0010be5c <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
10be5c: 55 push %ebp 10be5d: 89 e5 mov %esp,%ebp 10be5f: 53 push %ebx 10be60: 83 ec 04 sub $0x4,%esp
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10be63: 8b 1d b8 56 12 00 mov 0x1256b8,%ebx
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10be69: 81 fb bc 56 12 00 cmp $0x1256bc,%ebx
10be6f: 74 10 je 10be81 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN
10be71: 8d 76 00 lea 0x0(%esi),%esi
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
10be74: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10be77: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10be79: 81 fb bc 56 12 00 cmp $0x1256bc,%ebx
10be7f: 75 f3 jne 10be74 <_API_extensions_Run_postdriver+0x18><== NEVER TAKEN
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
10be81: 58 pop %eax 10be82: 5b pop %ebx 10be83: c9 leave 10be84: c3 ret
0010be88 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
10be88: 55 push %ebp 10be89: 89 e5 mov %esp,%ebp 10be8b: 53 push %ebx 10be8c: 83 ec 04 sub $0x4,%esp
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10be8f: 8b 1d b8 56 12 00 mov 0x1256b8,%ebx
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10be95: 81 fb bc 56 12 00 cmp $0x1256bc,%ebx
10be9b: 74 1c je 10beb9 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN
10be9d: 8d 76 00 lea 0x0(%esi),%esi
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
10bea0: 83 ec 0c sub $0xc,%esp 10bea3: ff 35 18 57 12 00 pushl 0x125718 10bea9: ff 53 0c call *0xc(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10beac: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10beae: 83 c4 10 add $0x10,%esp 10beb1: 81 fb bc 56 12 00 cmp $0x1256bc,%ebx
10beb7: 75 e7 jne 10bea0 <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10beb9: 8b 5d fc mov -0x4(%ebp),%ebx 10bebc: c9 leave 10bebd: c3 ret
00119880 <_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
)
{
119880: 55 push %ebp 119881: 89 e5 mov %esp,%ebp 119883: 57 push %edi 119884: 56 push %esi 119885: 53 push %ebx 119886: 83 ec 1c sub $0x1c,%esp 119889: 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 ) {
11988c: 8b 45 10 mov 0x10(%ebp),%eax 11988f: 39 43 4c cmp %eax,0x4c(%ebx)
119892: 72 60 jb 1198f4 <_CORE_message_queue_Broadcast+0x74><== NEVER TAKEN
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
119894: 8b 43 48 mov 0x48(%ebx),%eax 119897: 85 c0 test %eax,%eax
119899: 75 45 jne 1198e0 <_CORE_message_queue_Broadcast+0x60>
11989b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1198a2: eb 18 jmp 1198bc <_CORE_message_queue_Broadcast+0x3c>
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
1198a4: ff 45 e4 incl -0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
1198a7: 8b 42 2c mov 0x2c(%edx),%eax 1198aa: 89 c7 mov %eax,%edi 1198ac: 8b 75 0c mov 0xc(%ebp),%esi 1198af: 8b 4d 10 mov 0x10(%ebp),%ecx 1198b2: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
1198b4: 8b 42 28 mov 0x28(%edx),%eax 1198b7: 8b 55 10 mov 0x10(%ebp),%edx 1198ba: 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 =
1198bc: 83 ec 0c sub $0xc,%esp 1198bf: 53 push %ebx 1198c0: e8 e3 26 00 00 call 11bfa8 <_Thread_queue_Dequeue> 1198c5: 89 c2 mov %eax,%edx 1198c7: 83 c4 10 add $0x10,%esp 1198ca: 85 c0 test %eax,%eax
1198cc: 75 d6 jne 1198a4 <_CORE_message_queue_Broadcast+0x24>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
1198ce: 8b 55 e4 mov -0x1c(%ebp),%edx 1198d1: 8b 45 1c mov 0x1c(%ebp),%eax 1198d4: 89 10 mov %edx,(%eax)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
1198d6: 31 c0 xor %eax,%eax
}
1198d8: 8d 65 f4 lea -0xc(%ebp),%esp 1198db: 5b pop %ebx 1198dc: 5e pop %esi 1198dd: 5f pop %edi 1198de: c9 leave 1198df: c3 ret
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
*count = 0;
1198e0: 8b 55 1c mov 0x1c(%ebp),%edx 1198e3: c7 02 00 00 00 00 movl $0x0,(%edx)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
1198e9: 31 c0 xor %eax,%eax
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
1198eb: 8d 65 f4 lea -0xc(%ebp),%esp 1198ee: 5b pop %ebx 1198ef: 5e pop %esi 1198f0: 5f pop %edi 1198f1: c9 leave 1198f2: c3 ret 1198f3: 90 nop
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;
1198f4: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
1198f9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1198fc: 5b pop %ebx <== NOT EXECUTED 1198fd: 5e pop %esi <== NOT EXECUTED 1198fe: 5f pop %edi <== NOT EXECUTED 1198ff: c9 leave <== NOT EXECUTED 119900: c3 ret <== NOT EXECUTED
001149c0 <_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
)
{
1149c0: 55 push %ebp 1149c1: 89 e5 mov %esp,%ebp 1149c3: 57 push %edi 1149c4: 56 push %esi 1149c5: 53 push %ebx 1149c6: 83 ec 0c sub $0xc,%esp 1149c9: 8b 5d 08 mov 0x8(%ebp),%ebx 1149cc: 8b 75 10 mov 0x10(%ebp),%esi 1149cf: 8b 45 14 mov 0x14(%ebp),%eax
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
1149d2: 89 73 44 mov %esi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
1149d5: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
1149dc: 89 43 4c mov %eax,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)) {
1149df: a8 03 test $0x3,%al
1149e1: 74 15 je 1149f8 <_CORE_message_queue_Initialize+0x38>
allocated_message_size += sizeof(uint32_t);
1149e3: 8d 50 04 lea 0x4(%eax),%edx
allocated_message_size &= ~(sizeof(uint32_t) - 1);
1149e6: 83 e2 fc and $0xfffffffc,%edx
}
if (allocated_message_size < maximum_message_size)
1149e9: 39 d0 cmp %edx,%eax
1149eb: 76 0d jbe 1149fa <_CORE_message_queue_Initialize+0x3a><== ALWAYS TAKEN
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
return false;
1149ed: 31 c0 xor %eax,%eax
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
1149ef: 8d 65 f4 lea -0xc(%ebp),%esp 1149f2: 5b pop %ebx 1149f3: 5e pop %esi 1149f4: 5f pop %edi 1149f5: c9 leave 1149f6: c3 ret 1149f7: 90 nop
/*
* 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)) {
1149f8: 89 c2 mov %eax,%edx
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
1149fa: 8d 7a 10 lea 0x10(%edx),%edi
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
1149fd: 89 f8 mov %edi,%eax 1149ff: 0f af c6 imul %esi,%eax
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
114a02: 39 d0 cmp %edx,%eax
114a04: 72 e7 jb 1149ed <_CORE_message_queue_Initialize+0x2d><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
114a06: 83 ec 0c sub $0xc,%esp 114a09: 50 push %eax 114a0a: e8 c1 29 00 00 call 1173d0 <_Workspace_Allocate>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
114a0f: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
114a12: 83 c4 10 add $0x10,%esp 114a15: 85 c0 test %eax,%eax
114a17: 74 d4 je 1149ed <_CORE_message_queue_Initialize+0x2d>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
114a19: 57 push %edi 114a1a: 56 push %esi 114a1b: 50 push %eax 114a1c: 8d 43 60 lea 0x60(%ebx),%eax 114a1f: 50 push %eax 114a20: e8 e7 46 00 00 call 11910c <_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 );
114a25: 8d 43 54 lea 0x54(%ebx),%eax 114a28: 89 43 50 mov %eax,0x50(%ebx)
head->next = tail;
head->previous = NULL;
114a2b: 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 );
114a32: 8d 43 50 lea 0x50(%ebx),%eax 114a35: 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(
114a38: 6a 06 push $0x6 114a3a: 68 80 00 00 00 push $0x80 114a3f: 8b 45 0c mov 0xc(%ebp),%eax 114a42: 83 38 01 cmpl $0x1,(%eax) 114a45: 0f 94 c0 sete %al 114a48: 0f b6 c0 movzbl %al,%eax 114a4b: 50 push %eax 114a4c: 53 push %ebx 114a4d: e8 92 20 00 00 call 116ae4 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
114a52: 83 c4 20 add $0x20,%esp 114a55: b0 01 mov $0x1,%al
}
114a57: 8d 65 f4 lea -0xc(%ebp),%esp 114a5a: 5b pop %ebx 114a5b: 5e pop %esi 114a5c: 5f pop %edi 114a5d: c9 leave 114a5e: c3 ret
00110594 <_CORE_message_queue_Insert_message>:
void _CORE_message_queue_Insert_message(
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message,
CORE_message_queue_Submit_types submit_type
)
{
110594: 55 push %ebp 110595: 89 e5 mov %esp,%ebp 110597: 56 push %esi 110598: 53 push %ebx 110599: 8b 45 08 mov 0x8(%ebp),%eax 11059c: 8b 55 0c mov 0xc(%ebp),%edx
#endif
_CORE_message_queue_Set_message_priority( the_message, submit_type );
#if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
_ISR_Disable( level );
11059f: 9c pushf 1105a0: fa cli 1105a1: 5b pop %ebx
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
1105a2: ff 40 48 incl 0x48(%eax)
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST )
1105a5: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp)
1105ac: 74 1a je 1105c8 <_CORE_message_queue_Insert_message+0x34>
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
1105ae: 8d 48 50 lea 0x50(%eax),%ecx 1105b1: 89 4a 04 mov %ecx,0x4(%edx)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
1105b4: 8b 48 50 mov 0x50(%eax),%ecx
after_node->next = the_node;
1105b7: 89 50 50 mov %edx,0x50(%eax)
the_node->next = before_node;
1105ba: 89 0a mov %ecx,(%edx)
before_node->previous = the_node;
1105bc: 89 51 04 mov %edx,0x4(%ecx)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
1105bf: 53 push %ebx 1105c0: 9d popf
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
#endif
}
1105c1: 5b pop %ebx 1105c2: 5e pop %esi 1105c3: c9 leave 1105c4: c3 ret 1105c5: 8d 76 00 lea 0x0(%esi),%esi
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
1105c8: 8b 48 58 mov 0x58(%eax),%ecx
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
1105cb: 8d 70 54 lea 0x54(%eax),%esi 1105ce: 89 32 mov %esi,(%edx)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
1105d0: 89 50 58 mov %edx,0x58(%eax)
old_last->next = the_node;
1105d3: 89 11 mov %edx,(%ecx)
the_node->previous = old_last;
1105d5: 89 4a 04 mov %ecx,0x4(%edx) 1105d8: eb e5 jmp 1105bf <_CORE_message_queue_Insert_message+0x2b>
0010bff0 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
10bff0: 55 push %ebp 10bff1: 89 e5 mov %esp,%ebp 10bff3: 57 push %edi 10bff4: 56 push %esi 10bff5: 53 push %ebx 10bff6: 83 ec 0c sub $0xc,%esp 10bff9: 8b 5d 08 mov 0x8(%ebp),%ebx 10bffc: 8b 75 0c mov 0xc(%ebp),%esi
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
10bfff: 8b 45 10 mov 0x10(%ebp),%eax 10c002: 39 43 4c cmp %eax,0x4c(%ebx)
10c005: 72 51 jb 10c058 <_CORE_message_queue_Submit+0x68>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
10c007: 8b 43 48 mov 0x48(%ebx),%eax 10c00a: 85 c0 test %eax,%eax
10c00c: 74 5a je 10c068 <_CORE_message_queue_Submit+0x78>
/*
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
if ( the_message_queue->number_of_pending_messages <
10c00e: 39 43 44 cmp %eax,0x44(%ebx)
10c011: 77 0d ja 10c020 <_CORE_message_queue_Submit+0x30>
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
#if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND)
return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY;
10c013: b8 02 00 00 00 mov $0x2,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c018: 8d 65 f4 lea -0xc(%ebp),%esp 10c01b: 5b pop %ebx 10c01c: 5e pop %esi 10c01d: 5f pop %edi 10c01e: c9 leave 10c01f: c3 ret
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get( &the_message_queue->Inactive_messages );
10c020: 83 ec 0c sub $0xc,%esp 10c023: 8d 43 60 lea 0x60(%ebx),%eax 10c026: 50 push %eax 10c027: e8 a0 ff ff ff call 10bfcc <_Chain_Get> 10c02c: 89 c2 mov %eax,%edx
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
#endif
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
10c02e: 8d 40 0c lea 0xc(%eax),%eax
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10c031: 89 c7 mov %eax,%edi 10c033: 8b 4d 10 mov 0x10(%ebp),%ecx 10c036: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
size
);
the_message->Contents.size = size;
10c038: 8b 4d 10 mov 0x10(%ebp),%ecx 10c03b: 89 4a 08 mov %ecx,0x8(%edx)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
10c03e: 83 c4 0c add $0xc,%esp 10c041: ff 75 1c pushl 0x1c(%ebp) 10c044: 52 push %edx 10c045: 53 push %ebx 10c046: e8 49 45 00 00 call 110594 <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
10c04b: 83 c4 10 add $0x10,%esp 10c04e: 31 c0 xor %eax,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c050: 8d 65 f4 lea -0xc(%ebp),%esp 10c053: 5b pop %ebx 10c054: 5e pop %esi 10c055: 5f pop %edi 10c056: c9 leave 10c057: c3 ret
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
10c058: b8 01 00 00 00 mov $0x1,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c05d: 8d 65 f4 lea -0xc(%ebp),%esp 10c060: 5b pop %ebx 10c061: 5e pop %esi 10c062: 5f pop %edi 10c063: c9 leave 10c064: c3 ret 10c065: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
10c068: 83 ec 0c sub $0xc,%esp 10c06b: 53 push %ebx 10c06c: e8 1b 1b 00 00 call 10db8c <_Thread_queue_Dequeue> 10c071: 89 c2 mov %eax,%edx
if ( the_thread ) {
10c073: 83 c4 10 add $0x10,%esp 10c076: 85 c0 test %eax,%eax
10c078: 74 1e je 10c098 <_CORE_message_queue_Submit+0xa8>
10c07a: 8b 40 2c mov 0x2c(%eax),%eax 10c07d: 89 c7 mov %eax,%edi 10c07f: 8b 4d 10 mov 0x10(%ebp),%ecx 10c082: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
10c084: 8b 42 28 mov 0x28(%edx),%eax 10c087: 8b 4d 10 mov 0x10(%ebp),%ecx 10c08a: 89 08 mov %ecx,(%eax)
the_thread->Wait.count = (uint32_t) submit_type;
10c08c: 8b 45 1c mov 0x1c(%ebp),%eax 10c08f: 89 42 24 mov %eax,0x24(%edx)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
10c092: 31 c0 xor %eax,%eax 10c094: eb 82 jmp 10c018 <_CORE_message_queue_Submit+0x28> 10c096: 66 90 xchg %ax,%ax
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
if ( the_thread ) {
10c098: 8b 43 48 mov 0x48(%ebx),%eax 10c09b: e9 6e ff ff ff jmp 10c00e <_CORE_message_queue_Submit+0x1e>
0010c0ac <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
10c0ac: 55 push %ebp 10c0ad: 89 e5 mov %esp,%ebp 10c0af: 57 push %edi 10c0b0: 56 push %esi 10c0b1: 53 push %ebx 10c0b2: 83 ec 0c sub $0xc,%esp 10c0b5: 8b 45 08 mov 0x8(%ebp),%eax 10c0b8: 8b 5d 0c mov 0xc(%ebp),%ebx 10c0bb: 8b 55 10 mov 0x10(%ebp),%edx
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
10c0be: 8d 78 40 lea 0x40(%eax),%edi 10c0c1: b9 04 00 00 00 mov $0x4,%ecx 10c0c6: 89 de mov %ebx,%esi 10c0c8: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_mutex->lock = initial_lock;
10c0ca: 89 50 50 mov %edx,0x50(%eax)
the_mutex->blocked_count = 0;
10c0cd: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
if ( initial_lock == CORE_MUTEX_LOCKED ) {
10c0d4: 85 d2 test %edx,%edx
10c0d6: 75 30 jne 10c108 <_CORE_mutex_Initialize+0x5c>
the_mutex->nest_count = 1;
10c0d8: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
the_mutex->holder = _Thread_Executing;
10c0df: 8b 15 18 57 12 00 mov 0x125718,%edx 10c0e5: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = _Thread_Executing->Object.id;
10c0e8: 8b 4a 08 mov 0x8(%edx),%ecx 10c0eb: 89 48 60 mov %ecx,0x60(%eax)
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c0ee: 8b 48 48 mov 0x48(%eax),%ecx
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10c0f1: 83 f9 02 cmp $0x2,%ecx
10c0f4: 74 05 je 10c0fb <_CORE_mutex_Initialize+0x4f>
10c0f6: 83 f9 03 cmp $0x3,%ecx
10c0f9: 75 22 jne 10c11d <_CORE_mutex_Initialize+0x71>
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
10c0fb: 8b 48 4c mov 0x4c(%eax),%ecx 10c0fe: 39 4a 14 cmp %ecx,0x14(%edx)
10c101: 72 41 jb 10c144 <_CORE_mutex_Initialize+0x98>
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
10c103: ff 42 1c incl 0x1c(%edx) 10c106: eb 15 jmp 10c11d <_CORE_mutex_Initialize+0x71>
}
} else {
the_mutex->nest_count = 0;
10c108: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
the_mutex->holder = NULL;
10c10f: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
the_mutex->holder_id = 0;
10c116: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
}
_Thread_queue_Initialize(
10c11d: 6a 05 push $0x5 10c11f: 68 00 04 00 00 push $0x400 10c124: 31 d2 xor %edx,%edx 10c126: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c12a: 0f 95 c2 setne %dl 10c12d: 52 push %edx 10c12e: 50 push %eax 10c12f: e8 e8 1d 00 00 call 10df1c <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c134: 83 c4 10 add $0x10,%esp 10c137: 31 c0 xor %eax,%eax
}
10c139: 8d 65 f4 lea -0xc(%ebp),%esp 10c13c: 5b pop %ebx 10c13d: 5e pop %esi 10c13e: 5f pop %edi 10c13f: c9 leave 10c140: c3 ret 10c141: 8d 76 00 lea 0x0(%esi),%esi
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
the_mutex->Attributes.priority_ceiling )
return CORE_MUTEX_STATUS_CEILING_VIOLATED;
10c144: b8 06 00 00 00 mov $0x6,%eax
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c149: 8d 65 f4 lea -0xc(%ebp),%esp 10c14c: 5b pop %ebx 10c14d: 5e pop %esi 10c14e: 5f pop %edi 10c14f: c9 leave 10c150: c3 ret
0010c1a4 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10c1a4: 55 push %ebp 10c1a5: 89 e5 mov %esp,%ebp 10c1a7: 53 push %ebx 10c1a8: 83 ec 14 sub $0x14,%esp 10c1ab: 8b 5d 08 mov 0x8(%ebp),%ebx 10c1ae: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c1b1: a1 50 54 12 00 mov 0x125450,%eax 10c1b6: 85 c0 test %eax,%eax
10c1b8: 74 04 je 10c1be <_CORE_mutex_Seize+0x1a>
10c1ba: 84 d2 test %dl,%dl
10c1bc: 75 36 jne 10c1f4 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN
10c1be: 83 ec 08 sub $0x8,%esp 10c1c1: 8d 45 18 lea 0x18(%ebp),%eax 10c1c4: 50 push %eax 10c1c5: 53 push %ebx 10c1c6: 88 55 f4 mov %dl,-0xc(%ebp) 10c1c9: e8 0e 44 00 00 call 1105dc <_CORE_mutex_Seize_interrupt_trylock> 10c1ce: 83 c4 10 add $0x10,%esp 10c1d1: 85 c0 test %eax,%eax 10c1d3: 8a 55 f4 mov -0xc(%ebp),%dl
10c1d6: 74 14 je 10c1ec <_CORE_mutex_Seize+0x48>
10c1d8: 84 d2 test %dl,%dl
10c1da: 75 30 jne 10c20c <_CORE_mutex_Seize+0x68>
10c1dc: ff 75 18 pushl 0x18(%ebp) 10c1df: 9d popf 10c1e0: a1 18 57 12 00 mov 0x125718,%eax 10c1e5: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
}
10c1ec: 8b 5d fc mov -0x4(%ebp),%ebx 10c1ef: c9 leave 10c1f0: c3 ret 10c1f1: 8d 76 00 lea 0x0(%esi),%esi
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c1f4: 83 3d 20 56 12 00 01 cmpl $0x1,0x125620
10c1fb: 76 c1 jbe 10c1be <_CORE_mutex_Seize+0x1a>
10c1fd: 53 push %ebx 10c1fe: 6a 12 push $0x12 10c200: 6a 00 push $0x0 10c202: 6a 00 push $0x0 10c204: e8 23 06 00 00 call 10c82c <_Internal_error_Occurred> 10c209: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c20c: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c213: a1 18 57 12 00 mov 0x125718,%eax 10c218: 89 58 44 mov %ebx,0x44(%eax) 10c21b: 8b 55 0c mov 0xc(%ebp),%edx 10c21e: 89 50 20 mov %edx,0x20(%eax) 10c221: a1 50 54 12 00 mov 0x125450,%eax 10c226: 40 inc %eax 10c227: a3 50 54 12 00 mov %eax,0x125450 10c22c: ff 75 18 pushl 0x18(%ebp) 10c22f: 9d popf 10c230: 83 ec 08 sub $0x8,%esp 10c233: ff 75 14 pushl 0x14(%ebp) 10c236: 53 push %ebx 10c237: e8 18 ff ff ff call 10c154 <_CORE_mutex_Seize_interrupt_blocking> 10c23c: 83 c4 10 add $0x10,%esp
}
10c23f: 8b 5d fc mov -0x4(%ebp),%ebx 10c242: c9 leave 10c243: c3 ret
001105dc <_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
)
{
1105dc: 55 push %ebp 1105dd: 89 e5 mov %esp,%ebp 1105df: 56 push %esi 1105e0: 53 push %ebx 1105e1: 8b 45 08 mov 0x8(%ebp),%eax 1105e4: 8b 4d 0c mov 0xc(%ebp),%ecx
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
1105e7: 8b 15 18 57 12 00 mov 0x125718,%edx
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
1105ed: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
1105f4: 8b 58 50 mov 0x50(%eax),%ebx 1105f7: 85 db test %ebx,%ebx
1105f9: 74 31 je 11062c <_CORE_mutex_Seize_interrupt_trylock+0x50>
the_mutex->lock = CORE_MUTEX_LOCKED;
1105fb: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
the_mutex->holder = executing;
110602: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = executing->Object.id;
110605: 8b 5a 08 mov 0x8(%edx),%ebx 110608: 89 58 60 mov %ebx,0x60(%eax)
the_mutex->nest_count = 1;
11060b: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); }
110612: 8b 58 48 mov 0x48(%eax),%ebx
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
110615: 83 fb 02 cmp $0x2,%ebx
110618: 74 26 je 110640 <_CORE_mutex_Seize_interrupt_trylock+0x64>
11061a: 83 fb 03 cmp $0x3,%ebx
11061d: 74 3d je 11065c <_CORE_mutex_Seize_interrupt_trylock+0x80>
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
11061f: ff 31 pushl (%ecx) 110621: 9d popf
return 0;
110622: 31 c0 xor %eax,%eax 110624: 8d 65 f8 lea -0x8(%ebp),%esp 110627: 5b pop %ebx 110628: 5e pop %esi 110629: c9 leave 11062a: c3 ret 11062b: 90 nop
/*
* 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 ) ) {
11062c: 3b 50 5c cmp 0x5c(%eax),%edx
11062f: 74 17 je 110648 <_CORE_mutex_Seize_interrupt_trylock+0x6c>
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
110631: b8 01 00 00 00 mov $0x1,%eax 110636: 8d 65 f8 lea -0x8(%ebp),%esp 110639: 5b pop %ebx 11063a: 5e pop %esi 11063b: c9 leave 11063c: c3 ret 11063d: 8d 76 00 lea 0x0(%esi),%esi
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
110640: ff 42 1c incl 0x1c(%edx) 110643: eb da jmp 11061f <_CORE_mutex_Seize_interrupt_trylock+0x43> 110645: 8d 76 00 lea 0x0(%esi),%esi
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
110648: 8b 58 40 mov 0x40(%eax),%ebx 11064b: 85 db test %ebx,%ebx
11064d: 75 45 jne 110694 <_CORE_mutex_Seize_interrupt_trylock+0xb8>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
11064f: ff 40 54 incl 0x54(%eax)
_ISR_Enable( *level_p );
110652: ff 31 pushl (%ecx) 110654: 9d popf
return 0;
110655: 31 c0 xor %eax,%eax 110657: eb dd jmp 110636 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110659: 8d 76 00 lea 0x0(%esi),%esi
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
11065c: 8b 5a 1c mov 0x1c(%edx),%ebx 11065f: 8d 73 01 lea 0x1(%ebx),%esi 110662: 89 72 1c mov %esi,0x1c(%edx)
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
110665: 8b 72 14 mov 0x14(%edx),%esi 110668: 39 70 4c cmp %esi,0x4c(%eax)
11066b: 74 6b je 1106d8 <_CORE_mutex_Seize_interrupt_trylock+0xfc>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
11066d: 72 39 jb 1106a8 <_CORE_mutex_Seize_interrupt_trylock+0xcc>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
11066f: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
110676: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax)
the_mutex->nest_count = 0; /* undo locking above */
11067d: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
executing->resource_count--; /* undo locking above */
110684: 89 5a 1c mov %ebx,0x1c(%edx)
_ISR_Enable( *level_p );
110687: ff 31 pushl (%ecx) 110689: 9d popf
return 0;
11068a: 31 c0 xor %eax,%eax 11068c: 8d 65 f8 lea -0x8(%ebp),%esp 11068f: 5b pop %ebx 110690: 5e pop %esi 110691: c9 leave 110692: c3 ret 110693: 90 nop
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
110694: 4b dec %ebx
110695: 75 9a jne 110631 <_CORE_mutex_Seize_interrupt_trylock+0x55><== ALWAYS TAKEN
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
110697: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) <== NOT EXECUTED
_ISR_Enable( *level_p );
11069e: ff 31 pushl (%ecx) <== NOT EXECUTED 1106a0: 9d popf <== NOT EXECUTED
return 0;
1106a1: 31 c0 xor %eax,%eax <== NOT EXECUTED 1106a3: eb 91 jmp 110636 <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED 1106a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
1106a8: 8b 15 50 54 12 00 mov 0x125450,%edx 1106ae: 42 inc %edx 1106af: 89 15 50 54 12 00 mov %edx,0x125450
return 0;
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
1106b5: ff 31 pushl (%ecx) 1106b7: 9d popf
_Thread_Change_priority(
1106b8: 52 push %edx 1106b9: 6a 00 push $0x0 1106bb: ff 70 4c pushl 0x4c(%eax) 1106be: ff 70 5c pushl 0x5c(%eax) 1106c1: e8 82 cc ff ff call 10d348 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
1106c6: e8 31 d1 ff ff call 10d7fc <_Thread_Enable_dispatch> 1106cb: 83 c4 10 add $0x10,%esp
return 0;
1106ce: 31 c0 xor %eax,%eax 1106d0: e9 61 ff ff ff jmp 110636 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 1106d5: 8d 76 00 lea 0x0(%esi),%esi
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
1106d8: ff 31 pushl (%ecx) 1106da: 9d popf
return 0;
1106db: 31 c0 xor %eax,%eax 1106dd: e9 54 ff ff ff jmp 110636 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
0010c244 <_CORE_mutex_Surrender>:
#else
Objects_Id id __attribute__((unused)),
CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused))
#endif
)
{
10c244: 55 push %ebp 10c245: 89 e5 mov %esp,%ebp 10c247: 53 push %ebx 10c248: 83 ec 04 sub $0x4,%esp 10c24b: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
Thread_Control *holder;
holder = the_mutex->holder;
10c24e: 8b 43 5c mov 0x5c(%ebx),%eax
* allowed when the mutex in quetion is FIFO or simple Priority
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
10c251: 80 7b 44 00 cmpb $0x0,0x44(%ebx)
10c255: 74 15 je 10c26c <_CORE_mutex_Surrender+0x28>
if ( !_Thread_Is_executing( holder ) )
10c257: 3b 05 18 57 12 00 cmp 0x125718,%eax
10c25d: 74 0d je 10c26c <_CORE_mutex_Surrender+0x28>
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
10c25f: b8 03 00 00 00 mov $0x3,%eax
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c264: 8b 5d fc mov -0x4(%ebp),%ebx 10c267: c9 leave 10c268: c3 ret 10c269: 8d 76 00 lea 0x0(%esi),%esi
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
10c26c: 8b 53 54 mov 0x54(%ebx),%edx 10c26f: 85 d2 test %edx,%edx
10c271: 74 51 je 10c2c4 <_CORE_mutex_Surrender+0x80>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
10c273: 4a dec %edx 10c274: 89 53 54 mov %edx,0x54(%ebx)
if ( the_mutex->nest_count != 0 ) {
10c277: 85 d2 test %edx,%edx
10c279: 75 49 jne 10c2c4 <_CORE_mutex_Surrender+0x80>
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c27b: 8b 53 48 mov 0x48(%ebx),%edx
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10c27e: 83 fa 02 cmp $0x2,%edx
10c281: 74 69 je 10c2ec <_CORE_mutex_Surrender+0xa8>
10c283: 83 fa 03 cmp $0x3,%edx
10c286: 74 64 je 10c2ec <_CORE_mutex_Surrender+0xa8>
if ( holder->resource_count == 0 &&
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
}
}
the_mutex->holder = NULL;
10c288: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
the_mutex->holder_id = 0;
10c28f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
/*
* Now we check if another thread was waiting for this mutex. If so,
* transfer the mutex to that thread.
*/
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
10c296: 83 ec 0c sub $0xc,%esp 10c299: 53 push %ebx 10c29a: e8 ed 18 00 00 call 10db8c <_Thread_queue_Dequeue> 10c29f: 83 c4 10 add $0x10,%esp 10c2a2: 85 c0 test %eax,%eax
10c2a4: 74 7a je 10c320 <_CORE_mutex_Surrender+0xdc>
} else
#endif
{
the_mutex->holder = the_thread;
10c2a6: 89 43 5c mov %eax,0x5c(%ebx)
the_mutex->holder_id = the_thread->Object.id;
10c2a9: 8b 50 08 mov 0x8(%eax),%edx 10c2ac: 89 53 60 mov %edx,0x60(%ebx)
the_mutex->nest_count = 1;
10c2af: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx)
switch ( the_mutex->Attributes.discipline ) {
10c2b6: 8b 53 48 mov 0x48(%ebx),%edx 10c2b9: 83 fa 02 cmp $0x2,%edx
10c2bc: 74 56 je 10c314 <_CORE_mutex_Surrender+0xd0>
10c2be: 83 fa 03 cmp $0x3,%edx
10c2c1: 74 09 je 10c2cc <_CORE_mutex_Surrender+0x88>
10c2c3: 90 nop
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c2c4: 31 c0 xor %eax,%eax
}
10c2c6: 8b 5d fc mov -0x4(%ebp),%ebx 10c2c9: c9 leave 10c2ca: c3 ret 10c2cb: 90 nop
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
10c2cc: ff 40 1c incl 0x1c(%eax)
if (the_mutex->Attributes.priority_ceiling <
10c2cf: 8b 53 4c mov 0x4c(%ebx),%edx 10c2d2: 3b 50 14 cmp 0x14(%eax),%edx
10c2d5: 73 ed jae 10c2c4 <_CORE_mutex_Surrender+0x80>
the_thread->current_priority){
_Thread_Change_priority(
10c2d7: 51 push %ecx 10c2d8: 6a 00 push $0x0 10c2da: 52 push %edx 10c2db: 50 push %eax 10c2dc: e8 67 10 00 00 call 10d348 <_Thread_Change_priority> 10c2e1: 83 c4 10 add $0x10,%esp
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c2e4: 31 c0 xor %eax,%eax 10c2e6: e9 79 ff ff ff jmp 10c264 <_CORE_mutex_Surrender+0x20> 10c2eb: 90 nop
_CORE_mutex_Pop_priority( the_mutex, holder );
if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL )
return pop_status;
holder->resource_count--;
10c2ec: 8b 50 1c mov 0x1c(%eax),%edx 10c2ef: 4a dec %edx 10c2f0: 89 50 1c mov %edx,0x1c(%eax)
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( holder->resource_count == 0 &&
10c2f3: 85 d2 test %edx,%edx
10c2f5: 75 91 jne 10c288 <_CORE_mutex_Surrender+0x44>
holder->real_priority != holder->current_priority ) {
10c2f7: 8b 50 18 mov 0x18(%eax),%edx
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( holder->resource_count == 0 &&
10c2fa: 3b 50 14 cmp 0x14(%eax),%edx
10c2fd: 74 89 je 10c288 <_CORE_mutex_Surrender+0x44>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
10c2ff: 51 push %ecx 10c300: 6a 01 push $0x1 10c302: 52 push %edx 10c303: 50 push %eax 10c304: e8 3f 10 00 00 call 10d348 <_Thread_Change_priority> 10c309: 83 c4 10 add $0x10,%esp 10c30c: e9 77 ff ff ff jmp 10c288 <_CORE_mutex_Surrender+0x44> 10c311: 8d 76 00 lea 0x0(%esi),%esi
case CORE_MUTEX_DISCIPLINES_FIFO:
case CORE_MUTEX_DISCIPLINES_PRIORITY:
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
10c314: ff 40 1c incl 0x1c(%eax)
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c317: 31 c0 xor %eax,%eax
case CORE_MUTEX_DISCIPLINES_PRIORITY:
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
break;
10c319: e9 46 ff ff ff jmp 10c264 <_CORE_mutex_Surrender+0x20> 10c31e: 66 90 xchg %ax,%ax
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10c320: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx)
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c327: 31 c0 xor %eax,%eax 10c329: e9 36 ff ff ff jmp 10c264 <_CORE_mutex_Surrender+0x20>
0010c37c <_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
)
{
10c37c: 55 push %ebp 10c37d: 89 e5 mov %esp,%ebp 10c37f: 53 push %ebx 10c380: 83 ec 10 sub $0x10,%esp 10c383: 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)) ) {
10c386: 53 push %ebx 10c387: e8 00 18 00 00 call 10db8c <_Thread_queue_Dequeue> 10c38c: 83 c4 10 add $0x10,%esp 10c38f: 85 c0 test %eax,%eax
10c391: 74 09 je 10c39c <_CORE_semaphore_Surrender+0x20>
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c393: 31 c0 xor %eax,%eax
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
10c395: 8b 5d fc mov -0x4(%ebp),%ebx 10c398: c9 leave 10c399: c3 ret 10c39a: 66 90 xchg %ax,%ax
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10c39c: 9c pushf 10c39d: fa cli 10c39e: 5a pop %edx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10c39f: 8b 43 48 mov 0x48(%ebx),%eax 10c3a2: 3b 43 40 cmp 0x40(%ebx),%eax
10c3a5: 72 0d jb 10c3b4 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10c3a7: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
_ISR_Enable( level );
10c3ac: 52 push %edx 10c3ad: 9d popf
}
return status;
}
10c3ae: 8b 5d fc mov -0x4(%ebp),%ebx 10c3b1: c9 leave 10c3b2: c3 ret 10c3b3: 90 nop
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
10c3b4: 40 inc %eax 10c3b5: 89 43 48 mov %eax,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c3b8: 31 c0 xor %eax,%eax 10c3ba: eb f0 jmp 10c3ac <_CORE_semaphore_Surrender+0x30>
0010c654 <_Chain_Get_with_empty_check>:
bool _Chain_Get_with_empty_check(
Chain_Control *chain,
Chain_Node **node
)
{
10c654: 55 push %ebp 10c655: 89 e5 mov %esp,%ebp 10c657: 57 push %edi 10c658: 56 push %esi 10c659: 53 push %ebx 10c65a: 8b 45 08 mov 0x8(%ebp),%eax 10c65d: 8b 7d 0c mov 0xc(%ebp),%edi
ISR_Level level;
bool is_empty_now;
_ISR_Disable( level );
10c660: 9c pushf 10c661: fa cli 10c662: 5e pop %esi
Chain_Node **the_node
)
{
bool is_empty_now = true;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c663: 8d 58 04 lea 0x4(%eax),%ebx
Chain_Node *old_first = head->next;
10c666: 8b 10 mov (%eax),%edx
if ( old_first != tail ) {
10c668: 39 d3 cmp %edx,%ebx
10c66a: 74 18 je 10c684 <_Chain_Get_with_empty_check+0x30>
Chain_Node *new_first = old_first->next;
10c66c: 8b 0a mov (%edx),%ecx
head->next = new_first;
10c66e: 89 08 mov %ecx,(%eax)
new_first->previous = head;
10c670: 89 41 04 mov %eax,0x4(%ecx)
*the_node = old_first;
10c673: 89 17 mov %edx,(%edi)
is_empty_now = new_first == tail;
10c675: 39 cb cmp %ecx,%ebx 10c677: 0f 94 c0 sete %al
is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node ); _ISR_Enable( level );
10c67a: 56 push %esi 10c67b: 9d popf
return is_empty_now;
}
10c67c: 5b pop %ebx 10c67d: 5e pop %esi 10c67e: 5f pop %edi 10c67f: c9 leave 10c680: c3 ret 10c681: 8d 76 00 lea 0x0(%esi),%esi
} else
*the_node = NULL;
10c684: c7 07 00 00 00 00 movl $0x0,(%edi)
RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected(
Chain_Control *the_chain,
Chain_Node **the_node
)
{
bool is_empty_now = true;
10c68a: b0 01 mov $0x1,%al 10c68c: eb ec jmp 10c67a <_Chain_Get_with_empty_check+0x26>
00110538 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
110538: 55 push %ebp 110539: 89 e5 mov %esp,%ebp 11053b: 57 push %edi 11053c: 56 push %esi 11053d: 53 push %ebx 11053e: 83 ec 08 sub $0x8,%esp 110541: 8b 7d 08 mov 0x8(%ebp),%edi 110544: 8b 4d 10 mov 0x10(%ebp),%ecx 110547: 8b 75 14 mov 0x14(%ebp),%esi
size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain );
11054a: 8d 47 04 lea 0x4(%edi),%eax 11054d: 89 45 f0 mov %eax,-0x10(%ebp)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
110550: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
while ( count-- ) {
110557: 85 c9 test %ecx,%ecx
110559: 74 35 je 110590 <_Chain_Initialize+0x58><== NEVER TAKEN
11055b: 49 dec %ecx 11055c: 89 4d ec mov %ecx,-0x14(%ebp)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
11055f: 8b 45 0c mov 0xc(%ebp),%eax
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
110562: 89 fa mov %edi,%edx 110564: eb 07 jmp 11056d <_Chain_Initialize+0x35> 110566: 66 90 xchg %ax,%ax
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
110568: 89 c2 mov %eax,%edx
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
11056a: 89 d8 mov %ebx,%eax 11056c: 49 dec %ecx
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
11056d: 89 02 mov %eax,(%edx)
next->previous = current;
11056f: 89 50 04 mov %edx,0x4(%eax)
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
110572: 8d 1c 30 lea (%eax,%esi,1),%ebx
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
110575: 85 c9 test %ecx,%ecx
110577: 75 ef jne 110568 <_Chain_Initialize+0x30>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
110579: 0f af 75 ec imul -0x14(%ebp),%esi 11057d: 03 75 0c add 0xc(%ebp),%esi
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
110580: 8b 45 f0 mov -0x10(%ebp),%eax 110583: 89 06 mov %eax,(%esi)
tail->previous = current;
110585: 89 77 08 mov %esi,0x8(%edi)
}
110588: 83 c4 08 add $0x8,%esp 11058b: 5b pop %ebx 11058c: 5e pop %esi 11058d: 5f pop %edi 11058e: c9 leave 11058f: c3 ret
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
110590: 89 fe mov %edi,%esi <== NOT EXECUTED 110592: eb ec jmp 110580 <_Chain_Initialize+0x48><== NOT EXECUTED
0010b070 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
10b070: 55 push %ebp 10b071: 89 e5 mov %esp,%ebp 10b073: 57 push %edi 10b074: 56 push %esi 10b075: 53 push %ebx 10b076: 83 ec 2c sub $0x2c,%esp 10b079: 8b 45 08 mov 0x8(%ebp),%eax 10b07c: 8b 4d 0c mov 0xc(%ebp),%ecx 10b07f: 8b 55 10 mov 0x10(%ebp),%edx 10b082: 89 55 dc mov %edx,-0x24(%ebp) 10b085: 8b 7d 14 mov 0x14(%ebp),%edi
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
10b088: 8b 1d 18 57 12 00 mov 0x125718,%ebx
executing->Wait.return_code = RTEMS_SUCCESSFUL;
10b08e: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10b095: 8b b3 e4 00 00 00 mov 0xe4(%ebx),%esi
_ISR_Disable( level );
10b09b: 9c pushf 10b09c: fa cli 10b09d: 8f 45 e0 popl -0x20(%ebp)
pending_events = api->pending_events;
10b0a0: 8b 16 mov (%esi),%edx 10b0a2: 89 55 d4 mov %edx,-0x2c(%ebp)
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
10b0a5: 21 c2 and %eax,%edx 10b0a7: 89 55 e4 mov %edx,-0x1c(%ebp)
10b0aa: 74 0d je 10b0b9 <_Event_Seize+0x49>
10b0ac: 39 d0 cmp %edx,%eax
10b0ae: 0f 84 84 00 00 00 je 10b138 <_Event_Seize+0xc8>
(seized_events == event_in || _Options_Is_any( option_set )) ) {
10b0b4: f6 c1 02 test $0x2,%cl
10b0b7: 75 7f jne 10b138 <_Event_Seize+0xc8>
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
10b0b9: f6 c1 01 test $0x1,%cl
10b0bc: 75 62 jne 10b120 <_Event_Seize+0xb0> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set;
10b0be: 89 4b 30 mov %ecx,0x30(%ebx)
executing->Wait.count = (uint32_t) event_in;
10b0c1: 89 43 24 mov %eax,0x24(%ebx)
executing->Wait.return_argument = event_out;
10b0c4: 89 7b 28 mov %edi,0x28(%ebx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10b0c7: c7 05 80 57 12 00 01 movl $0x1,0x125780
10b0ce: 00 00 00
_ISR_Enable( level );
10b0d1: ff 75 e0 pushl -0x20(%ebp) 10b0d4: 9d popf
if ( ticks ) {
10b0d5: 8b 45 dc mov -0x24(%ebp),%eax 10b0d8: 85 c0 test %eax,%eax
10b0da: 0f 85 80 00 00 00 jne 10b160 <_Event_Seize+0xf0>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
10b0e0: 83 ec 08 sub $0x8,%esp 10b0e3: 68 00 01 00 00 push $0x100 10b0e8: 53 push %ebx 10b0e9: e8 4e 2f 00 00 call 10e03c <_Thread_Set_state>
_ISR_Disable( level );
10b0ee: 9c pushf 10b0ef: fa cli 10b0f0: 5a pop %edx
sync_state = _Event_Sync_state;
10b0f1: a1 80 57 12 00 mov 0x125780,%eax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10b0f6: c7 05 80 57 12 00 00 movl $0x0,0x125780
10b0fd: 00 00 00
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
10b100: 83 c4 10 add $0x10,%esp 10b103: 83 f8 01 cmp $0x1,%eax
10b106: 74 4c je 10b154 <_Event_Seize+0xe4> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level );
10b108: 89 55 10 mov %edx,0x10(%ebp) 10b10b: 89 5d 0c mov %ebx,0xc(%ebp) 10b10e: 89 45 08 mov %eax,0x8(%ebp)
}
10b111: 8d 65 f4 lea -0xc(%ebp),%esp 10b114: 5b pop %ebx 10b115: 5e pop %esi 10b116: 5f pop %edi 10b117: c9 leave
* An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level );
10b118: e9 df 21 00 00 jmp 10d2fc <_Thread_blocking_operation_Cancel> 10b11d: 8d 76 00 lea 0x0(%esi),%esi
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
10b120: ff 75 e0 pushl -0x20(%ebp) 10b123: 9d popf
executing->Wait.return_code = RTEMS_UNSATISFIED;
10b124: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx)
*event_out = seized_events;
10b12b: 8b 55 e4 mov -0x1c(%ebp),%edx 10b12e: 89 17 mov %edx,(%edi)
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
10b130: 8d 65 f4 lea -0xc(%ebp),%esp 10b133: 5b pop %ebx 10b134: 5e pop %esi 10b135: 5f pop %edi 10b136: c9 leave 10b137: c3 ret
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
10b138: 8b 45 e4 mov -0x1c(%ebp),%eax 10b13b: f7 d0 not %eax 10b13d: 23 45 d4 and -0x2c(%ebp),%eax 10b140: 89 06 mov %eax,(%esi)
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
10b142: ff 75 e0 pushl -0x20(%ebp) 10b145: 9d popf
*event_out = seized_events;
10b146: 8b 45 e4 mov -0x1c(%ebp),%eax 10b149: 89 07 mov %eax,(%edi)
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
10b14b: 8d 65 f4 lea -0xc(%ebp),%esp 10b14e: 5b pop %ebx 10b14f: 5e pop %esi 10b150: 5f pop %edi 10b151: c9 leave 10b152: c3 ret 10b153: 90 nop
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
10b154: 52 push %edx 10b155: 9d popf
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
10b156: 8d 65 f4 lea -0xc(%ebp),%esp 10b159: 5b pop %ebx 10b15a: 5e pop %esi 10b15b: 5f pop %edi 10b15c: c9 leave 10b15d: c3 ret 10b15e: 66 90 xchg %ax,%ax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
10b160: 8b 43 08 mov 0x8(%ebx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b163: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10b16a: c7 43 64 14 b3 10 00 movl $0x10b314,0x64(%ebx)
the_watchdog->id = id;
10b171: 89 43 68 mov %eax,0x68(%ebx)
the_watchdog->user_data = user_data;
10b174: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b17b: 8b 45 dc mov -0x24(%ebp),%eax 10b17e: 89 43 54 mov %eax,0x54(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b181: 83 ec 08 sub $0x8,%esp
&executing->Timer,
_Event_Timeout,
executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
10b184: 8d 43 48 lea 0x48(%ebx),%eax 10b187: 50 push %eax 10b188: 68 5c 55 12 00 push $0x12555c 10b18d: e8 16 34 00 00 call 10e5a8 <_Watchdog_Insert> 10b192: 83 c4 10 add $0x10,%esp 10b195: e9 46 ff ff ff jmp 10b0e0 <_Event_Seize+0x70>
0010b1f0 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
10b1f0: 55 push %ebp 10b1f1: 89 e5 mov %esp,%ebp 10b1f3: 57 push %edi 10b1f4: 56 push %esi 10b1f5: 53 push %ebx 10b1f6: 83 ec 2c sub $0x2c,%esp 10b1f9: 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 ];
10b1fc: 8b 8b e4 00 00 00 mov 0xe4(%ebx),%ecx
option_set = (rtems_option) the_thread->Wait.option;
10b202: 8b 7b 30 mov 0x30(%ebx),%edi
_ISR_Disable( level );
10b205: 9c pushf 10b206: fa cli 10b207: 8f 45 d4 popl -0x2c(%ebp)
pending_events = api->pending_events;
10b20a: 8b 11 mov (%ecx),%edx
event_condition = (rtems_event_set) the_thread->Wait.count;
10b20c: 8b 43 24 mov 0x24(%ebx),%eax
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
10b20f: 89 c6 mov %eax,%esi 10b211: 21 d6 and %edx,%esi 10b213: 89 75 e4 mov %esi,-0x1c(%ebp)
10b216: 74 74 je 10b28c <_Event_Surrender+0x9c>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
10b218: 8b 35 14 57 12 00 mov 0x125714,%esi 10b21e: 85 f6 test %esi,%esi
10b220: 74 0c je 10b22e <_Event_Surrender+0x3e>
10b222: 3b 1d 18 57 12 00 cmp 0x125718,%ebx
10b228: 0f 84 96 00 00 00 je 10b2c4 <_Event_Surrender+0xd4>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
10b22e: f6 43 11 01 testb $0x1,0x11(%ebx)
10b232: 74 4c je 10b280 <_Event_Surrender+0x90>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
10b234: 3b 45 e4 cmp -0x1c(%ebp),%eax
10b237: 74 05 je 10b23e <_Event_Surrender+0x4e>
10b239: 83 e7 02 and $0x2,%edi
10b23c: 74 42 je 10b280 <_Event_Surrender+0x90> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
10b23e: 8b 45 e4 mov -0x1c(%ebp),%eax 10b241: f7 d0 not %eax 10b243: 21 d0 and %edx,%eax 10b245: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
10b247: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b24e: 8b 43 28 mov 0x28(%ebx),%eax 10b251: 8b 75 e4 mov -0x1c(%ebp),%esi 10b254: 89 30 mov %esi,(%eax)
_ISR_Flash( level );
10b256: ff 75 d4 pushl -0x2c(%ebp) 10b259: 9d popf 10b25a: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10b25b: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10b25f: 74 37 je 10b298 <_Event_Surrender+0xa8>
_ISR_Enable( level );
10b261: ff 75 d4 pushl -0x2c(%ebp) 10b264: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b265: 83 ec 08 sub $0x8,%esp 10b268: 68 f8 ff 03 10 push $0x1003fff8 10b26d: 53 push %ebx 10b26e: e8 09 22 00 00 call 10d47c <_Thread_Clear_state> 10b273: 83 c4 10 add $0x10,%esp
}
return;
}
}
_ISR_Enable( level );
}
10b276: 8d 65 f4 lea -0xc(%ebp),%esp 10b279: 5b pop %ebx 10b27a: 5e pop %esi 10b27b: 5f pop %edi 10b27c: c9 leave 10b27d: c3 ret 10b27e: 66 90 xchg %ax,%ax
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
10b280: ff 75 d4 pushl -0x2c(%ebp) 10b283: 9d popf
}
10b284: 8d 65 f4 lea -0xc(%ebp),%esp 10b287: 5b pop %ebx 10b288: 5e pop %esi 10b289: 5f pop %edi 10b28a: c9 leave 10b28b: c3 ret
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
10b28c: ff 75 d4 pushl -0x2c(%ebp) 10b28f: 9d popf
}
return;
}
}
_ISR_Enable( level );
}
10b290: 8d 65 f4 lea -0xc(%ebp),%esp 10b293: 5b pop %ebx 10b294: 5e pop %esi 10b295: 5f pop %edi 10b296: c9 leave 10b297: c3 ret
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10b298: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10b29f: ff 75 d4 pushl -0x2c(%ebp) 10b2a2: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10b2a3: 83 ec 0c sub $0xc,%esp 10b2a6: 8d 43 48 lea 0x48(%ebx),%eax 10b2a9: 50 push %eax 10b2aa: e8 31 34 00 00 call 10e6e0 <_Watchdog_Remove> 10b2af: 58 pop %eax 10b2b0: 5a pop %edx 10b2b1: 68 f8 ff 03 10 push $0x1003fff8 10b2b6: 53 push %ebx 10b2b7: e8 c0 21 00 00 call 10d47c <_Thread_Clear_state> 10b2bc: 83 c4 10 add $0x10,%esp 10b2bf: eb c3 jmp 10b284 <_Event_Surrender+0x94> 10b2c1: 8d 76 00 lea 0x0(%esi),%esi
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
10b2c4: 8b 35 80 57 12 00 mov 0x125780,%esi
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
10b2ca: 83 fe 02 cmp $0x2,%esi
10b2cd: 74 0d je 10b2dc <_Event_Surrender+0xec> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
10b2cf: 8b 35 80 57 12 00 mov 0x125780,%esi
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
10b2d5: 4e dec %esi
10b2d6: 0f 85 52 ff ff ff jne 10b22e <_Event_Surrender+0x3e>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
10b2dc: 3b 45 e4 cmp -0x1c(%ebp),%eax
10b2df: 74 05 je 10b2e6 <_Event_Surrender+0xf6>
10b2e1: 83 e7 02 and $0x2,%edi
10b2e4: 74 22 je 10b308 <_Event_Surrender+0x118><== NEVER TAKEN
10b2e6: 8b 45 e4 mov -0x1c(%ebp),%eax 10b2e9: f7 d0 not %eax 10b2eb: 21 d0 and %edx,%eax 10b2ed: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
10b2ef: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b2f6: 8b 43 28 mov 0x28(%ebx),%eax 10b2f9: 8b 55 e4 mov -0x1c(%ebp),%edx 10b2fc: 89 10 mov %edx,(%eax)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
10b2fe: c7 05 80 57 12 00 03 movl $0x3,0x125780
10b305: 00 00 00
}
_ISR_Enable( level );
10b308: ff 75 d4 pushl -0x2c(%ebp) 10b30b: 9d popf
return;
10b30c: e9 73 ff ff ff jmp 10b284 <_Event_Surrender+0x94>
0010b314 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
10b314: 55 push %ebp 10b315: 89 e5 mov %esp,%ebp 10b317: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
10b31a: 8d 45 f4 lea -0xc(%ebp),%eax 10b31d: 50 push %eax 10b31e: ff 75 08 pushl 0x8(%ebp) 10b321: e8 fa 24 00 00 call 10d820 <_Thread_Get>
switch ( location ) {
10b326: 83 c4 10 add $0x10,%esp 10b329: 8b 55 f4 mov -0xc(%ebp),%edx 10b32c: 85 d2 test %edx,%edx
10b32e: 75 37 jne 10b367 <_Event_Timeout+0x53> <== NEVER TAKEN
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
10b330: 9c pushf 10b331: fa cli 10b332: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
10b333: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
10b33a: 3b 05 18 57 12 00 cmp 0x125718,%eax
10b340: 74 2a je 10b36c <_Event_Timeout+0x58>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
10b342: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
10b349: 52 push %edx 10b34a: 9d popf 10b34b: 83 ec 08 sub $0x8,%esp 10b34e: 68 f8 ff 03 10 push $0x1003fff8 10b353: 50 push %eax 10b354: e8 23 21 00 00 call 10d47c <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10b359: a1 50 54 12 00 mov 0x125450,%eax 10b35e: 48 dec %eax 10b35f: a3 50 54 12 00 mov %eax,0x125450
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
10b364: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b367: c9 leave 10b368: c3 ret 10b369: 8d 76 00 lea 0x0(%esi),%esi
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
10b36c: 8b 0d 80 57 12 00 mov 0x125780,%ecx 10b372: 49 dec %ecx
10b373: 75 cd jne 10b342 <_Event_Timeout+0x2e>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10b375: c7 05 80 57 12 00 02 movl $0x2,0x125780
10b37c: 00 00 00
10b37f: eb c1 jmp 10b342 <_Event_Timeout+0x2e>
00110740 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
110740: 55 push %ebp 110741: 89 e5 mov %esp,%ebp 110743: 57 push %edi 110744: 56 push %esi 110745: 53 push %ebx 110746: 83 ec 2c sub $0x2c,%esp 110749: 8b 7d 0c mov 0xc(%ebp),%edi
Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
11074c: 8d 47 04 lea 0x4(%edi),%eax 11074f: 89 45 dc mov %eax,-0x24(%ebp)
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
110752: 8b 55 08 mov 0x8(%ebp),%edx 110755: 8b 52 10 mov 0x10(%edx),%edx 110758: 89 55 cc mov %edx,-0x34(%ebp)
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
11075b: 39 c7 cmp %eax,%edi
11075d: 0f 87 69 01 00 00 ja 1108cc <_Heap_Allocate_aligned_with_boundary+0x18c>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
110763: 8b 5d 14 mov 0x14(%ebp),%ebx 110766: 85 db test %ebx,%ebx
110768: 0f 85 56 01 00 00 jne 1108c4 <_Heap_Allocate_aligned_with_boundary+0x184>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
11076e: 8b 45 08 mov 0x8(%ebp),%eax 110771: 8b 48 08 mov 0x8(%eax),%ecx
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
110774: 39 c8 cmp %ecx,%eax
110776: 0f 84 50 01 00 00 je 1108cc <_Heap_Allocate_aligned_with_boundary+0x18c>
11077c: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp)
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
110783: 8b 55 cc mov -0x34(%ebp),%edx 110786: 83 c2 07 add $0x7,%edx 110789: 89 55 c8 mov %edx,-0x38(%ebp)
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
11078c: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp) 110793: 29 7d d0 sub %edi,-0x30(%ebp) 110796: eb 1e jmp 1107b6 <_Heap_Allocate_aligned_with_boundary+0x76>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
110798: 8d 59 08 lea 0x8(%ecx),%ebx
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
11079b: 85 db test %ebx,%ebx
11079d: 0f 85 f1 00 00 00 jne 110894 <_Heap_Allocate_aligned_with_boundary+0x154><== ALWAYS TAKEN
break;
}
block = block->next;
1107a3: 8b 49 08 mov 0x8(%ecx),%ecx 1107a6: 8b 45 e4 mov -0x1c(%ebp),%eax 1107a9: 40 inc %eax
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
1107aa: 39 4d 08 cmp %ecx,0x8(%ebp)
1107ad: 0f 84 25 01 00 00 je 1108d8 <_Heap_Allocate_aligned_with_boundary+0x198>
1107b3: 89 45 e4 mov %eax,-0x1c(%ebp)
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
1107b6: 8b 59 04 mov 0x4(%ecx),%ebx 1107b9: 39 5d dc cmp %ebx,-0x24(%ebp)
1107bc: 73 e5 jae 1107a3 <_Heap_Allocate_aligned_with_boundary+0x63>
if ( alignment == 0 ) {
1107be: 8b 55 10 mov 0x10(%ebp),%edx 1107c1: 85 d2 test %edx,%edx
1107c3: 74 d3 je 110798 <_Heap_Allocate_aligned_with_boundary+0x58>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
1107c5: 8b 45 08 mov 0x8(%ebp),%eax 1107c8: 8b 40 14 mov 0x14(%eax),%eax 1107cb: 89 45 d8 mov %eax,-0x28(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
1107ce: 83 e3 fe and $0xfffffffe,%ebx
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
1107d1: 8d 1c 19 lea (%ecx,%ebx,1),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
1107d4: 8d 51 08 lea 0x8(%ecx),%edx 1107d7: 89 55 d4 mov %edx,-0x2c(%ebp)
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
1107da: 8b 75 c8 mov -0x38(%ebp),%esi 1107dd: 29 c6 sub %eax,%esi
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
1107df: 01 de add %ebx,%esi
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
1107e1: 03 5d d0 add -0x30(%ebp),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
1107e4: 89 d8 mov %ebx,%eax 1107e6: 31 d2 xor %edx,%edx 1107e8: f7 75 10 divl 0x10(%ebp) 1107eb: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
1107ed: 39 de cmp %ebx,%esi
1107ef: 73 0b jae 1107fc <_Heap_Allocate_aligned_with_boundary+0xbc>
1107f1: 89 f0 mov %esi,%eax 1107f3: 31 d2 xor %edx,%edx 1107f5: f7 75 10 divl 0x10(%ebp) 1107f8: 89 f3 mov %esi,%ebx 1107fa: 29 d3 sub %edx,%ebx
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
1107fc: 8b 45 14 mov 0x14(%ebp),%eax 1107ff: 85 c0 test %eax,%eax
110801: 74 5b je 11085e <_Heap_Allocate_aligned_with_boundary+0x11e>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
110803: 8d 34 3b lea (%ebx,%edi,1),%esi 110806: 89 f0 mov %esi,%eax 110808: 31 d2 xor %edx,%edx 11080a: f7 75 14 divl 0x14(%ebp) 11080d: 89 f0 mov %esi,%eax 11080f: 29 d0 sub %edx,%eax
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
110811: 39 c3 cmp %eax,%ebx
110813: 73 49 jae 11085e <_Heap_Allocate_aligned_with_boundary+0x11e>
110815: 39 c6 cmp %eax,%esi
110817: 76 45 jbe 11085e <_Heap_Allocate_aligned_with_boundary+0x11e>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
110819: 8b 55 d4 mov -0x2c(%ebp),%edx 11081c: 01 fa add %edi,%edx 11081e: 89 55 e0 mov %edx,-0x20(%ebp)
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
110821: 39 c2 cmp %eax,%edx
110823: 0f 87 7a ff ff ff ja 1107a3 <_Heap_Allocate_aligned_with_boundary+0x63>
110829: 89 ce mov %ecx,%esi 11082b: eb 10 jmp 11083d <_Heap_Allocate_aligned_with_boundary+0xfd> 11082d: 8d 76 00 lea 0x0(%esi),%esi
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
110830: 39 c1 cmp %eax,%ecx
110832: 76 28 jbe 11085c <_Heap_Allocate_aligned_with_boundary+0x11c>
if ( boundary_line < boundary_floor ) {
110834: 39 45 e0 cmp %eax,-0x20(%ebp)
110837: 0f 87 9f 00 00 00 ja 1108dc <_Heap_Allocate_aligned_with_boundary+0x19c><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
11083d: 89 c3 mov %eax,%ebx 11083f: 29 fb sub %edi,%ebx 110841: 89 d8 mov %ebx,%eax 110843: 31 d2 xor %edx,%edx 110845: f7 75 10 divl 0x10(%ebp) 110848: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
11084a: 8d 0c 3b lea (%ebx,%edi,1),%ecx 11084d: 89 c8 mov %ecx,%eax 11084f: 31 d2 xor %edx,%edx 110851: f7 75 14 divl 0x14(%ebp) 110854: 89 c8 mov %ecx,%eax 110856: 29 d0 sub %edx,%eax
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
110858: 39 c3 cmp %eax,%ebx
11085a: 72 d4 jb 110830 <_Heap_Allocate_aligned_with_boundary+0xf0>
11085c: 89 f1 mov %esi,%ecx
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
11085e: 39 5d d4 cmp %ebx,-0x2c(%ebp)
110861: 0f 87 3c ff ff ff ja 1107a3 <_Heap_Allocate_aligned_with_boundary+0x63>
110867: be f8 ff ff ff mov $0xfffffff8,%esi 11086c: 29 ce sub %ecx,%esi
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
11086e: 01 de add %ebx,%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
110870: 89 d8 mov %ebx,%eax 110872: 31 d2 xor %edx,%edx 110874: f7 75 cc divl -0x34(%ebp)
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
110877: 29 d6 sub %edx,%esi
if ( free_size >= min_block_size || free_size == 0 ) {
110879: 39 75 d8 cmp %esi,-0x28(%ebp)
11087c: 0f 86 19 ff ff ff jbe 11079b <_Heap_Allocate_aligned_with_boundary+0x5b>
110882: 85 f6 test %esi,%esi
110884: 0f 85 19 ff ff ff jne 1107a3 <_Heap_Allocate_aligned_with_boundary+0x63>
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
11088a: 85 db test %ebx,%ebx
11088c: 0f 84 11 ff ff ff je 1107a3 <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN
110892: 66 90 xchg %ax,%ax
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
110894: 8b 45 08 mov 0x8(%ebp),%eax 110897: ff 40 48 incl 0x48(%eax)
stats->searches += search_count;
11089a: 8b 55 e4 mov -0x1c(%ebp),%edx 11089d: 01 50 4c add %edx,0x4c(%eax)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
1108a0: 57 push %edi 1108a1: 53 push %ebx 1108a2: 51 push %ecx 1108a3: 50 push %eax 1108a4: e8 8f be ff ff call 10c738 <_Heap_Block_allocate> 1108a9: 89 d8 mov %ebx,%eax 1108ab: 83 c4 10 add $0x10,%esp
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
1108ae: 8b 55 e4 mov -0x1c(%ebp),%edx 1108b1: 8b 4d 08 mov 0x8(%ebp),%ecx 1108b4: 39 51 44 cmp %edx,0x44(%ecx)
1108b7: 73 15 jae 1108ce <_Heap_Allocate_aligned_with_boundary+0x18e>
stats->max_search = search_count;
1108b9: 89 51 44 mov %edx,0x44(%ecx)
}
return (void *) alloc_begin;
}
1108bc: 8d 65 f4 lea -0xc(%ebp),%esp 1108bf: 5b pop %ebx 1108c0: 5e pop %esi 1108c1: 5f pop %edi 1108c2: c9 leave 1108c3: c3 ret
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
1108c4: 3b 7d 14 cmp 0x14(%ebp),%edi
1108c7: 76 1a jbe 1108e3 <_Heap_Allocate_aligned_with_boundary+0x1a3>
1108c9: 8d 76 00 lea 0x0(%esi),%esi
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
1108cc: 31 c0 xor %eax,%eax
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
1108ce: 8d 65 f4 lea -0xc(%ebp),%esp 1108d1: 5b pop %ebx 1108d2: 5e pop %esi 1108d3: 5f pop %edi 1108d4: c9 leave 1108d5: c3 ret 1108d6: 66 90 xchg %ax,%ax
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
1108d8: 31 c0 xor %eax,%eax 1108da: eb d2 jmp 1108ae <_Heap_Allocate_aligned_with_boundary+0x16e>
1108dc: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1108de: e9 c0 fe ff ff jmp 1107a3 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
1108e3: 8b 4d 10 mov 0x10(%ebp),%ecx 1108e6: 85 c9 test %ecx,%ecx
1108e8: 0f 85 80 fe ff ff jne 11076e <_Heap_Allocate_aligned_with_boundary+0x2e>
alignment = page_size;
1108ee: 89 55 10 mov %edx,0x10(%ebp) 1108f1: e9 78 fe ff ff jmp 11076e <_Heap_Allocate_aligned_with_boundary+0x2e>
00110cc4 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
110cc4: 55 push %ebp 110cc5: 89 e5 mov %esp,%ebp 110cc7: 57 push %edi 110cc8: 56 push %esi 110cc9: 53 push %ebx 110cca: 83 ec 4c sub $0x4c,%esp 110ccd: 8b 5d 08 mov 0x8(%ebp),%ebx 110cd0: 8b 4d 10 mov 0x10(%ebp),%ecx
Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block;
110cd3: 8b 43 20 mov 0x20(%ebx),%eax 110cd6: 89 45 d0 mov %eax,-0x30(%ebp)
Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL;
110cd9: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
Heap_Block *extend_last_block = NULL;
110ce0: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
uintptr_t const page_size = heap->page_size;
110ce7: 8b 53 10 mov 0x10(%ebx),%edx 110cea: 89 55 d4 mov %edx,-0x2c(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
110ced: 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;
110cf0: 8b 73 30 mov 0x30(%ebx),%esi 110cf3: 89 75 c0 mov %esi,-0x40(%ebp)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
110cf6: 8b 55 0c mov 0xc(%ebp),%edx 110cf9: 01 ca add %ecx,%edx 110cfb: 89 55 cc mov %edx,-0x34(%ebp)
110cfe: 73 0c jae 110d0c <_Heap_Extend+0x48>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
110d00: 31 c0 xor %eax,%eax
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
110d02: 8d 65 f4 lea -0xc(%ebp),%esp 110d05: 5b pop %ebx 110d06: 5e pop %esi 110d07: 5f pop %edi 110d08: c9 leave 110d09: c3 ret 110d0a: 66 90 xchg %ax,%ax
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
110d0c: 83 ec 08 sub $0x8,%esp 110d0f: 8d 55 e0 lea -0x20(%ebp),%edx 110d12: 52 push %edx 110d13: 8d 55 e4 lea -0x1c(%ebp),%edx 110d16: 52 push %edx 110d17: 50 push %eax 110d18: ff 75 d4 pushl -0x2c(%ebp) 110d1b: 51 push %ecx 110d1c: ff 75 0c pushl 0xc(%ebp) 110d1f: e8 20 bc ff ff call 10c944 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
110d24: 83 c4 20 add $0x20,%esp 110d27: 84 c0 test %al,%al
110d29: 74 d5 je 110d00 <_Heap_Extend+0x3c>
110d2b: 8b 7d d0 mov -0x30(%ebp),%edi 110d2e: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 110d35: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) 110d3c: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 110d43: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 110d4a: 8b 75 cc mov -0x34(%ebp),%esi 110d4d: 89 5d b4 mov %ebx,-0x4c(%ebp) 110d50: eb 30 jmp 110d82 <_Heap_Extend+0xbe> 110d52: 66 90 xchg %ax,%ax
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
110d54: 39 ce cmp %ecx,%esi
110d56: 73 03 jae 110d5b <_Heap_Extend+0x97>
110d58: 89 7d b8 mov %edi,-0x48(%ebp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
110d5b: 8d 59 f8 lea -0x8(%ecx),%ebx 110d5e: 89 c8 mov %ecx,%eax 110d60: 31 d2 xor %edx,%edx 110d62: f7 75 d4 divl -0x2c(%ebp)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
110d65: 29 d3 sub %edx,%ebx
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
110d67: 3b 4d 0c cmp 0xc(%ebp),%ecx
110d6a: 74 3c je 110da8 <_Heap_Extend+0xe4>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
110d6c: 39 4d 0c cmp %ecx,0xc(%ebp)
110d6f: 76 03 jbe 110d74 <_Heap_Extend+0xb0>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
110d71: 89 5d bc mov %ebx,-0x44(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
110d74: 8b 7b 04 mov 0x4(%ebx),%edi 110d77: 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);
110d7a: 8d 3c 3b lea (%ebx,%edi,1),%edi
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
110d7d: 39 7d d0 cmp %edi,-0x30(%ebp)
110d80: 74 39 je 110dbb <_Heap_Extend+0xf7>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
110d82: 3b 7d d0 cmp -0x30(%ebp),%edi
110d85: 0f 84 35 01 00 00 je 110ec0 <_Heap_Extend+0x1fc>
110d8b: 89 f8 mov %edi,%eax
uintptr_t const sub_area_end = start_block->prev_size;
110d8d: 8b 0f mov (%edi),%ecx
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
110d8f: 39 4d 0c cmp %ecx,0xc(%ebp)
110d92: 73 08 jae 110d9c <_Heap_Extend+0xd8>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
110d94: 39 f0 cmp %esi,%eax
110d96: 0f 82 64 ff ff ff jb 110d00 <_Heap_Extend+0x3c>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
110d9c: 39 f0 cmp %esi,%eax
110d9e: 75 b4 jne 110d54 <_Heap_Extend+0x90>
110da0: 89 7d c4 mov %edi,-0x3c(%ebp) 110da3: eb b6 jmp 110d5b <_Heap_Extend+0x97> 110da5: 8d 76 00 lea 0x0(%esi),%esi
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
start_block->prev_size = extend_area_end;
110da8: 89 37 mov %esi,(%edi)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
110daa: 89 5d c8 mov %ebx,-0x38(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
110dad: 8b 7b 04 mov 0x4(%ebx),%edi 110db0: 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);
110db3: 8d 3c 3b lea (%ebx,%edi,1),%edi
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
110db6: 39 7d d0 cmp %edi,-0x30(%ebp)
110db9: 75 c7 jne 110d82 <_Heap_Extend+0xbe> <== NEVER TAKEN
110dbb: 8b 5d b4 mov -0x4c(%ebp),%ebx
if ( extend_area_begin < heap->area_begin ) {
110dbe: 8b 75 0c mov 0xc(%ebp),%esi 110dc1: 3b 73 18 cmp 0x18(%ebx),%esi
110dc4: 0f 82 02 01 00 00 jb 110ecc <_Heap_Extend+0x208>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
110dca: 8b 45 cc mov -0x34(%ebp),%eax 110dcd: 3b 43 1c cmp 0x1c(%ebx),%eax
110dd0: 76 03 jbe 110dd5 <_Heap_Extend+0x111>
heap->area_end = extend_area_end;
110dd2: 89 43 1c mov %eax,0x1c(%ebx)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
110dd5: 8b 55 e0 mov -0x20(%ebp),%edx 110dd8: 8b 45 e4 mov -0x1c(%ebp),%eax
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
110ddb: 89 d1 mov %edx,%ecx 110ddd: 29 c1 sub %eax,%ecx
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
110ddf: 8b 75 cc mov -0x34(%ebp),%esi 110de2: 89 30 mov %esi,(%eax)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
110de4: 89 ce mov %ecx,%esi 110de6: 83 ce 01 or $0x1,%esi 110de9: 89 70 04 mov %esi,0x4(%eax)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
110dec: 89 0a mov %ecx,(%edx)
extend_last_block->size_and_flag = 0;
110dee: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
110df5: 39 43 20 cmp %eax,0x20(%ebx)
110df8: 0f 86 d6 00 00 00 jbe 110ed4 <_Heap_Extend+0x210>
heap->first_block = extend_first_block;
110dfe: 89 43 20 mov %eax,0x20(%ebx)
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
110e01: 8b 75 c4 mov -0x3c(%ebp),%esi 110e04: 85 f6 test %esi,%esi
110e06: 0f 84 04 01 00 00 je 110f10 <_Heap_Extend+0x24c>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
110e0c: 8b 73 10 mov 0x10(%ebx),%esi
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
110e0f: 8b 4d 0c mov 0xc(%ebp),%ecx 110e12: 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;
110e15: 89 c8 mov %ecx,%eax 110e17: 31 d2 xor %edx,%edx 110e19: f7 f6 div %esi
if ( remainder != 0 ) {
110e1b: 85 d2 test %edx,%edx
110e1d: 74 04 je 110e23 <_Heap_Extend+0x15f> <== ALWAYS TAKEN
return value - remainder + alignment;
110e1f: 01 f1 add %esi,%ecx <== NOT EXECUTED 110e21: 29 d1 sub %edx,%ecx <== NOT EXECUTED
uintptr_t const new_first_block_begin =
110e23: 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;
110e26: 8b 75 c4 mov -0x3c(%ebp),%esi 110e29: 8b 06 mov (%esi),%eax 110e2b: 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 =
110e2e: 89 f0 mov %esi,%eax 110e30: 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;
110e32: 83 c8 01 or $0x1,%eax 110e35: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
110e38: 89 d8 mov %ebx,%eax 110e3a: e8 69 fe ff ff call 110ca8 <_Heap_Free_block>
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
110e3f: 8b 45 c8 mov -0x38(%ebp),%eax 110e42: 85 c0 test %eax,%eax
110e44: 0f 84 9e 00 00 00 je 110ee8 <_Heap_Extend+0x224>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
110e4a: 8b 4d cc mov -0x34(%ebp),%ecx 110e4d: 83 e9 08 sub $0x8,%ecx
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
110e50: 2b 4d c8 sub -0x38(%ebp),%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
110e53: 89 c8 mov %ecx,%eax 110e55: 31 d2 xor %edx,%edx 110e57: f7 73 10 divl 0x10(%ebx) 110e5a: 29 d1 sub %edx,%ecx
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
110e5c: 8b 55 c8 mov -0x38(%ebp),%edx 110e5f: 8b 42 04 mov 0x4(%edx),%eax 110e62: 29 c8 sub %ecx,%eax
| HEAP_PREV_BLOCK_USED;
110e64: 83 c8 01 or $0x1,%eax 110e67: 89 44 11 04 mov %eax,0x4(%ecx,%edx,1)
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
110e6b: 8b 42 04 mov 0x4(%edx),%eax 110e6e: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
110e71: 09 c8 or %ecx,%eax 110e73: 89 42 04 mov %eax,0x4(%edx)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
110e76: 89 d8 mov %ebx,%eax 110e78: e8 2b fe ff ff call 110ca8 <_Heap_Free_block>
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
110e7d: 8b 75 c4 mov -0x3c(%ebp),%esi 110e80: 85 f6 test %esi,%esi
110e82: 0f 84 a4 00 00 00 je 110f2c <_Heap_Extend+0x268>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
110e88: 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(
110e8b: 8b 43 20 mov 0x20(%ebx),%eax 110e8e: 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;
110e90: 8b 4a 04 mov 0x4(%edx),%ecx 110e93: 83 e1 01 and $0x1,%ecx
block->size_and_flag = size | flag;
110e96: 09 c8 or %ecx,%eax 110e98: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
110e9b: 8b 43 30 mov 0x30(%ebx),%eax 110e9e: 2b 45 c0 sub -0x40(%ebp),%eax
/* Statistics */
stats->size += extended_size;
110ea1: 01 43 2c add %eax,0x2c(%ebx)
if ( extended_size_ptr != NULL )
110ea4: 8b 55 14 mov 0x14(%ebp),%edx 110ea7: 85 d2 test %edx,%edx
110ea9: 0f 84 99 00 00 00 je 110f48 <_Heap_Extend+0x284> <== NEVER TAKEN
*extended_size_ptr = extended_size;
110eaf: 8b 55 14 mov 0x14(%ebp),%edx 110eb2: 89 02 mov %eax,(%edx)
return true;
110eb4: b0 01 mov $0x1,%al
}
110eb6: 8d 65 f4 lea -0xc(%ebp),%esp 110eb9: 5b pop %ebx 110eba: 5e pop %esi 110ebb: 5f pop %edi 110ebc: c9 leave 110ebd: c3 ret 110ebe: 66 90 xchg %ax,%ax
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
110ec0: 8b 55 b4 mov -0x4c(%ebp),%edx 110ec3: 8b 42 18 mov 0x18(%edx),%eax 110ec6: e9 c2 fe ff ff jmp 110d8d <_Heap_Extend+0xc9> 110ecb: 90 nop
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
110ecc: 89 73 18 mov %esi,0x18(%ebx) 110ecf: e9 01 ff ff ff jmp 110dd5 <_Heap_Extend+0x111>
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
110ed4: 39 53 24 cmp %edx,0x24(%ebx)
110ed7: 0f 83 24 ff ff ff jae 110e01 <_Heap_Extend+0x13d>
heap->last_block = extend_last_block;
110edd: 89 53 24 mov %edx,0x24(%ebx) 110ee0: e9 1c ff ff ff jmp 110e01 <_Heap_Extend+0x13d> 110ee5: 8d 76 00 lea 0x0(%esi),%esi
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
110ee8: 8b 7d bc mov -0x44(%ebp),%edi 110eeb: 85 ff test %edi,%edi
110eed: 74 8e je 110e7d <_Heap_Extend+0x1b9>
_Heap_Link_above(
110eef: 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 );
110ef2: 8b 45 e4 mov -0x1c(%ebp),%eax 110ef5: 2b 45 bc sub -0x44(%ebp),%eax
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
110ef8: 8b 75 bc mov -0x44(%ebp),%esi 110efb: 8b 56 04 mov 0x4(%esi),%edx 110efe: 83 e2 01 and $0x1,%edx
block->size_and_flag = size | flag;
110f01: 09 d0 or %edx,%eax 110f03: 89 46 04 mov %eax,0x4(%esi)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
110f06: 83 49 04 01 orl $0x1,0x4(%ecx) 110f0a: e9 6e ff ff ff jmp 110e7d <_Heap_Extend+0x1b9> 110f0f: 90 nop
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 ) {
110f10: 8b 4d b8 mov -0x48(%ebp),%ecx 110f13: 85 c9 test %ecx,%ecx
110f15: 0f 84 24 ff ff ff je 110e3f <_Heap_Extend+0x17b>
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
110f1b: 8b 45 b8 mov -0x48(%ebp),%eax 110f1e: 29 d0 sub %edx,%eax 110f20: 83 c8 01 or $0x1,%eax 110f23: 89 42 04 mov %eax,0x4(%edx) 110f26: e9 14 ff ff ff jmp 110e3f <_Heap_Extend+0x17b> 110f2b: 90 nop
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
110f2c: 8b 4d c8 mov -0x38(%ebp),%ecx 110f2f: 85 c9 test %ecx,%ecx
110f31: 0f 85 51 ff ff ff jne 110e88 <_Heap_Extend+0x1c4>
_Heap_Free_block( heap, extend_first_block );
110f37: 8b 55 e4 mov -0x1c(%ebp),%edx 110f3a: 89 d8 mov %ebx,%eax 110f3c: e8 67 fd ff ff call 110ca8 <_Heap_Free_block> 110f41: e9 42 ff ff ff jmp 110e88 <_Heap_Extend+0x1c4> 110f46: 66 90 xchg %ax,%ax
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
110f48: b0 01 mov $0x1,%al <== NOT EXECUTED 110f4a: e9 b3 fd ff ff jmp 110d02 <_Heap_Extend+0x3e> <== NOT EXECUTED
001108f8 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
1108f8: 55 push %ebp 1108f9: 89 e5 mov %esp,%ebp 1108fb: 57 push %edi 1108fc: 56 push %esi 1108fd: 53 push %ebx 1108fe: 83 ec 10 sub $0x10,%esp 110901: 8b 5d 08 mov 0x8(%ebp),%ebx 110904: 8b 45 0c mov 0xc(%ebp),%eax 110907: 8d 48 f8 lea -0x8(%eax),%ecx 11090a: 31 d2 xor %edx,%edx 11090c: 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);
11090f: 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
110911: 8b 43 20 mov 0x20(%ebx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
110914: 39 c1 cmp %eax,%ecx
110916: 72 07 jb 11091f <_Heap_Free+0x27>
110918: 8b 73 24 mov 0x24(%ebx),%esi 11091b: 39 f1 cmp %esi,%ecx
11091d: 76 0d jbe 11092c <_Heap_Free+0x34>
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
_HAssert( false );
return( false );
11091f: 31 c0 xor %eax,%eax
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
110921: 83 c4 10 add $0x10,%esp 110924: 5b pop %ebx 110925: 5e pop %esi 110926: 5f pop %edi 110927: c9 leave 110928: c3 ret 110929: 8d 76 00 lea 0x0(%esi),%esi 11092c: 8b 51 04 mov 0x4(%ecx),%edx 11092f: 89 55 f0 mov %edx,-0x10(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
110932: 83 e2 fe and $0xfffffffe,%edx 110935: 89 55 ec mov %edx,-0x14(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
110938: 8d 14 11 lea (%ecx,%edx,1),%edx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11093b: 39 d0 cmp %edx,%eax
11093d: 77 e0 ja 11091f <_Heap_Free+0x27> <== NEVER TAKEN
11093f: 39 d6 cmp %edx,%esi
110941: 72 dc jb 11091f <_Heap_Free+0x27> <== NEVER TAKEN
110943: 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 ) ) {
110946: f7 c7 01 00 00 00 test $0x1,%edi
11094c: 74 d1 je 11091f <_Heap_Free+0x27> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
11094e: 83 e7 fe and $0xfffffffe,%edi 110951: 89 7d e4 mov %edi,-0x1c(%ebp)
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
110954: 39 d6 cmp %edx,%esi
110956: 0f 84 c8 00 00 00 je 110a24 <_Heap_Free+0x12c>
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
11095c: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 110961: 0f 94 45 eb sete -0x15(%ebp)
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
110965: f6 45 f0 01 testb $0x1,-0x10(%ebp)
110969: 75 45 jne 1109b0 <_Heap_Free+0xb8>
uintptr_t const prev_size = block->prev_size;
11096b: 8b 39 mov (%ecx),%edi 11096d: 89 7d f0 mov %edi,-0x10(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
110970: 29 f9 sub %edi,%ecx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
110972: 39 c8 cmp %ecx,%eax
110974: 77 a9 ja 11091f <_Heap_Free+0x27> <== NEVER TAKEN
110976: 39 ce cmp %ecx,%esi
110978: 72 a5 jb 11091f <_Heap_Free+0x27> <== NEVER TAKEN
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
11097a: f6 41 04 01 testb $0x1,0x4(%ecx)
11097e: 74 9f je 11091f <_Heap_Free+0x27> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
110980: 80 7d eb 00 cmpb $0x0,-0x15(%ebp)
110984: 0f 84 a6 00 00 00 je 110a30 <_Heap_Free+0x138>
uintptr_t const size = block_size + prev_size + next_block_size;
11098a: 8b 7d e4 mov -0x1c(%ebp),%edi 11098d: 03 7d ec add -0x14(%ebp),%edi 110990: 03 7d f0 add -0x10(%ebp),%edi
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
110993: 8b 42 08 mov 0x8(%edx),%eax 110996: 8b 52 0c mov 0xc(%edx),%edx
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
110999: 89 42 08 mov %eax,0x8(%edx)
next->prev = prev;
11099c: 89 50 0c mov %edx,0xc(%eax)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
11099f: ff 4b 38 decl 0x38(%ebx)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
1109a2: 89 f8 mov %edi,%eax 1109a4: 83 c8 01 or $0x1,%eax 1109a7: 89 41 04 mov %eax,0x4(%ecx)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
1109aa: 89 3c 39 mov %edi,(%ecx,%edi,1) 1109ad: eb 2a jmp 1109d9 <_Heap_Free+0xe1> 1109af: 90 nop
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
1109b0: 80 7d eb 00 cmpb $0x0,-0x15(%ebp)
1109b4: 74 3a je 1109f0 <_Heap_Free+0xf8>
uintptr_t const size = block_size + next_block_size;
1109b6: 8b 7d e4 mov -0x1c(%ebp),%edi 1109b9: 03 7d ec add -0x14(%ebp),%edi
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
1109bc: 8b 42 08 mov 0x8(%edx),%eax 1109bf: 8b 52 0c mov 0xc(%edx),%edx
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
1109c2: 89 41 08 mov %eax,0x8(%ecx)
new_block->prev = prev;
1109c5: 89 51 0c mov %edx,0xc(%ecx)
next->prev = new_block;
1109c8: 89 48 0c mov %ecx,0xc(%eax)
prev->next = new_block;
1109cb: 89 4a 08 mov %ecx,0x8(%edx)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
1109ce: 89 f8 mov %edi,%eax 1109d0: 83 c8 01 or $0x1,%eax 1109d3: 89 41 04 mov %eax,0x4(%ecx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
1109d6: 89 3c 39 mov %edi,(%ecx,%edi,1)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
1109d9: ff 4b 40 decl 0x40(%ebx)
++stats->frees;
1109dc: ff 43 50 incl 0x50(%ebx)
stats->free_size += block_size;
1109df: 8b 55 ec mov -0x14(%ebp),%edx 1109e2: 01 53 30 add %edx,0x30(%ebx)
return( true );
1109e5: b0 01 mov $0x1,%al
}
1109e7: 83 c4 10 add $0x10,%esp 1109ea: 5b pop %ebx 1109eb: 5e pop %esi 1109ec: 5f pop %edi 1109ed: c9 leave 1109ee: c3 ret 1109ef: 90 nop
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
1109f0: 8b 43 08 mov 0x8(%ebx),%eax
new_block->next = next;
1109f3: 89 41 08 mov %eax,0x8(%ecx)
new_block->prev = block_before;
1109f6: 89 59 0c mov %ebx,0xc(%ecx)
block_before->next = new_block;
1109f9: 89 4b 08 mov %ecx,0x8(%ebx)
next->prev = new_block;
1109fc: 89 48 0c mov %ecx,0xc(%eax)
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
1109ff: 8b 45 ec mov -0x14(%ebp),%eax 110a02: 83 c8 01 or $0x1,%eax 110a05: 89 41 04 mov %eax,0x4(%ecx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
110a08: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
110a0c: 8b 45 ec mov -0x14(%ebp),%eax 110a0f: 89 02 mov %eax,(%edx)
/* Statistics */
++stats->free_blocks;
110a11: 8b 43 38 mov 0x38(%ebx),%eax 110a14: 40 inc %eax 110a15: 89 43 38 mov %eax,0x38(%ebx)
if ( stats->max_free_blocks < stats->free_blocks ) {
110a18: 3b 43 3c cmp 0x3c(%ebx),%eax
110a1b: 76 bc jbe 1109d9 <_Heap_Free+0xe1>
stats->max_free_blocks = stats->free_blocks;
110a1d: 89 43 3c mov %eax,0x3c(%ebx) 110a20: eb b7 jmp 1109d9 <_Heap_Free+0xe1> 110a22: 66 90 xchg %ax,%ax
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
110a24: c6 45 eb 00 movb $0x0,-0x15(%ebp) 110a28: e9 38 ff ff ff jmp 110965 <_Heap_Free+0x6d> 110a2d: 8d 76 00 lea 0x0(%esi),%esi
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;
110a30: 8b 45 ec mov -0x14(%ebp),%eax 110a33: 03 45 f0 add -0x10(%ebp),%eax
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
110a36: 89 c6 mov %eax,%esi 110a38: 83 ce 01 or $0x1,%esi 110a3b: 89 71 04 mov %esi,0x4(%ecx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
110a3e: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
110a42: 89 02 mov %eax,(%edx) 110a44: eb 93 jmp 1109d9 <_Heap_Free+0xe1>
0010c5c8 <_Heap_Get_first_and_last_block>:
uintptr_t page_size,
uintptr_t min_block_size,
Heap_Block **first_block_ptr,
Heap_Block **last_block_ptr
)
{
10c5c8: 55 push %ebp 10c5c9: 89 e5 mov %esp,%ebp 10c5cb: 57 push %edi 10c5cc: 56 push %esi 10c5cd: 53 push %ebx 10c5ce: 8b 5d 08 mov 0x8(%ebp),%ebx 10c5d1: 8b 7d 0c mov 0xc(%ebp),%edi
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
10c5d4: 8d 34 1f lea (%edi,%ebx,1),%esi
uintptr_t const alloc_area_begin =
_Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
10c5d7: 8d 4b 08 lea 0x8(%ebx),%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
10c5da: 89 c8 mov %ecx,%eax 10c5dc: 31 d2 xor %edx,%edx 10c5de: f7 75 10 divl 0x10(%ebp)
if ( remainder != 0 ) {
10c5e1: 85 d2 test %edx,%edx
10c5e3: 74 05 je 10c5ea <_Heap_Get_first_and_last_block+0x22>
return value - remainder + alignment;
10c5e5: 03 4d 10 add 0x10(%ebp),%ecx 10c5e8: 29 d1 sub %edx,%ecx
_Heap_Align_down( heap_area_size - overhead, page_size );
Heap_Block *const first_block = (Heap_Block *) first_block_begin;
Heap_Block *const last_block =
_Heap_Block_at( first_block, first_block_size );
if (
10c5ea: 39 f3 cmp %esi,%ebx
10c5ec: 77 2e ja 10c61c <_Heap_Get_first_and_last_block+0x54>
uintptr_t const alloc_area_begin =
_Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const first_block_begin =
alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const overhead =
HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
10c5ee: 8d 71 f8 lea -0x8(%ecx),%esi
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
uintptr_t const alloc_area_begin =
_Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const first_block_begin =
alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const overhead =
10c5f1: 29 d9 sub %ebx,%ecx
Heap_Block *const last_block =
_Heap_Block_at( first_block, first_block_size );
if (
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
10c5f3: 39 cf cmp %ecx,%edi
10c5f5: 76 25 jbe 10c61c <_Heap_Get_first_and_last_block+0x54>
uintptr_t const first_block_begin =
alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const overhead =
HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
uintptr_t const first_block_size =
_Heap_Align_down( heap_area_size - overhead, page_size );
10c5f7: 29 cf sub %ecx,%edi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10c5f9: 89 f8 mov %edi,%eax 10c5fb: 31 d2 xor %edx,%edx 10c5fd: f7 75 10 divl 0x10(%ebp) 10c600: 29 d7 sub %edx,%edi
_Heap_Block_at( first_block, first_block_size );
if (
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
|| first_block_size < min_block_size
10c602: 39 7d 14 cmp %edi,0x14(%ebp)
10c605: 77 15 ja 10c61c <_Heap_Get_first_and_last_block+0x54>
) {
/* Invalid area or area too small */
return false;
}
*first_block_ptr = first_block;
10c607: 8b 45 18 mov 0x18(%ebp),%eax 10c60a: 89 30 mov %esi,(%eax)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10c60c: 01 f7 add %esi,%edi 10c60e: 8b 45 1c mov 0x1c(%ebp),%eax 10c611: 89 38 mov %edi,(%eax)
*last_block_ptr = last_block;
return true;
10c613: b0 01 mov $0x1,%al
}
10c615: 5b pop %ebx 10c616: 5e pop %esi 10c617: 5f pop %edi 10c618: c9 leave 10c619: c3 ret 10c61a: 66 90 xchg %ax,%ax
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
|| first_block_size < min_block_size
) {
/* Invalid area or area too small */
return false;
10c61c: 31 c0 xor %eax,%eax
*first_block_ptr = first_block;
*last_block_ptr = last_block;
return true;
}
10c61e: 5b pop %ebx 10c61f: 5e pop %esi 10c620: 5f pop %edi 10c621: c9 leave 10c622: c3 ret
001145c0 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
1145c0: 55 push %ebp 1145c1: 89 e5 mov %esp,%ebp 1145c3: 57 push %edi 1145c4: 56 push %esi 1145c5: 53 push %ebx 1145c6: 8b 7d 0c mov 0xc(%ebp),%edi
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
1145c9: c7 07 00 00 00 00 movl $0x0,(%edi)
info->largest = 0;
1145cf: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
info->total = 0;
1145d6: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
1145dd: 8b 45 08 mov 0x8(%ebp),%eax 1145e0: 8b 50 08 mov 0x8(%eax),%edx
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
1145e3: 39 d0 cmp %edx,%eax
1145e5: 74 31 je 114618 <_Heap_Get_free_information+0x58>
1145e7: bb 01 00 00 00 mov $0x1,%ebx 1145ec: 31 f6 xor %esi,%esi 1145ee: 31 c9 xor %ecx,%ecx 1145f0: eb 07 jmp 1145f9 <_Heap_Get_free_information+0x39> 1145f2: 66 90 xchg %ax,%ax 1145f4: 8b 77 04 mov 0x4(%edi),%esi 1145f7: 89 c3 mov %eax,%ebx
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
1145f9: 8b 42 04 mov 0x4(%edx),%eax 1145fc: 83 e0 fe and $0xfffffffe,%eax
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
1145ff: 01 c1 add %eax,%ecx
if ( info->largest < the_size )
114601: 39 f0 cmp %esi,%eax
114603: 76 03 jbe 114608 <_Heap_Get_free_information+0x48>
info->largest = the_size;
114605: 89 47 04 mov %eax,0x4(%edi)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
114608: 8b 52 08 mov 0x8(%edx),%edx 11460b: 8d 43 01 lea 0x1(%ebx),%eax
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
11460e: 39 55 08 cmp %edx,0x8(%ebp)
114611: 75 e1 jne 1145f4 <_Heap_Get_free_information+0x34>
114613: 89 1f mov %ebx,(%edi) 114615: 89 4f 08 mov %ecx,0x8(%edi)
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
114618: 5b pop %ebx 114619: 5e pop %esi 11461a: 5f pop %edi 11461b: c9 leave 11461c: c3 ret
00111470 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
111470: 55 push %ebp 111471: 89 e5 mov %esp,%ebp 111473: 57 push %edi 111474: 56 push %esi 111475: 53 push %ebx 111476: 8b 45 08 mov 0x8(%ebp),%eax 111479: 8b 5d 0c mov 0xc(%ebp),%ebx
Heap_Block *the_block = the_heap->first_block;
11147c: 8b 50 20 mov 0x20(%eax),%edx
Heap_Block *const end = the_heap->last_block;
11147f: 8b 70 24 mov 0x24(%eax),%esi
memset(the_info, 0, sizeof(*the_info));
111482: b9 18 00 00 00 mov $0x18,%ecx 111487: 31 c0 xor %eax,%eax 111489: 89 df mov %ebx,%edi 11148b: f3 aa rep stos %al,%es:(%edi)
while ( the_block != end ) {
11148d: 39 f2 cmp %esi,%edx
11148f: 74 33 je 1114c4 <_Heap_Get_information+0x54><== NEVER TAKEN
111491: 8b 7a 04 mov 0x4(%edx),%edi 111494: eb 16 jmp 1114ac <_Heap_Get_information+0x3c> 111496: 66 90 xchg %ax,%ax
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
111498: 8d 43 0c lea 0xc(%ebx),%eax
else
info = &the_info->Free;
info->number++;
11149b: ff 00 incl (%eax)
info->total += the_size;
11149d: 01 48 08 add %ecx,0x8(%eax)
if ( info->largest < the_size )
1114a0: 39 48 04 cmp %ecx,0x4(%eax)
1114a3: 73 03 jae 1114a8 <_Heap_Get_information+0x38>
info->largest = the_size;
1114a5: 89 48 04 mov %ecx,0x4(%eax)
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
while ( the_block != end ) {
1114a8: 39 d6 cmp %edx,%esi
1114aa: 74 18 je 1114c4 <_Heap_Get_information+0x54>
- 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;
1114ac: 89 f9 mov %edi,%ecx 1114ae: 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);
1114b1: 01 ca add %ecx,%edx
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
1114b3: 8b 7a 04 mov 0x4(%edx),%edi
while ( the_block != end ) {
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
1114b6: f7 c7 01 00 00 00 test $0x1,%edi
1114bc: 75 da jne 111498 <_Heap_Get_information+0x28>
info = &the_info->Used;
else
info = &the_info->Free;
1114be: 89 d8 mov %ebx,%eax 1114c0: eb d9 jmp 11149b <_Heap_Get_information+0x2b> 1114c2: 66 90 xchg %ax,%ax
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
1114c4: 5b pop %ebx 1114c5: 5e pop %esi 1114c6: 5f pop %edi 1114c7: c9 leave 1114c8: c3 ret
0011dd44 <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
11dd44: 55 push %ebp 11dd45: 89 e5 mov %esp,%ebp 11dd47: 57 push %edi 11dd48: 56 push %esi 11dd49: 53 push %ebx 11dd4a: 83 ec 2c sub $0x2c,%esp 11dd4d: 8b 5d 08 mov 0x8(%ebp),%ebx 11dd50: 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);
11dd53: 8d 4e f8 lea -0x8(%esi),%ecx 11dd56: 89 f0 mov %esi,%eax 11dd58: 31 d2 xor %edx,%edx 11dd5a: 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);
11dd5d: 29 d1 sub %edx,%ecx
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
*old_size = 0;
11dd5f: 8b 45 14 mov 0x14(%ebp),%eax 11dd62: c7 00 00 00 00 00 movl $0x0,(%eax)
*new_size = 0;
11dd68: 8b 55 18 mov 0x18(%ebp),%edx 11dd6b: c7 02 00 00 00 00 movl $0x0,(%edx)
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11dd71: 39 4b 20 cmp %ecx,0x20(%ebx)
11dd74: 77 05 ja 11dd7b <_Heap_Resize_block+0x37>
11dd76: 39 4b 24 cmp %ecx,0x24(%ebx)
11dd79: 73 0d jae 11dd88 <_Heap_Resize_block+0x44>
new_alloc_size,
old_size,
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
11dd7b: b8 02 00 00 00 mov $0x2,%eax
} }
11dd80: 8d 65 f4 lea -0xc(%ebp),%esp 11dd83: 5b pop %ebx 11dd84: 5e pop %esi 11dd85: 5f pop %edi 11dd86: c9 leave 11dd87: c3 ret
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
11dd88: 8b 41 04 mov 0x4(%ecx),%eax 11dd8b: 83 e0 fe and $0xfffffffe,%eax
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
11dd8e: 8d 3c 01 lea (%ecx,%eax,1),%edi 11dd91: 89 7d d4 mov %edi,-0x2c(%ebp)
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
11dd94: 89 fa mov %edi,%edx 11dd96: 29 f2 sub %esi,%edx 11dd98: 83 c2 04 add $0x4,%edx 11dd9b: 89 55 e0 mov %edx,-0x20(%ebp) 11dd9e: 8b 57 04 mov 0x4(%edi),%edx 11dda1: 83 e2 fe and $0xfffffffe,%edx 11dda4: 89 55 d0 mov %edx,-0x30(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
11dda7: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1) 11ddac: 0f 94 45 df sete -0x21(%ebp)
bool next_block_is_free = _Heap_Is_free( next_block );;
_HAssert( _Heap_Is_block_in_heap( heap, next_block ) );
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
11ddb0: 8b 55 e0 mov -0x20(%ebp),%edx 11ddb3: 8b 7d 14 mov 0x14(%ebp),%edi 11ddb6: 89 17 mov %edx,(%edi)
if ( next_block_is_free ) {
11ddb8: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
11ddbc: 75 6e jne 11de2c <_Heap_Resize_block+0xe8>
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
11ddbe: 8b 55 e0 mov -0x20(%ebp),%edx 11ddc1: 39 55 10 cmp %edx,0x10(%ebp)
11ddc4: 77 79 ja 11de3f <_Heap_Resize_block+0xfb>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
11ddc6: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
11ddca: 74 31 je 11ddfd <_Heap_Resize_block+0xb9>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
11ddcc: 8b 79 04 mov 0x4(%ecx),%edi 11ddcf: 83 e7 01 and $0x1,%edi
block->size_and_flag = size | flag;
11ddd2: 09 c7 or %eax,%edi 11ddd4: 89 79 04 mov %edi,0x4(%ecx)
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
11ddd7: 8b 7d d4 mov -0x2c(%ebp),%edi 11ddda: 8b 7f 08 mov 0x8(%edi),%edi 11dddd: 89 7d e4 mov %edi,-0x1c(%ebp) 11dde0: 8b 55 d4 mov -0x2c(%ebp),%edx 11dde3: 8b 7a 0c mov 0xc(%edx),%edi
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
11dde6: 8b 55 e4 mov -0x1c(%ebp),%edx 11dde9: 89 57 08 mov %edx,0x8(%edi)
next->prev = prev;
11ddec: 89 7a 0c mov %edi,0xc(%edx)
_Heap_Block_set_size( block, block_size );
_Heap_Free_list_remove( next_block );
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
11ddef: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1)
/* Statistics */
--stats->free_blocks;
11ddf4: ff 4b 38 decl 0x38(%ebx)
stats->free_size -= next_block_size;
11ddf7: 8b 7d d0 mov -0x30(%ebp),%edi 11ddfa: 29 7b 30 sub %edi,0x30(%ebx)
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
11ddfd: ff 75 10 pushl 0x10(%ebp) 11de00: 56 push %esi 11de01: 51 push %ecx 11de02: 53 push %ebx 11de03: e8 30 e9 fe ff call 10c738 <_Heap_Block_allocate>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
11de08: 8b 50 04 mov 0x4(%eax),%edx 11de0b: 83 e2 fe and $0xfffffffe,%edx
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
11de0e: 29 f0 sub %esi,%eax 11de10: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11de14: 8b 55 18 mov 0x18(%ebp),%edx 11de17: 89 02 mov %eax,(%edx)
/* Statistics */
++stats->resizes;
11de19: ff 43 54 incl 0x54(%ebx) 11de1c: 83 c4 10 add $0x10,%esp
return HEAP_RESIZE_SUCCESSFUL;
11de1f: 31 c0 xor %eax,%eax
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
11de21: 8d 65 f4 lea -0xc(%ebp),%esp 11de24: 5b pop %ebx 11de25: 5e pop %esi 11de26: 5f pop %edi 11de27: c9 leave 11de28: c3 ret 11de29: 8d 76 00 lea 0x0(%esi),%esi
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
11de2c: 03 45 d0 add -0x30(%ebp),%eax
alloc_size += next_block_size;
11de2f: 8b 7d d0 mov -0x30(%ebp),%edi 11de32: 01 fa add %edi,%edx 11de34: 89 55 e0 mov %edx,-0x20(%ebp)
}
if ( new_alloc_size > alloc_size ) {
11de37: 8b 55 e0 mov -0x20(%ebp),%edx 11de3a: 39 55 10 cmp %edx,0x10(%ebp)
11de3d: 76 87 jbe 11ddc6 <_Heap_Resize_block+0x82>
return HEAP_RESIZE_UNSATISFIED;
11de3f: b8 01 00 00 00 mov $0x1,%eax
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
11de44: 8d 65 f4 lea -0xc(%ebp),%esp 11de47: 5b pop %ebx 11de48: 5e pop %esi 11de49: 5f pop %edi 11de4a: c9 leave 11de4b: c3 ret
0011de4c <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
11de4c: 55 push %ebp 11de4d: 89 e5 mov %esp,%ebp 11de4f: 56 push %esi 11de50: 53 push %ebx 11de51: 8b 5d 08 mov 0x8(%ebp),%ebx 11de54: 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);
11de57: 8d 4e f8 lea -0x8(%esi),%ecx 11de5a: 89 f0 mov %esi,%eax 11de5c: 31 d2 xor %edx,%edx 11de5e: 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);
11de61: 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
11de63: 8b 43 20 mov 0x20(%ebx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11de66: 39 c1 cmp %eax,%ecx
11de68: 72 07 jb 11de71 <_Heap_Size_of_alloc_area+0x25>
11de6a: 8b 53 24 mov 0x24(%ebx),%edx 11de6d: 39 d1 cmp %edx,%ecx
11de6f: 76 07 jbe 11de78 <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
11de71: 31 c0 xor %eax,%eax
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
11de73: 5b pop %ebx 11de74: 5e pop %esi 11de75: c9 leave 11de76: c3 ret 11de77: 90 nop
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
11de78: 8b 59 04 mov 0x4(%ecx),%ebx 11de7b: 83 e3 fe and $0xfffffffe,%ebx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11de7e: 01 d9 add %ebx,%ecx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11de80: 39 c8 cmp %ecx,%eax
11de82: 77 ed ja 11de71 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
11de84: 39 ca cmp %ecx,%edx
11de86: 72 e9 jb 11de71 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
11de88: f6 41 04 01 testb $0x1,0x4(%ecx)
11de8c: 74 e3 je 11de71 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
11de8e: 29 f1 sub %esi,%ecx 11de90: 8d 51 04 lea 0x4(%ecx),%edx 11de93: 8b 45 10 mov 0x10(%ebp),%eax 11de96: 89 10 mov %edx,(%eax)
return true;
11de98: b0 01 mov $0x1,%al
}
11de9a: 5b pop %ebx 11de9b: 5e pop %esi 11de9c: c9 leave 11de9d: c3 ret
0010d25c <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10d25c: 55 push %ebp 10d25d: 89 e5 mov %esp,%ebp 10d25f: 57 push %edi 10d260: 56 push %esi 10d261: 53 push %ebx 10d262: 83 ec 4c sub $0x4c,%esp 10d265: 8b 5d 08 mov 0x8(%ebp),%ebx
uintptr_t const page_size = heap->page_size;
10d268: 8b 43 10 mov 0x10(%ebx),%eax 10d26b: 89 45 e0 mov %eax,-0x20(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10d26e: 8b 53 14 mov 0x14(%ebx),%edx 10d271: 89 55 d0 mov %edx,-0x30(%ebp)
Heap_Block *const first_block = heap->first_block;
10d274: 8b 43 20 mov 0x20(%ebx),%eax 10d277: 89 45 dc mov %eax,-0x24(%ebp)
Heap_Block *const last_block = heap->last_block;
10d27a: 8b 53 24 mov 0x24(%ebx),%edx 10d27d: 89 55 cc mov %edx,-0x34(%ebp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d280: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10d284: 74 1a je 10d2a0 <_Heap_Walk+0x44>
10d286: c7 45 d8 14 d2 10 00 movl $0x10d214,-0x28(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d28d: 83 3d a0 89 12 00 03 cmpl $0x3,0x1289a0
10d294: 74 1a je 10d2b0 <_Heap_Walk+0x54> <== ALWAYS TAKEN
}
block = next_block;
} while ( block != first_block );
return true;
10d296: b0 01 mov $0x1,%al
}
10d298: 8d 65 f4 lea -0xc(%ebp),%esp 10d29b: 5b pop %ebx 10d29c: 5e pop %esi 10d29d: 5f pop %edi 10d29e: c9 leave 10d29f: c3 ret
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d2a0: c7 45 d8 0c d2 10 00 movl $0x10d20c,-0x28(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d2a7: 83 3d a0 89 12 00 03 cmpl $0x3,0x1289a0
10d2ae: 75 e6 jne 10d296 <_Heap_Walk+0x3a>
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
10d2b0: 52 push %edx 10d2b1: ff 73 0c pushl 0xc(%ebx) 10d2b4: ff 73 08 pushl 0x8(%ebx) 10d2b7: ff 75 cc pushl -0x34(%ebp) 10d2ba: ff 75 dc pushl -0x24(%ebp) 10d2bd: ff 73 1c pushl 0x1c(%ebx) 10d2c0: ff 73 18 pushl 0x18(%ebx) 10d2c3: ff 75 d0 pushl -0x30(%ebp) 10d2c6: ff 75 e0 pushl -0x20(%ebp) 10d2c9: 68 94 0d 12 00 push $0x120d94 10d2ce: 6a 00 push $0x0 10d2d0: ff 75 0c pushl 0xc(%ebp) 10d2d3: ff 55 d8 call *-0x28(%ebp)
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
10d2d6: 83 c4 30 add $0x30,%esp 10d2d9: 8b 45 e0 mov -0x20(%ebp),%eax 10d2dc: 85 c0 test %eax,%eax
10d2de: 74 70 je 10d350 <_Heap_Walk+0xf4>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10d2e0: f6 45 e0 03 testb $0x3,-0x20(%ebp)
10d2e4: 75 72 jne 10d358 <_Heap_Walk+0xfc>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d2e6: 8b 45 d0 mov -0x30(%ebp),%eax 10d2e9: 31 d2 xor %edx,%edx 10d2eb: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10d2ee: 85 d2 test %edx,%edx
10d2f0: 75 72 jne 10d364 <_Heap_Walk+0x108>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d2f2: 8b 45 dc mov -0x24(%ebp),%eax 10d2f5: 83 c0 08 add $0x8,%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d2f8: 31 d2 xor %edx,%edx 10d2fa: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if (
10d2fd: 85 d2 test %edx,%edx
10d2ff: 75 6f jne 10d370 <_Heap_Walk+0x114>
block = next_block;
} while ( block != first_block );
return true;
}
10d301: 8b 45 dc mov -0x24(%ebp),%eax 10d304: 8b 40 04 mov 0x4(%eax),%eax 10d307: 89 45 e4 mov %eax,-0x1c(%ebp)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10d30a: a8 01 test $0x1,%al
10d30c: 0f 84 8e 00 00 00 je 10d3a0 <_Heap_Walk+0x144>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10d312: 8b 55 cc mov -0x34(%ebp),%edx 10d315: 8b 42 04 mov 0x4(%edx),%eax 10d318: 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);
10d31b: 01 d0 add %edx,%eax
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10d31d: f6 40 04 01 testb $0x1,0x4(%eax)
10d321: 74 25 je 10d348 <_Heap_Walk+0xec>
);
return false;
}
if (
10d323: 39 45 dc cmp %eax,-0x24(%ebp)
10d326: 74 54 je 10d37c <_Heap_Walk+0x120> <== ALWAYS TAKEN
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10d328: 51 push %ecx <== NOT EXECUTED 10d329: 68 b0 0e 12 00 push $0x120eb0 <== NOT EXECUTED 10d32e: 66 90 xchg %ax,%ax <== NOT EXECUTED
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10d330: 6a 01 push $0x1 10d332: ff 75 0c pushl 0xc(%ebp) 10d335: ff 55 d8 call *-0x28(%ebp) 10d338: 83 c4 10 add $0x10,%esp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
10d33b: 31 c0 xor %eax,%eax
block = next_block;
} while ( block != first_block );
return true;
}
10d33d: 8d 65 f4 lea -0xc(%ebp),%esp 10d340: 5b pop %ebx 10d341: 5e pop %esi 10d342: 5f pop %edi 10d343: c9 leave 10d344: c3 ret 10d345: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
10d348: 53 push %ebx 10d349: 68 4a 0d 12 00 push $0x120d4a 10d34e: eb e0 jmp 10d330 <_Heap_Walk+0xd4>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
10d350: 57 push %edi 10d351: 68 19 0d 12 00 push $0x120d19 10d356: eb d8 jmp 10d330 <_Heap_Walk+0xd4>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
10d358: ff 75 e0 pushl -0x20(%ebp) 10d35b: 68 2c 0d 12 00 push $0x120d2c 10d360: eb ce jmp 10d330 <_Heap_Walk+0xd4> 10d362: 66 90 xchg %ax,%ax
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
10d364: ff 75 d0 pushl -0x30(%ebp) 10d367: 68 28 0e 12 00 push $0x120e28 10d36c: eb c2 jmp 10d330 <_Heap_Walk+0xd4> 10d36e: 66 90 xchg %ax,%ax
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10d370: ff 75 dc pushl -0x24(%ebp) 10d373: 68 4c 0e 12 00 push $0x120e4c 10d378: eb b6 jmp 10d330 <_Heap_Walk+0xd4> 10d37a: 66 90 xchg %ax,%ax
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10d37c: 8b 43 10 mov 0x10(%ebx),%eax 10d37f: 89 45 c8 mov %eax,-0x38(%ebp)
block = next_block;
} while ( block != first_block );
return true;
}
10d382: 8b 4b 08 mov 0x8(%ebx),%ecx
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10d385: 39 cb cmp %ecx,%ebx
10d387: 0f 84 a8 00 00 00 je 10d435 <_Heap_Walk+0x1d9>
block = next_block;
} while ( block != first_block );
return true;
}
10d38d: 8b 43 20 mov 0x20(%ebx),%eax 10d390: 89 45 d4 mov %eax,-0x2c(%ebp)
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10d393: 39 c8 cmp %ecx,%eax
10d395: 76 11 jbe 10d3a8 <_Heap_Walk+0x14c> <== ALWAYS TAKEN
10d397: 90 nop
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
10d398: 51 push %ecx 10d399: 68 e0 0e 12 00 push $0x120ee0 10d39e: eb 90 jmp 10d330 <_Heap_Walk+0xd4>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
10d3a0: 56 push %esi 10d3a1: 68 80 0e 12 00 push $0x120e80 10d3a6: eb 88 jmp 10d330 <_Heap_Walk+0xd4> 10d3a8: 8b 7b 24 mov 0x24(%ebx),%edi 10d3ab: 39 cf cmp %ecx,%edi
10d3ad: 72 e9 jb 10d398 <_Heap_Walk+0x13c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d3af: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d3b2: 31 d2 xor %edx,%edx 10d3b4: f7 75 c8 divl -0x38(%ebp)
);
return false;
}
if (
10d3b7: 85 d2 test %edx,%edx
10d3b9: 0f 85 44 02 00 00 jne 10d603 <_Heap_Walk+0x3a7> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10d3bf: 8b 41 04 mov 0x4(%ecx),%eax 10d3c2: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d3c5: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10d3ca: 0f 85 3e 02 00 00 jne 10d60e <_Heap_Walk+0x3b2> <== NEVER TAKEN
10d3d0: 89 da mov %ebx,%edx 10d3d2: 89 ce mov %ecx,%esi 10d3d4: eb 37 jmp 10d40d <_Heap_Walk+0x1b1> 10d3d6: 66 90 xchg %ax,%ax
return false;
}
prev_block = free_block;
free_block = free_block->next;
10d3d8: 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 ) {
10d3db: 39 cb cmp %ecx,%ebx
10d3dd: 74 5c je 10d43b <_Heap_Walk+0x1df>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10d3df: 39 4d d4 cmp %ecx,-0x2c(%ebp)
10d3e2: 77 b4 ja 10d398 <_Heap_Walk+0x13c>
10d3e4: 39 f9 cmp %edi,%ecx
10d3e6: 77 b0 ja 10d398 <_Heap_Walk+0x13c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d3e8: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d3eb: 31 d2 xor %edx,%edx 10d3ed: f7 75 c8 divl -0x38(%ebp)
);
return false;
}
if (
10d3f0: 85 d2 test %edx,%edx
10d3f2: 0f 85 0b 02 00 00 jne 10d603 <_Heap_Walk+0x3a7>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10d3f8: 8b 41 04 mov 0x4(%ecx),%eax 10d3fb: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d3fe: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10d403: 0f 85 05 02 00 00 jne 10d60e <_Heap_Walk+0x3b2>
10d409: 89 f2 mov %esi,%edx 10d40b: 89 ce mov %ecx,%esi
);
return false;
}
if ( free_block->prev != prev_block ) {
10d40d: 8b 41 0c mov 0xc(%ecx),%eax 10d410: 39 d0 cmp %edx,%eax
10d412: 74 c4 je 10d3d8 <_Heap_Walk+0x17c>
(*printer)(
10d414: 83 ec 0c sub $0xc,%esp 10d417: 50 push %eax 10d418: 51 push %ecx 10d419: 68 30 0f 12 00 push $0x120f30 10d41e: 66 90 xchg %ax,%ax
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
10d420: 6a 01 push $0x1 10d422: ff 75 0c pushl 0xc(%ebp) 10d425: ff 55 d8 call *-0x28(%ebp)
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
10d428: 83 c4 20 add $0x20,%esp 10d42b: 31 c0 xor %eax,%eax
block = next_block;
} while ( block != first_block );
return true;
}
10d42d: 8d 65 f4 lea -0xc(%ebp),%esp 10d430: 5b pop %ebx 10d431: 5e pop %esi 10d432: 5f pop %edi 10d433: c9 leave 10d434: c3 ret
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10d435: 8b 53 20 mov 0x20(%ebx),%edx 10d438: 89 55 d4 mov %edx,-0x2c(%ebp)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d43b: 8b 7d dc mov -0x24(%ebp),%edi 10d43e: 8b 45 d4 mov -0x2c(%ebp),%eax 10d441: 8d 76 00 lea 0x0(%esi),%esi 10d444: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d447: 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);
10d44a: 8d 34 39 lea (%ecx,%edi,1),%esi
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10d44d: 39 f0 cmp %esi,%eax
10d44f: 76 0f jbe 10d460 <_Heap_Walk+0x204> <== ALWAYS TAKEN
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
10d451: 83 ec 0c sub $0xc,%esp 10d454: 56 push %esi 10d455: 57 push %edi 10d456: 68 64 0f 12 00 push $0x120f64 10d45b: eb c3 jmp 10d420 <_Heap_Walk+0x1c4> 10d45d: 8d 76 00 lea 0x0(%esi),%esi 10d460: 39 73 24 cmp %esi,0x24(%ebx)
10d463: 72 ec jb 10d451 <_Heap_Walk+0x1f5>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
10d465: 3b 7d cc cmp -0x34(%ebp),%edi 10d468: 0f 95 45 d4 setne -0x2c(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d46c: 89 c8 mov %ecx,%eax 10d46e: 31 d2 xor %edx,%edx 10d470: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10d473: 85 d2 test %edx,%edx
10d475: 74 0a je 10d481 <_Heap_Walk+0x225>
10d477: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10d47b: 0f 85 52 01 00 00 jne 10d5d3 <_Heap_Walk+0x377>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10d481: 39 4d d0 cmp %ecx,-0x30(%ebp)
10d484: 76 0a jbe 10d490 <_Heap_Walk+0x234>
10d486: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10d48a: 0f 85 52 01 00 00 jne 10d5e2 <_Heap_Walk+0x386> <== ALWAYS TAKEN
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10d490: 39 f7 cmp %esi,%edi
10d492: 72 0a jb 10d49e <_Heap_Walk+0x242>
10d494: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10d498: 0f 85 56 01 00 00 jne 10d5f4 <_Heap_Walk+0x398>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
10d49e: 8b 55 e4 mov -0x1c(%ebp),%edx 10d4a1: 83 e2 01 and $0x1,%edx
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10d4a4: f6 46 04 01 testb $0x1,0x4(%esi)
10d4a8: 74 4e je 10d4f8 <_Heap_Walk+0x29c>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10d4aa: 85 d2 test %edx,%edx
10d4ac: 74 2e je 10d4dc <_Heap_Walk+0x280>
(*printer)(
10d4ae: 83 ec 0c sub $0xc,%esp 10d4b1: 51 push %ecx 10d4b2: 57 push %edi 10d4b3: 68 7b 0d 12 00 push $0x120d7b 10d4b8: 6a 00 push $0x0 10d4ba: ff 75 0c pushl 0xc(%ebp) 10d4bd: ff 55 d8 call *-0x28(%ebp) 10d4c0: 83 c4 20 add $0x20,%esp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10d4c3: 39 75 dc cmp %esi,-0x24(%ebp)
10d4c6: 0f 84 ca fd ff ff je 10d296 <_Heap_Walk+0x3a>
10d4cc: 8b 56 04 mov 0x4(%esi),%edx 10d4cf: 89 55 e4 mov %edx,-0x1c(%ebp) 10d4d2: 8b 43 20 mov 0x20(%ebx),%eax 10d4d5: 89 f7 mov %esi,%edi 10d4d7: e9 68 ff ff ff jmp 10d444 <_Heap_Walk+0x1e8>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10d4dc: 83 ec 08 sub $0x8,%esp 10d4df: ff 37 pushl (%edi) 10d4e1: 51 push %ecx 10d4e2: 57 push %edi 10d4e3: 68 c8 10 12 00 push $0x1210c8 10d4e8: 6a 00 push $0x0 10d4ea: ff 75 0c pushl 0xc(%ebp) 10d4ed: ff 55 d8 call *-0x28(%ebp) 10d4f0: 83 c4 20 add $0x20,%esp 10d4f3: eb ce jmp 10d4c3 <_Heap_Walk+0x267> 10d4f5: 8d 76 00 lea 0x0(%esi),%esi
block = next_block;
} while ( block != first_block );
return true;
}
10d4f8: 8b 43 08 mov 0x8(%ebx),%eax 10d4fb: 89 45 b4 mov %eax,-0x4c(%ebp)
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
10d4fe: 8b 47 08 mov 0x8(%edi),%eax 10d501: 89 45 e4 mov %eax,-0x1c(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d504: 39 43 0c cmp %eax,0xc(%ebx)
10d507: 0f 84 97 00 00 00 je 10d5a4 <_Heap_Walk+0x348>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10d50d: 39 c3 cmp %eax,%ebx
10d50f: 0f 84 9b 00 00 00 je 10d5b0 <_Heap_Walk+0x354>
10d515: c7 45 c8 09 0c 12 00 movl $0x120c09,-0x38(%ebp)
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
10d51c: 8b 47 0c mov 0xc(%edi),%eax 10d51f: 89 45 d4 mov %eax,-0x2c(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d522: 39 45 b4 cmp %eax,-0x4c(%ebp)
10d525: 74 75 je 10d59c <_Heap_Walk+0x340>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10d527: 39 c3 cmp %eax,%ebx
10d529: 0f 84 8d 00 00 00 je 10d5bc <_Heap_Walk+0x360>
10d52f: b8 09 0c 12 00 mov $0x120c09,%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)(
10d534: 83 ec 0c sub $0xc,%esp 10d537: ff 75 c8 pushl -0x38(%ebp) 10d53a: ff 75 e4 pushl -0x1c(%ebp) 10d53d: 50 push %eax 10d53e: ff 75 d4 pushl -0x2c(%ebp) 10d541: 51 push %ecx 10d542: 57 push %edi 10d543: 68 24 10 12 00 push $0x121024 10d548: 6a 00 push $0x0 10d54a: ff 75 0c pushl 0xc(%ebp) 10d54d: 89 55 c4 mov %edx,-0x3c(%ebp) 10d550: 89 4d c0 mov %ecx,-0x40(%ebp) 10d553: ff 55 d8 call *-0x28(%ebp)
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10d556: 8b 06 mov (%esi),%eax 10d558: 83 c4 30 add $0x30,%esp 10d55b: 8b 4d c0 mov -0x40(%ebp),%ecx 10d55e: 39 c1 cmp %eax,%ecx 10d560: 8b 55 c4 mov -0x3c(%ebp),%edx
10d563: 75 27 jne 10d58c <_Heap_Walk+0x330>
);
return false;
}
if ( !prev_used ) {
10d565: 85 d2 test %edx,%edx
10d567: 74 5f je 10d5c8 <_Heap_Walk+0x36c>
block = next_block;
} while ( block != first_block );
return true;
}
10d569: 8b 43 08 mov 0x8(%ebx),%eax
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
10d56c: 39 c3 cmp %eax,%ebx
10d56e: 74 0f je 10d57f <_Heap_Walk+0x323> <== NEVER TAKEN
if ( free_block == block ) {
10d570: 39 c7 cmp %eax,%edi
10d572: 0f 84 4b ff ff ff je 10d4c3 <_Heap_Walk+0x267>
return true;
}
free_block = free_block->next;
10d578: 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 ) {
10d57b: 39 c3 cmp %eax,%ebx
10d57d: 75 f1 jne 10d570 <_Heap_Walk+0x314>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10d57f: 57 push %edi 10d580: 68 f0 10 12 00 push $0x1210f0 10d585: e9 a6 fd ff ff jmp 10d330 <_Heap_Walk+0xd4> 10d58a: 66 90 xchg %ax,%ax
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
10d58c: 52 push %edx 10d58d: 56 push %esi 10d58e: 50 push %eax 10d58f: 51 push %ecx 10d590: 57 push %edi 10d591: 68 5c 10 12 00 push $0x12105c 10d596: e9 85 fe ff ff jmp 10d420 <_Heap_Walk+0x1c4> 10d59b: 90 nop
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)(
10d59c: b8 ff 0c 12 00 mov $0x120cff,%eax 10d5a1: eb 91 jmp 10d534 <_Heap_Walk+0x2d8> 10d5a3: 90 nop 10d5a4: c7 45 c8 e6 0c 12 00 movl $0x120ce6,-0x38(%ebp) 10d5ab: e9 6c ff ff ff jmp 10d51c <_Heap_Walk+0x2c0>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10d5b0: c7 45 c8 f5 0c 12 00 movl $0x120cf5,-0x38(%ebp) 10d5b7: e9 60 ff ff ff jmp 10d51c <_Heap_Walk+0x2c0>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10d5bc: b8 0f 0d 12 00 mov $0x120d0f,%eax 10d5c1: e9 6e ff ff ff jmp 10d534 <_Heap_Walk+0x2d8> 10d5c6: 66 90 xchg %ax,%ax
return false;
}
if ( !prev_used ) {
(*printer)(
10d5c8: 57 push %edi 10d5c9: 68 98 10 12 00 push $0x121098 10d5ce: e9 5d fd ff ff jmp 10d330 <_Heap_Walk+0xd4>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
10d5d3: 83 ec 0c sub $0xc,%esp 10d5d6: 51 push %ecx 10d5d7: 57 push %edi 10d5d8: 68 94 0f 12 00 push $0x120f94 10d5dd: e9 3e fe ff ff jmp 10d420 <_Heap_Walk+0x1c4>
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
10d5e2: 83 ec 08 sub $0x8,%esp 10d5e5: ff 75 d0 pushl -0x30(%ebp) 10d5e8: 51 push %ecx 10d5e9: 57 push %edi 10d5ea: 68 c4 0f 12 00 push $0x120fc4 10d5ef: e9 2c fe ff ff jmp 10d420 <_Heap_Walk+0x1c4>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
10d5f4: 83 ec 0c sub $0xc,%esp 10d5f7: 56 push %esi 10d5f8: 57 push %edi 10d5f9: 68 f0 0f 12 00 push $0x120ff0 10d5fe: e9 1d fe ff ff jmp 10d420 <_Heap_Walk+0x1c4>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10d603: 51 push %ecx 10d604: 68 00 0f 12 00 push $0x120f00 10d609: e9 22 fd ff ff jmp 10d330 <_Heap_Walk+0xd4>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
10d60e: 51 push %ecx 10d60f: 68 5f 0d 12 00 push $0x120d5f 10d614: e9 17 fd ff ff jmp 10d330 <_Heap_Walk+0xd4>
0010bda8 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
10bda8: 55 push %ebp 10bda9: 89 e5 mov %esp,%ebp 10bdab: 53 push %ebx 10bdac: 83 ec 04 sub $0x4,%esp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10bdaf: 8b 0d 20 58 12 00 mov 0x125820,%ecx 10bdb5: 85 c9 test %ecx,%ecx
10bdb7: 74 1a je 10bdd3 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN
10bdb9: 31 db xor %ebx,%ebx 10bdbb: 90 nop
(void) rtems_io_initialize( major, 0, NULL );
10bdbc: 52 push %edx 10bdbd: 6a 00 push $0x0 10bdbf: 6a 00 push $0x0 10bdc1: 53 push %ebx 10bdc2: e8 31 47 00 00 call 1104f8 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10bdc7: 43 inc %ebx 10bdc8: 83 c4 10 add $0x10,%esp 10bdcb: 39 1d 20 58 12 00 cmp %ebx,0x125820
10bdd1: 77 e9 ja 10bdbc <_IO_Initialize_all_drivers+0x14>
(void) rtems_io_initialize( major, 0, NULL );
}
10bdd3: 8b 5d fc mov -0x4(%ebp),%ebx 10bdd6: c9 leave 10bdd7: c3 ret
0010bd10 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
10bd10: 55 push %ebp 10bd11: 89 e5 mov %esp,%ebp 10bd13: 57 push %edi 10bd14: 56 push %esi 10bd15: 53 push %ebx 10bd16: 83 ec 1c sub $0x1c,%esp
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
10bd19: 8b 1d 58 12 12 00 mov 0x121258,%ebx
drivers_in_table = Configuration.number_of_device_drivers;
10bd1f: a1 54 12 12 00 mov 0x121254,%eax 10bd24: 89 45 e4 mov %eax,-0x1c(%ebp)
number_of_drivers = Configuration.maximum_drivers;
10bd27: 8b 35 50 12 12 00 mov 0x121250,%esi
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
10bd2d: 39 f0 cmp %esi,%eax
10bd2f: 73 5f jae 10bd90 <_IO_Manager_initialization+0x80>
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
10bd31: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bd34: c1 e1 03 shl $0x3,%ecx 10bd37: 83 ec 0c sub $0xc,%esp 10bd3a: 51 push %ecx 10bd3b: 89 4d dc mov %ecx,-0x24(%ebp) 10bd3e: e8 f9 2a 00 00 call 10e83c <_Workspace_Allocate_or_fatal_error> 10bd43: 89 c2 mov %eax,%edx
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
10bd45: a3 24 58 12 00 mov %eax,0x125824
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
10bd4a: 89 35 20 58 12 00 mov %esi,0x125820
memset(
10bd50: 31 c0 xor %eax,%eax 10bd52: 8b 4d dc mov -0x24(%ebp),%ecx 10bd55: 89 d7 mov %edx,%edi 10bd57: f3 aa rep stos %al,%es:(%edi)
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10bd59: 83 c4 10 add $0x10,%esp 10bd5c: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd5f: 85 c0 test %eax,%eax
10bd61: 74 25 je 10bd88 <_IO_Manager_initialization+0x78><== NEVER TAKEN
10bd63: a1 24 58 12 00 mov 0x125824,%eax 10bd68: 89 45 e0 mov %eax,-0x20(%ebp) 10bd6b: 31 c0 xor %eax,%eax 10bd6d: 31 d2 xor %edx,%edx 10bd6f: 90 nop
_IO_Driver_address_table[index] = driver_table[index];
10bd70: 8b 7d e0 mov -0x20(%ebp),%edi 10bd73: 01 c7 add %eax,%edi 10bd75: 8d 34 03 lea (%ebx,%eax,1),%esi 10bd78: b9 06 00 00 00 mov $0x6,%ecx 10bd7d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10bd7f: 42 inc %edx 10bd80: 83 c0 18 add $0x18,%eax 10bd83: 39 55 e4 cmp %edx,-0x1c(%ebp)
10bd86: 77 e8 ja 10bd70 <_IO_Manager_initialization+0x60>
_IO_Driver_address_table[index] = driver_table[index];
}
10bd88: 8d 65 f4 lea -0xc(%ebp),%esp 10bd8b: 5b pop %ebx 10bd8c: 5e pop %esi 10bd8d: 5f pop %edi 10bd8e: c9 leave 10bd8f: c3 ret
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
10bd90: 89 1d 24 58 12 00 mov %ebx,0x125824
_IO_Number_of_drivers = number_of_drivers;
10bd96: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd99: a3 20 58 12 00 mov %eax,0x125820
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
10bd9e: 8d 65 f4 lea -0xc(%ebp),%esp 10bda1: 5b pop %ebx 10bda2: 5e pop %esi 10bda3: 5f pop %edi 10bda4: c9 leave 10bda5: c3 ret
0010c82c <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10c82c: 55 push %ebp 10c82d: 89 e5 mov %esp,%ebp 10c82f: 53 push %ebx 10c830: 83 ec 08 sub $0x8,%esp 10c833: 8b 45 08 mov 0x8(%ebp),%eax 10c836: 8b 55 0c mov 0xc(%ebp),%edx 10c839: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10c83c: a3 30 55 12 00 mov %eax,0x125530
_Internal_errors_What_happened.is_internal = is_internal;
10c841: 88 15 34 55 12 00 mov %dl,0x125534
_Internal_errors_What_happened.the_error = the_error;
10c847: 89 1d 38 55 12 00 mov %ebx,0x125538
_User_extensions_Fatal( the_source, is_internal, the_error );
10c84d: 53 push %ebx 10c84e: 0f b6 d2 movzbl %dl,%edx 10c851: 52 push %edx 10c852: 50 push %eax 10c853: e8 ec 1b 00 00 call 10e444 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10c858: c7 05 20 56 12 00 05 movl $0x5,0x125620 <== NOT EXECUTED
10c85f: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10c862: fa cli <== NOT EXECUTED 10c863: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c865: f4 hlt <== NOT EXECUTED 10c866: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c869: eb fe jmp 10c869 <_Internal_error_Occurred+0x3d><== NOT EXECUTED
00110a48 <_Objects_API_maximum_class>:
#include <rtems/score/object.h>
unsigned int _Objects_API_maximum_class(
uint32_t api
)
{
110a48: 55 push %ebp 110a49: 89 e5 mov %esp,%ebp 110a4b: 8b 45 08 mov 0x8(%ebp),%eax 110a4e: 48 dec %eax 110a4f: 83 f8 02 cmp $0x2,%eax
110a52: 77 0c ja 110a60 <_Objects_API_maximum_class+0x18>
110a54: 8b 04 85 f0 01 12 00 mov 0x1201f0(,%eax,4),%eax
case OBJECTS_NO_API:
default:
break;
}
return 0;
}
110a5b: c9 leave 110a5c: c3 ret 110a5d: 8d 76 00 lea 0x0(%esi),%esi
#include <rtems/score/object.h>
unsigned int _Objects_API_maximum_class(
uint32_t api
)
{
110a60: 31 c0 xor %eax,%eax
case OBJECTS_NO_API:
default:
break;
}
return 0;
}
110a62: c9 leave 110a63: c3 ret
0010c8bc <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10c8bc: 55 push %ebp 10c8bd: 89 e5 mov %esp,%ebp 10c8bf: 56 push %esi 10c8c0: 53 push %ebx 10c8c1: 8b 5d 08 mov 0x8(%ebp),%ebx
* If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 )
10c8c4: 8b 43 18 mov 0x18(%ebx),%eax 10c8c7: 85 c0 test %eax,%eax
10c8c9: 75 0d jne 10c8d8 <_Objects_Allocate+0x1c><== ALWAYS TAKEN
return NULL;
10c8cb: 31 c9 xor %ecx,%ecx
);
}
#endif
return the_object;
}
10c8cd: 89 c8 mov %ecx,%eax 10c8cf: 8d 65 f8 lea -0x8(%ebp),%esp 10c8d2: 5b pop %ebx 10c8d3: 5e pop %esi 10c8d4: c9 leave 10c8d5: c3 ret 10c8d6: 66 90 xchg %ax,%ax
/*
* 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 );
10c8d8: 8d 73 20 lea 0x20(%ebx),%esi 10c8db: 83 ec 0c sub $0xc,%esp 10c8de: 56 push %esi 10c8df: e8 e8 f6 ff ff call 10bfcc <_Chain_Get> 10c8e4: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10c8e6: 83 c4 10 add $0x10,%esp 10c8e9: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10c8ed: 74 de je 10c8cd <_Objects_Allocate+0x11>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10c8ef: 85 c0 test %eax,%eax
10c8f1: 74 29 je 10c91c <_Objects_Allocate+0x60>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10c8f3: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c8f7: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c8fb: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10c8fd: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c901: 31 d2 xor %edx,%edx 10c903: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10c905: c1 e0 02 shl $0x2,%eax 10c908: 03 43 30 add 0x30(%ebx),%eax 10c90b: ff 08 decl (%eax)
information->inactive--;
10c90d: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10c911: 89 c8 mov %ecx,%eax 10c913: 8d 65 f8 lea -0x8(%ebp),%esp 10c916: 5b pop %ebx 10c917: 5e pop %esi 10c918: c9 leave 10c919: c3 ret 10c91a: 66 90 xchg %ax,%ax
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
10c91c: 83 ec 0c sub $0xc,%esp 10c91f: 53 push %ebx 10c920: e8 3b 00 00 00 call 10c960 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10c925: 89 34 24 mov %esi,(%esp) 10c928: e8 9f f6 ff ff call 10bfcc <_Chain_Get> 10c92d: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10c92f: 83 c4 10 add $0x10,%esp 10c932: 85 c0 test %eax,%eax
10c934: 74 97 je 10c8cd <_Objects_Allocate+0x11>
10c936: eb bb jmp 10c8f3 <_Objects_Allocate+0x37>
0010c960 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10c960: 55 push %ebp 10c961: 89 e5 mov %esp,%ebp 10c963: 57 push %edi 10c964: 56 push %esi 10c965: 53 push %ebx 10c966: 83 ec 4c sub $0x4c,%esp 10c969: 8b 5d 08 mov 0x8(%ebp),%ebx
/* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id );
10c96c: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c970: 89 45 cc mov %eax,-0x34(%ebp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10c973: 8b 4b 34 mov 0x34(%ebx),%ecx 10c976: 85 c9 test %ecx,%ecx
10c978: 0f 84 66 02 00 00 je 10cbe4 <_Objects_Extend_information+0x284>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10c97e: 8b 73 10 mov 0x10(%ebx),%esi 10c981: 66 89 75 d0 mov %si,-0x30(%ebp) 10c985: 8b 7b 14 mov 0x14(%ebx),%edi 10c988: 89 f0 mov %esi,%eax 10c98a: 31 d2 xor %edx,%edx 10c98c: 66 f7 f7 div %di 10c98f: 0f b7 f0 movzwl %ax,%esi
for ( ; block < block_count; block++ ) {
10c992: 85 f6 test %esi,%esi
10c994: 0f 84 63 02 00 00 je 10cbfd <_Objects_Extend_information+0x29d><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL ) {
10c99a: 8b 01 mov (%ecx),%eax 10c99c: 85 c0 test %eax,%eax
10c99e: 0f 84 6b 02 00 00 je 10cc0f <_Objects_Extend_information+0x2af><== NEVER TAKEN
10c9a4: 0f b7 ff movzwl %di,%edi
/* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id );
10c9a7: 8b 55 cc mov -0x34(%ebp),%edx 10c9aa: 89 55 d4 mov %edx,-0x2c(%ebp)
index_base = minimum_index; block = 0;
10c9ad: 31 d2 xor %edx,%edx 10c9af: 8b 45 d4 mov -0x2c(%ebp),%eax 10c9b2: eb 0a jmp 10c9be <_Objects_Extend_information+0x5e>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
10c9b4: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4)
10c9b8: 0f 84 c6 01 00 00 je 10cb84 <_Objects_Extend_information+0x224>
do_extend = false;
break;
} else
index_base += information->allocation_size;
10c9be: 01 f8 add %edi,%eax
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10c9c0: 42 inc %edx 10c9c1: 39 d6 cmp %edx,%esi
10c9c3: 77 ef ja 10c9b4 <_Objects_Extend_information+0x54>
10c9c5: 89 45 d4 mov %eax,-0x2c(%ebp)
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10c9c8: b1 01 mov $0x1,%cl
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10c9ca: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10c9ce: 01 f8 add %edi,%eax 10c9d0: 89 45 d0 mov %eax,-0x30(%ebp)
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
10c9d3: 3d ff ff 00 00 cmp $0xffff,%eax
10c9d8: 0f 87 9e 01 00 00 ja 10cb7c <_Objects_Extend_information+0x21c>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
10c9de: 0f af 7b 18 imul 0x18(%ebx),%edi
if ( information->auto_extend ) {
10c9e2: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10c9e6: 0f 84 a4 01 00 00 je 10cb90 <_Objects_Extend_information+0x230>
new_object_block = _Workspace_Allocate( block_size );
10c9ec: 83 ec 0c sub $0xc,%esp 10c9ef: 57 push %edi 10c9f0: 89 55 b8 mov %edx,-0x48(%ebp) 10c9f3: 88 4d b4 mov %cl,-0x4c(%ebp) 10c9f6: e8 0d 1e 00 00 call 10e808 <_Workspace_Allocate> 10c9fb: 89 45 c8 mov %eax,-0x38(%ebp)
if ( !new_object_block )
10c9fe: 83 c4 10 add $0x10,%esp 10ca01: 85 c0 test %eax,%eax 10ca03: 8b 55 b8 mov -0x48(%ebp),%edx 10ca06: 8a 4d b4 mov -0x4c(%ebp),%cl
10ca09: 0f 84 6d 01 00 00 je 10cb7c <_Objects_Extend_information+0x21c>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
10ca0f: 84 c9 test %cl,%cl
10ca11: 0f 84 ea 00 00 00 je 10cb01 <_Objects_Extend_information+0x1a1>
*/
/*
* Up the block count and maximum
*/
block_count++;
10ca17: 8d 7e 01 lea 0x1(%esi),%edi
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10ca1a: 83 ec 0c sub $0xc,%esp
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10ca1d: 8d 04 7f lea (%edi,%edi,2),%eax
((maximum + minimum_index) * sizeof(Objects_Control *));
10ca20: 03 45 d0 add -0x30(%ebp),%eax
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10ca23: 03 45 cc add -0x34(%ebp),%eax
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
10ca26: c1 e0 02 shl $0x2,%eax
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10ca29: 50 push %eax 10ca2a: 89 55 b8 mov %edx,-0x48(%ebp) 10ca2d: e8 d6 1d 00 00 call 10e808 <_Workspace_Allocate> 10ca32: 89 45 c4 mov %eax,-0x3c(%ebp)
if ( !object_blocks ) {
10ca35: 83 c4 10 add $0x10,%esp 10ca38: 85 c0 test %eax,%eax 10ca3a: 8b 55 b8 mov -0x48(%ebp),%edx
10ca3d: 0f 84 de 01 00 00 je 10cc21 <_Objects_Extend_information+0x2c1>
10ca43: 8b 45 c4 mov -0x3c(%ebp),%eax 10ca46: 8d 04 b8 lea (%eax,%edi,4),%eax 10ca49: 89 45 bc mov %eax,-0x44(%ebp) 10ca4c: 8b 4d c4 mov -0x3c(%ebp),%ecx 10ca4f: 8d 04 f9 lea (%ecx,%edi,8),%eax
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10ca52: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10ca56: 39 4d cc cmp %ecx,-0x34(%ebp)
10ca59: 0f 82 51 01 00 00 jb 10cbb0 <_Objects_Extend_information+0x250>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10ca5f: 8b 4d cc mov -0x34(%ebp),%ecx 10ca62: 85 c9 test %ecx,%ecx
10ca64: 74 12 je 10ca78 <_Objects_Extend_information+0x118><== NEVER TAKEN
10ca66: 31 c9 xor %ecx,%ecx 10ca68: 8b 7d cc mov -0x34(%ebp),%edi 10ca6b: 90 nop
local_table[ index ] = NULL;
10ca6c: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4)
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10ca73: 41 inc %ecx 10ca74: 39 cf cmp %ecx,%edi
10ca76: 77 f4 ja 10ca6c <_Objects_Extend_information+0x10c><== NEVER TAKEN
10ca78: c1 e6 02 shl $0x2,%esi 10ca7b: 89 75 c0 mov %esi,-0x40(%ebp)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10ca7e: 8b 4d c4 mov -0x3c(%ebp),%ecx 10ca81: 8b 75 c0 mov -0x40(%ebp),%esi 10ca84: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1)
inactive_per_block[block_count] = 0;
10ca8b: 8b 4d bc mov -0x44(%ebp),%ecx 10ca8e: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10ca95: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10ca99: 03 75 d4 add -0x2c(%ebp),%esi
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10ca9c: 39 75 d4 cmp %esi,-0x2c(%ebp)
10ca9f: 73 0f jae 10cab0 <_Objects_Extend_information+0x150><== NEVER TAKEN
10caa1: 8b 4d d4 mov -0x2c(%ebp),%ecx
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10caa4: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4)
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
10caab: 41 inc %ecx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10caac: 39 f1 cmp %esi,%ecx
10caae: 72 f4 jb 10caa4 <_Objects_Extend_information+0x144>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10cab0: 9c pushf 10cab1: fa cli 10cab2: 5f pop %edi
old_tables = information->object_blocks;
10cab3: 8b 4b 34 mov 0x34(%ebx),%ecx
information->object_blocks = object_blocks;
10cab6: 8b 75 c4 mov -0x3c(%ebp),%esi 10cab9: 89 73 34 mov %esi,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10cabc: 8b 75 bc mov -0x44(%ebp),%esi 10cabf: 89 73 30 mov %esi,0x30(%ebx)
information->local_table = local_table;
10cac2: 89 43 1c mov %eax,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10cac5: 8b 45 d0 mov -0x30(%ebp),%eax 10cac8: 66 89 43 10 mov %ax,0x10(%ebx)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cacc: 8b 33 mov (%ebx),%esi 10cace: c1 e6 18 shl $0x18,%esi 10cad1: 81 ce 00 00 01 00 or $0x10000,%esi
information->maximum_id = _Objects_Build_id(
10cad7: 0f b7 43 04 movzwl 0x4(%ebx),%eax
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10cadb: c1 e0 1b shl $0x1b,%eax 10cade: 09 c6 or %eax,%esi 10cae0: 0f b7 45 d0 movzwl -0x30(%ebp),%eax
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cae4: 09 c6 or %eax,%esi 10cae6: 89 73 0c mov %esi,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10cae9: 57 push %edi 10caea: 9d popf
if ( old_tables )
10caeb: 85 c9 test %ecx,%ecx
10caed: 74 12 je 10cb01 <_Objects_Extend_information+0x1a1>
_Workspace_Free( old_tables );
10caef: 83 ec 0c sub $0xc,%esp 10caf2: 51 push %ecx 10caf3: 89 55 b8 mov %edx,-0x48(%ebp) 10caf6: e8 29 1d 00 00 call 10e824 <_Workspace_Free> 10cafb: 83 c4 10 add $0x10,%esp 10cafe: 8b 55 b8 mov -0x48(%ebp),%edx
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10cb01: c1 e2 02 shl $0x2,%edx 10cb04: 89 55 d0 mov %edx,-0x30(%ebp) 10cb07: 8b 43 34 mov 0x34(%ebx),%eax 10cb0a: 8b 4d c8 mov -0x38(%ebp),%ecx 10cb0d: 89 0c 10 mov %ecx,(%eax,%edx,1)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10cb10: ff 73 18 pushl 0x18(%ebx) 10cb13: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10cb17: 50 push %eax 10cb18: 51 push %ecx 10cb19: 8d 7d dc lea -0x24(%ebp),%edi 10cb1c: 57 push %edi 10cb1d: e8 16 3a 00 00 call 110538 <_Chain_Initialize>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10cb22: 83 c4 10 add $0x10,%esp 10cb25: 8b 75 d4 mov -0x2c(%ebp),%esi
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cb28: 8d 43 20 lea 0x20(%ebx),%eax 10cb2b: 89 45 d4 mov %eax,-0x2c(%ebp)
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10cb2e: eb 29 jmp 10cb59 <_Objects_Extend_information+0x1f9> 10cb30: 8b 13 mov (%ebx),%edx 10cb32: c1 e2 18 shl $0x18,%edx 10cb35: 81 ca 00 00 01 00 or $0x10000,%edx
the_object->id = _Objects_Build_id(
10cb3b: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10cb3f: c1 e1 1b shl $0x1b,%ecx 10cb42: 09 ca or %ecx,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cb44: 09 f2 or %esi,%edx 10cb46: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cb49: 83 ec 08 sub $0x8,%esp 10cb4c: 50 push %eax 10cb4d: ff 75 d4 pushl -0x2c(%ebp) 10cb50: e8 3b f4 ff ff call 10bf90 <_Chain_Append>
index++;
10cb55: 46 inc %esi 10cb56: 83 c4 10 add $0x10,%esp
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10cb59: 83 ec 0c sub $0xc,%esp 10cb5c: 57 push %edi 10cb5d: e8 6a f4 ff ff call 10bfcc <_Chain_Get> 10cb62: 83 c4 10 add $0x10,%esp 10cb65: 85 c0 test %eax,%eax
10cb67: 75 c7 jne 10cb30 <_Objects_Extend_information+0x1d0>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10cb69: 8b 43 14 mov 0x14(%ebx),%eax 10cb6c: 8b 53 30 mov 0x30(%ebx),%edx 10cb6f: 0f b7 c8 movzwl %ax,%ecx 10cb72: 8b 75 d0 mov -0x30(%ebp),%esi 10cb75: 89 0c 32 mov %ecx,(%edx,%esi,1)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
10cb78: 66 01 43 2c add %ax,0x2c(%ebx)
}
10cb7c: 8d 65 f4 lea -0xc(%ebp),%esp 10cb7f: 5b pop %ebx 10cb80: 5e pop %esi 10cb81: 5f pop %edi 10cb82: c9 leave 10cb83: c3 ret 10cb84: 89 45 d4 mov %eax,-0x2c(%ebp)
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10cb87: 31 c9 xor %ecx,%ecx 10cb89: e9 3c fe ff ff jmp 10c9ca <_Objects_Extend_information+0x6a> 10cb8e: 66 90 xchg %ax,%ax
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
10cb90: 83 ec 0c sub $0xc,%esp 10cb93: 57 push %edi 10cb94: 89 55 b8 mov %edx,-0x48(%ebp) 10cb97: 88 4d b4 mov %cl,-0x4c(%ebp) 10cb9a: e8 9d 1c 00 00 call 10e83c <_Workspace_Allocate_or_fatal_error> 10cb9f: 89 45 c8 mov %eax,-0x38(%ebp) 10cba2: 83 c4 10 add $0x10,%esp 10cba5: 8a 4d b4 mov -0x4c(%ebp),%cl 10cba8: 8b 55 b8 mov -0x48(%ebp),%edx 10cbab: e9 5f fe ff ff jmp 10ca0f <_Objects_Extend_information+0xaf>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
10cbb0: c1 e6 02 shl $0x2,%esi 10cbb3: 89 75 c0 mov %esi,-0x40(%ebp) 10cbb6: 8b 73 34 mov 0x34(%ebx),%esi 10cbb9: 8b 7d c4 mov -0x3c(%ebp),%edi 10cbbc: 8b 4d c0 mov -0x40(%ebp),%ecx 10cbbf: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10cbc1: 8b 73 30 mov 0x30(%ebx),%esi 10cbc4: 8b 7d bc mov -0x44(%ebp),%edi 10cbc7: 8b 4d c0 mov -0x40(%ebp),%ecx 10cbca: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
10cbcc: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cbd0: 03 4d cc add -0x34(%ebp),%ecx
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10cbd3: c1 e1 02 shl $0x2,%ecx 10cbd6: 8b 73 1c mov 0x1c(%ebx),%esi 10cbd9: 89 c7 mov %eax,%edi 10cbdb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cbdd: e9 9c fe ff ff jmp 10ca7e <_Objects_Extend_information+0x11e> 10cbe2: 66 90 xchg %ax,%ax
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10cbe4: 8b 53 10 mov 0x10(%ebx),%edx 10cbe7: 66 89 55 d0 mov %dx,-0x30(%ebp) 10cbeb: 0f b7 7b 14 movzwl 0x14(%ebx),%edi
/* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id );
10cbef: 89 45 d4 mov %eax,-0x2c(%ebp)
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10cbf2: b1 01 mov $0x1,%cl
minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0;
10cbf4: 31 d2 xor %edx,%edx
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
10cbf6: 31 f6 xor %esi,%esi 10cbf8: e9 cd fd ff ff jmp 10c9ca <_Objects_Extend_information+0x6a>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10cbfd: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED
/* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id );
10cc00: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10cc03: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10cc06: b1 01 mov $0x1,%cl <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0;
10cc08: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cc0a: e9 bb fd ff ff jmp 10c9ca <_Objects_Extend_information+0x6a><== NOT EXECUTED
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
10cc0f: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED
/* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id );
10cc12: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10cc15: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10cc18: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
* extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0;
10cc1a: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cc1c: e9 a9 fd ff ff jmp 10c9ca <_Objects_Extend_information+0x6a><== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
10cc21: 83 ec 0c sub $0xc,%esp 10cc24: ff 75 c8 pushl -0x38(%ebp) 10cc27: e8 f8 1b 00 00 call 10e824 <_Workspace_Free>
return;
10cc2c: 83 c4 10 add $0x10,%esp 10cc2f: e9 48 ff ff ff jmp 10cb7c <_Objects_Extend_information+0x21c>
0010ccc4 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10ccc4: 55 push %ebp 10ccc5: 89 e5 mov %esp,%ebp 10ccc7: 56 push %esi 10ccc8: 53 push %ebx 10ccc9: 8b 75 08 mov 0x8(%ebp),%esi 10cccc: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10cccf: 66 85 db test %bx,%bx
10ccd2: 75 0c jne 10cce0 <_Objects_Get_information+0x1c>
the_class_api_maximum = _Objects_API_maximum_class( the_api );
if ( the_class_api_maximum == 0 )
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
10ccd4: 31 c0 xor %eax,%eax
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
10ccd6: 8d 65 f8 lea -0x8(%ebp),%esp 10ccd9: 5b pop %ebx 10ccda: 5e pop %esi 10ccdb: c9 leave 10ccdc: c3 ret 10ccdd: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
10cce0: 83 ec 0c sub $0xc,%esp 10cce3: 56 push %esi 10cce4: e8 5f 3d 00 00 call 110a48 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10cce9: 83 c4 10 add $0x10,%esp 10ccec: 85 c0 test %eax,%eax
10ccee: 74 e4 je 10ccd4 <_Objects_Get_information+0x10>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10ccf0: 0f b7 db movzwl %bx,%ebx 10ccf3: 39 d8 cmp %ebx,%eax
10ccf5: 72 dd jb 10ccd4 <_Objects_Get_information+0x10>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10ccf7: 8b 14 b5 28 54 12 00 mov 0x125428(,%esi,4),%edx
return NULL;
10ccfe: 31 c0 xor %eax,%eax
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10cd00: 85 d2 test %edx,%edx
10cd02: 74 d2 je 10ccd6 <_Objects_Get_information+0x12><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10cd04: 8b 04 9a mov (%edx,%ebx,4),%eax
if ( !info )
10cd07: 85 c0 test %eax,%eax
10cd09: 74 cb je 10ccd6 <_Objects_Get_information+0x12><== 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;
10cd0b: 31 d2 xor %edx,%edx 10cd0d: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cd12: 0f 95 c2 setne %dl 10cd15: f7 da neg %edx 10cd17: 21 d0 and %edx,%eax 10cd19: eb bb jmp 10ccd6 <_Objects_Get_information+0x12>
0010cd1c <_Objects_Get_isr_disable>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
10cd1c: 55 push %ebp 10cd1d: 89 e5 mov %esp,%ebp 10cd1f: 56 push %esi 10cd20: 53 push %ebx 10cd21: 8b 55 08 mov 0x8(%ebp),%edx 10cd24: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
10cd27: b8 01 00 00 00 mov $0x1,%eax 10cd2c: 2b 42 08 sub 0x8(%edx),%eax 10cd2f: 03 45 0c add 0xc(%ebp),%eax
_ISR_Disable( level );
10cd32: 9c pushf 10cd33: fa cli 10cd34: 5e pop %esi
if ( information->maximum >= index ) {
10cd35: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cd39: 39 c8 cmp %ecx,%eax
10cd3b: 77 1b ja 10cd58 <_Objects_Get_isr_disable+0x3c>
if ( (the_object = information->local_table[ index ]) != NULL ) {
10cd3d: 8b 52 1c mov 0x1c(%edx),%edx 10cd40: 8b 04 82 mov (%edx,%eax,4),%eax 10cd43: 85 c0 test %eax,%eax
10cd45: 74 21 je 10cd68 <_Objects_Get_isr_disable+0x4c>
*location = OBJECTS_LOCAL;
10cd47: c7 03 00 00 00 00 movl $0x0,(%ebx)
*level_p = level;
10cd4d: 8b 55 14 mov 0x14(%ebp),%edx 10cd50: 89 32 mov %esi,(%edx)
_Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif }
10cd52: 5b pop %ebx 10cd53: 5e pop %esi 10cd54: c9 leave 10cd55: c3 ret 10cd56: 66 90 xchg %ax,%ax
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
return NULL;
}
_ISR_Enable( level );
10cd58: 56 push %esi 10cd59: 9d popf
*location = OBJECTS_ERROR;
10cd5a: c7 03 01 00 00 00 movl $0x1,(%ebx)
#if defined(RTEMS_MULTIPROCESSING)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
10cd60: 31 c0 xor %eax,%eax
#endif }
10cd62: 5b pop %ebx 10cd63: 5e pop %esi 10cd64: c9 leave 10cd65: c3 ret 10cd66: 66 90 xchg %ax,%ax
if ( (the_object = information->local_table[ index ]) != NULL ) {
*location = OBJECTS_LOCAL;
*level_p = level;
return the_object;
}
_ISR_Enable( level );
10cd68: 56 push %esi 10cd69: 9d popf
*location = OBJECTS_ERROR;
10cd6a: c7 03 01 00 00 00 movl $0x1,(%ebx)
return NULL;
10cd70: eb e0 jmp 10cd52 <_Objects_Get_isr_disable+0x36>
0010e3f4 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
10e3f4: 55 push %ebp 10e3f5: 89 e5 mov %esp,%ebp 10e3f7: 57 push %edi 10e3f8: 56 push %esi 10e3f9: 53 push %ebx 10e3fa: 83 ec 2c sub $0x2c,%esp 10e3fd: 8b 7d 08 mov 0x8(%ebp),%edi 10e400: 8b 75 0c mov 0xc(%ebp),%esi 10e403: 8b 5d 10 mov 0x10(%ebp),%ebx
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
10e406: 85 f6 test %esi,%esi
10e408: 75 0e jne 10e418 <_Objects_Get_name_as_string+0x24>
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
10e40a: 31 db xor %ebx,%ebx
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
10e40c: 89 d8 mov %ebx,%eax 10e40e: 8d 65 f4 lea -0xc(%ebp),%esp 10e411: 5b pop %ebx 10e412: 5e pop %esi 10e413: 5f pop %edi 10e414: c9 leave 10e415: c3 ret 10e416: 66 90 xchg %ax,%ax
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
10e418: 85 db test %ebx,%ebx
10e41a: 74 f0 je 10e40c <_Objects_Get_name_as_string+0x18>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10e41c: 85 ff test %edi,%edi
10e41e: 75 08 jne 10e428 <_Objects_Get_name_as_string+0x34>
10e420: a1 38 17 13 00 mov 0x131738,%eax 10e425: 8b 78 08 mov 0x8(%eax),%edi
information = _Objects_Get_information_id( tmpId );
10e428: 83 ec 0c sub $0xc,%esp 10e42b: 57 push %edi 10e42c: e8 f3 fe ff ff call 10e324 <_Objects_Get_information_id>
if ( !information )
10e431: 83 c4 10 add $0x10,%esp 10e434: 85 c0 test %eax,%eax
10e436: 74 d2 je 10e40a <_Objects_Get_name_as_string+0x16>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
10e438: 51 push %ecx 10e439: 8d 55 e4 lea -0x1c(%ebp),%edx 10e43c: 52 push %edx 10e43d: 57 push %edi 10e43e: 50 push %eax 10e43f: e8 7c 00 00 00 call 10e4c0 <_Objects_Get>
switch ( location ) {
10e444: 83 c4 10 add $0x10,%esp 10e447: 8b 55 e4 mov -0x1c(%ebp),%edx 10e44a: 85 d2 test %edx,%edx
10e44c: 75 bc jne 10e40a <_Objects_Get_name_as_string+0x16>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
10e44e: 8b 50 0c mov 0xc(%eax),%edx
lname[ 0 ] = (u32_name >> 24) & 0xff;
10e451: 89 d1 mov %edx,%ecx 10e453: c1 e9 18 shr $0x18,%ecx 10e456: 88 c8 mov %cl,%al 10e458: 88 4d df mov %cl,-0x21(%ebp)
lname[ 1 ] = (u32_name >> 16) & 0xff;
10e45b: 89 d1 mov %edx,%ecx 10e45d: c1 e9 10 shr $0x10,%ecx 10e460: 88 4d e0 mov %cl,-0x20(%ebp)
lname[ 2 ] = (u32_name >> 8) & 0xff;
10e463: 89 d1 mov %edx,%ecx 10e465: c1 e9 08 shr $0x8,%ecx 10e468: 88 4d e1 mov %cl,-0x1f(%ebp)
lname[ 3 ] = (u32_name >> 0) & 0xff;
10e46b: 88 55 e2 mov %dl,-0x1e(%ebp)
lname[ 4 ] = '\0';
10e46e: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10e472: 4e dec %esi 10e473: 89 75 d4 mov %esi,-0x2c(%ebp)
10e476: 74 42 je 10e4ba <_Objects_Get_name_as_string+0xc6><== NEVER TAKEN
10e478: 84 c0 test %al,%al
10e47a: 74 3e je 10e4ba <_Objects_Get_name_as_string+0xc6>
10e47c: 89 d9 mov %ebx,%ecx 10e47e: 31 d2 xor %edx,%edx 10e480: eb 0a jmp 10e48c <_Objects_Get_name_as_string+0x98> 10e482: 66 90 xchg %ax,%ax 10e484: 8a 44 15 df mov -0x21(%ebp,%edx,1),%al 10e488: 84 c0 test %al,%al
10e48a: 74 21 je 10e4ad <_Objects_Get_name_as_string+0xb9>
*d = (isprint((unsigned char)*s)) ? *s : '*';
10e48c: 0f b6 f0 movzbl %al,%esi 10e48f: 8b 3d a8 73 12 00 mov 0x1273a8,%edi 10e495: 0f be 74 37 01 movsbl 0x1(%edi,%esi,1),%esi 10e49a: 81 e6 97 00 00 00 and $0x97,%esi
10e4a0: 75 02 jne 10e4a4 <_Objects_Get_name_as_string+0xb0>
10e4a2: b0 2a mov $0x2a,%al 10e4a4: 88 01 mov %al,(%ecx)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10e4a6: 42 inc %edx 10e4a7: 41 inc %ecx 10e4a8: 3b 55 d4 cmp -0x2c(%ebp),%edx
10e4ab: 72 d7 jb 10e484 <_Objects_Get_name_as_string+0x90>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
10e4ad: c6 01 00 movb $0x0,(%ecx)
_Thread_Enable_dispatch();
10e4b0: e8 93 0a 00 00 call 10ef48 <_Thread_Enable_dispatch>
return name;
10e4b5: e9 52 ff ff ff jmp 10e40c <_Objects_Get_name_as_string+0x18>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10e4ba: 89 d9 mov %ebx,%ecx 10e4bc: eb ef jmp 10e4ad <_Objects_Get_name_as_string+0xb9>
0010cebc <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
10cebc: 55 push %ebp 10cebd: 89 e5 mov %esp,%ebp 10cebf: 57 push %edi 10cec0: 56 push %esi 10cec1: 53 push %ebx 10cec2: 83 ec 0c sub $0xc,%esp 10cec5: 8b 5d 08 mov 0x8(%ebp),%ebx 10cec8: 8b 75 0c mov 0xc(%ebp),%esi 10cecb: 8b 7d 10 mov 0x10(%ebp),%edi
Objects_Control *object;
Objects_Id next_id;
if ( !information )
10cece: 85 db test %ebx,%ebx
10ced0: 75 0a jne 10cedc <_Objects_Get_next+0x20>
if ( !location_p )
return NULL;
if ( !next_id_p )
return NULL;
10ced2: 31 c0 xor %eax,%eax
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
10ced4: 8d 65 f4 lea -0xc(%ebp),%esp 10ced7: 5b pop %ebx 10ced8: 5e pop %esi 10ced9: 5f pop %edi 10ceda: c9 leave 10cedb: c3 ret
Objects_Id next_id;
if ( !information )
return NULL;
if ( !location_p )
10cedc: 85 ff test %edi,%edi
10cede: 74 f2 je 10ced2 <_Objects_Get_next+0x16>
return NULL;
if ( !next_id_p )
10cee0: 8b 45 14 mov 0x14(%ebp),%eax 10cee3: 85 c0 test %eax,%eax
10cee5: 74 eb je 10ced2 <_Objects_Get_next+0x16>
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
10cee7: 66 85 f6 test %si,%si
10ceea: 75 04 jne 10cef0 <_Objects_Get_next+0x34>
next_id = information->minimum_id;
10ceec: 8b 73 08 mov 0x8(%ebx),%esi 10ceef: 90 nop
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
10cef0: 66 39 73 10 cmp %si,0x10(%ebx)
10cef4: 72 22 jb 10cf18 <_Objects_Get_next+0x5c>
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
10cef6: 51 push %ecx 10cef7: 57 push %edi 10cef8: 56 push %esi 10cef9: 53 push %ebx 10cefa: e8 2d 00 00 00 call 10cf2c <_Objects_Get>
next_id++;
10ceff: 46 inc %esi
} while (*location_p != OBJECTS_LOCAL);
10cf00: 83 c4 10 add $0x10,%esp 10cf03: 8b 17 mov (%edi),%edx 10cf05: 85 d2 test %edx,%edx
10cf07: 75 e7 jne 10cef0 <_Objects_Get_next+0x34>
*next_id_p = next_id;
10cf09: 8b 55 14 mov 0x14(%ebp),%edx 10cf0c: 89 32 mov %esi,(%edx)
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
10cf0e: 8d 65 f4 lea -0xc(%ebp),%esp 10cf11: 5b pop %ebx 10cf12: 5e pop %esi 10cf13: 5f pop %edi 10cf14: c9 leave 10cf15: c3 ret 10cf16: 66 90 xchg %ax,%ax
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
{
*location_p = OBJECTS_ERROR;
10cf18: c7 07 01 00 00 00 movl $0x1,(%edi)
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
10cf1e: 8b 45 14 mov 0x14(%ebp),%eax 10cf21: c7 00 ff ff ff ff movl $0xffffffff,(%eax)
return 0;
10cf27: 31 c0 xor %eax,%eax 10cf29: eb a9 jmp 10ced4 <_Objects_Get_next+0x18>
0011b154 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
11b154: 55 push %ebp 11b155: 89 e5 mov %esp,%ebp 11b157: 53 push %ebx 11b158: 8b 55 08 mov 0x8(%ebp),%edx 11b15b: 8b 5d 10 mov 0x10(%ebp),%ebx
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
11b15e: b8 01 00 00 00 mov $0x1,%eax 11b163: 2b 42 08 sub 0x8(%edx),%eax 11b166: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
11b169: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b16d: 39 c8 cmp %ecx,%eax
11b16f: 77 13 ja 11b184 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
11b171: 8b 52 1c mov 0x1c(%edx),%edx 11b174: 8b 04 82 mov (%edx,%eax,4),%eax 11b177: 85 c0 test %eax,%eax
11b179: 74 09 je 11b184 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
11b17b: c7 03 00 00 00 00 movl $0x0,(%ebx)
* This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; }
11b181: 5b pop %ebx 11b182: c9 leave 11b183: c3 ret
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
11b184: c7 03 01 00 00 00 movl $0x1,(%ebx)
return NULL;
11b18a: 31 c0 xor %eax,%eax
}
11b18c: 5b pop %ebx 11b18d: c9 leave 11b18e: c3 ret
0010e00c <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10e00c: 55 push %ebp 10e00d: 89 e5 mov %esp,%ebp 10e00f: 83 ec 18 sub $0x18,%esp 10e012: 8b 55 08 mov 0x8(%ebp),%edx
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10e015: 85 d2 test %edx,%edx
10e017: 75 08 jne 10e021 <_Objects_Id_to_name+0x15>
10e019: a1 18 8d 12 00 mov 0x128d18,%eax 10e01e: 8b 50 08 mov 0x8(%eax),%edx 10e021: 89 d0 mov %edx,%eax 10e023: c1 e8 18 shr $0x18,%eax 10e026: 83 e0 07 and $0x7,%eax
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
10e029: 8d 48 ff lea -0x1(%eax),%ecx 10e02c: 83 f9 02 cmp $0x2,%ecx
10e02f: 77 3b ja 10e06c <_Objects_Id_to_name+0x60>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
10e031: 8b 04 85 28 8a 12 00 mov 0x128a28(,%eax,4),%eax 10e038: 85 c0 test %eax,%eax
10e03a: 74 30 je 10e06c <_Objects_Id_to_name+0x60>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10e03c: 89 d1 mov %edx,%ecx 10e03e: c1 e9 1b shr $0x1b,%ecx
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10e041: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( !information )
10e044: 85 c0 test %eax,%eax
10e046: 74 24 je 10e06c <_Objects_Id_to_name+0x60><== 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 );
10e048: 51 push %ecx 10e049: 8d 4d f4 lea -0xc(%ebp),%ecx 10e04c: 51 push %ecx 10e04d: 52 push %edx 10e04e: 50 push %eax 10e04f: e8 50 ff ff ff call 10dfa4 <_Objects_Get>
if ( !the_object )
10e054: 83 c4 10 add $0x10,%esp 10e057: 85 c0 test %eax,%eax
10e059: 74 11 je 10e06c <_Objects_Id_to_name+0x60>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10e05b: 8b 50 0c mov 0xc(%eax),%edx 10e05e: 8b 45 0c mov 0xc(%ebp),%eax 10e061: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10e063: e8 2c 0a 00 00 call 10ea94 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10e068: 31 c0 xor %eax,%eax
}
10e06a: c9 leave 10e06b: 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 ] )
return OBJECTS_INVALID_ID;
10e06c: b8 03 00 00 00 mov $0x3,%eax
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
10e071: c9 leave 10e072: c3 ret
0010cddc <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
10cddc: 55 push %ebp 10cddd: 89 e5 mov %esp,%ebp 10cddf: 57 push %edi 10cde0: 56 push %esi 10cde1: 53 push %ebx 10cde2: 83 ec 0c sub $0xc,%esp 10cde5: 8b 45 08 mov 0x8(%ebp),%eax 10cde8: 8b 55 0c mov 0xc(%ebp),%edx 10cdeb: 8b 5d 10 mov 0x10(%ebp),%ebx 10cdee: 8b 75 20 mov 0x20(%ebp),%esi 10cdf1: 0f b7 7d 18 movzwl 0x18(%ebp),%edi
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
10cdf5: 89 10 mov %edx,(%eax)
information->the_class = the_class;
10cdf7: 66 89 58 04 mov %bx,0x4(%eax)
information->size = size;
10cdfb: 89 78 18 mov %edi,0x18(%eax)
information->local_table = 0;
10cdfe: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
information->inactive_per_block = 0;
10ce05: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
information->object_blocks = 0;
10ce0c: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
information->inactive = 0;
10ce13: 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;
10ce19: 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;
10ce1f: 0f b7 db movzwl %bx,%ebx 10ce22: 8b 3c 95 28 54 12 00 mov 0x125428(,%edx,4),%edi 10ce29: 89 04 9f mov %eax,(%edi,%ebx,4)
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
10ce2c: 8b 7d 14 mov 0x14(%ebp),%edi 10ce2f: c1 ef 1f shr $0x1f,%edi
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
10ce32: 89 f9 mov %edi,%ecx 10ce34: 88 48 12 mov %cl,0x12(%eax)
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
10ce37: 8b 4d 14 mov 0x14(%ebp),%ecx 10ce3a: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
10ce40: 85 ff test %edi,%edi
10ce42: 74 04 je 10ce48 <_Objects_Initialize_information+0x6c>
10ce44: 85 c9 test %ecx,%ecx
10ce46: 74 67 je 10ceaf <_Objects_Initialize_information+0xd3>
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
10ce48: 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;
10ce4c: c7 40 1c c4 50 12 00 movl $0x1250c4,0x1c(%eax)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10ce53: c1 e2 18 shl $0x18,%edx 10ce56: 81 ca 00 00 01 00 or $0x10000,%edx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10ce5c: c1 e3 1b shl $0x1b,%ebx 10ce5f: 09 da or %ebx,%edx
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
10ce61: 31 db xor %ebx,%ebx 10ce63: 85 c9 test %ecx,%ecx 10ce65: 0f 95 c3 setne %bl
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10ce68: 09 da or %ebx,%edx 10ce6a: 89 50 08 mov %edx,0x8(%eax)
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
10ce6d: f7 c6 03 00 00 00 test $0x3,%esi
10ce73: 75 23 jne 10ce98 <_Objects_Initialize_information+0xbc><== NEVER TAKEN
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
10ce75: 66 89 70 38 mov %si,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 );
10ce79: 8d 50 24 lea 0x24(%eax),%edx 10ce7c: 89 50 20 mov %edx,0x20(%eax)
head->next = tail;
head->previous = NULL;
10ce7f: 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 );
10ce86: 8d 50 20 lea 0x20(%eax),%edx 10ce89: 89 50 28 mov %edx,0x28(%eax)
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
10ce8c: 85 c9 test %ecx,%ecx
10ce8e: 75 10 jne 10cea0 <_Objects_Initialize_information+0xc4>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10ce90: 8d 65 f4 lea -0xc(%ebp),%esp 10ce93: 5b pop %ebx 10ce94: 5e pop %esi 10ce95: 5f pop %edi 10ce96: c9 leave 10ce97: c3 ret
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
10ce98: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10ce9b: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED 10ce9e: eb d5 jmp 10ce75 <_Objects_Initialize_information+0x99><== NOT EXECUTED
/*
* 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 );
10cea0: 89 45 08 mov %eax,0x8(%ebp)
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10cea3: 8d 65 f4 lea -0xc(%ebp),%esp 10cea6: 5b pop %ebx 10cea7: 5e pop %esi 10cea8: 5f pop %edi 10cea9: 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 );
10ceaa: e9 b1 fa ff ff jmp 10c960 <_Objects_Extend_information>
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
_Internal_error_Occurred(
10ceaf: 50 push %eax 10ceb0: 6a 13 push $0x13 10ceb2: 6a 01 push $0x1 10ceb4: 6a 00 push $0x0 10ceb6: e8 71 f9 ff ff call 10c82c <_Internal_error_Occurred>
0010cecc <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
10cecc: 55 push %ebp 10cecd: 89 e5 mov %esp,%ebp 10cecf: 57 push %edi 10ced0: 56 push %esi 10ced1: 53 push %ebx 10ced2: 8b 45 08 mov 0x8(%ebp),%eax 10ced5: 8b 4d 0c mov 0xc(%ebp),%ecx 10ced8: 8b 55 10 mov 0x10(%ebp),%edx 10cedb: 8b 7d 14 mov 0x14(%ebp),%edi
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
10cede: 85 ff test %edi,%edi
10cee0: 74 56 je 10cf38 <_Objects_Name_to_id_u32+0x6c>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
10cee2: 85 c9 test %ecx,%ecx
10cee4: 74 08 je 10ceee <_Objects_Name_to_id_u32+0x22>
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10cee6: 8b 70 10 mov 0x10(%eax),%esi 10cee9: 66 85 f6 test %si,%si
10ceec: 75 0a jne 10cef8 <_Objects_Name_to_id_u32+0x2c>
return OBJECTS_INVALID_NAME;
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
10ceee: b8 01 00 00 00 mov $0x1,%eax
#endif }
10cef3: 5b pop %ebx 10cef4: 5e pop %esi 10cef5: 5f pop %edi 10cef6: c9 leave 10cef7: c3 ret
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10cef8: 85 d2 test %edx,%edx
10cefa: 75 20 jne 10cf1c <_Objects_Name_to_id_u32+0x50>
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
10cefc: 0f b7 f6 movzwl %si,%esi 10ceff: 8b 58 1c mov 0x1c(%eax),%ebx 10cf02: b8 01 00 00 00 mov $0x1,%eax 10cf07: 90 nop
the_object = information->local_table[ index ];
10cf08: 8b 14 83 mov (%ebx,%eax,4),%edx
if ( !the_object )
10cf0b: 85 d2 test %edx,%edx
10cf0d: 74 05 je 10cf14 <_Objects_Name_to_id_u32+0x48>
continue;
if ( name == the_object->name.name_u32 ) {
10cf0f: 39 4a 0c cmp %ecx,0xc(%edx)
10cf12: 74 18 je 10cf2c <_Objects_Name_to_id_u32+0x60>
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
10cf14: 40 inc %eax 10cf15: 39 c6 cmp %eax,%esi
10cf17: 73 ef jae 10cf08 <_Objects_Name_to_id_u32+0x3c>
10cf19: eb d3 jmp 10ceee <_Objects_Name_to_id_u32+0x22> 10cf1b: 90 nop
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
(node == OBJECTS_SEARCH_ALL_NODES ||
10cf1c: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
10cf22: 74 d8 je 10cefc <_Objects_Name_to_id_u32+0x30>
node == OBJECTS_SEARCH_LOCAL_NODE ||
10cf24: 4a dec %edx
10cf25: 75 c7 jne 10ceee <_Objects_Name_to_id_u32+0x22>
10cf27: eb d3 jmp 10cefc <_Objects_Name_to_id_u32+0x30> 10cf29: 8d 76 00 lea 0x0(%esi),%esi
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
10cf2c: 8b 42 08 mov 0x8(%edx),%eax 10cf2f: 89 07 mov %eax,(%edi)
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10cf31: 31 c0 xor %eax,%eax
name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif }
10cf33: 5b pop %ebx 10cf34: 5e pop %esi 10cf35: 5f pop %edi 10cf36: c9 leave 10cf37: c3 ret
#endif
/* ASSERT: information->is_string == false */
if ( !id )
return OBJECTS_INVALID_ADDRESS;
10cf38: b8 02 00 00 00 mov $0x2,%eax
name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif }
10cf3d: 5b pop %ebx 10cf3e: 5e pop %esi 10cf3f: 5f pop %edi 10cf40: c9 leave 10cf41: c3 ret
0010edac <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
10edac: 55 push %ebp 10edad: 89 e5 mov %esp,%ebp 10edaf: 53 push %ebx 10edb0: 83 ec 0c sub $0xc,%esp 10edb3: 8b 5d 10 mov 0x10(%ebp),%ebx
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
10edb6: 8b 45 08 mov 0x8(%ebp),%eax 10edb9: 0f b7 40 38 movzwl 0x38(%eax),%eax 10edbd: 50 push %eax 10edbe: 53 push %ebx 10edbf: e8 d4 66 00 00 call 115498 <strnlen>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10edc4: 0f be 0b movsbl (%ebx),%ecx 10edc7: c1 e1 18 shl $0x18,%ecx 10edca: 83 c4 10 add $0x10,%esp 10edcd: 83 f8 01 cmp $0x1,%eax
10edd0: 76 32 jbe 10ee04 <_Objects_Set_name+0x58>
10edd2: 0f be 53 01 movsbl 0x1(%ebx),%edx 10edd6: c1 e2 10 shl $0x10,%edx 10edd9: 09 ca or %ecx,%edx 10eddb: 83 f8 02 cmp $0x2,%eax
10edde: 74 2c je 10ee0c <_Objects_Set_name+0x60>
10ede0: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10ede4: c1 e1 08 shl $0x8,%ecx 10ede7: 09 d1 or %edx,%ecx 10ede9: 83 f8 03 cmp $0x3,%eax
10edec: 74 37 je 10ee25 <_Objects_Set_name+0x79>
10edee: 0f be 43 03 movsbl 0x3(%ebx),%eax 10edf2: 09 c1 or %eax,%ecx 10edf4: 8b 55 0c mov 0xc(%ebp),%edx 10edf7: 89 4a 0c mov %ecx,0xc(%edx)
);
}
return true;
}
10edfa: b0 01 mov $0x1,%al 10edfc: 8b 5d fc mov -0x4(%ebp),%ebx 10edff: c9 leave 10ee00: c3 ret 10ee01: 8d 76 00 lea 0x0(%esi),%esi
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10ee04: 89 ca mov %ecx,%edx 10ee06: 81 ca 00 00 20 00 or $0x200000,%edx 10ee0c: 89 d1 mov %edx,%ecx 10ee0e: 80 cd 20 or $0x20,%ch 10ee11: b8 20 00 00 00 mov $0x20,%eax 10ee16: 09 c1 or %eax,%ecx 10ee18: 8b 55 0c mov 0xc(%ebp),%edx 10ee1b: 89 4a 0c mov %ecx,0xc(%edx)
);
}
return true;
}
10ee1e: b0 01 mov $0x1,%al 10ee20: 8b 5d fc mov -0x4(%ebp),%ebx 10ee23: c9 leave 10ee24: c3 ret
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10ee25: b8 20 00 00 00 mov $0x20,%eax 10ee2a: eb c6 jmp 10edf2 <_Objects_Set_name+0x46>
0010cf44 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
10cf44: 55 push %ebp 10cf45: 89 e5 mov %esp,%ebp 10cf47: 57 push %edi 10cf48: 56 push %esi 10cf49: 53 push %ebx 10cf4a: 83 ec 1c sub $0x1c,%esp
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
10cf4d: 8b 45 08 mov 0x8(%ebp),%eax 10cf50: 0f b7 58 08 movzwl 0x8(%eax),%ebx
block_count = (information->maximum - index_base) /
10cf54: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10cf58: 0f b7 40 10 movzwl 0x10(%eax),%eax 10cf5c: 29 d8 sub %ebx,%eax 10cf5e: 31 d2 xor %edx,%edx 10cf60: f7 f1 div %ecx
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10cf62: 85 c0 test %eax,%eax
10cf64: 74 21 je 10cf87 <_Objects_Shrink_information+0x43><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
10cf66: 8b 55 08 mov 0x8(%ebp),%edx 10cf69: 8b 7a 30 mov 0x30(%edx),%edi 10cf6c: 3b 0f cmp (%edi),%ecx
10cf6e: 74 1f je 10cf8f <_Objects_Shrink_information+0x4b><== NEVER TAKEN
10cf70: 31 d2 xor %edx,%edx 10cf72: eb 0e jmp 10cf82 <_Objects_Shrink_information+0x3e>
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
10cf74: 01 cb add %ecx,%ebx 10cf76: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
10cf7d: 3b 0c 97 cmp (%edi,%edx,4),%ecx
10cf80: 74 12 je 10cf94 <_Objects_Shrink_information+0x50>
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10cf82: 42 inc %edx 10cf83: 39 d0 cmp %edx,%eax
10cf85: 77 ed ja 10cf74 <_Objects_Shrink_information+0x30>
return;
}
index_base += information->allocation_size;
}
}
10cf87: 8d 65 f4 lea -0xc(%ebp),%esp 10cf8a: 5b pop %ebx 10cf8b: 5e pop %esi 10cf8c: 5f pop %edi 10cf8d: c9 leave 10cf8e: c3 ret
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
10cf8f: 31 f6 xor %esi,%esi 10cf91: 8d 76 00 lea 0x0(%esi),%esi
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
10cf94: 8b 55 08 mov 0x8(%ebp),%edx 10cf97: 8b 42 20 mov 0x20(%edx),%eax 10cf9a: 89 75 e4 mov %esi,-0x1c(%ebp) 10cf9d: eb 07 jmp 10cfa6 <_Objects_Shrink_information+0x62> 10cf9f: 90 nop
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
10cfa0: 85 ff test %edi,%edi
10cfa2: 74 2c je 10cfd0 <_Objects_Shrink_information+0x8c>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10cfa4: 89 f8 mov %edi,%eax
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
10cfa6: 0f b7 50 08 movzwl 0x8(%eax),%edx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10cfaa: 8b 38 mov (%eax),%edi
if ((index >= index_base) &&
10cfac: 39 da cmp %ebx,%edx
10cfae: 72 f0 jb 10cfa0 <_Objects_Shrink_information+0x5c>
(index < (index_base + information->allocation_size))) {
10cfb0: 8b 75 08 mov 0x8(%ebp),%esi 10cfb3: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10cfb7: 8d 0c 0b lea (%ebx,%ecx,1),%ecx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
10cfba: 39 ca cmp %ecx,%edx
10cfbc: 73 e2 jae 10cfa0 <_Objects_Shrink_information+0x5c>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
10cfbe: 83 ec 0c sub $0xc,%esp 10cfc1: 50 push %eax 10cfc2: e8 ed ef ff ff call 10bfb4 <_Chain_Extract> 10cfc7: 83 c4 10 add $0x10,%esp
}
}
while ( the_object );
10cfca: 85 ff test %edi,%edi
10cfcc: 75 d6 jne 10cfa4 <_Objects_Shrink_information+0x60>
10cfce: 66 90 xchg %ax,%ax 10cfd0: 8b 75 e4 mov -0x1c(%ebp),%esi
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
10cfd3: 83 ec 0c sub $0xc,%esp 10cfd6: 8b 55 08 mov 0x8(%ebp),%edx 10cfd9: 8b 42 34 mov 0x34(%edx),%eax 10cfdc: ff 34 30 pushl (%eax,%esi,1) 10cfdf: e8 40 18 00 00 call 10e824 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
10cfe4: 8b 55 08 mov 0x8(%ebp),%edx 10cfe7: 8b 42 34 mov 0x34(%edx),%eax 10cfea: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1)
information->inactive_per_block[ block ] = 0;
10cff1: 8b 42 30 mov 0x30(%edx),%eax 10cff4: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1)
information->inactive -= information->allocation_size;
10cffb: 8b 42 14 mov 0x14(%edx),%eax 10cffe: 66 29 42 2c sub %ax,0x2c(%edx)
return;
10d002: 83 c4 10 add $0x10,%esp
}
index_base += information->allocation_size;
}
}
10d005: 8d 65 f4 lea -0xc(%ebp),%esp 10d008: 5b pop %ebx 10d009: 5e pop %esi 10d00a: 5f pop %edi 10d00b: c9 leave 10d00c: c3 ret
0010d76c <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
10d76c: 55 push %ebp 10d76d: 89 e5 mov %esp,%ebp 10d76f: 56 push %esi 10d770: 53 push %ebx 10d771: 8b 5d 08 mov 0x8(%ebp),%ebx 10d774: 8b 75 0c mov 0xc(%ebp),%esi
if ( !the_heap )
10d777: 85 db test %ebx,%ebx
10d779: 74 35 je 10d7b0 <_Protected_heap_Get_information+0x44>
return false;
if ( !the_info )
10d77b: 85 f6 test %esi,%esi
10d77d: 74 31 je 10d7b0 <_Protected_heap_Get_information+0x44>
return false;
_RTEMS_Lock_allocator();
10d77f: 83 ec 0c sub $0xc,%esp 10d782: ff 35 fc 65 12 00 pushl 0x1265fc 10d788: e8 7b ee ff ff call 10c608 <_API_Mutex_Lock>
_Heap_Get_information( the_heap, the_info );
10d78d: 5a pop %edx 10d78e: 59 pop %ecx 10d78f: 56 push %esi 10d790: 53 push %ebx 10d791: e8 da 3c 00 00 call 111470 <_Heap_Get_information>
_RTEMS_Unlock_allocator();
10d796: 58 pop %eax 10d797: ff 35 fc 65 12 00 pushl 0x1265fc 10d79d: e8 ae ee ff ff call 10c650 <_API_Mutex_Unlock>
return true;
10d7a2: 83 c4 10 add $0x10,%esp 10d7a5: b0 01 mov $0x1,%al
}
10d7a7: 8d 65 f8 lea -0x8(%ebp),%esp 10d7aa: 5b pop %ebx 10d7ab: 5e pop %esi 10d7ac: c9 leave 10d7ad: c3 ret 10d7ae: 66 90 xchg %ax,%ax
{
if ( !the_heap )
return false;
if ( !the_info )
return false;
10d7b0: 31 c0 xor %eax,%eax
_RTEMS_Lock_allocator();
_Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
return true;
}
10d7b2: 8d 65 f8 lea -0x8(%ebp),%esp 10d7b5: 5b pop %ebx 10d7b6: 5e pop %esi 10d7b7: c9 leave 10d7b8: c3 ret
00110af4 <_Protected_heap_Walk>:
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
110af4: 55 push %ebp 110af5: 89 e5 mov %esp,%ebp 110af7: 56 push %esi 110af8: 53 push %ebx 110af9: 83 ec 10 sub $0x10,%esp 110afc: 8b 5d 08 mov 0x8(%ebp),%ebx 110aff: 8b 75 0c mov 0xc(%ebp),%esi 110b02: 8a 45 10 mov 0x10(%ebp),%al
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
110b05: 8b 15 50 d3 12 00 mov 0x12d350,%edx 110b0b: 85 d2 test %edx,%edx
110b0d: 74 19 je 110b28 <_Protected_heap_Walk+0x34>
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
110b0f: 0f b6 c0 movzbl %al,%eax 110b12: 89 45 10 mov %eax,0x10(%ebp) 110b15: 89 75 0c mov %esi,0xc(%ebp) 110b18: 89 5d 08 mov %ebx,0x8(%ebp)
} return status; }
110b1b: 8d 65 f8 lea -0x8(%ebp),%esp 110b1e: 5b pop %ebx 110b1f: 5e pop %esi 110b20: c9 leave
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
110b21: e9 76 f2 ff ff jmp 10fd9c <_Heap_Walk> 110b26: 66 90 xchg %ax,%ax
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
110b28: 83 ec 0c sub $0xc,%esp 110b2b: ff 35 3c d4 12 00 pushl 0x12d43c 110b31: 88 45 f4 mov %al,-0xc(%ebp) 110b34: e8 83 e4 ff ff call 10efbc <_API_Mutex_Lock>
status = _Heap_Walk( the_heap, source, do_dump );
110b39: 83 c4 0c add $0xc,%esp 110b3c: 8a 45 f4 mov -0xc(%ebp),%al 110b3f: 0f b6 c0 movzbl %al,%eax 110b42: 50 push %eax 110b43: 56 push %esi 110b44: 53 push %ebx 110b45: e8 52 f2 ff ff call 10fd9c <_Heap_Walk>
_RTEMS_Unlock_allocator();
110b4a: 5a pop %edx 110b4b: ff 35 3c d4 12 00 pushl 0x12d43c 110b51: 88 45 f4 mov %al,-0xc(%ebp) 110b54: e8 ab e4 ff ff call 10f004 <_API_Mutex_Unlock> 110b59: 83 c4 10 add $0x10,%esp
} else {
status = _Heap_Walk( the_heap, source, do_dump );
}
return status;
}
110b5c: 8a 45 f4 mov -0xc(%ebp),%al 110b5f: 8d 65 f8 lea -0x8(%ebp),%esp 110b62: 5b pop %ebx 110b63: 5e pop %esi 110b64: c9 leave 110b65: c3 ret
00110348 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
110348: 55 push %ebp 110349: 89 e5 mov %esp,%ebp 11034b: 53 push %ebx 11034c: 83 ec 10 sub $0x10,%esp 11034f: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
110352: 80 3d e4 11 12 00 01 cmpb $0x1,0x1211e4 110359: 19 c0 sbb %eax,%eax 11035b: 83 e0 c0 and $0xffffffc0,%eax 11035e: 83 c0 60 add $0x60,%eax
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
110361: 50 push %eax 110362: e8 a1 e4 ff ff call 10e808 <_Workspace_Allocate>
if ( !api )
110367: 83 c4 10 add $0x10,%esp 11036a: 85 c0 test %eax,%eax
11036c: 74 6a je 1103d8 <_RTEMS_tasks_Create_extension+0x90>
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
11036e: 89 83 e4 00 00 00 mov %eax,0xe4(%ebx)
api->pending_events = EVENT_SETS_NONE_PENDING;
110374: c7 00 00 00 00 00 movl $0x0,(%eax)
api->event_condition = 0;
11037a: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
110381: c6 40 08 00 movb $0x0,0x8(%eax)
information->handler = NULL;
110385: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
information->mode_set = RTEMS_DEFAULT_MODES;
11038c: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
information->signals_posted = 0;
110393: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
information->signals_pending = 0;
11039a: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
information->nest_level = 0;
1103a1: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
_ASR_Initialize( &api->Signal ); created->task_variables = NULL;
1103a8: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
1103af: 00 00 00
if ( rtems_configuration_get_notepads_enabled() ) {
1103b2: 80 3d e4 11 12 00 00 cmpb $0x0,0x1211e4
1103b9: 74 13 je 1103ce <_RTEMS_tasks_Create_extension+0x86>
1103bb: 31 d2 xor %edx,%edx 1103bd: 8d 76 00 lea 0x0(%esi),%esi
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
1103c0: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4)
1103c7: 00
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
1103c8: 42 inc %edx 1103c9: 83 fa 10 cmp $0x10,%edx
1103cc: 75 f2 jne 1103c0 <_RTEMS_tasks_Create_extension+0x78>
api->Notepads[i] = 0;
}
return true;
1103ce: b0 01 mov $0x1,%al
}
1103d0: 8b 5d fc mov -0x4(%ebp),%ebx 1103d3: c9 leave 1103d4: c3 ret 1103d5: 8d 76 00 lea 0x0(%esi),%esi
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
1103d8: 31 c0 xor %eax,%eax
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
1103da: 8b 5d fc mov -0x4(%ebp),%ebx 1103dd: c9 leave 1103de: c3 ret
001102f0 <_RTEMS_tasks_Delete_extension>:
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
1102f0: 55 push %ebp 1102f1: 89 e5 mov %esp,%ebp 1102f3: 56 push %esi 1102f4: 53 push %ebx 1102f5: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
1102f8: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax
deleted->task_variables = NULL;
1102fe: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
110305: 00 00 00
while (tvp) {
110308: 85 c0 test %eax,%eax
11030a: 75 06 jne 110312 <_RTEMS_tasks_Delete_extension+0x22>
11030c: eb 17 jmp 110325 <_RTEMS_tasks_Delete_extension+0x35> 11030e: 66 90 xchg %ax,%ax
next = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
tvp = next;
110310: 89 f0 mov %esi,%eax
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
next = (rtems_task_variable_t *)tvp->next;
110312: 8b 30 mov (%eax),%esi
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
110314: 83 ec 08 sub $0x8,%esp 110317: 50 push %eax 110318: 53 push %ebx 110319: e8 56 01 00 00 call 110474 <_RTEMS_Tasks_Invoke_task_variable_dtor>
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
11031e: 83 c4 10 add $0x10,%esp 110321: 85 f6 test %esi,%esi
110323: 75 eb jne 110310 <_RTEMS_tasks_Delete_extension+0x20>
/*
* Free API specific memory
*/
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
110325: 83 ec 0c sub $0xc,%esp 110328: ff b3 e4 00 00 00 pushl 0xe4(%ebx) 11032e: e8 f1 e4 ff ff call 10e824 <_Workspace_Free>
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
110333: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
11033a: 00 00 00
11033d: 83 c4 10 add $0x10,%esp
}
110340: 8d 65 f8 lea -0x8(%ebp),%esp 110343: 5b pop %ebx 110344: 5e pop %esi 110345: c9 leave 110346: c3 ret
00110274 <_RTEMS_tasks_Initialize_user_tasks>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
110274: 55 push %ebp 110275: 89 e5 mov %esp,%ebp 110277: 83 ec 08 sub $0x8,%esp
if ( _RTEMS_tasks_Initialize_user_tasks_p )
11027a: a1 64 12 12 00 mov 0x121264,%eax 11027f: 85 c0 test %eax,%eax
110281: 74 05 je 110288 <_RTEMS_tasks_Initialize_user_tasks+0x14>
(*_RTEMS_tasks_Initialize_user_tasks_p)();
}
110283: c9 leave
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
if ( _RTEMS_tasks_Initialize_user_tasks_p )
(*_RTEMS_tasks_Initialize_user_tasks_p)();
110284: ff e0 jmp *%eax 110286: 66 90 xchg %ax,%ax
}
110288: c9 leave 110289: c3 ret
0010ba80 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
10ba80: 55 push %ebp 10ba81: 89 e5 mov %esp,%ebp 10ba83: 57 push %edi 10ba84: 56 push %esi 10ba85: 53 push %ebx 10ba86: 83 ec 1c sub $0x1c,%esp
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
10ba89: 8b 1d 0c 12 12 00 mov 0x12120c,%ebx
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
10ba8f: 8b 3d 08 12 12 00 mov 0x121208,%edi
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
10ba95: 85 db test %ebx,%ebx
10ba97: 74 46 je 10badf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10ba99: 85 ff test %edi,%edi
10ba9b: 74 42 je 10badf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN
10ba9d: 31 f6 xor %esi,%esi 10ba9f: 90 nop
return_value = rtems_task_create(
10baa0: 83 ec 08 sub $0x8,%esp 10baa3: 8d 45 e4 lea -0x1c(%ebp),%eax 10baa6: 50 push %eax 10baa7: ff 73 0c pushl 0xc(%ebx) 10baaa: ff 73 14 pushl 0x14(%ebx) 10baad: ff 73 04 pushl 0x4(%ebx) 10bab0: ff 73 08 pushl 0x8(%ebx) 10bab3: ff 33 pushl (%ebx) 10bab5: e8 92 fd ff ff call 10b84c <rtems_task_create>
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
10baba: 83 c4 20 add $0x20,%esp 10babd: 85 c0 test %eax,%eax
10babf: 75 26 jne 10bae7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
10bac1: 51 push %ecx 10bac2: ff 73 18 pushl 0x18(%ebx) 10bac5: ff 73 10 pushl 0x10(%ebx) 10bac8: ff 75 e4 pushl -0x1c(%ebp) 10bacb: e8 24 00 00 00 call 10baf4 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
10bad0: 83 c4 10 add $0x10,%esp 10bad3: 85 c0 test %eax,%eax
10bad5: 75 10 jne 10bae7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10bad7: 46 inc %esi 10bad8: 83 c3 1c add $0x1c,%ebx 10badb: 39 f7 cmp %esi,%edi
10badd: 77 c1 ja 10baa0 <_RTEMS_tasks_Initialize_user_tasks_body+0x20><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
10badf: 8d 65 f4 lea -0xc(%ebp),%esp 10bae2: 5b pop %ebx 10bae3: 5e pop %esi 10bae4: 5f pop %edi 10bae5: c9 leave 10bae6: c3 ret
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
10bae7: 52 push %edx 10bae8: 50 push %eax 10bae9: 6a 01 push $0x1 10baeb: 6a 01 push $0x1 10baed: e8 3a 0d 00 00 call 10c82c <_Internal_error_Occurred>
0011028c <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
11028c: 55 push %ebp 11028d: 89 e5 mov %esp,%ebp 11028f: 57 push %edi 110290: 56 push %esi 110291: 53 push %ebx 110292: 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 ];
110295: 8b 45 08 mov 0x8(%ebp),%eax 110298: 8b 98 e4 00 00 00 mov 0xe4(%eax),%ebx
if ( !api )
11029e: 85 db test %ebx,%ebx
1102a0: 74 45 je 1102e7 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
1102a2: 9c pushf 1102a3: fa cli 1102a4: 58 pop %eax
signal_set = asr->signals_posted;
1102a5: 8b 73 14 mov 0x14(%ebx),%esi
asr->signals_posted = 0;
1102a8: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_ISR_Enable( level );
1102af: 50 push %eax 1102b0: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
1102b1: 85 f6 test %esi,%esi
1102b3: 74 32 je 1102e7 <_RTEMS_tasks_Post_switch_extension+0x5b>
return;
asr->nest_level += 1;
1102b5: ff 43 1c incl 0x1c(%ebx)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
1102b8: 50 push %eax 1102b9: 8d 7d e4 lea -0x1c(%ebp),%edi 1102bc: 57 push %edi 1102bd: 68 ff ff 00 00 push $0xffff 1102c2: ff 73 10 pushl 0x10(%ebx) 1102c5: e8 7a 1c 00 00 call 111f44 <rtems_task_mode>
(*asr->handler)( signal_set );
1102ca: 89 34 24 mov %esi,(%esp) 1102cd: ff 53 0c call *0xc(%ebx)
asr->nest_level -= 1;
1102d0: ff 4b 1c decl 0x1c(%ebx)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
1102d3: 83 c4 0c add $0xc,%esp 1102d6: 57 push %edi 1102d7: 68 ff ff 00 00 push $0xffff 1102dc: ff 75 e4 pushl -0x1c(%ebp) 1102df: e8 60 1c 00 00 call 111f44 <rtems_task_mode> 1102e4: 83 c4 10 add $0x10,%esp
}
1102e7: 8d 65 f4 lea -0xc(%ebp),%esp 1102ea: 5b pop %ebx 1102eb: 5e pop %esi 1102ec: 5f pop %edi 1102ed: c9 leave 1102ee: c3 ret
0011022c <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
11022c: 55 push %ebp 11022d: 89 e5 mov %esp,%ebp
/*
* Per Task Variables
*/
tvp = executing->task_variables;
11022f: 8b 45 08 mov 0x8(%ebp),%eax 110232: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax
while (tvp) {
110238: 85 c0 test %eax,%eax
11023a: 74 13 je 11024f <_RTEMS_tasks_Switch_extension+0x23>
tvp->tval = *tvp->ptr;
11023c: 8b 50 04 mov 0x4(%eax),%edx 11023f: 8b 0a mov (%edx),%ecx 110241: 89 48 0c mov %ecx,0xc(%eax)
*tvp->ptr = tvp->gval;
110244: 8b 48 08 mov 0x8(%eax),%ecx 110247: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
110249: 8b 00 mov (%eax),%eax
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
11024b: 85 c0 test %eax,%eax
11024d: 75 ed jne 11023c <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
11024f: 8b 45 0c mov 0xc(%ebp),%eax 110252: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax
while (tvp) {
110258: 85 c0 test %eax,%eax
11025a: 74 13 je 11026f <_RTEMS_tasks_Switch_extension+0x43>
tvp->gval = *tvp->ptr;
11025c: 8b 50 04 mov 0x4(%eax),%edx 11025f: 8b 0a mov (%edx),%ecx 110261: 89 48 08 mov %ecx,0x8(%eax)
*tvp->ptr = tvp->tval;
110264: 8b 48 0c mov 0xc(%eax),%ecx 110267: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
110269: 8b 00 mov (%eax),%eax
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
11026b: 85 c0 test %eax,%eax
11026d: 75 ed jne 11025c <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
11026f: c9 leave 110270: c3 ret
0010c4dc <_Rate_monotonic_Initiate_statistics>:
}
void _Rate_monotonic_Initiate_statistics(
Rate_monotonic_Control *the_period
)
{
10c4dc: 55 push %ebp 10c4dd: 89 e5 mov %esp,%ebp 10c4df: 57 push %edi 10c4e0: 56 push %esi 10c4e1: 53 push %ebx 10c4e2: 83 ec 28 sub $0x28,%esp 10c4e5: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *owning_thread = the_period->owner;
10c4e8: 8b 73 40 mov 0x40(%ebx),%esi
* If using nanosecond statistics, we need to obtain the uptime.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
_TOD_Get_uptime( &uptime );
10c4eb: 8d 7d e0 lea -0x20(%ebp),%edi 10c4ee: 57 push %edi 10c4ef: e8 d0 17 00 00 call 10dcc4 <_TOD_Get_uptime>
/*
* Set the starting point and the CPU time used for the statistics.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
the_period->time_period_initiated = uptime;
10c4f4: 8b 45 e0 mov -0x20(%ebp),%eax 10c4f7: 8b 55 e4 mov -0x1c(%ebp),%edx 10c4fa: 89 43 4c mov %eax,0x4c(%ebx) 10c4fd: 89 53 50 mov %edx,0x50(%ebx)
#else
the_period->time_period_initiated = _Watchdog_Ticks_since_boot;
#endif
the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used;
10c500: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10c506: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10c50c: 89 43 44 mov %eax,0x44(%ebx) 10c50f: 89 53 48 mov %edx,0x48(%ebx)
* routine is invoked from rtems_rate_monotonic_period, the owner will
* be the executing thread. When this routine is invoked from
* _Rate_monotonic_Timeout, it will not.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
10c512: 83 c4 10 add $0x10,%esp 10c515: 39 35 38 88 12 00 cmp %esi,0x128838
10c51b: 74 0b je 10c528 <_Rate_monotonic_Initiate_statistics+0x4c>
);
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
}
#endif
}
10c51d: 8d 65 f4 lea -0xc(%ebp),%esp 10c520: 5b pop %ebx 10c521: 5e pop %esi 10c522: 5f pop %edi 10c523: c9 leave 10c524: c3 ret 10c525: 8d 76 00 lea 0x0(%esi),%esi
/*
* Adjust the CPU time used to account for the time since last
* context switch.
*/
_Timespec_Subtract(
10c528: 50 push %eax
&_Thread_Time_of_last_context_switch, &uptime, &ran
10c529: 8d 75 d8 lea -0x28(%ebp),%esi
/*
* Adjust the CPU time used to account for the time since last
* context switch.
*/
_Timespec_Subtract(
10c52c: 56 push %esi 10c52d: 57 push %edi 10c52e: 68 68 86 12 00 push $0x128668 10c533: e8 68 38 00 00 call 10fda0 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &ran
);
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
10c538: 59 pop %ecx 10c539: 5f pop %edi 10c53a: 56 push %esi 10c53b: 83 c3 44 add $0x44,%ebx 10c53e: 53 push %ebx 10c53f: e8 60 37 00 00 call 10fca4 <_Timespec_Add_to> 10c544: 83 c4 10 add $0x10,%esp
}
#endif
}
10c547: 8d 65 f4 lea -0xc(%ebp),%esp 10c54a: 5b pop %ebx 10c54b: 5e pop %esi 10c54c: 5f pop %edi 10c54d: c9 leave 10c54e: c3 ret
0010ca98 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10ca98: 55 push %ebp 10ca99: 89 e5 mov %esp,%ebp 10ca9b: 83 ec 2c sub $0x2c,%esp
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
10ca9e: 8d 45 f4 lea -0xc(%ebp),%eax 10caa1: 50 push %eax 10caa2: ff 75 08 pushl 0x8(%ebp) 10caa5: 68 80 84 12 00 push $0x128480 10caaa: e8 99 1c 00 00 call 10e748 <_Objects_Get>
switch ( location ) {
10caaf: 83 c4 10 add $0x10,%esp 10cab2: 8b 55 f4 mov -0xc(%ebp),%edx 10cab5: 85 d2 test %edx,%edx
10cab7: 75 29 jne 10cae2 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10cab9: 8b 50 40 mov 0x40(%eax),%edx
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10cabc: f6 42 11 40 testb $0x40,0x11(%edx)
10cac0: 74 08 je 10caca <_Rate_monotonic_Timeout+0x32>
10cac2: 8b 48 08 mov 0x8(%eax),%ecx 10cac5: 39 4a 20 cmp %ecx,0x20(%edx)
10cac8: 74 4e je 10cb18 <_Rate_monotonic_Timeout+0x80>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
10caca: 83 78 38 01 cmpl $0x1,0x38(%eax)
10cace: 74 14 je 10cae4 <_Rate_monotonic_Timeout+0x4c>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10cad0: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10cad7: a1 70 85 12 00 mov 0x128570,%eax 10cadc: 48 dec %eax 10cadd: a3 70 85 12 00 mov %eax,0x128570
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10cae2: c9 leave 10cae3: c3 ret
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
10cae4: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax)
_Rate_monotonic_Initiate_statistics( the_period );
10caeb: 83 ec 0c sub $0xc,%esp 10caee: 50 push %eax 10caef: 89 45 e4 mov %eax,-0x1c(%ebp) 10caf2: e8 e5 f9 ff ff call 10c4dc <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10caf7: 8b 45 e4 mov -0x1c(%ebp),%eax 10cafa: 8b 50 3c mov 0x3c(%eax),%edx 10cafd: 89 50 1c mov %edx,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10cb00: 5a pop %edx 10cb01: 59 pop %ecx
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
10cb02: 83 c0 10 add $0x10,%eax 10cb05: 50 push %eax 10cb06: 68 7c 86 12 00 push $0x12867c 10cb0b: e8 70 35 00 00 call 110080 <_Watchdog_Insert> 10cb10: 83 c4 10 add $0x10,%esp 10cb13: eb c2 jmp 10cad7 <_Rate_monotonic_Timeout+0x3f> 10cb15: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10cb18: 83 ec 08 sub $0x8,%esp 10cb1b: 68 f8 ff 03 10 push $0x1003fff8 10cb20: 52 push %edx 10cb21: 89 45 e4 mov %eax,-0x1c(%ebp) 10cb24: e8 27 23 00 00 call 10ee50 <_Thread_Clear_state>
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
10cb29: 8b 45 e4 mov -0x1c(%ebp),%eax 10cb2c: 89 04 24 mov %eax,(%esp) 10cb2f: eb c1 jmp 10caf2 <_Rate_monotonic_Timeout+0x5a>
0010c550 <_Rate_monotonic_Update_statistics>:
void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
10c550: 55 push %ebp 10c551: 89 e5 mov %esp,%ebp 10c553: 57 push %edi 10c554: 56 push %esi 10c555: 53 push %ebx 10c556: 83 ec 1c sub $0x1c,%esp 10c559: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
10c55c: ff 43 54 incl 0x54(%ebx)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
10c55f: 83 7b 38 04 cmpl $0x4,0x38(%ebx)
10c563: 0f 84 bf 00 00 00 je 10c628 <_Rate_monotonic_Update_statistics+0xd8>
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
10c569: 51 push %ecx
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
10c56a: 8d 7d e0 lea -0x20(%ebp),%edi
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
10c56d: 57 push %edi
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
10c56e: 8d 75 d8 lea -0x28(%ebp),%esi
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
10c571: 56 push %esi 10c572: 53 push %ebx 10c573: e8 cc fe ff ff call 10c444 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
10c578: 83 c4 10 add $0x10,%esp 10c57b: 84 c0 test %al,%al
10c57d: 75 09 jne 10c588 <_Rate_monotonic_Update_statistics+0x38>
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
10c57f: 8d 65 f4 lea -0xc(%ebp),%esp 10c582: 5b pop %ebx 10c583: 5e pop %esi 10c584: 5f pop %edi 10c585: c9 leave 10c586: c3 ret 10c587: 90 nop
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
10c588: 83 ec 08 sub $0x8,%esp 10c58b: 57 push %edi 10c58c: 8d 43 6c lea 0x6c(%ebx),%eax 10c58f: 50 push %eax 10c590: e8 0f 37 00 00 call 10fca4 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
10c595: 58 pop %eax 10c596: 5a pop %edx 10c597: 8d 43 5c lea 0x5c(%ebx),%eax 10c59a: 50 push %eax 10c59b: 57 push %edi 10c59c: e8 db 37 00 00 call 10fd7c <_Timespec_Less_than> 10c5a1: 83 c4 10 add $0x10,%esp 10c5a4: 84 c0 test %al,%al
10c5a6: 74 0c je 10c5b4 <_Rate_monotonic_Update_statistics+0x64>
stats->min_cpu_time = executed;
10c5a8: 8b 45 e0 mov -0x20(%ebp),%eax 10c5ab: 8b 55 e4 mov -0x1c(%ebp),%edx 10c5ae: 89 43 5c mov %eax,0x5c(%ebx) 10c5b1: 89 53 60 mov %edx,0x60(%ebx)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
10c5b4: 83 ec 08 sub $0x8,%esp 10c5b7: 8d 43 64 lea 0x64(%ebx),%eax 10c5ba: 50 push %eax 10c5bb: 57 push %edi 10c5bc: e8 97 37 00 00 call 10fd58 <_Timespec_Greater_than> 10c5c1: 83 c4 10 add $0x10,%esp 10c5c4: 84 c0 test %al,%al
10c5c6: 74 0c je 10c5d4 <_Rate_monotonic_Update_statistics+0x84>
stats->max_cpu_time = executed;
10c5c8: 8b 45 e0 mov -0x20(%ebp),%eax 10c5cb: 8b 55 e4 mov -0x1c(%ebp),%edx 10c5ce: 89 43 64 mov %eax,0x64(%ebx) 10c5d1: 89 53 68 mov %edx,0x68(%ebx)
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
10c5d4: 83 ec 08 sub $0x8,%esp 10c5d7: 56 push %esi 10c5d8: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c5de: 50 push %eax 10c5df: e8 c0 36 00 00 call 10fca4 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
10c5e4: 5a pop %edx 10c5e5: 59 pop %ecx 10c5e6: 8d 43 74 lea 0x74(%ebx),%eax 10c5e9: 50 push %eax 10c5ea: 56 push %esi 10c5eb: e8 8c 37 00 00 call 10fd7c <_Timespec_Less_than> 10c5f0: 83 c4 10 add $0x10,%esp 10c5f3: 84 c0 test %al,%al
10c5f5: 75 39 jne 10c630 <_Rate_monotonic_Update_statistics+0xe0>
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
10c5f7: 83 ec 08 sub $0x8,%esp 10c5fa: 8d 43 7c lea 0x7c(%ebx),%eax 10c5fd: 50 push %eax 10c5fe: 56 push %esi 10c5ff: e8 54 37 00 00 call 10fd58 <_Timespec_Greater_than> 10c604: 83 c4 10 add $0x10,%esp 10c607: 84 c0 test %al,%al
10c609: 0f 84 70 ff ff ff je 10c57f <_Rate_monotonic_Update_statistics+0x2f>
stats->max_wall_time = since_last_period;
10c60f: 8b 45 d8 mov -0x28(%ebp),%eax 10c612: 8b 55 dc mov -0x24(%ebp),%edx 10c615: 89 43 7c mov %eax,0x7c(%ebx) 10c618: 89 93 80 00 00 00 mov %edx,0x80(%ebx)
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
10c61e: 8d 65 f4 lea -0xc(%ebp),%esp 10c621: 5b pop %ebx 10c622: 5e pop %esi 10c623: 5f pop %edi 10c624: c9 leave 10c625: c3 ret 10c626: 66 90 xchg %ax,%ax
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
10c628: ff 43 58 incl 0x58(%ebx) 10c62b: e9 39 ff ff ff jmp 10c569 <_Rate_monotonic_Update_statistics+0x19>
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
stats->min_wall_time = since_last_period;
10c630: 8b 45 d8 mov -0x28(%ebp),%eax 10c633: 8b 55 dc mov -0x24(%ebp),%edx 10c636: 89 43 74 mov %eax,0x74(%ebx) 10c639: 89 53 78 mov %edx,0x78(%ebx) 10c63c: eb b9 jmp 10c5f7 <_Rate_monotonic_Update_statistics+0xa7>
00110a64 <_Scheduler_priority_Block>:
void _Scheduler_priority_Block(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
110a64: 55 push %ebp 110a65: 89 e5 mov %esp,%ebp 110a67: 53 push %ebx 110a68: 8b 45 0c mov 0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract(
Thread_Control *the_thread
)
{
Chain_Control *ready = the_thread->scheduler.priority->ready_chain;
110a6b: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx 110a71: 8b 12 mov (%edx),%edx
if ( _Chain_Has_only_one_node( ready ) ) {
110a73: 8b 4a 08 mov 0x8(%edx),%ecx 110a76: 39 0a cmp %ecx,(%edx)
110a78: 74 6e je 110ae8 <_Scheduler_priority_Block+0x84>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
110a7a: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
110a7c: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
110a7f: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
110a82: 89 0a mov %ecx,(%edx)
{
_Scheduler_priority_Ready_queue_extract(the_thread);
/* TODO: flash critical section */
if ( _Thread_Is_heir( the_thread ) )
110a84: 3b 05 1c 57 12 00 cmp 0x12571c,%eax
110a8a: 74 18 je 110aa4 <_Scheduler_priority_Block+0x40>
_Scheduler_priority_Schedule_body(the_scheduler);
if ( _Thread_Is_executing( the_thread ) )
110a8c: 3b 05 18 57 12 00 cmp 0x125718,%eax
110a92: 74 04 je 110a98 <_Scheduler_priority_Block+0x34> _Scheduler_priority_Block_body(the_scheduler, the_thread); }
110a94: 5b pop %ebx 110a95: c9 leave 110a96: c3 ret 110a97: 90 nop
_Thread_Dispatch_necessary = true;
110a98: c6 05 24 57 12 00 01 movb $0x1,0x125724 110a9f: 5b pop %ebx 110aa0: c9 leave 110aa1: c3 ret 110aa2: 66 90 xchg %ax,%ax
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 );
110aa4: 66 8b 1d 40 57 12 00 mov 0x125740,%bx 110aab: 31 d2 xor %edx,%edx 110aad: 89 d1 mov %edx,%ecx 110aaf: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
110ab3: 0f b7 c9 movzwl %cx,%ecx 110ab6: 66 8b 9c 09 60 57 12 mov 0x125760(%ecx,%ecx,1),%bx
110abd: 00
110abe: 66 0f bc d3 bsf %bx,%dx
return (_Priority_Bits_index( major ) << 4) +
110ac2: c1 e1 04 shl $0x4,%ecx 110ac5: 0f b7 d2 movzwl %dx,%edx 110ac8: 8d 14 11 lea (%ecx,%edx,1),%edx
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
110acb: 8d 14 52 lea (%edx,%edx,2),%edx 110ace: c1 e2 02 shl $0x2,%edx 110ad1: 8b 4d 08 mov 0x8(%ebp),%ecx 110ad4: 03 11 add (%ecx),%edx 110ad6: 8b 0a mov (%edx),%ecx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
110ad8: 83 c2 04 add $0x4,%edx 110adb: 39 d1 cmp %edx,%ecx
110add: 74 4d je 110b2c <_Scheduler_priority_Block+0xc8><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
Scheduler_Control *the_scheduler
)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
110adf: 89 0d 1c 57 12 00 mov %ecx,0x12571c 110ae5: eb a5 jmp 110a8c <_Scheduler_priority_Block+0x28> 110ae7: 90 nop
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 );
110ae8: 8d 4a 04 lea 0x4(%edx),%ecx 110aeb: 89 0a mov %ecx,(%edx)
head->next = tail;
head->previous = NULL;
110aed: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
tail->previous = head;
110af4: 89 52 08 mov %edx,0x8(%edx)
{
Chain_Control *ready = the_thread->scheduler.priority->ready_chain;
if ( _Chain_Has_only_one_node( ready ) ) {
_Chain_Initialize_empty( ready );
_Priority_bit_map_Remove( &the_thread->scheduler.priority->Priority_map );
110af7: 8b 88 8c 00 00 00 mov 0x8c(%eax),%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;
110afd: 8b 59 04 mov 0x4(%ecx),%ebx 110b00: 66 8b 13 mov (%ebx),%dx 110b03: 66 23 51 0e and 0xe(%ecx),%dx 110b07: 66 89 13 mov %dx,(%ebx)
if ( *the_priority_map->minor == 0 )
110b0a: 66 85 d2 test %dx,%dx
110b0d: 0f 85 71 ff ff ff jne 110a84 <_Scheduler_priority_Block+0x20>
_Priority_Major_bit_map &= the_priority_map->block_major;
110b13: 66 8b 15 40 57 12 00 mov 0x125740,%dx 110b1a: 23 51 0c and 0xc(%ecx),%edx 110b1d: 66 89 15 40 57 12 00 mov %dx,0x125740 110b24: e9 5b ff ff ff jmp 110a84 <_Scheduler_priority_Block+0x20> 110b29: 8d 76 00 lea 0x0(%esi),%esi
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
110b2c: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 110b2e: eb af jmp 110adf <_Scheduler_priority_Block+0x7b><== NOT EXECUTED
0010d140 <_Scheduler_priority_Schedule>:
*/
void _Scheduler_priority_Schedule(
Scheduler_Control *the_scheduler
)
{
10d140: 55 push %ebp 10d141: 89 e5 mov %esp,%ebp
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 );
10d143: 66 8b 0d 40 57 12 00 mov 0x125740,%cx 10d14a: 31 c0 xor %eax,%eax 10d14c: 89 c2 mov %eax,%edx 10d14e: 66 0f bc d1 bsf %cx,%dx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d152: 0f b7 d2 movzwl %dx,%edx 10d155: 66 8b 8c 12 60 57 12 mov 0x125760(%edx,%edx,1),%cx
10d15c: 00
10d15d: 66 0f bc c1 bsf %cx,%ax
return (_Priority_Bits_index( major ) << 4) +
10d161: c1 e2 04 shl $0x4,%edx 10d164: 0f b7 c0 movzwl %ax,%eax 10d167: 8d 04 02 lea (%edx,%eax,1),%eax
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10d16a: 8d 04 40 lea (%eax,%eax,2),%eax 10d16d: c1 e0 02 shl $0x2,%eax 10d170: 8b 55 08 mov 0x8(%ebp),%edx 10d173: 03 02 add (%edx),%eax
_Scheduler_priority_Schedule_body( the_scheduler ); }
10d175: 8b 10 mov (%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 );
10d177: 83 c0 04 add $0x4,%eax 10d17a: 39 c2 cmp %eax,%edx
10d17c: 74 0a je 10d188 <_Scheduler_priority_Schedule+0x48><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
Scheduler_Control *the_scheduler
)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d17e: 89 15 1c 57 12 00 mov %edx,0x12571c 10d184: c9 leave 10d185: c3 ret 10d186: 66 90 xchg %ax,%ax
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10d188: 31 d2 xor %edx,%edx <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
Scheduler_Control *the_scheduler
)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d18a: 89 15 1c 57 12 00 mov %edx,0x12571c <== NOT EXECUTED 10d190: c9 leave <== NOT EXECUTED 10d191: c3 ret <== NOT EXECUTED
0010d220 <_Scheduler_priority_Unblock>:
void _Scheduler_priority_Unblock (
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
10d220: 55 push %ebp 10d221: 89 e5 mov %esp,%ebp 10d223: 53 push %ebx 10d224: 8b 45 0c mov 0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue(
Thread_Control *the_thread
)
{
_Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map );
10d227: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10d22d: 8b 4a 04 mov 0x4(%edx),%ecx 10d230: 66 8b 5a 0a mov 0xa(%edx),%bx 10d234: 66 09 19 or %bx,(%ecx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10d237: 66 8b 0d 40 57 12 00 mov 0x125740,%cx 10d23e: 0b 4a 08 or 0x8(%edx),%ecx 10d241: 66 89 0d 40 57 12 00 mov %cx,0x125740
_Chain_Append_unprotected( the_thread->scheduler.priority->ready_chain,
10d248: 8b 12 mov (%edx),%edx
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10d24a: 8b 4a 08 mov 0x8(%edx),%ecx
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
10d24d: 8d 5a 04 lea 0x4(%edx),%ebx 10d250: 89 18 mov %ebx,(%eax)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
10d252: 89 42 08 mov %eax,0x8(%edx)
old_last->next = the_node;
10d255: 89 01 mov %eax,(%ecx)
the_node->previous = old_last;
10d257: 89 48 04 mov %ecx,0x4(%eax)
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
10d25a: 8b 50 14 mov 0x14(%eax),%edx 10d25d: 8b 0d 1c 57 12 00 mov 0x12571c,%ecx 10d263: 3b 51 14 cmp 0x14(%ecx),%edx
10d266: 73 17 jae 10d27f <_Scheduler_priority_Unblock+0x5f>
_Thread_Heir = the_thread;
10d268: a3 1c 57 12 00 mov %eax,0x12571c
if ( _Thread_Executing->is_preemptible ||
10d26d: a1 18 57 12 00 mov 0x125718,%eax 10d272: 80 78 74 00 cmpb $0x0,0x74(%eax)
10d276: 74 0c je 10d284 <_Scheduler_priority_Unblock+0x64>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10d278: c6 05 24 57 12 00 01 movb $0x1,0x125724
_Scheduler_priority_Unblock_body(the_scheduler, the_thread); }
10d27f: 5b pop %ebx 10d280: c9 leave 10d281: c3 ret 10d282: 66 90 xchg %ax,%ax
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
10d284: 85 d2 test %edx,%edx
10d286: 75 f7 jne 10d27f <_Scheduler_priority_Unblock+0x5f>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10d288: c6 05 24 57 12 00 01 movb $0x1,0x125724 10d28f: eb ee jmp 10d27f <_Scheduler_priority_Unblock+0x5f>
0010d294 <_Scheduler_priority_Yield>:
*/
void _Scheduler_priority_Yield(
Scheduler_Control *the_scheduler __attribute__((unused))
)
{
10d294: 55 push %ebp 10d295: 89 e5 mov %esp,%ebp 10d297: 56 push %esi 10d298: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10d299: a1 18 57 12 00 mov 0x125718,%eax
ready = executing->scheduler.priority->ready_chain;
10d29e: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx 10d2a4: 8b 12 mov (%edx),%edx
_ISR_Disable( level );
10d2a6: 9c pushf 10d2a7: fa cli 10d2a8: 59 pop %ecx
if ( !_Chain_Has_only_one_node( ready ) ) {
10d2a9: 8b 5a 08 mov 0x8(%edx),%ebx 10d2ac: 39 1a cmp %ebx,(%edx)
10d2ae: 74 40 je 10d2f0 <_Scheduler_priority_Yield+0x5c>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10d2b0: 8b 30 mov (%eax),%esi
previous = the_node->previous;
10d2b2: 8b 58 04 mov 0x4(%eax),%ebx
next->previous = previous;
10d2b5: 89 5e 04 mov %ebx,0x4(%esi)
previous->next = next;
10d2b8: 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;
10d2ba: 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 );
10d2bd: 8d 72 04 lea 0x4(%edx),%esi 10d2c0: 89 30 mov %esi,(%eax)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
10d2c2: 89 42 08 mov %eax,0x8(%edx)
old_last->next = the_node;
10d2c5: 89 03 mov %eax,(%ebx)
the_node->previous = old_last;
10d2c7: 89 58 04 mov %ebx,0x4(%eax)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10d2ca: 51 push %ecx 10d2cb: 9d popf 10d2cc: fa cli
if ( _Thread_Is_heir( executing ) )
10d2cd: 3b 05 1c 57 12 00 cmp 0x12571c,%eax
10d2d3: 74 0f je 10d2e4 <_Scheduler_priority_Yield+0x50><== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Thread_Dispatch_necessary = true;
10d2d5: c6 05 24 57 12 00 01 movb $0x1,0x125724
_ISR_Enable( level );
10d2dc: 51 push %ecx 10d2dd: 9d popf
}
10d2de: 5b pop %ebx 10d2df: 5e pop %esi 10d2e0: c9 leave 10d2e1: c3 ret 10d2e2: 66 90 xchg %ax,%ax
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
10d2e4: 8b 02 mov (%edx),%eax 10d2e6: a3 1c 57 12 00 mov %eax,0x12571c 10d2eb: eb e8 jmp 10d2d5 <_Scheduler_priority_Yield+0x41> 10d2ed: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
10d2f0: 3b 05 1c 57 12 00 cmp 0x12571c,%eax
10d2f6: 75 dd jne 10d2d5 <_Scheduler_priority_Yield+0x41><== NEVER TAKEN
10d2f8: eb e2 jmp 10d2dc <_Scheduler_priority_Yield+0x48>
0010d9f8 <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
10d9f8: 55 push %ebp 10d9f9: 89 e5 mov %esp,%ebp 10d9fb: 53 push %ebx 10d9fc: 83 ec 04 sub $0x4,%esp 10d9ff: 8b 5d 08 mov 0x8(%ebp),%ebx 10da02: a1 30 14 13 00 mov 0x131430,%eax 10da07: 40 inc %eax 10da08: a3 30 14 13 00 mov %eax,0x131430
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
10da0d: a1 04 15 13 00 mov 0x131504,%eax
if ( time->tv_sec < seconds )
10da12: 8b 13 mov (%ebx),%edx 10da14: 39 d0 cmp %edx,%eax
10da16: 7f 34 jg 10da4c <_TOD_Set+0x54>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
10da18: 51 push %ecx
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
10da19: 29 c2 sub %eax,%edx 10da1b: 52 push %edx 10da1c: 6a 00 push $0x0 10da1e: 68 30 15 13 00 push $0x131530 10da23: e8 4c 24 00 00 call 10fe74 <_Watchdog_Adjust> 10da28: 83 c4 10 add $0x10,%esp
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
10da2b: 8b 03 mov (%ebx),%eax 10da2d: a3 04 15 13 00 mov %eax,0x131504 10da32: 8b 43 04 mov 0x4(%ebx),%eax 10da35: a3 08 15 13 00 mov %eax,0x131508
_TOD_Is_set = true;
10da3a: c6 05 44 14 13 00 01 movb $0x1,0x131444
_TOD_Activate();
_Thread_Enable_dispatch();
}
10da41: 8b 5d fc mov -0x4(%ebp),%ebx 10da44: c9 leave
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
10da45: e9 fe 14 00 00 jmp 10ef48 <_Thread_Enable_dispatch> 10da4a: 66 90 xchg %ax,%ax 10da4c: 51 push %ecx
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
if ( time->tv_sec < seconds )
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
10da4d: 29 d0 sub %edx,%eax 10da4f: 50 push %eax 10da50: 6a 01 push $0x1 10da52: 68 30 15 13 00 push $0x131530 10da57: e8 18 24 00 00 call 10fe74 <_Watchdog_Adjust> 10da5c: 83 c4 10 add $0x10,%esp 10da5f: eb ca jmp 10da2b <_TOD_Set+0x33>
0010c44c <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
10c44c: 55 push %ebp 10c44d: 89 e5 mov %esp,%ebp 10c44f: 53 push %ebx 10c450: 83 ec 1c sub $0x1c,%esp
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
10c453: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10c45a: a1 2c 12 12 00 mov 0x12122c,%eax 10c45f: 8d 04 80 lea (%eax,%eax,4),%eax 10c462: 8d 04 80 lea (%eax,%eax,4),%eax 10c465: 8d 04 80 lea (%eax,%eax,4),%eax 10c468: c1 e0 03 shl $0x3,%eax 10c46b: 89 45 f4 mov %eax,-0xc(%ebp)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
10c46e: a1 c4 55 12 00 mov 0x1255c4,%eax 10c473: 40 inc %eax 10c474: a3 c4 55 12 00 mov %eax,0x1255c4
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
10c479: 8d 5d f0 lea -0x10(%ebp),%ebx 10c47c: 53 push %ebx 10c47d: 68 d8 54 12 00 push $0x1254d8 10c482: e8 05 1e 00 00 call 10e28c <_Timespec_Add_to>
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
10c487: 58 pop %eax 10c488: 5a pop %edx 10c489: 53 push %ebx 10c48a: 68 24 55 12 00 push $0x125524 10c48f: e8 f8 1d 00 00 call 10e28c <_Timespec_Add_to> 10c494: 89 c3 mov %eax,%ebx
while ( seconds ) {
10c496: 83 c4 10 add $0x10,%esp 10c499: 85 c0 test %eax,%eax
10c49b: 74 16 je 10c4b3 <_TOD_Tickle_ticks+0x67>
10c49d: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
10c4a0: 83 ec 0c sub $0xc,%esp 10c4a3: 68 50 55 12 00 push $0x125550 10c4a8: e8 9f 22 00 00 call 10e74c <_Watchdog_Tickle> 10c4ad: 83 c4 10 add $0x10,%esp 10c4b0: 4b dec %ebx
10c4b1: 75 ed jne 10c4a0 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN
_Watchdog_Tickle_seconds();
seconds--;
}
}
10c4b3: 8b 5d fc mov -0x4(%ebp),%ebx 10c4b6: c9 leave 10c4b7: c3 ret
0010c1c4 <_TOD_To_seconds>:
*/
uint32_t _TOD_To_seconds(
const rtems_time_of_day *the_tod
)
{
10c1c4: 55 push %ebp 10c1c5: 89 e5 mov %esp,%ebp 10c1c7: 56 push %esi 10c1c8: 53 push %ebx 10c1c9: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t time;
uint32_t year_mod_4;
time = the_tod->day - 1;
10c1cc: 8b 72 08 mov 0x8(%edx),%esi 10c1cf: 4e dec %esi
year_mod_4 = the_tod->year & 3;
10c1d0: 8b 02 mov (%edx),%eax
if ( year_mod_4 == 0 )
10c1d2: 89 c3 mov %eax,%ebx 10c1d4: 83 e3 03 and $0x3,%ebx
10c1d7: 74 67 je 10c240 <_TOD_To_seconds+0x7c>
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
else
time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
10c1d9: 8b 4a 04 mov 0x4(%edx),%ecx 10c1dc: 0f b7 8c 09 20 26 12 movzwl 0x122620(%ecx,%ecx,1),%ecx
10c1e3: 00
10c1e4: 8d 34 31 lea (%ecx,%esi,1),%esi
time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) *
( (TOD_DAYS_PER_YEAR * 4) + 1);
time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
10c1e7: 0f b7 8c 1b 54 26 12 movzwl 0x122654(%ebx,%ebx,1),%ecx
10c1ee: 00
if ( year_mod_4 == 0 )
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
else
time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) *
10c1ef: 2d c4 07 00 00 sub $0x7c4,%eax 10c1f4: c1 e8 02 shr $0x2,%eax 10c1f7: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c1fa: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c1fd: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c200: 8d 04 98 lea (%eax,%ebx,4),%eax 10c203: 01 c1 add %eax,%ecx
( (TOD_DAYS_PER_YEAR * 4) + 1);
time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
10c205: 01 f1 add %esi,%ecx
time *= TOD_SECONDS_PER_DAY;
10c207: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c20a: 8d 04 81 lea (%ecx,%eax,4),%eax 10c20d: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c210: c1 e0 02 shl $0x2,%eax 10c213: 29 c8 sub %ecx,%eax 10c215: c1 e0 07 shl $0x7,%eax
time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute)
10c218: 8b 5a 14 mov 0x14(%edx),%ebx 10c21b: 8b 4a 0c mov 0xc(%edx),%ecx 10c21e: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c221: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c224: c1 e1 02 shl $0x2,%ecx 10c227: 03 4a 10 add 0x10(%edx),%ecx
* TOD_SECONDS_PER_MINUTE;
10c22a: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c22d: 8d 14 92 lea (%edx,%edx,4),%edx
time += the_tod->second;
10c230: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx
time += TOD_SECONDS_1970_THROUGH_1988;
10c237: 8d 04 02 lea (%edx,%eax,1),%eax
return( time );
}
10c23a: 5b pop %ebx 10c23b: 5e pop %esi 10c23c: c9 leave 10c23d: c3 ret 10c23e: 66 90 xchg %ax,%ax
time = the_tod->day - 1;
year_mod_4 = the_tod->year & 3;
if ( year_mod_4 == 0 )
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
10c240: 8b 4a 04 mov 0x4(%edx),%ecx 10c243: 0f b7 8c 09 3a 26 12 movzwl 0x12263a(%ecx,%ecx,1),%ecx
10c24a: 00
10c24b: 8d 34 31 lea (%ecx,%esi,1),%esi 10c24e: eb 97 jmp 10c1e7 <_TOD_To_seconds+0x23>
0010c250 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10c250: 55 push %ebp 10c251: 89 e5 mov %esp,%ebp 10c253: 53 push %ebx 10c254: 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();
10c257: 8b 1d ac 53 12 00 mov 0x1253ac,%ebx
if ((!the_tod) ||
10c25d: 85 c9 test %ecx,%ecx
10c25f: 74 53 je 10c2b4 <_TOD_Validate+0x64> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10c261: b8 40 42 0f 00 mov $0xf4240,%eax 10c266: 31 d2 xor %edx,%edx 10c268: f7 f3 div %ebx
rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) ||
10c26a: 3b 41 18 cmp 0x18(%ecx),%eax
10c26d: 76 45 jbe 10c2b4 <_TOD_Validate+0x64>
(the_tod->ticks >= ticks_per_second) ||
10c26f: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10c273: 77 3f ja 10c2b4 <_TOD_Validate+0x64>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10c275: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10c279: 77 39 ja 10c2b4 <_TOD_Validate+0x64>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10c27b: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10c27f: 77 33 ja 10c2b4 <_TOD_Validate+0x64>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10c281: 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) ||
10c284: 85 c0 test %eax,%eax
10c286: 74 2c je 10c2b4 <_TOD_Validate+0x64> <== NEVER TAKEN
(the_tod->month == 0) ||
10c288: 83 f8 0c cmp $0xc,%eax
10c28b: 77 27 ja 10c2b4 <_TOD_Validate+0x64>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10c28d: 8b 11 mov (%ecx),%edx
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
10c28f: 81 fa c3 07 00 00 cmp $0x7c3,%edx
10c295: 76 1d jbe 10c2b4 <_TOD_Validate+0x64>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10c297: 8b 49 08 mov 0x8(%ecx),%ecx
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10c29a: 85 c9 test %ecx,%ecx
10c29c: 74 16 je 10c2b4 <_TOD_Validate+0x64> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10c29e: 83 e2 03 and $0x3,%edx
10c2a1: 75 16 jne 10c2b9 <_TOD_Validate+0x69>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10c2a3: 8b 04 85 94 26 12 00 mov 0x122694(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10c2aa: 39 c8 cmp %ecx,%eax 10c2ac: 0f 93 c0 setae %al 10c2af: eb 05 jmp 10c2b6 <_TOD_Validate+0x66> 10c2b1: 8d 76 00 lea 0x0(%esi),%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;
10c2b4: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10c2b6: 5b pop %ebx 10c2b7: c9 leave 10c2b8: c3 ret
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10c2b9: 8b 04 85 60 26 12 00 mov 0x122660(,%eax,4),%eax 10c2c0: eb e8 jmp 10c2aa <_TOD_Validate+0x5a>
0010d348 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10d348: 55 push %ebp 10d349: 89 e5 mov %esp,%ebp 10d34b: 57 push %edi 10d34c: 56 push %esi 10d34d: 53 push %ebx 10d34e: 83 ec 28 sub $0x28,%esp 10d351: 8b 5d 08 mov 0x8(%ebp),%ebx 10d354: 8b 75 0c mov 0xc(%ebp),%esi 10d357: 8a 45 10 mov 0x10(%ebp),%al 10d35a: 88 45 e7 mov %al,-0x19(%ebp)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
10d35d: 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 );
10d360: 53 push %ebx 10d361: e8 16 0d 00 00 call 10e07c <_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 )
10d366: 83 c4 10 add $0x10,%esp 10d369: 39 73 14 cmp %esi,0x14(%ebx)
10d36c: 74 0d je 10d37b <_Thread_Change_priority+0x33>
_Thread_Set_priority( the_thread, new_priority );
10d36e: 83 ec 08 sub $0x8,%esp 10d371: 56 push %esi 10d372: 53 push %ebx 10d373: e8 a0 0c 00 00 call 10e018 <_Thread_Set_priority> 10d378: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10d37b: 9c pushf 10d37c: fa cli 10d37d: 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;
10d37e: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10d381: 83 f8 04 cmp $0x4,%eax
10d384: 74 26 je 10d3ac <_Thread_Change_priority+0x64>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10d386: 83 e7 04 and $0x4,%edi
10d389: 74 15 je 10d3a0 <_Thread_Change_priority+0x58><== ALWAYS TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10d38b: 56 push %esi 10d38c: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10d38d: a9 e0 be 03 00 test $0x3bee0,%eax
10d392: 0f 85 94 00 00 00 jne 10d42c <_Thread_Change_priority+0xe4>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10d398: 8d 65 f4 lea -0xc(%ebp),%esp 10d39b: 5b pop %ebx 10d39c: 5e pop %esi 10d39d: 5f pop %edi 10d39e: c9 leave 10d39f: c3 ret
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10d3a0: 89 c2 mov %eax,%edx 10d3a2: 83 e2 fb and $0xfffffffb,%edx 10d3a5: 89 53 10 mov %edx,0x10(%ebx) 10d3a8: eb e1 jmp 10d38b <_Thread_Change_priority+0x43> 10d3aa: 66 90 xchg %ax,%ax
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10d3ac: 83 e7 04 and $0x4,%edi
10d3af: 75 40 jne 10d3f1 <_Thread_Change_priority+0xa9><== 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 );
10d3b1: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( prepend_it )
10d3b8: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10d3bc: 0f 84 82 00 00 00 je 10d444 <_Thread_Change_priority+0xfc>
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue_first(
Thread_Control *the_thread
)
{
_Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map );
10d3c2: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10d3c8: 8b 50 04 mov 0x4(%eax),%edx 10d3cb: 66 8b 48 0a mov 0xa(%eax),%cx 10d3cf: 66 09 0a or %cx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10d3d2: 66 8b 15 40 57 12 00 mov 0x125740,%dx 10d3d9: 0b 50 08 or 0x8(%eax),%edx 10d3dc: 66 89 15 40 57 12 00 mov %dx,0x125740
_Chain_Prepend_unprotected( the_thread->scheduler.priority->ready_chain,
10d3e3: 8b 00 mov (%eax),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10d3e5: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10d3e8: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10d3ea: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10d3ec: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10d3ee: 89 5a 04 mov %ebx,0x4(%edx)
_Scheduler_priority_Ready_queue_enqueue_first( the_thread );
else
_Scheduler_priority_Ready_queue_enqueue( the_thread );
}
_ISR_Flash( level );
10d3f1: 56 push %esi 10d3f2: 9d popf 10d3f3: fa cli
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule(
Scheduler_Control *the_scheduler
)
{
the_scheduler->Operations.schedule( the_scheduler );
10d3f4: 83 ec 0c sub $0xc,%esp 10d3f7: 68 00 55 12 00 push $0x125500 10d3fc: ff 15 04 55 12 00 call *0x125504
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10d402: a1 18 57 12 00 mov 0x125718,%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() &&
10d407: 83 c4 10 add $0x10,%esp 10d40a: 3b 05 1c 57 12 00 cmp 0x12571c,%eax
10d410: 74 0d je 10d41f <_Thread_Change_priority+0xd7>
10d412: 80 78 74 00 cmpb $0x0,0x74(%eax)
10d416: 74 07 je 10d41f <_Thread_Change_priority+0xd7>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10d418: c6 05 24 57 12 00 01 movb $0x1,0x125724
_ISR_Enable( level );
10d41f: 56 push %esi 10d420: 9d popf
}
10d421: 8d 65 f4 lea -0xc(%ebp),%esp 10d424: 5b pop %ebx 10d425: 5e pop %esi 10d426: 5f pop %edi 10d427: c9 leave 10d428: c3 ret 10d429: 8d 76 00 lea 0x0(%esi),%esi
/* 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 );
10d42c: 89 5d 0c mov %ebx,0xc(%ebp) 10d42f: 8b 43 44 mov 0x44(%ebx),%eax 10d432: 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 );
}
10d435: 8d 65 f4 lea -0xc(%ebp),%esp 10d438: 5b pop %ebx 10d439: 5e pop %esi 10d43a: 5f pop %edi 10d43b: 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 );
10d43c: e9 3f 0b 00 00 jmp 10df80 <_Thread_queue_Requeue> 10d441: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue(
Thread_Control *the_thread
)
{
_Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map );
10d444: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10d44a: 8b 50 04 mov 0x4(%eax),%edx 10d44d: 66 8b 48 0a mov 0xa(%eax),%cx 10d451: 66 09 0a or %cx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10d454: 66 8b 15 40 57 12 00 mov 0x125740,%dx 10d45b: 0b 50 08 or 0x8(%eax),%edx 10d45e: 66 89 15 40 57 12 00 mov %dx,0x125740
_Chain_Append_unprotected( the_thread->scheduler.priority->ready_chain,
10d465: 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;
10d467: 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 );
10d46a: 8d 48 04 lea 0x4(%eax),%ecx 10d46d: 89 0b mov %ecx,(%ebx)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
10d46f: 89 58 08 mov %ebx,0x8(%eax)
old_last->next = the_node;
10d472: 89 1a mov %ebx,(%edx)
the_node->previous = old_last;
10d474: 89 53 04 mov %edx,0x4(%ebx) 10d477: e9 75 ff ff ff jmp 10d3f1 <_Thread_Change_priority+0xa9>
0010d47c <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
10d47c: 55 push %ebp 10d47d: 89 e5 mov %esp,%ebp 10d47f: 53 push %ebx 10d480: 83 ec 04 sub $0x4,%esp 10d483: 8b 55 08 mov 0x8(%ebp),%edx 10d486: 8b 45 0c mov 0xc(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10d489: 9c pushf 10d48a: fa cli 10d48b: 5b pop %ebx
current_state = the_thread->current_state;
10d48c: 8b 4a 10 mov 0x10(%edx),%ecx
if ( current_state & state ) {
10d48f: 85 c8 test %ecx,%eax
10d491: 74 0b je 10d49e <_Thread_Clear_state+0x22>
10d493: f7 d0 not %eax 10d495: 21 c8 and %ecx,%eax
current_state =
the_thread->current_state = _States_Clear( state, current_state );
10d497: 89 42 10 mov %eax,0x10(%edx)
if ( _States_Is_ready( current_state ) ) {
10d49a: 85 c0 test %eax,%eax
10d49c: 74 0a je 10d4a8 <_Thread_Clear_state+0x2c>
_Scheduler_Unblock( &_Scheduler, the_thread);
}
}
_ISR_Enable( level );
10d49e: 53 push %ebx 10d49f: 9d popf
}
10d4a0: 8b 5d fc mov -0x4(%ebp),%ebx 10d4a3: c9 leave 10d4a4: c3 ret 10d4a5: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Scheduler_Unblock(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
the_scheduler->Operations.unblock( the_scheduler, the_thread );
10d4a8: 83 ec 08 sub $0x8,%esp 10d4ab: 52 push %edx 10d4ac: 68 00 55 12 00 push $0x125500 10d4b1: ff 15 10 55 12 00 call *0x125510 10d4b7: 83 c4 10 add $0x10,%esp 10d4ba: eb e2 jmp 10d49e <_Thread_Clear_state+0x22>
0010d648 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10d648: 55 push %ebp 10d649: 89 e5 mov %esp,%ebp 10d64b: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10d64e: 8d 45 f4 lea -0xc(%ebp),%eax 10d651: 50 push %eax 10d652: ff 75 08 pushl 0x8(%ebp) 10d655: e8 c6 01 00 00 call 10d820 <_Thread_Get>
switch ( location ) {
10d65a: 83 c4 10 add $0x10,%esp 10d65d: 8b 55 f4 mov -0xc(%ebp),%edx 10d660: 85 d2 test %edx,%edx
10d662: 75 1c jne 10d680 <_Thread_Delay_ended+0x38><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10d664: 83 ec 08 sub $0x8,%esp 10d667: 68 18 00 00 10 push $0x10000018 10d66c: 50 push %eax 10d66d: e8 0a fe ff ff call 10d47c <_Thread_Clear_state> 10d672: a1 50 54 12 00 mov 0x125450,%eax 10d677: 48 dec %eax 10d678: a3 50 54 12 00 mov %eax,0x125450 10d67d: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10d680: c9 leave 10d681: c3 ret
0010d684 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10d684: 55 push %ebp 10d685: 89 e5 mov %esp,%ebp 10d687: 57 push %edi 10d688: 56 push %esi 10d689: 53 push %ebx 10d68a: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10d68d: 8b 1d 18 57 12 00 mov 0x125718,%ebx
_ISR_Disable( level );
10d693: 9c pushf 10d694: fa cli 10d695: 58 pop %eax
while ( _Thread_Dispatch_necessary == true ) {
10d696: 8a 15 24 57 12 00 mov 0x125724,%dl 10d69c: 84 d2 test %dl,%dl
10d69e: 0f 84 3c 01 00 00 je 10d7e0 <_Thread_Dispatch+0x15c>
heir = _Thread_Heir;
10d6a4: 8b 35 1c 57 12 00 mov 0x12571c,%esi
_Thread_Dispatch_disable_level = 1;
10d6aa: c7 05 50 54 12 00 01 movl $0x1,0x125450
10d6b1: 00 00 00
_Thread_Dispatch_necessary = false;
10d6b4: c6 05 24 57 12 00 00 movb $0x0,0x125724
_Thread_Executing = heir;
10d6bb: 89 35 18 57 12 00 mov %esi,0x125718
/*
* 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 )
10d6c1: 39 f3 cmp %esi,%ebx
10d6c3: 0f 84 17 01 00 00 je 10d7e0 <_Thread_Dispatch+0x15c>
10d6c9: 8d 7d d8 lea -0x28(%ebp),%edi 10d6cc: e9 f5 00 00 00 jmp 10d7c6 <_Thread_Dispatch+0x142> 10d6d1: 8d 76 00 lea 0x0(%esi),%esi
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
10d6d4: 50 push %eax 10d6d5: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10d6d6: 83 ec 0c sub $0xc,%esp 10d6d9: 8d 45 e0 lea -0x20(%ebp),%eax 10d6dc: 50 push %eax 10d6dd: e8 02 30 00 00 call 1106e4 <_TOD_Get_uptime>
_Timestamp_Subtract(
10d6e2: 83 c4 0c add $0xc,%esp 10d6e5: 57 push %edi 10d6e6: 8d 45 e0 lea -0x20(%ebp),%eax 10d6e9: 50 push %eax 10d6ea: 68 48 55 12 00 push $0x125548 10d6ef: e8 d4 0b 00 00 call 10e2c8 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10d6f4: 58 pop %eax 10d6f5: 5a pop %edx 10d6f6: 57 push %edi 10d6f7: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d6fd: 50 push %eax 10d6fe: e8 89 0b 00 00 call 10e28c <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10d703: 8b 45 e0 mov -0x20(%ebp),%eax 10d706: 8b 55 e4 mov -0x1c(%ebp),%edx 10d709: a3 48 55 12 00 mov %eax,0x125548 10d70e: 89 15 4c 55 12 00 mov %edx,0x12554c
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10d714: a1 20 55 12 00 mov 0x125520,%eax 10d719: 83 c4 10 add $0x10,%esp 10d71c: 85 c0 test %eax,%eax
10d71e: 74 10 je 10d730 <_Thread_Dispatch+0xac> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10d720: 8b 10 mov (%eax),%edx 10d722: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10d728: 8b 96 e0 00 00 00 mov 0xe0(%esi),%edx 10d72e: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10d730: 83 ec 08 sub $0x8,%esp 10d733: 56 push %esi 10d734: 53 push %ebx 10d735: e8 2e 0e 00 00 call 10e568 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10d73a: 5a pop %edx 10d73b: 59 pop %ecx 10d73c: 81 c6 c4 00 00 00 add $0xc4,%esi 10d742: 56 push %esi 10d743: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax 10d749: 50 push %eax 10d74a: e8 21 11 00 00 call 10e870 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10d74f: 83 c4 10 add $0x10,%esp 10d752: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 10d758: 85 c0 test %eax,%eax
10d75a: 74 36 je 10d792 <_Thread_Dispatch+0x10e>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
10d75c: a1 e0 54 12 00 mov 0x1254e0,%eax 10d761: 39 c3 cmp %eax,%ebx
10d763: 74 2d je 10d792 <_Thread_Dispatch+0x10e>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10d765: 85 c0 test %eax,%eax
10d767: 74 11 je 10d77a <_Thread_Dispatch+0xf6>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10d769: 83 ec 0c sub $0xc,%esp 10d76c: 05 dc 00 00 00 add $0xdc,%eax 10d771: 50 push %eax 10d772: e8 2d 11 00 00 call 10e8a4 <_CPU_Context_save_fp> 10d777: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10d77a: 83 ec 0c sub $0xc,%esp 10d77d: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax 10d783: 50 push %eax 10d784: e8 25 11 00 00 call 10e8ae <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10d789: 89 1d e0 54 12 00 mov %ebx,0x1254e0 10d78f: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10d792: 8b 1d 18 57 12 00 mov 0x125718,%ebx
_ISR_Disable( level );
10d798: 9c pushf 10d799: fa cli 10d79a: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10d79b: 8a 15 24 57 12 00 mov 0x125724,%dl 10d7a1: 84 d2 test %dl,%dl
10d7a3: 74 3b je 10d7e0 <_Thread_Dispatch+0x15c>
heir = _Thread_Heir;
10d7a5: 8b 35 1c 57 12 00 mov 0x12571c,%esi
_Thread_Dispatch_disable_level = 1;
10d7ab: c7 05 50 54 12 00 01 movl $0x1,0x125450
10d7b2: 00 00 00
_Thread_Dispatch_necessary = false;
10d7b5: c6 05 24 57 12 00 00 movb $0x0,0x125724
_Thread_Executing = heir;
10d7bc: 89 35 18 57 12 00 mov %esi,0x125718
/*
* 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 )
10d7c2: 39 de cmp %ebx,%esi
10d7c4: 74 1a je 10d7e0 <_Thread_Dispatch+0x15c><== NEVER TAKEN
*/
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
10d7c6: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10d7ca: 0f 85 04 ff ff ff jne 10d6d4 <_Thread_Dispatch+0x50>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10d7d0: 8b 15 20 54 12 00 mov 0x125420,%edx 10d7d6: 89 56 78 mov %edx,0x78(%esi) 10d7d9: e9 f6 fe ff ff jmp 10d6d4 <_Thread_Dispatch+0x50> 10d7de: 66 90 xchg %ax,%ax
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
10d7e0: c7 05 50 54 12 00 00 movl $0x0,0x125450
10d7e7: 00 00 00
_ISR_Enable( level );
10d7ea: 50 push %eax 10d7eb: 9d popf
_API_extensions_Run_postswitch();
10d7ec: e8 97 e6 ff ff call 10be88 <_API_extensions_Run_postswitch>
}
10d7f1: 8d 65 f4 lea -0xc(%ebp),%esp 10d7f4: 5b pop %ebx 10d7f5: 5e pop %esi 10d7f6: 5f pop %edi 10d7f7: c9 leave 10d7f8: c3 ret
0010d820 <_Thread_Get>:
*/
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
10d820: 55 push %ebp 10d821: 89 e5 mov %esp,%ebp 10d823: 53 push %ebx 10d824: 83 ec 04 sub $0x4,%esp 10d827: 8b 45 08 mov 0x8(%ebp),%eax 10d82a: 8b 4d 0c mov 0xc(%ebp),%ecx
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
10d82d: 85 c0 test %eax,%eax
10d82f: 74 4b je 10d87c <_Thread_Get+0x5c>
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
10d831: 89 c2 mov %eax,%edx 10d833: c1 ea 18 shr $0x18,%edx 10d836: 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 )
10d839: 8d 5a ff lea -0x1(%edx),%ebx 10d83c: 83 fb 02 cmp $0x2,%ebx
10d83f: 77 2b ja 10d86c <_Thread_Get+0x4c>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10d841: 89 c3 mov %eax,%ebx 10d843: 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 :) */
10d846: 4b dec %ebx
10d847: 75 23 jne 10d86c <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
10d849: 8b 14 95 28 54 12 00 mov 0x125428(,%edx,4),%edx
/*
* There is no way for this to happen if POSIX is enabled.
*/
#if !defined(RTEMS_POSIX_API)
if ( !api_information ) {
10d850: 85 d2 test %edx,%edx
10d852: 74 18 je 10d86c <_Thread_Get+0x4c> <== NEVER TAKEN
*location = OBJECTS_ERROR;
goto done;
}
#endif
information = api_information[ the_class ];
10d854: 8b 52 04 mov 0x4(%edx),%edx
if ( !information ) {
10d857: 85 d2 test %edx,%edx
10d859: 74 11 je 10d86c <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
10d85b: 53 push %ebx 10d85c: 51 push %ecx 10d85d: 50 push %eax 10d85e: 52 push %edx 10d85f: e8 10 f5 ff ff call 10cd74 <_Objects_Get> 10d864: 83 c4 10 add $0x10,%esp
done:
return tp;
}
10d867: 8b 5d fc mov -0x4(%ebp),%ebx 10d86a: c9 leave 10d86b: c3 ret
}
#endif
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
10d86c: c7 01 01 00 00 00 movl $0x1,(%ecx)
{
uint32_t the_api;
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
10d872: 31 c0 xor %eax,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10d874: 8b 5d fc mov -0x4(%ebp),%ebx 10d877: c9 leave 10d878: c3 ret 10d879: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10d87c: a1 50 54 12 00 mov 0x125450,%eax 10d881: 40 inc %eax 10d882: a3 50 54 12 00 mov %eax,0x125450
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
10d887: c7 01 00 00 00 00 movl $0x0,(%ecx)
tp = _Thread_Executing;
10d88d: a1 18 57 12 00 mov 0x125718,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10d892: 8b 5d fc mov -0x4(%ebp),%ebx 10d895: c9 leave 10d896: c3 ret
001121e8 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
1121e8: 55 push %ebp 1121e9: 89 e5 mov %esp,%ebp 1121eb: 53 push %ebx 1121ec: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
1121ef: 8b 1d 18 57 12 00 mov 0x125718,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
1121f5: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
_ISR_Set_level(level);
1121fb: 85 c0 test %eax,%eax
1121fd: 74 79 je 112278 <_Thread_Handler+0x90>
1121ff: fa cli
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
112200: a0 cc 50 12 00 mov 0x1250cc,%al 112205: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
112208: c6 05 cc 50 12 00 01 movb $0x1,0x1250cc
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
11220f: 8b 93 dc 00 00 00 mov 0xdc(%ebx),%edx 112215: 85 d2 test %edx,%edx
112217: 74 24 je 11223d <_Thread_Handler+0x55>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
112219: a1 e0 54 12 00 mov 0x1254e0,%eax 11221e: 39 c3 cmp %eax,%ebx
112220: 74 1b je 11223d <_Thread_Handler+0x55>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
112222: 85 c0 test %eax,%eax
112224: 74 11 je 112237 <_Thread_Handler+0x4f>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
112226: 83 ec 0c sub $0xc,%esp 112229: 05 dc 00 00 00 add $0xdc,%eax 11222e: 50 push %eax 11222f: e8 70 c6 ff ff call 10e8a4 <_CPU_Context_save_fp> 112234: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
112237: 89 1d e0 54 12 00 mov %ebx,0x1254e0
/* * 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 );
11223d: 83 ec 0c sub $0xc,%esp 112240: 53 push %ebx 112241: e8 86 c1 ff ff call 10e3cc <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
112246: e8 b1 b5 ff ff call 10d7fc <_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) */ {
11224b: 83 c4 10 add $0x10,%esp 11224e: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
112252: 74 28 je 11227c <_Thread_Handler+0x94>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
112254: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 11225a: 85 c0 test %eax,%eax
11225c: 74 2d je 11228b <_Thread_Handler+0xa3> <== ALWAYS TAKEN
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
11225e: 83 ec 0c sub $0xc,%esp 112261: 53 push %ebx 112262: e8 a1 c1 ff ff call 10e408 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
112267: 83 c4 0c add $0xc,%esp 11226a: 6a 05 push $0x5 11226c: 6a 01 push $0x1 11226e: 6a 00 push $0x0 112270: e8 b7 a5 ff ff call 10c82c <_Internal_error_Occurred> 112275: 8d 76 00 lea 0x0(%esi),%esi
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
_ISR_Set_level(level);
112278: fb sti 112279: eb 85 jmp 112200 <_Thread_Handler+0x18> 11227b: 90 nop
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
11227c: e8 1f be 00 00 call 11e0a0 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
112281: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 112287: 85 c0 test %eax,%eax
112289: 75 d3 jne 11225e <_Thread_Handler+0x76> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
11228b: 83 ec 0c sub $0xc,%esp 11228e: ff b3 9c 00 00 00 pushl 0x9c(%ebx) 112294: ff 93 90 00 00 00 call *0x90(%ebx)
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
11229a: 89 43 28 mov %eax,0x28(%ebx) 11229d: 83 c4 10 add $0x10,%esp 1122a0: eb bc jmp 11225e <_Thread_Handler+0x76>
0010d898 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10d898: 55 push %ebp 10d899: 89 e5 mov %esp,%ebp 10d89b: 57 push %edi 10d89c: 56 push %esi 10d89d: 53 push %ebx 10d89e: 83 ec 24 sub $0x24,%esp 10d8a1: 8b 5d 0c mov 0xc(%ebp),%ebx 10d8a4: 8b 75 14 mov 0x14(%ebp),%esi 10d8a7: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10d8ab: 8a 45 20 mov 0x20(%ebp),%al 10d8ae: 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;
10d8b1: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10d8b8: 00 00 00
10d8bb: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
10d8c2: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10d8c5: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
10d8cc: 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 );
10d8cf: 56 push %esi 10d8d0: 53 push %ebx 10d8d1: e8 16 08 00 00 call 10e0ec <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10d8d6: 83 c4 10 add $0x10,%esp 10d8d9: 85 c0 test %eax,%eax
10d8db: 0f 84 9b 01 00 00 je 10da7c <_Thread_Initialize+0x1e4>
10d8e1: 39 c6 cmp %eax,%esi
10d8e3: 0f 87 93 01 00 00 ja 10da7c <_Thread_Initialize+0x1e4><== NEVER TAKEN
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10d8e9: 8b 93 c0 00 00 00 mov 0xc0(%ebx),%edx 10d8ef: 89 93 b8 00 00 00 mov %edx,0xb8(%ebx)
the_stack->size = size;
10d8f5: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10d8fb: 89 f8 mov %edi,%eax 10d8fd: 84 c0 test %al,%al
10d8ff: 0f 85 87 01 00 00 jne 10da8c <_Thread_Initialize+0x1f4>
10d905: 31 c0 xor %eax,%eax
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10d907: 31 ff xor %edi,%edi
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10d909: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx)
the_thread->Start.fp_context = fp_area;
10d90f: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10d915: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10d91c: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10d923: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10d92a: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10d931: a1 2c 55 12 00 mov 0x12552c,%eax 10d936: 85 c0 test %eax,%eax
10d938: 0f 85 76 01 00 00 jne 10dab4 <_Thread_Initialize+0x21c>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10d93e: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx)
10d945: 00 00 00
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10d948: 31 f6 xor %esi,%esi
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10d94a: 8a 45 e4 mov -0x1c(%ebp),%al 10d94d: 88 83 a0 00 00 00 mov %al,0xa0(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10d953: 8b 45 24 mov 0x24(%ebp),%eax 10d956: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.budget_callout = budget_callout;
10d95c: 8b 45 28 mov 0x28(%ebp),%eax 10d95f: 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;
10d965: 8b 45 2c mov 0x2c(%ebp),%eax 10d968: 89 83 ac 00 00 00 mov %eax,0xac(%ebx)
the_thread->current_state = STATES_DORMANT;
10d96e: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10d975: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10d97c: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10d983: 8b 45 1c mov 0x1c(%ebp),%eax 10d986: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10d989: 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
10d98f: 83 ec 08 sub $0x8,%esp 10d992: 53 push %ebx 10d993: 68 00 55 12 00 push $0x125500 10d998: ff 15 14 55 12 00 call *0x125514 10d99e: 89 45 e4 mov %eax,-0x1c(%ebp)
sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread ); if ( !sched )
10d9a1: 83 c4 10 add $0x10,%esp 10d9a4: 85 c0 test %eax,%eax
10d9a6: 74 46 je 10d9ee <_Thread_Initialize+0x156>
goto failed;
_Thread_Set_priority( the_thread, priority );
10d9a8: 83 ec 08 sub $0x8,%esp 10d9ab: ff 75 1c pushl 0x1c(%ebp) 10d9ae: 53 push %ebx 10d9af: e8 64 06 00 00 call 10e018 <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10d9b4: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10d9bb: 00 00 00
10d9be: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10d9c5: 00 00 00
_Thread_Stack_Free( the_thread );
return false;
}
10d9c8: 8b 45 08 mov 0x8(%ebp),%eax 10d9cb: 8b 40 1c mov 0x1c(%eax),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10d9ce: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10d9d2: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10d9d5: 8b 45 30 mov 0x30(%ebp),%eax 10d9d8: 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 );
10d9db: 89 1c 24 mov %ebx,(%esp) 10d9de: e8 b1 0a 00 00 call 10e494 <_User_extensions_Thread_create>
if ( extension_status )
10d9e3: 83 c4 10 add $0x10,%esp 10d9e6: 84 c0 test %al,%al
10d9e8: 0f 85 9a 00 00 00 jne 10da88 <_Thread_Initialize+0x1f0>
return true;
failed:
if ( the_thread->libc_reent )
10d9ee: 8b 83 e0 00 00 00 mov 0xe0(%ebx),%eax 10d9f4: 85 c0 test %eax,%eax
10d9f6: 74 0c je 10da04 <_Thread_Initialize+0x16c>
_Workspace_Free( the_thread->libc_reent );
10d9f8: 83 ec 0c sub $0xc,%esp 10d9fb: 50 push %eax 10d9fc: e8 23 0e 00 00 call 10e824 <_Workspace_Free> 10da01: 83 c4 10 add $0x10,%esp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10da04: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax 10da0a: 85 c0 test %eax,%eax
10da0c: 74 0c je 10da1a <_Thread_Initialize+0x182>
_Workspace_Free( the_thread->API_Extensions[i] );
10da0e: 83 ec 0c sub $0xc,%esp 10da11: 50 push %eax 10da12: e8 0d 0e 00 00 call 10e824 <_Workspace_Free> 10da17: 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] )
10da1a: 8b 83 e8 00 00 00 mov 0xe8(%ebx),%eax 10da20: 85 c0 test %eax,%eax
10da22: 74 0c je 10da30 <_Thread_Initialize+0x198><== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
10da24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10da27: 50 push %eax <== NOT EXECUTED 10da28: e8 f7 0d 00 00 call 10e824 <_Workspace_Free> <== NOT EXECUTED 10da2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( extensions_area )
10da30: 85 f6 test %esi,%esi
10da32: 74 0c je 10da40 <_Thread_Initialize+0x1a8>
(void) _Workspace_Free( extensions_area );
10da34: 83 ec 0c sub $0xc,%esp 10da37: 56 push %esi 10da38: e8 e7 0d 00 00 call 10e824 <_Workspace_Free> 10da3d: 83 c4 10 add $0x10,%esp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
10da40: 85 ff test %edi,%edi
10da42: 74 0c je 10da50 <_Thread_Initialize+0x1b8>
(void) _Workspace_Free( fp_area );
10da44: 83 ec 0c sub $0xc,%esp 10da47: 57 push %edi 10da48: e8 d7 0d 00 00 call 10e824 <_Workspace_Free> 10da4d: 83 c4 10 add $0x10,%esp
#endif
if ( sched )
10da50: 8b 45 e4 mov -0x1c(%ebp),%eax 10da53: 85 c0 test %eax,%eax
10da55: 74 0e je 10da65 <_Thread_Initialize+0x1cd>
(void) _Workspace_Free( sched );
10da57: 83 ec 0c sub $0xc,%esp 10da5a: ff 75 e4 pushl -0x1c(%ebp) 10da5d: e8 c2 0d 00 00 call 10e824 <_Workspace_Free> 10da62: 83 c4 10 add $0x10,%esp
_Thread_Stack_Free( the_thread );
10da65: 83 ec 0c sub $0xc,%esp 10da68: 53 push %ebx 10da69: e8 e2 06 00 00 call 10e150 <_Thread_Stack_Free>
return false;
10da6e: 83 c4 10 add $0x10,%esp 10da71: 31 c0 xor %eax,%eax
}
10da73: 8d 65 f4 lea -0xc(%ebp),%esp 10da76: 5b pop %ebx 10da77: 5e pop %esi 10da78: 5f pop %edi 10da79: c9 leave 10da7a: c3 ret 10da7b: 90 nop
* 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 */
10da7c: 31 c0 xor %eax,%eax
_Thread_Stack_Free( the_thread );
return false;
}
10da7e: 8d 65 f4 lea -0xc(%ebp),%esp 10da81: 5b pop %ebx 10da82: 5e pop %esi 10da83: 5f pop %edi 10da84: c9 leave 10da85: c3 ret 10da86: 66 90 xchg %ax,%ax
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
10da88: b0 01 mov $0x1,%al 10da8a: eb f2 jmp 10da7e <_Thread_Initialize+0x1e6>
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10da8c: 83 ec 0c sub $0xc,%esp 10da8f: 6a 6c push $0x6c 10da91: e8 72 0d 00 00 call 10e808 <_Workspace_Allocate> 10da96: 89 c7 mov %eax,%edi
if ( !fp_area )
10da98: 83 c4 10 add $0x10,%esp 10da9b: 85 c0 test %eax,%eax
10da9d: 0f 85 66 fe ff ff jne 10d909 <_Thread_Initialize+0x71>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10daa3: 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;
10daa5: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10daac: e9 3d ff ff ff jmp 10d9ee <_Thread_Initialize+0x156> 10dab1: 8d 76 00 lea 0x0(%esi),%esi
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
10dab4: 83 ec 0c sub $0xc,%esp 10dab7: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10dabe: 50 push %eax 10dabf: e8 44 0d 00 00 call 10e808 <_Workspace_Allocate> 10dac4: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10dac6: 83 c4 10 add $0x10,%esp 10dac9: 85 c0 test %eax,%eax
10dacb: 74 26 je 10daf3 <_Thread_Initialize+0x25b>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10dacd: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) 10dad3: 8b 0d 2c 55 12 00 mov 0x12552c,%ecx
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10dad9: 31 d2 xor %edx,%edx
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10dadb: 31 c0 xor %eax,%eax 10dadd: 8d 76 00 lea 0x0(%esi),%esi
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
10dae0: c7 04 96 00 00 00 00 movl $0x0,(%esi,%edx,4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10dae7: 40 inc %eax 10dae8: 89 c2 mov %eax,%edx 10daea: 39 c1 cmp %eax,%ecx
10daec: 73 f2 jae 10dae0 <_Thread_Initialize+0x248>
10daee: e9 57 fe ff ff jmp 10d94a <_Thread_Initialize+0xb2>
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;
10daf3: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10dafa: e9 ef fe ff ff jmp 10d9ee <_Thread_Initialize+0x156>
00111a4c <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
111a4c: 55 push %ebp 111a4d: 89 e5 mov %esp,%ebp 111a4f: 53 push %ebx 111a50: 83 ec 10 sub $0x10,%esp 111a53: 8b 5d 08 mov 0x8(%ebp),%ebx
the_thread->resource_count = 0;
111a56: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
111a5d: 8a 83 a0 00 00 00 mov 0xa0(%ebx),%al 111a63: 88 43 74 mov %al,0x74(%ebx)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
111a66: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax 111a6c: 89 43 7c mov %eax,0x7c(%ebx)
the_thread->budget_callout = the_thread->Start.budget_callout;
111a6f: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax 111a75: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
the_thread->Start.pointer_argument = pointer_argument;
111a7b: 8b 45 0c mov 0xc(%ebp),%eax 111a7e: 89 83 98 00 00 00 mov %eax,0x98(%ebx)
the_thread->Start.numeric_argument = numeric_argument;
111a84: 8b 45 10 mov 0x10(%ebp),%eax 111a87: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx)
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
111a8d: 53 push %ebx 111a8e: e8 59 cf ff ff call 10e9ec <_Thread_queue_Extract_with_proxy> 111a93: 83 c4 10 add $0x10,%esp 111a96: 84 c0 test %al,%al
111a98: 75 06 jne 111aa0 <_Thread_Reset+0x54>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
111a9a: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
111a9e: 74 28 je 111ac8 <_Thread_Reset+0x7c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
111aa0: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 111aa6: 39 43 14 cmp %eax,0x14(%ebx)
111aa9: 74 15 je 111ac0 <_Thread_Reset+0x74>
the_thread->real_priority = the_thread->Start.initial_priority;
111aab: 89 43 18 mov %eax,0x18(%ebx)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
111aae: 89 45 0c mov %eax,0xc(%ebp) 111ab1: 89 5d 08 mov %ebx,0x8(%ebp)
} }
111ab4: 8b 5d fc mov -0x4(%ebp),%ebx 111ab7: c9 leave
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
111ab8: e9 0b d1 ff ff jmp 10ebc8 <_Thread_Set_priority> 111abd: 8d 76 00 lea 0x0(%esi),%esi
} }
111ac0: 8b 5d fc mov -0x4(%ebp),%ebx 111ac3: c9 leave 111ac4: c3 ret 111ac5: 8d 76 00 lea 0x0(%esi),%esi
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
111ac8: 83 ec 0c sub $0xc,%esp 111acb: 8d 43 48 lea 0x48(%ebx),%eax 111ace: 50 push %eax 111acf: e8 fc d7 ff ff call 10f2d0 <_Watchdog_Remove> 111ad4: 83 c4 10 add $0x10,%esp 111ad7: eb c7 jmp 111aa0 <_Thread_Reset+0x54>
0011132c <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
11132c: 55 push %ebp 11132d: 89 e5 mov %esp,%ebp 11132f: 53 push %ebx 111330: 83 ec 04 sub $0x4,%esp 111333: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
111336: 9c pushf 111337: fa cli 111338: 5b pop %ebx
current_state = the_thread->current_state;
111339: 8b 50 10 mov 0x10(%eax),%edx
if ( current_state & STATES_SUSPENDED ) {
11133c: f6 c2 02 test $0x2,%dl
11133f: 74 0a je 11134b <_Thread_Resume+0x1f> <== NEVER TAKEN
111341: 83 e2 fd and $0xfffffffd,%edx
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
111344: 89 50 10 mov %edx,0x10(%eax)
if ( _States_Is_ready( current_state ) ) {
111347: 85 d2 test %edx,%edx
111349: 74 09 je 111354 <_Thread_Resume+0x28>
_Scheduler_Unblock( &_Scheduler, the_thread );
}
}
_ISR_Enable( level );
11134b: 53 push %ebx 11134c: 9d popf
}
11134d: 8b 5d fc mov -0x4(%ebp),%ebx 111350: c9 leave 111351: c3 ret 111352: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE void _Scheduler_Unblock(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
the_scheduler->Operations.unblock( the_scheduler, the_thread );
111354: 83 ec 08 sub $0x8,%esp 111357: 50 push %eax 111358: 68 e0 95 12 00 push $0x1295e0 11135d: ff 15 f0 95 12 00 call *0x1295f0 111363: 83 c4 10 add $0x10,%esp 111366: eb e3 jmp 11134b <_Thread_Resume+0x1f>
0010e0ec <_Thread_Stack_Allocate>:
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
10e0ec: 55 push %ebp 10e0ed: 89 e5 mov %esp,%ebp 10e0ef: 53 push %ebx 10e0f0: 83 ec 04 sub $0x4,%esp
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
the_stack_size = 0;
10e0f3: a1 10 12 12 00 mov 0x121210,%eax 10e0f8: 8b 5d 0c mov 0xc(%ebp),%ebx 10e0fb: 39 c3 cmp %eax,%ebx
10e0fd: 73 02 jae 10e101 <_Thread_Stack_Allocate+0x15>
10e0ff: 89 c3 mov %eax,%ebx
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( Configuration.stack_allocate_hook ) {
10e101: a1 44 12 12 00 mov 0x121244,%eax 10e106: 85 c0 test %eax,%eax
10e108: 74 32 je 10e13c <_Thread_Stack_Allocate+0x50>
stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size );
10e10a: 83 ec 0c sub $0xc,%esp 10e10d: 53 push %ebx 10e10e: ff d0 call *%eax 10e110: 83 c4 10 add $0x10,%esp
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
10e113: 85 c0 test %eax,%eax
10e115: 74 11 je 10e128 <_Thread_Stack_Allocate+0x3c>
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
10e117: 8b 55 08 mov 0x8(%ebp),%edx 10e11a: 89 82 c0 00 00 00 mov %eax,0xc0(%edx)
return the_stack_size;
}
10e120: 89 d8 mov %ebx,%eax 10e122: 8b 5d fc mov -0x4(%ebp),%ebx 10e125: c9 leave 10e126: c3 ret 10e127: 90 nop
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
the_stack_size = 0;
10e128: 31 db xor %ebx,%ebx
the_thread->Start.stack = stack_addr;
10e12a: 8b 55 08 mov 0x8(%ebp),%edx 10e12d: 89 82 c0 00 00 00 mov %eax,0xc0(%edx)
return the_stack_size;
}
10e133: 89 d8 mov %ebx,%eax 10e135: 8b 5d fc mov -0x4(%ebp),%ebx 10e138: c9 leave 10e139: c3 ret 10e13a: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size (
size_t size
)
{
return size + CPU_STACK_ALIGNMENT;
10e13c: 83 c3 10 add $0x10,%ebx
* get and keep the stack adjust factor, the stack alignment, and
* the context initialization sequence in sync.
*/
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
10e13f: 83 ec 0c sub $0xc,%esp 10e142: 53 push %ebx 10e143: e8 c0 06 00 00 call 10e808 <_Workspace_Allocate> 10e148: 83 c4 10 add $0x10,%esp 10e14b: eb c6 jmp 10e113 <_Thread_Stack_Allocate+0x27>
0010e150 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
10e150: 55 push %ebp 10e151: 89 e5 mov %esp,%ebp 10e153: 83 ec 08 sub $0x8,%esp 10e156: 8b 55 08 mov 0x8(%ebp),%edx
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
10e159: a1 48 12 12 00 mov 0x121248,%eax 10e15e: 85 c0 test %eax,%eax
10e160: 74 0e je 10e170 <_Thread_Stack_Free+0x20>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
10e162: 8b 92 b8 00 00 00 mov 0xb8(%edx),%edx 10e168: 89 55 08 mov %edx,0x8(%ebp)
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10e16b: c9 leave
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
10e16c: ff e0 jmp *%eax 10e16e: 66 90 xchg %ax,%ax
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10e170: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10e176: 89 45 08 mov %eax,0x8(%ebp)
}
10e179: c9 leave
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10e17a: e9 a5 06 00 00 jmp 10e824 <_Workspace_Free>
00110dd4 <_Thread_Suspend>:
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
110dd4: 55 push %ebp 110dd5: 89 e5 mov %esp,%ebp 110dd7: 53 push %ebx 110dd8: 83 ec 04 sub $0x4,%esp 110ddb: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
_ISR_Disable( level );
110dde: 9c pushf 110ddf: fa cli 110de0: 5b pop %ebx
if ( !_States_Is_ready( the_thread->current_state ) ) {
110de1: 8b 50 10 mov 0x10(%eax),%edx 110de4: 85 d2 test %edx,%edx
110de6: 74 10 je 110df8 <_Thread_Suspend+0x24>
110de8: 83 ca 02 or $0x2,%edx 110deb: 89 50 10 mov %edx,0x10(%eax)
the_thread->current_state =
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
110dee: 53 push %ebx 110def: 9d popf
the_thread->current_state = STATES_SUSPENDED;
_Scheduler_Block(&_Scheduler, the_thread);
_ISR_Enable( level );
}
110df0: 8b 5d fc mov -0x4(%ebp),%ebx 110df3: c9 leave 110df4: c3 ret 110df5: 8d 76 00 lea 0x0(%esi),%esi
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
110df8: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax)
RTEMS_INLINE_ROUTINE void _Scheduler_Block(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
the_scheduler->Operations.block( the_scheduler, the_thread );
110dff: 83 ec 08 sub $0x8,%esp 110e02: 50 push %eax 110e03: 68 00 55 12 00 push $0x125500 110e08: ff 15 0c 55 12 00 call *0x12550c
_Scheduler_Block(&_Scheduler, the_thread);
_ISR_Enable( level );
110e0e: 53 push %ebx 110e0f: 9d popf 110e10: 83 c4 10 add $0x10,%esp
}
110e13: 8b 5d fc mov -0x4(%ebp),%ebx 110e16: c9 leave 110e17: c3 ret
0010e23c <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
10e23c: 55 push %ebp 10e23d: 89 e5 mov %esp,%ebp 10e23f: 53 push %ebx 10e240: 83 ec 04 sub $0x4,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10e243: 8b 1d 18 57 12 00 mov 0x125718,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10e249: 80 7b 74 00 cmpb $0x0,0x74(%ebx)
10e24d: 74 0d je 10e25c <_Thread_Tickle_timeslice+0x20>
return;
if ( !_States_Is_ready( executing->current_state ) )
10e24f: 8b 43 10 mov 0x10(%ebx),%eax 10e252: 85 c0 test %eax,%eax
10e254: 75 06 jne 10e25c <_Thread_Tickle_timeslice+0x20>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10e256: 83 7b 7c 01 cmpl $0x1,0x7c(%ebx)
10e25a: 74 08 je 10e264 <_Thread_Tickle_timeslice+0x28>
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
10e25c: 8b 5d fc mov -0x4(%ebp),%ebx 10e25f: c9 leave 10e260: c3 ret 10e261: 8d 76 00 lea 0x0(%esi),%esi
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
10e264: 8b 43 78 mov 0x78(%ebx),%eax 10e267: 48 dec %eax 10e268: 89 43 78 mov %eax,0x78(%ebx) 10e26b: 85 c0 test %eax,%eax
10e26d: 7f ed jg 10e25c <_Thread_Tickle_timeslice+0x20>
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield( &_Scheduler );
10e26f: 83 ec 0c sub $0xc,%esp 10e272: 68 00 55 12 00 push $0x125500 10e277: ff 15 08 55 12 00 call *0x125508
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Scheduler_Yield( );
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10e27d: a1 20 54 12 00 mov 0x125420,%eax 10e282: 89 43 78 mov %eax,0x78(%ebx) 10e285: 83 c4 10 add $0x10,%esp 10e288: eb d2 jmp 10e25c <_Thread_Tickle_timeslice+0x20>
0010dbd8 <_Thread_queue_Dequeue_priority>:
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
10dbd8: 55 push %ebp 10dbd9: 89 e5 mov %esp,%ebp 10dbdb: 57 push %edi 10dbdc: 56 push %esi 10dbdd: 53 push %ebx 10dbde: 83 ec 2c sub $0x2c,%esp 10dbe1: 8b 7d 08 mov 0x8(%ebp),%edi
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
10dbe4: 9c pushf 10dbe5: fa cli 10dbe6: 58 pop %eax 10dbe7: 89 f9 mov %edi,%ecx
for( index=0 ;
10dbe9: 31 d2 xor %edx,%edx
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10dbeb: 8b 19 mov (%ecx),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10dbed: 8d 34 52 lea (%edx,%edx,2),%esi 10dbf0: 8d 74 b7 04 lea 0x4(%edi,%esi,4),%esi
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
10dbf4: 39 f3 cmp %esi,%ebx
10dbf6: 75 18 jne 10dc10 <_Thread_queue_Dequeue_priority+0x38>
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
10dbf8: 42 inc %edx 10dbf9: 83 c1 0c add $0xc,%ecx
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
10dbfc: 83 fa 04 cmp $0x4,%edx
10dbff: 75 ea jne 10dbeb <_Thread_queue_Dequeue_priority+0x13>
}
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
10dc01: 50 push %eax 10dc02: 9d popf
return NULL;
10dc03: 31 f6 xor %esi,%esi
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10dc05: 89 f0 mov %esi,%eax 10dc07: 8d 65 f4 lea -0xc(%ebp),%esp 10dc0a: 5b pop %ebx 10dc0b: 5e pop %esi 10dc0c: 5f pop %edi 10dc0d: c9 leave 10dc0e: c3 ret 10dc0f: 90 nop
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
the_thread = (Thread_Control *) _Chain_First(
10dc10: 89 de mov %ebx,%esi
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
10dc12: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10dc19: 8b 53 38 mov 0x38(%ebx),%edx
dequeue:
the_thread->Wait.queue = NULL;
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
10dc1c: 8b 0b mov (%ebx),%ecx
previous_node = the_thread->Object.Node.previous;
10dc1e: 8b 7b 04 mov 0x4(%ebx),%edi 10dc21: 89 7d d4 mov %edi,-0x2c(%ebp) 10dc24: 8d 7b 3c lea 0x3c(%ebx),%edi
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
10dc27: 39 fa cmp %edi,%edx
10dc29: 74 7f je 10dcaa <_Thread_queue_Dequeue_priority+0xd2>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10dc2b: 8b 7b 40 mov 0x40(%ebx),%edi 10dc2e: 89 7d e4 mov %edi,-0x1c(%ebp)
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
10dc31: 8b 3a mov (%edx),%edi 10dc33: 89 7d e0 mov %edi,-0x20(%ebp)
previous_node->next = new_first_node;
10dc36: 8b 7d d4 mov -0x2c(%ebp),%edi 10dc39: 89 17 mov %edx,(%edi)
next_node->previous = new_first_node;
10dc3b: 89 51 04 mov %edx,0x4(%ecx)
new_first_node->next = next_node;
10dc3e: 89 0a mov %ecx,(%edx)
new_first_node->previous = previous_node;
10dc40: 89 7a 04 mov %edi,0x4(%edx)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
10dc43: 8b 4b 40 mov 0x40(%ebx),%ecx 10dc46: 39 4b 38 cmp %ecx,0x38(%ebx)
10dc49: 74 17 je 10dc62 <_Thread_queue_Dequeue_priority+0x8a>
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
10dc4b: 8d 4a 38 lea 0x38(%edx),%ecx 10dc4e: 8b 7d e0 mov -0x20(%ebp),%edi 10dc51: 89 4f 04 mov %ecx,0x4(%edi)
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
10dc54: 89 7a 38 mov %edi,0x38(%edx)
tail->previous = last_node;
10dc57: 8b 4d e4 mov -0x1c(%ebp),%ecx 10dc5a: 89 4a 40 mov %ecx,0x40(%edx)
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
10dc5d: 83 c2 3c add $0x3c,%edx 10dc60: 89 11 mov %edx,(%ecx)
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10dc62: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10dc66: 74 18 je 10dc80 <_Thread_queue_Dequeue_priority+0xa8>
_ISR_Enable( level );
10dc68: 50 push %eax 10dc69: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10dc6a: 83 ec 08 sub $0x8,%esp 10dc6d: 68 f8 ff 03 10 push $0x1003fff8 10dc72: 53 push %ebx 10dc73: e8 04 f8 ff ff call 10d47c <_Thread_Clear_state> 10dc78: 83 c4 10 add $0x10,%esp 10dc7b: eb 88 jmp 10dc05 <_Thread_queue_Dequeue_priority+0x2d> 10dc7d: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10dc80: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10dc87: 50 push %eax 10dc88: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10dc89: 83 ec 0c sub $0xc,%esp 10dc8c: 8d 43 48 lea 0x48(%ebx),%eax 10dc8f: 50 push %eax 10dc90: e8 4b 0a 00 00 call 10e6e0 <_Watchdog_Remove> 10dc95: 58 pop %eax 10dc96: 5a pop %edx 10dc97: 68 f8 ff 03 10 push $0x1003fff8 10dc9c: 53 push %ebx 10dc9d: e8 da f7 ff ff call 10d47c <_Thread_Clear_state> 10dca2: 83 c4 10 add $0x10,%esp 10dca5: e9 5b ff ff ff jmp 10dc05 <_Thread_queue_Dequeue_priority+0x2d>
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
10dcaa: 8b 7d d4 mov -0x2c(%ebp),%edi 10dcad: 89 0f mov %ecx,(%edi)
next_node->previous = previous_node;
10dcaf: 89 79 04 mov %edi,0x4(%ecx) 10dcb2: eb ae jmp 10dc62 <_Thread_queue_Dequeue_priority+0x8a>
00110c78 <_Thread_queue_Extract>:
void _Thread_queue_Extract(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
110c78: 55 push %ebp 110c79: 89 e5 mov %esp,%ebp 110c7b: 83 ec 08 sub $0x8,%esp 110c7e: 8b 45 08 mov 0x8(%ebp),%eax 110c81: 8b 55 0c mov 0xc(%ebp),%edx
/* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
110c84: 83 78 34 01 cmpl $0x1,0x34(%eax)
110c88: 74 0e je 110c98 <_Thread_queue_Extract+0x20>
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
110c8a: 89 55 0c mov %edx,0xc(%ebp) 110c8d: 89 45 08 mov %eax,0x8(%ebp)
}
110c90: c9 leave
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
110c91: e9 0e 16 00 00 jmp 1122a4 <_Thread_queue_Extract_fifo> 110c96: 66 90 xchg %ax,%ax
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
110c98: 51 push %ecx 110c99: 6a 00 push $0x0 110c9b: 52 push %edx 110c9c: 50 push %eax 110c9d: e8 06 00 00 00 call 110ca8 <_Thread_queue_Extract_priority_helper> 110ca2: 83 c4 10 add $0x10,%esp
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
}
110ca5: c9 leave 110ca6: c3 ret
001122a4 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
1122a4: 55 push %ebp 1122a5: 89 e5 mov %esp,%ebp 1122a7: 53 push %ebx 1122a8: 83 ec 04 sub $0x4,%esp 1122ab: 8b 5d 0c mov 0xc(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
1122ae: 9c pushf 1122af: fa cli 1122b0: 58 pop %eax
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
1122b1: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
1122b8: 74 2e je 1122e8 <_Thread_queue_Extract_fifo+0x44>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
1122ba: 8b 0b mov (%ebx),%ecx
previous = the_node->previous;
1122bc: 8b 53 04 mov 0x4(%ebx),%edx
next->previous = previous;
1122bf: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
1122c2: 89 0a mov %ecx,(%edx)
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
1122c4: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
1122cb: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
1122cf: 74 1f je 1122f0 <_Thread_queue_Extract_fifo+0x4c>
_ISR_Enable( level );
1122d1: 50 push %eax 1122d2: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
1122d3: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 1122da: 89 5d 08 mov %ebx,0x8(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
1122dd: 8b 5d fc mov -0x4(%ebp),%ebx 1122e0: c9 leave 1122e1: e9 96 b1 ff ff jmp 10d47c <_Thread_Clear_state> 1122e6: 66 90 xchg %ax,%ax
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
1122e8: 50 push %eax 1122e9: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
1122ea: 8b 5d fc mov -0x4(%ebp),%ebx 1122ed: c9 leave 1122ee: c3 ret 1122ef: 90 nop 1122f0: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
1122f7: 50 push %eax 1122f8: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
1122f9: 83 ec 0c sub $0xc,%esp 1122fc: 8d 43 48 lea 0x48(%ebx),%eax 1122ff: 50 push %eax 112300: e8 db c3 ff ff call 10e6e0 <_Watchdog_Remove> 112305: 83 c4 10 add $0x10,%esp 112308: eb c9 jmp 1122d3 <_Thread_queue_Extract_fifo+0x2f>
00110ca8 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
110ca8: 55 push %ebp 110ca9: 89 e5 mov %esp,%ebp 110cab: 57 push %edi 110cac: 56 push %esi 110cad: 53 push %ebx 110cae: 83 ec 1c sub $0x1c,%esp 110cb1: 8b 5d 0c mov 0xc(%ebp),%ebx 110cb4: 8a 45 10 mov 0x10(%ebp),%al 110cb7: 88 45 e3 mov %al,-0x1d(%ebp)
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
110cba: 9c pushf 110cbb: fa cli 110cbc: 8f 45 e4 popl -0x1c(%ebp)
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
110cbf: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
110cc6: 74 6c je 110d34 <_Thread_queue_Extract_priority_helper+0x8c>
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
110cc8: 8b 13 mov (%ebx),%edx
previous_node = the_node->previous;
110cca: 8b 4b 04 mov 0x4(%ebx),%ecx
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
110ccd: 8b 43 38 mov 0x38(%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 );
110cd0: 8d 73 3c lea 0x3c(%ebx),%esi
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
110cd3: 39 f0 cmp %esi,%eax
110cd5: 74 69 je 110d40 <_Thread_queue_Extract_priority_helper+0x98>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
110cd7: 8b 7b 40 mov 0x40(%ebx),%edi
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
110cda: 8b 30 mov (%eax),%esi
previous_node->next = new_first_node;
110cdc: 89 01 mov %eax,(%ecx)
next_node->previous = new_first_node;
110cde: 89 42 04 mov %eax,0x4(%edx)
new_first_node->next = next_node;
110ce1: 89 10 mov %edx,(%eax)
new_first_node->previous = previous_node;
110ce3: 89 48 04 mov %ecx,0x4(%eax)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
110ce6: 8b 53 40 mov 0x40(%ebx),%edx 110ce9: 39 53 38 cmp %edx,0x38(%ebx)
110cec: 74 11 je 110cff <_Thread_queue_Extract_priority_helper+0x57>
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
110cee: 8d 50 38 lea 0x38(%eax),%edx 110cf1: 89 56 04 mov %edx,0x4(%esi)
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
110cf4: 89 70 38 mov %esi,0x38(%eax)
tail->previous = last_node;
110cf7: 89 78 40 mov %edi,0x40(%eax)
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
110cfa: 83 c0 3c add $0x3c,%eax 110cfd: 89 07 mov %eax,(%edi)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
110cff: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
110d03: 75 23 jne 110d28 <_Thread_queue_Extract_priority_helper+0x80>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
110d05: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
110d09: 74 3d je 110d48 <_Thread_queue_Extract_priority_helper+0xa0>
_ISR_Enable( level );
110d0b: ff 75 e4 pushl -0x1c(%ebp) 110d0e: 9d popf 110d0f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 110d16: 89 5d 08 mov %ebx,0x8(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
110d19: 8d 65 f4 lea -0xc(%ebp),%esp 110d1c: 5b pop %ebx 110d1d: 5e pop %esi 110d1e: 5f pop %edi 110d1f: c9 leave 110d20: e9 57 c7 ff ff jmp 10d47c <_Thread_Clear_state> 110d25: 8d 76 00 lea 0x0(%esi),%esi
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
110d28: ff 75 e4 pushl -0x1c(%ebp) 110d2b: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
110d2c: 8d 65 f4 lea -0xc(%ebp),%esp 110d2f: 5b pop %ebx 110d30: 5e pop %esi 110d31: 5f pop %edi 110d32: c9 leave 110d33: c3 ret
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
110d34: ff 75 e4 pushl -0x1c(%ebp) 110d37: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
110d38: 8d 65 f4 lea -0xc(%ebp),%esp 110d3b: 5b pop %ebx 110d3c: 5e pop %esi 110d3d: 5f pop %edi 110d3e: c9 leave 110d3f: c3 ret
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
110d40: 89 11 mov %edx,(%ecx)
next_node->previous = previous_node;
110d42: 89 4a 04 mov %ecx,0x4(%edx) 110d45: eb b8 jmp 110cff <_Thread_queue_Extract_priority_helper+0x57> 110d47: 90 nop 110d48: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
110d4f: ff 75 e4 pushl -0x1c(%ebp) 110d52: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
110d53: 83 ec 0c sub $0xc,%esp 110d56: 8d 43 48 lea 0x48(%ebx),%eax 110d59: 50 push %eax 110d5a: e8 81 d9 ff ff call 10e6e0 <_Watchdog_Remove> 110d5f: 83 c4 10 add $0x10,%esp 110d62: eb ab jmp 110d0f <_Thread_queue_Extract_priority_helper+0x67>
0010dec4 <_Thread_queue_Extract_with_proxy>:
*/
bool _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread
)
{
10dec4: 55 push %ebp 10dec5: 89 e5 mov %esp,%ebp 10dec7: 83 ec 08 sub $0x8,%esp 10deca: 8b 45 08 mov 0x8(%ebp),%eax
States_Control state;
state = the_thread->current_state;
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10decd: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10ded4: 75 06 jne 10dedc <_Thread_queue_Extract_with_proxy+0x18>
#endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
return true;
}
return false;
10ded6: 31 c0 xor %eax,%eax
}
10ded8: c9 leave 10ded9: c3 ret 10deda: 66 90 xchg %ax,%ax
if ( proxy_extract_callout )
(*proxy_extract_callout)( the_thread );
}
#endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
10dedc: 83 ec 08 sub $0x8,%esp 10dedf: 50 push %eax 10dee0: ff 70 44 pushl 0x44(%eax) 10dee3: e8 90 2d 00 00 call 110c78 <_Thread_queue_Extract>
return true;
10dee8: 83 c4 10 add $0x10,%esp 10deeb: b0 01 mov $0x1,%al
} return false; }
10deed: c9 leave 10deee: c3 ret
0011f09c <_Thread_queue_First>:
*/
Thread_Control *_Thread_queue_First(
Thread_queue_Control *the_thread_queue
)
{
11f09c: 55 push %ebp 11f09d: 89 e5 mov %esp,%ebp 11f09f: 83 ec 08 sub $0x8,%esp 11f0a2: 8b 45 08 mov 0x8(%ebp),%eax
Thread_Control * (*first_p)(Thread_queue_Control *);
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
11f0a5: 83 78 34 01 cmpl $0x1,0x34(%eax)
11f0a9: 74 0d je 11f0b8 <_Thread_queue_First+0x1c>
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
11f0ab: ba 48 04 12 00 mov $0x120448,%edx
return (*first_p)( the_thread_queue );
11f0b0: 89 45 08 mov %eax,0x8(%ebp)
}
11f0b3: c9 leave
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
11f0b4: ff e2 jmp *%edx 11f0b6: 66 90 xchg %ax,%ax
)
{
Thread_Control * (*first_p)(Thread_queue_Control *);
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
11f0b8: ba c4 f0 11 00 mov $0x11f0c4,%edx
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
11f0bd: 89 45 08 mov %eax,0x8(%ebp)
}
11f0c0: c9 leave
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
11f0c1: ff e2 jmp *%edx
00120448 <_Thread_queue_First_fifo>:
*/
Thread_Control *_Thread_queue_First_fifo(
Thread_queue_Control *the_thread_queue
)
{
120448: 55 push %ebp 120449: 89 e5 mov %esp,%ebp 12044b: 8b 55 08 mov 0x8(%ebp),%edx
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo );
return NULL;
}
12044e: 8b 02 mov (%edx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
120450: 83 c2 04 add $0x4,%edx
Thread_Control *_Thread_queue_First_fifo(
Thread_queue_Control *the_thread_queue
)
{
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
120453: 39 d0 cmp %edx,%eax
120455: 74 05 je 12045c <_Thread_queue_First_fifo+0x14>
return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo );
return NULL;
}
120457: c9 leave 120458: c3 ret 120459: 8d 76 00 lea 0x0(%esi),%esi
)
{
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo );
return NULL;
12045c: 31 c0 xor %eax,%eax
}
12045e: c9 leave 12045f: c3 ret
0010def0 <_Thread_queue_Flush>:
#else
Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)),
#endif
uint32_t status
)
{
10def0: 55 push %ebp 10def1: 89 e5 mov %esp,%ebp 10def3: 56 push %esi 10def4: 53 push %ebx 10def5: 8b 5d 08 mov 0x8(%ebp),%ebx 10def8: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10defb: eb 06 jmp 10df03 <_Thread_queue_Flush+0x13> 10defd: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
10df00: 89 70 34 mov %esi,0x34(%eax)
uint32_t status
)
{
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10df03: 83 ec 0c sub $0xc,%esp 10df06: 53 push %ebx 10df07: e8 80 fc ff ff call 10db8c <_Thread_queue_Dequeue> 10df0c: 83 c4 10 add $0x10,%esp 10df0f: 85 c0 test %eax,%eax
10df11: 75 ed jne 10df00 <_Thread_queue_Flush+0x10>
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
}
}
10df13: 8d 65 f8 lea -0x8(%ebp),%esp 10df16: 5b pop %ebx 10df17: 5e pop %esi 10df18: c9 leave 10df19: c3 ret
0010df1c <_Thread_queue_Initialize>:
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
10df1c: 55 push %ebp 10df1d: 89 e5 mov %esp,%ebp 10df1f: 56 push %esi 10df20: 53 push %ebx 10df21: 8b 45 08 mov 0x8(%ebp),%eax 10df24: 8b 55 0c mov 0xc(%ebp),%edx
the_thread_queue->state = state;
10df27: 8b 4d 10 mov 0x10(%ebp),%ecx 10df2a: 89 48 38 mov %ecx,0x38(%eax)
the_thread_queue->discipline = the_discipline;
10df2d: 89 50 34 mov %edx,0x34(%eax)
the_thread_queue->timeout_status = timeout_status;
10df30: 8b 4d 14 mov 0x14(%ebp),%ecx 10df33: 89 48 3c mov %ecx,0x3c(%eax)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10df36: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10df3d: 83 fa 01 cmp $0x1,%edx
10df40: 74 16 je 10df58 <_Thread_queue_Initialize+0x3c>
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 );
10df42: 8d 50 04 lea 0x4(%eax),%edx 10df45: 89 10 mov %edx,(%eax)
head->next = tail;
head->previous = NULL;
10df47: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
tail->previous = head;
10df4e: 89 40 08 mov %eax,0x8(%eax)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
10df51: 5b pop %ebx 10df52: 5e pop %esi 10df53: c9 leave 10df54: c3 ret 10df55: 8d 76 00 lea 0x0(%esi),%esi
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
the_thread_queue->timeout_status = timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10df58: 89 c1 mov %eax,%ecx 10df5a: 30 d2 xor %dl,%dl
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 );
10df5c: 8d 1c 52 lea (%edx,%edx,2),%ebx 10df5f: 8d 1c 98 lea (%eax,%ebx,4),%ebx 10df62: 8d 73 04 lea 0x4(%ebx),%esi 10df65: 89 31 mov %esi,(%ecx)
head->next = tail;
head->previous = NULL;
10df67: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10df6e: 89 59 08 mov %ebx,0x8(%ecx)
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
10df71: 42 inc %edx 10df72: 83 c1 0c add $0xc,%ecx
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
10df75: 83 fa 04 cmp $0x4,%edx
10df78: 75 e2 jne 10df5c <_Thread_queue_Initialize+0x40>
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
10df7a: 5b pop %ebx 10df7b: 5e pop %esi 10df7c: c9 leave 10df7d: c3 ret
00110d64 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
110d64: 55 push %ebp 110d65: 89 e5 mov %esp,%ebp 110d67: 83 ec 08 sub $0x8,%esp 110d6a: 8b 45 08 mov 0x8(%ebp),%eax
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
110d6d: 8b 50 44 mov 0x44(%eax),%edx
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
110d70: 8b 4a 30 mov 0x30(%edx),%ecx 110d73: 85 c9 test %ecx,%ecx
110d75: 74 08 je 110d7f <_Thread_queue_Process_timeout+0x1b>
110d77: 3b 05 18 57 12 00 cmp 0x125718,%eax
110d7d: 74 15 je 110d94 <_Thread_queue_Process_timeout+0x30><== ALWAYS TAKEN
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
110d7f: 8b 4a 3c mov 0x3c(%edx),%ecx 110d82: 89 48 34 mov %ecx,0x34(%eax)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
110d85: 83 ec 08 sub $0x8,%esp 110d88: 50 push %eax 110d89: 52 push %edx 110d8a: e8 e9 fe ff ff call 110c78 <_Thread_queue_Extract> 110d8f: 83 c4 10 add $0x10,%esp
} }
110d92: c9 leave 110d93: c3 ret
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
110d94: 83 f9 03 cmp $0x3,%ecx
110d97: 74 f9 je 110d92 <_Thread_queue_Process_timeout+0x2e>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
110d99: 8b 4a 3c mov 0x3c(%edx),%ecx 110d9c: 89 48 34 mov %ecx,0x34(%eax)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
110d9f: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx)
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
}
}
110da6: c9 leave 110da7: c3 ret
0010df80 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10df80: 55 push %ebp 10df81: 89 e5 mov %esp,%ebp 10df83: 57 push %edi 10df84: 56 push %esi 10df85: 53 push %ebx 10df86: 83 ec 1c sub $0x1c,%esp 10df89: 8b 75 08 mov 0x8(%ebp),%esi 10df8c: 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 )
10df8f: 85 f6 test %esi,%esi
10df91: 74 06 je 10df99 <_Thread_queue_Requeue+0x19><== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10df93: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10df97: 74 0b je 10dfa4 <_Thread_queue_Requeue+0x24><== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
10df99: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10df9c: 5b pop %ebx <== NOT EXECUTED 10df9d: 5e pop %esi <== NOT EXECUTED 10df9e: 5f pop %edi <== NOT EXECUTED 10df9f: c9 leave <== NOT EXECUTED 10dfa0: c3 ret <== NOT EXECUTED 10dfa1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10dfa4: 9c pushf 10dfa5: fa cli 10dfa6: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10dfa7: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10dfae: 75 0c jne 10dfbc <_Thread_queue_Requeue+0x3c><== ALWAYS TAKEN
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
10dfb0: 53 push %ebx 10dfb1: 9d popf
} }
10dfb2: 8d 65 f4 lea -0xc(%ebp),%esp 10dfb5: 5b pop %ebx 10dfb6: 5e pop %esi 10dfb7: 5f pop %edi 10dfb8: c9 leave 10dfb9: c3 ret 10dfba: 66 90 xchg %ax,%ax
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;
10dfbc: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
10dfc3: 50 push %eax 10dfc4: 6a 01 push $0x1 10dfc6: 57 push %edi 10dfc7: 56 push %esi 10dfc8: e8 db 2c 00 00 call 110ca8 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10dfcd: 83 c4 0c add $0xc,%esp 10dfd0: 8d 45 e4 lea -0x1c(%ebp),%eax 10dfd3: 50 push %eax 10dfd4: 57 push %edi 10dfd5: 56 push %esi 10dfd6: e8 71 fd ff ff call 10dd4c <_Thread_queue_Enqueue_priority> 10dfdb: 83 c4 10 add $0x10,%esp 10dfde: eb d0 jmp 10dfb0 <_Thread_queue_Requeue+0x30>
0010dfe0 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10dfe0: 55 push %ebp 10dfe1: 89 e5 mov %esp,%ebp 10dfe3: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10dfe6: 8d 45 f4 lea -0xc(%ebp),%eax 10dfe9: 50 push %eax 10dfea: ff 75 08 pushl 0x8(%ebp) 10dfed: e8 2e f8 ff ff call 10d820 <_Thread_Get>
switch ( location ) {
10dff2: 83 c4 10 add $0x10,%esp 10dff5: 8b 55 f4 mov -0xc(%ebp),%edx 10dff8: 85 d2 test %edx,%edx
10dffa: 75 17 jne 10e013 <_Thread_queue_Timeout+0x33><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10dffc: 83 ec 0c sub $0xc,%esp 10dfff: 50 push %eax 10e000: e8 5f 2d 00 00 call 110d64 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10e005: a1 50 54 12 00 mov 0x125450,%eax 10e00a: 48 dec %eax 10e00b: a3 50 54 12 00 mov %eax,0x125450 10e010: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10e013: c9 leave 10e014: c3 ret
00118db0 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
118db0: 55 push %ebp 118db1: 89 e5 mov %esp,%ebp 118db3: 57 push %edi 118db4: 56 push %esi 118db5: 53 push %ebx 118db6: 83 ec 4c sub $0x4c,%esp 118db9: 8b 5d 08 mov 0x8(%ebp),%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
118dbc: 8d 45 e0 lea -0x20(%ebp),%eax 118dbf: 89 45 b4 mov %eax,-0x4c(%ebp) 118dc2: 89 45 dc mov %eax,-0x24(%ebp)
head->previous = NULL;
118dc5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
tail->previous = head;
118dcc: 8d 4d dc lea -0x24(%ebp),%ecx 118dcf: 89 4d e4 mov %ecx,-0x1c(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
118dd2: 8d 7d d0 lea -0x30(%ebp),%edi 118dd5: 8d 45 d4 lea -0x2c(%ebp),%eax 118dd8: 89 45 b0 mov %eax,-0x50(%ebp) 118ddb: 89 45 d0 mov %eax,-0x30(%ebp)
head->previous = NULL;
118dde: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
tail->previous = head;
118de5: 89 7d d8 mov %edi,-0x28(%ebp) 118de8: 8d 73 30 lea 0x30(%ebx),%esi 118deb: 8d 4b 68 lea 0x68(%ebx),%ecx 118dee: 89 4d c4 mov %ecx,-0x3c(%ebp) 118df1: 8d 43 08 lea 0x8(%ebx),%eax 118df4: 89 45 bc mov %eax,-0x44(%ebp) 118df7: 8d 53 40 lea 0x40(%ebx),%edx 118dfa: 89 55 c0 mov %edx,-0x40(%ebp) 118dfd: 8d 76 00 lea 0x0(%esi),%esi
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;
118e00: 8d 4d dc lea -0x24(%ebp),%ecx 118e03: 89 4b 78 mov %ecx,0x78(%ebx) 118e06: 66 90 xchg %ax,%ax
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
118e08: a1 c4 0b 14 00 mov 0x140bc4,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
118e0d: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
118e10: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118e13: 51 push %ecx 118e14: 57 push %edi
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
118e15: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118e17: 50 push %eax 118e18: 56 push %esi 118e19: e8 ae 3d 00 00 call 11cbcc <_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();
118e1e: a1 24 0b 14 00 mov 0x140b24,%eax
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
118e23: 8b 53 74 mov 0x74(%ebx),%edx
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
118e26: 83 c4 10 add $0x10,%esp 118e29: 39 d0 cmp %edx,%eax
118e2b: 0f 87 af 00 00 00 ja 118ee0 <_Timer_server_Body+0x130>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
118e31: 0f 82 c9 00 00 00 jb 118f00 <_Timer_server_Body+0x150>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
118e37: 89 43 74 mov %eax,0x74(%ebx) 118e3a: 66 90 xchg %ax,%ax
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
118e3c: 8b 43 78 mov 0x78(%ebx),%eax 118e3f: 83 ec 0c sub $0xc,%esp 118e42: 50 push %eax 118e43: e8 b8 09 00 00 call 119800 <_Chain_Get>
if ( timer == NULL ) {
118e48: 83 c4 10 add $0x10,%esp 118e4b: 85 c0 test %eax,%eax
118e4d: 74 35 je 118e84 <_Timer_server_Body+0xd4><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
118e4f: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118e52: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118e55: 74 19 je 118e70 <_Timer_server_Body+0xc0><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
118e57: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118e5a: 75 e0 jne 118e3c <_Timer_server_Body+0x8c><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
118e5c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118e5f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118e62: 50 push %eax <== NOT EXECUTED 118e63: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118e66: e8 ed 3d 00 00 call 11cc58 <_Watchdog_Insert> <== NOT EXECUTED 118e6b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118e6e: eb cc jmp 118e3c <_Timer_server_Body+0x8c><== NOT EXECUTED
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
118e70: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118e73: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118e76: 50 push %eax <== NOT EXECUTED 118e77: 56 push %esi <== NOT EXECUTED 118e78: e8 db 3d 00 00 call 11cc58 <_Watchdog_Insert> <== NOT EXECUTED 118e7d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118e80: eb ba jmp 118e3c <_Timer_server_Body+0x8c><== NOT EXECUTED 118e82: 66 90 xchg %ax,%ax <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
118e84: 9c pushf 118e85: fa cli 118e86: 58 pop %eax
tmp = ts->insert_chain;
118e87: 8b 53 78 mov 0x78(%ebx),%edx
if ( _Chain_Is_empty( insert_chain ) ) {
118e8a: 8b 55 b4 mov -0x4c(%ebp),%edx 118e8d: 39 55 dc cmp %edx,-0x24(%ebp)
118e90: 0f 84 86 00 00 00 je 118f1c <_Timer_server_Body+0x16c><== ALWAYS TAKEN
118e96: b2 01 mov $0x1,%dl <== NOT EXECUTED
ts->insert_chain = NULL;
do_loop = false;
}
_ISR_Enable( level );
118e98: 50 push %eax 118e99: 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 ) {
118e9a: 84 d2 test %dl,%dl
118e9c: 0f 85 66 ff ff ff jne 118e08 <_Timer_server_Body+0x58><== NEVER TAKEN
_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 ) ) {
118ea2: 8b 4d b0 mov -0x50(%ebp),%ecx 118ea5: 39 4d d0 cmp %ecx,-0x30(%ebp)
118ea8: 75 22 jne 118ecc <_Timer_server_Body+0x11c>
118eaa: eb 7e jmp 118f2a <_Timer_server_Body+0x17a>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
118eac: 8b 10 mov (%eax),%edx
head->next = new_first;
118eae: 89 55 d0 mov %edx,-0x30(%ebp)
new_first->previous = head;
118eb1: 89 7a 04 mov %edi,0x4(%edx)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
118eb4: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
118ebb: 51 push %ecx 118ebc: 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 );
118ebd: 83 ec 08 sub $0x8,%esp 118ec0: ff 70 24 pushl 0x24(%eax) 118ec3: ff 70 20 pushl 0x20(%eax) 118ec6: ff 50 1c call *0x1c(%eax)
}
118ec9: 83 c4 10 add $0x10,%esp
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
118ecc: 9c pushf 118ecd: fa cli 118ece: 59 pop %ecx
initialized = false;
}
#endif
return status;
}
118ecf: 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))
118ed2: 3b 45 b0 cmp -0x50(%ebp),%eax
118ed5: 75 d5 jne 118eac <_Timer_server_Body+0xfc>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
118ed7: 51 push %ecx 118ed8: 9d popf 118ed9: e9 22 ff ff ff jmp 118e00 <_Timer_server_Body+0x50> 118ede: 66 90 xchg %ax,%ax
/*
* 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 );
118ee0: 51 push %ecx 118ee1: 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;
118ee2: 89 c1 mov %eax,%ecx 118ee4: 29 d1 sub %edx,%ecx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118ee6: 51 push %ecx 118ee7: ff 75 c4 pushl -0x3c(%ebp) 118eea: 89 45 b8 mov %eax,-0x48(%ebp) 118eed: e8 da 3c 00 00 call 11cbcc <_Watchdog_Adjust_to_chain> 118ef2: 83 c4 10 add $0x10,%esp 118ef5: 8b 45 b8 mov -0x48(%ebp),%eax 118ef8: e9 3a ff ff ff jmp 118e37 <_Timer_server_Body+0x87> 118efd: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
118f00: 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;
118f01: 29 c2 sub %eax,%edx
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
118f03: 52 push %edx 118f04: 6a 01 push $0x1 118f06: ff 75 c4 pushl -0x3c(%ebp) 118f09: 89 45 b8 mov %eax,-0x48(%ebp) 118f0c: e8 43 3c 00 00 call 11cb54 <_Watchdog_Adjust> 118f11: 83 c4 10 add $0x10,%esp 118f14: 8b 45 b8 mov -0x48(%ebp),%eax 118f17: e9 1b ff ff ff jmp 118e37 <_Timer_server_Body+0x87>
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
tmp = ts->insert_chain;
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
118f1c: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
do_loop = false;
118f23: 31 d2 xor %edx,%edx 118f25: e9 6e ff ff ff jmp 118e98 <_Timer_server_Body+0xe8>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
118f2a: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118f2e: a1 50 0a 14 00 mov 0x140a50,%eax 118f33: 40 inc %eax 118f34: a3 50 0a 14 00 mov %eax,0x140a50
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
118f39: 83 ec 08 sub $0x8,%esp 118f3c: 6a 08 push $0x8 118f3e: ff 33 pushl (%ebx) 118f40: e8 d7 35 00 00 call 11c51c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
118f45: 89 d8 mov %ebx,%eax 118f47: e8 c4 fd ff ff call 118d10 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
118f4c: 89 d8 mov %ebx,%eax 118f4e: e8 0d fe ff ff call 118d60 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
118f53: e8 c0 2c 00 00 call 11bc18 <_Thread_Enable_dispatch>
ts->active = true;
118f58: 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 );
118f5c: 5a pop %edx 118f5d: ff 75 bc pushl -0x44(%ebp) 118f60: e8 2b 3e 00 00 call 11cd90 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
118f65: 58 pop %eax 118f66: ff 75 c0 pushl -0x40(%ebp) 118f69: e8 22 3e 00 00 call 11cd90 <_Watchdog_Remove> 118f6e: 83 c4 10 add $0x10,%esp 118f71: e9 8a fe ff ff jmp 118e00 <_Timer_server_Body+0x50>
00118f78 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
118f78: 55 push %ebp 118f79: 89 e5 mov %esp,%ebp 118f7b: 57 push %edi 118f7c: 56 push %esi 118f7d: 53 push %ebx 118f7e: 83 ec 2c sub $0x2c,%esp 118f81: 8b 5d 08 mov 0x8(%ebp),%ebx 118f84: 8b 45 0c mov 0xc(%ebp),%eax
if ( ts->insert_chain == NULL ) {
118f87: 8b 53 78 mov 0x78(%ebx),%edx 118f8a: 85 d2 test %edx,%edx
118f8c: 74 16 je 118fa4 <_Timer_server_Schedule_operation_method+0x2c><== ALWAYS TAKEN
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
118f8e: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 118f91: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 118f94: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED
} }
118f97: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118f9a: 5b pop %ebx <== NOT EXECUTED 118f9b: 5e pop %esi <== NOT EXECUTED 118f9c: 5f pop %edi <== NOT EXECUTED 118f9d: 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 );
118f9e: e9 21 08 00 00 jmp 1197c4 <_Chain_Append> <== NOT EXECUTED 118fa3: 90 nop <== NOT EXECUTED
118fa4: 8b 15 50 0a 14 00 mov 0x140a50,%edx 118faa: 42 inc %edx 118fab: 89 15 50 0a 14 00 mov %edx,0x140a50
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
118fb1: 8b 50 38 mov 0x38(%eax),%edx 118fb4: 83 fa 01 cmp $0x1,%edx
118fb7: 74 7b je 119034 <_Timer_server_Schedule_operation_method+0xbc>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
118fb9: 83 fa 03 cmp $0x3,%edx
118fbc: 74 0e je 118fcc <_Timer_server_Schedule_operation_method+0x54>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
118fbe: 8d 65 f4 lea -0xc(%ebp),%esp 118fc1: 5b pop %ebx 118fc2: 5e pop %esi 118fc3: 5f pop %edi 118fc4: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
118fc5: e9 4e 2c 00 00 jmp 11bc18 <_Thread_Enable_dispatch> 118fca: 66 90 xchg %ax,%ax
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
118fcc: 9c pushf 118fcd: fa cli 118fce: 8f 45 e4 popl -0x1c(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
118fd1: 8b 0d 24 0b 14 00 mov 0x140b24,%ecx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
118fd7: 8b 53 74 mov 0x74(%ebx),%edx 118fda: 89 55 d4 mov %edx,-0x2c(%ebp)
initialized = false;
}
#endif
return status;
}
118fdd: 8b 53 68 mov 0x68(%ebx),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
118fe0: 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 ) ) {
118fe3: 39 fa cmp %edi,%edx
118fe5: 74 21 je 119008 <_Timer_server_Schedule_operation_method+0x90>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
118fe7: 8b 7a 10 mov 0x10(%edx),%edi
if ( snapshot > last_snapshot ) {
118fea: 3b 4d d4 cmp -0x2c(%ebp),%ecx
118fed: 0f 86 a1 00 00 00 jbe 119094 <_Timer_server_Schedule_operation_method+0x11c>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
118ff3: 89 ce mov %ecx,%esi 118ff5: 2b 75 d4 sub -0x2c(%ebp),%esi 118ff8: 89 75 d4 mov %esi,-0x2c(%ebp)
if (delta_interval > delta) {
118ffb: 39 f7 cmp %esi,%edi
118ffd: 0f 86 9b 00 00 00 jbe 11909e <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN
delta_interval -= delta;
119003: 29 f7 sub %esi,%edi
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
119005: 89 7a 10 mov %edi,0x10(%edx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
119008: 89 4b 74 mov %ecx,0x74(%ebx)
_ISR_Enable( level );
11900b: ff 75 e4 pushl -0x1c(%ebp) 11900e: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
11900f: 83 ec 08 sub $0x8,%esp 119012: 83 c0 10 add $0x10,%eax 119015: 50 push %eax 119016: 8d 43 68 lea 0x68(%ebx),%eax 119019: 50 push %eax 11901a: e8 39 3c 00 00 call 11cc58 <_Watchdog_Insert>
if ( !ts->active ) {
11901f: 8a 43 7c mov 0x7c(%ebx),%al 119022: 83 c4 10 add $0x10,%esp 119025: 84 c0 test %al,%al
119027: 75 95 jne 118fbe <_Timer_server_Schedule_operation_method+0x46>
_Timer_server_Reset_tod_system_watchdog( ts );
119029: 89 d8 mov %ebx,%eax 11902b: e8 30 fd ff ff call 118d60 <_Timer_server_Reset_tod_system_watchdog> 119030: eb 8c jmp 118fbe <_Timer_server_Schedule_operation_method+0x46> 119032: 66 90 xchg %ax,%ax
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
119034: 9c pushf 119035: fa cli 119036: 8f 45 e4 popl -0x1c(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
119039: 8b 0d c4 0b 14 00 mov 0x140bc4,%ecx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
11903f: 8b 7b 3c mov 0x3c(%ebx),%edi
initialized = false;
}
#endif
return status;
}
119042: 8b 53 30 mov 0x30(%ebx),%edx 119045: 8d 73 34 lea 0x34(%ebx),%esi
* 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 ) ) {
119048: 39 f2 cmp %esi,%edx
11904a: 74 10 je 11905c <_Timer_server_Schedule_operation_method+0xe4>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
11904c: 89 ce mov %ecx,%esi 11904e: 29 fe sub %edi,%esi
delta_interval = first_watchdog->delta_interval;
119050: 8b 7a 10 mov 0x10(%edx),%edi
if (delta_interval > delta) {
119053: 39 fe cmp %edi,%esi
119055: 73 39 jae 119090 <_Timer_server_Schedule_operation_method+0x118>
delta_interval -= delta;
119057: 29 f7 sub %esi,%edi
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
119059: 89 7a 10 mov %edi,0x10(%edx)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
11905c: 89 4b 3c mov %ecx,0x3c(%ebx)
_ISR_Enable( level );
11905f: ff 75 e4 pushl -0x1c(%ebp) 119062: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
119063: 83 ec 08 sub $0x8,%esp 119066: 83 c0 10 add $0x10,%eax 119069: 50 push %eax 11906a: 8d 43 30 lea 0x30(%ebx),%eax 11906d: 50 push %eax 11906e: e8 e5 3b 00 00 call 11cc58 <_Watchdog_Insert>
if ( !ts->active ) {
119073: 8a 43 7c mov 0x7c(%ebx),%al 119076: 83 c4 10 add $0x10,%esp 119079: 84 c0 test %al,%al
11907b: 0f 85 3d ff ff ff jne 118fbe <_Timer_server_Schedule_operation_method+0x46>
_Timer_server_Reset_interval_system_watchdog( ts );
119081: 89 d8 mov %ebx,%eax 119083: e8 88 fc ff ff call 118d10 <_Timer_server_Reset_interval_system_watchdog> 119088: e9 31 ff ff ff jmp 118fbe <_Timer_server_Schedule_operation_method+0x46> 11908d: 8d 76 00 lea 0x0(%esi),%esi
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
119090: 31 ff xor %edi,%edi 119092: eb c5 jmp 119059 <_Timer_server_Schedule_operation_method+0xe1>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
119094: 03 7d d4 add -0x2c(%ebp),%edi
delta_interval += delta;
119097: 29 cf sub %ecx,%edi 119099: e9 67 ff ff ff jmp 119005 <_Timer_server_Schedule_operation_method+0x8d>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
11909e: 31 ff xor %edi,%edi <== NOT EXECUTED 1190a0: e9 60 ff ff ff jmp 119005 <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED
0010e28c <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
10e28c: 55 push %ebp 10e28d: 89 e5 mov %esp,%ebp 10e28f: 53 push %ebx 10e290: 8b 5d 08 mov 0x8(%ebp),%ebx 10e293: 8b 55 0c mov 0xc(%ebp),%edx
uint32_t seconds = add->tv_sec;
10e296: 8b 02 mov (%edx),%eax
/* Add the basics */
time->tv_sec += add->tv_sec;
10e298: 01 03 add %eax,(%ebx)
time->tv_nsec += add->tv_nsec;
10e29a: 8b 52 04 mov 0x4(%edx),%edx 10e29d: 03 53 04 add 0x4(%ebx),%edx 10e2a0: 89 53 04 mov %edx,0x4(%ebx)
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10e2a3: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx
10e2a9: 76 1a jbe 10e2c5 <_Timespec_Add_to+0x39>
10e2ab: 8b 0b mov (%ebx),%ecx 10e2ad: 8d 76 00 lea 0x0(%esi),%esi
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
10e2b0: 81 ea 00 ca 9a 3b sub $0x3b9aca00,%edx
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
10e2b6: 41 inc %ecx
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
time->tv_sec++;
seconds++;
10e2b7: 40 inc %eax
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10e2b8: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx
10e2be: 77 f0 ja 10e2b0 <_Timespec_Add_to+0x24> <== NEVER TAKEN
10e2c0: 89 53 04 mov %edx,0x4(%ebx) 10e2c3: 89 0b mov %ecx,(%ebx)
time->tv_sec++;
seconds++;
}
return seconds;
}
10e2c5: 5b pop %ebx 10e2c6: c9 leave 10e2c7: c3 ret
0010fa94 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
10fa94: 55 push %ebp 10fa95: 89 e5 mov %esp,%ebp 10fa97: 57 push %edi 10fa98: 56 push %esi 10fa99: 53 push %ebx 10fa9a: 83 ec 2c sub $0x2c,%esp 10fa9d: 8b 45 08 mov 0x8(%ebp),%eax 10faa0: 8b 4d 0c mov 0xc(%ebp),%ecx
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10faa3: 8b 38 mov (%eax),%edi
left += lhs->tv_nsec;
10faa5: 8b 70 04 mov 0x4(%eax),%esi
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10faa8: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10faad: 8b 01 mov (%ecx),%eax 10faaf: f7 eb imul %ebx 10fab1: 89 45 e0 mov %eax,-0x20(%ebp) 10fab4: 89 55 e4 mov %edx,-0x1c(%ebp)
right += rhs->tv_nsec;
10fab7: 8b 41 04 mov 0x4(%ecx),%eax 10faba: 99 cltd 10fabb: 01 45 e0 add %eax,-0x20(%ebp) 10fabe: 11 55 e4 adc %edx,-0x1c(%ebp)
if ( right == 0 ) {
10fac1: 8b 55 e4 mov -0x1c(%ebp),%edx 10fac4: 0b 55 e0 or -0x20(%ebp),%edx
10fac7: 74 73 je 10fb3c <_Timespec_Divide+0xa8>
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10fac9: 89 f8 mov %edi,%eax 10facb: f7 eb imul %ebx 10facd: 89 45 d0 mov %eax,-0x30(%ebp) 10fad0: 89 55 d4 mov %edx,-0x2c(%ebp)
left += lhs->tv_nsec;
10fad3: 89 f7 mov %esi,%edi 10fad5: c1 ff 1f sar $0x1f,%edi 10fad8: 01 75 d0 add %esi,-0x30(%ebp) 10fadb: 11 7d d4 adc %edi,-0x2c(%ebp)
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
10fade: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx 10fae5: bb a0 86 01 00 mov $0x186a0,%ebx 10faea: 8b 45 d0 mov -0x30(%ebp),%eax 10faed: f7 e3 mul %ebx 10faef: 8d 34 11 lea (%ecx,%edx,1),%esi 10faf2: ff 75 e4 pushl -0x1c(%ebp) 10faf5: ff 75 e0 pushl -0x20(%ebp) 10faf8: 56 push %esi 10faf9: 50 push %eax 10fafa: e8 bd fb 00 00 call 11f6bc <__udivdi3> 10faff: 83 c4 10 add $0x10,%esp 10fb02: 89 c3 mov %eax,%ebx 10fb04: 89 d6 mov %edx,%esi
*ival_percentage = answer / 1000;
10fb06: 6a 00 push $0x0 10fb08: 68 e8 03 00 00 push $0x3e8 10fb0d: 52 push %edx 10fb0e: 50 push %eax 10fb0f: e8 a8 fb 00 00 call 11f6bc <__udivdi3> 10fb14: 83 c4 10 add $0x10,%esp 10fb17: 8b 55 10 mov 0x10(%ebp),%edx 10fb1a: 89 02 mov %eax,(%edx)
*fval_percentage = answer % 1000;
10fb1c: 6a 00 push $0x0 10fb1e: 68 e8 03 00 00 push $0x3e8 10fb23: 56 push %esi 10fb24: 53 push %ebx 10fb25: e8 a2 fc 00 00 call 11f7cc <__umoddi3> 10fb2a: 83 c4 10 add $0x10,%esp 10fb2d: 8b 55 14 mov 0x14(%ebp),%edx 10fb30: 89 02 mov %eax,(%edx)
}
10fb32: 8d 65 f4 lea -0xc(%ebp),%esp 10fb35: 5b pop %ebx 10fb36: 5e pop %esi 10fb37: 5f pop %edi 10fb38: c9 leave 10fb39: c3 ret 10fb3a: 66 90 xchg %ax,%ax
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
*ival_percentage = 0;
10fb3c: 8b 45 10 mov 0x10(%ebp),%eax 10fb3f: c7 00 00 00 00 00 movl $0x0,(%eax)
*fval_percentage = 0;
10fb45: 8b 55 14 mov 0x14(%ebp),%edx 10fb48: c7 02 00 00 00 00 movl $0x0,(%edx)
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
*fval_percentage = answer % 1000;
}
10fb4e: 8d 65 f4 lea -0xc(%ebp),%esp 10fb51: 5b pop %ebx 10fb52: 5e pop %esi 10fb53: 5f pop %edi 10fb54: c9 leave 10fb55: c3 ret
0010fd58 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
10fd58: 55 push %ebp 10fd59: 89 e5 mov %esp,%ebp 10fd5b: 8b 55 08 mov 0x8(%ebp),%edx 10fd5e: 8b 45 0c mov 0xc(%ebp),%eax
if ( lhs->tv_sec > rhs->tv_sec )
10fd61: 8b 08 mov (%eax),%ecx 10fd63: 39 0a cmp %ecx,(%edx)
10fd65: 7f 11 jg 10fd78 <_Timespec_Greater_than+0x20>
return true;
if ( lhs->tv_sec < rhs->tv_sec )
10fd67: 7c 0b jl 10fd74 <_Timespec_Greater_than+0x1c><== NEVER TAKEN
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
10fd69: 8b 48 04 mov 0x4(%eax),%ecx 10fd6c: 39 4a 04 cmp %ecx,0x4(%edx) 10fd6f: 0f 9f c0 setg %al
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
10fd72: c9 leave 10fd73: c3 ret
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
10fd74: 31 c0 xor %eax,%eax
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
10fd76: c9 leave <== NOT EXECUTED 10fd77: c3 ret <== NOT EXECUTED
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
10fd78: b0 01 mov $0x1,%al
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
10fd7a: c9 leave 10fd7b: c3 ret
0010eee0 <_Timespec_Is_valid>:
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
const struct timespec *time
)
{
10eee0: 55 push %ebp 10eee1: 89 e5 mov %esp,%ebp 10eee3: 8b 45 08 mov 0x8(%ebp),%eax
if ( !time )
10eee6: 85 c0 test %eax,%eax
10eee8: 74 1a je 10ef04 <_Timespec_Is_valid+0x24>
return false;
if ( time->tv_sec < 0 )
10eeea: 8b 10 mov (%eax),%edx 10eeec: 85 d2 test %edx,%edx
10eeee: 78 14 js 10ef04 <_Timespec_Is_valid+0x24>
return false;
if ( time->tv_nsec < 0 )
10eef0: 8b 40 04 mov 0x4(%eax),%eax 10eef3: 85 c0 test %eax,%eax
10eef5: 78 0d js 10ef04 <_Timespec_Is_valid+0x24>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
10eef7: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10eefc: 0f 96 c0 setbe %al
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
10eeff: c9 leave 10ef00: c3 ret 10ef01: 8d 76 00 lea 0x0(%esi),%esi
if ( time->tv_sec < 0 )
return false;
if ( time->tv_nsec < 0 )
return false;
10ef04: 31 c0 xor %eax,%eax
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
10ef06: c9 leave 10ef07: c3 ret
0010ef48 <_Timespec_To_ticks>:
*/
uint32_t _Timespec_To_ticks(
const struct timespec *time
)
{
10ef48: 55 push %ebp 10ef49: 89 e5 mov %esp,%ebp 10ef4b: 56 push %esi 10ef4c: 53 push %ebx 10ef4d: 8b 5d 08 mov 0x8(%ebp),%ebx
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
10ef50: 8b 33 mov (%ebx),%esi 10ef52: 85 f6 test %esi,%esi
10ef54: 75 07 jne 10ef5d <_Timespec_To_ticks+0x15>
10ef56: 8b 43 04 mov 0x4(%ebx),%eax 10ef59: 85 c0 test %eax,%eax
10ef5b: 74 37 je 10ef94 <_Timespec_To_ticks+0x4c>
return 0;
ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
10ef5d: e8 ee 24 00 00 call 111450 <TOD_TICKS_PER_SECOND_method> 10ef62: 89 c1 mov %eax,%ecx 10ef64: 0f af ce imul %esi,%ecx
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
10ef67: a1 2c 32 12 00 mov 0x12322c,%eax 10ef6c: 8d 04 80 lea (%eax,%eax,4),%eax 10ef6f: 8d 04 80 lea (%eax,%eax,4),%eax 10ef72: 8d 34 80 lea (%eax,%eax,4),%esi 10ef75: c1 e6 03 shl $0x3,%esi 10ef78: 8b 43 04 mov 0x4(%ebx),%eax 10ef7b: 31 d2 xor %edx,%edx 10ef7d: f7 f6 div %esi
if (ticks)
10ef7f: 01 c8 add %ecx,%eax
10ef81: 74 05 je 10ef88 <_Timespec_To_ticks+0x40>
return ticks;
return 1;
}
10ef83: 5b pop %ebx 10ef84: 5e pop %esi 10ef85: c9 leave 10ef86: c3 ret 10ef87: 90 nop
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
if (ticks)
return ticks;
return 1;
10ef88: b8 01 00 00 00 mov $0x1,%eax
}
10ef8d: 5b pop %ebx 10ef8e: 5e pop %esi 10ef8f: c9 leave 10ef90: c3 ret 10ef91: 8d 76 00 lea 0x0(%esi),%esi
)
{
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
return 0;
10ef94: 31 c0 xor %eax,%eax
if (ticks)
return ticks;
return 1;
}
10ef96: 5b pop %ebx 10ef97: 5e pop %esi 10ef98: c9 leave 10ef99: c3 ret
0010e444 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10e444: 55 push %ebp 10e445: 89 e5 mov %esp,%ebp 10e447: 57 push %edi 10e448: 56 push %esi 10e449: 53 push %ebx 10e44a: 83 ec 1c sub $0x1c,%esp 10e44d: 8b 75 08 mov 0x8(%ebp),%esi 10e450: 8b 7d 10 mov 0x10(%ebp),%edi 10e453: 8a 45 0c mov 0xc(%ebp),%al
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e456: 8b 1d b4 56 12 00 mov 0x1256b4,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e45c: 81 fb ac 56 12 00 cmp $0x1256ac,%ebx
10e462: 74 25 je 10e489 <_User_extensions_Fatal+0x45><== NEVER TAKEN
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10e464: 0f b6 c0 movzbl %al,%eax 10e467: 89 45 e4 mov %eax,-0x1c(%ebp) 10e46a: 66 90 xchg %ax,%ax
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
10e46c: 8b 43 30 mov 0x30(%ebx),%eax 10e46f: 85 c0 test %eax,%eax
10e471: 74 0b je 10e47e <_User_extensions_Fatal+0x3a>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10e473: 52 push %edx 10e474: 57 push %edi 10e475: ff 75 e4 pushl -0x1c(%ebp) 10e478: 56 push %esi 10e479: ff d0 call *%eax
10e47b: 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 ) {
10e47e: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e481: 81 fb ac 56 12 00 cmp $0x1256ac,%ebx
10e487: 75 e3 jne 10e46c <_User_extensions_Fatal+0x28><== 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 );
}
}
10e489: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e48c: 5b pop %ebx <== NOT EXECUTED 10e48d: 5e pop %esi <== NOT EXECUTED 10e48e: 5f pop %edi <== NOT EXECUTED 10e48f: c9 leave <== NOT EXECUTED 10e490: c3 ret <== NOT EXECUTED
0010e308 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10e308: 55 push %ebp 10e309: 89 e5 mov %esp,%ebp 10e30b: 57 push %edi 10e30c: 56 push %esi 10e30d: 53 push %ebx 10e30e: 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;
10e311: a1 5c 12 12 00 mov 0x12125c,%eax 10e316: 89 45 dc mov %eax,-0x24(%ebp)
initial_extensions = Configuration.User_extension_table;
10e319: 8b 35 60 12 12 00 mov 0x121260,%esi
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10e31f: c7 05 ac 56 12 00 b0 movl $0x1256b0,0x1256ac
10e326: 56 12 00 head->previous = NULL;
10e329: c7 05 b0 56 12 00 00 movl $0x0,0x1256b0
10e330: 00 00 00 tail->previous = head;
10e333: c7 05 b4 56 12 00 ac movl $0x1256ac,0x1256b4
10e33a: 56 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10e33d: c7 05 54 54 12 00 58 movl $0x125458,0x125454
10e344: 54 12 00 head->previous = NULL;
10e347: c7 05 58 54 12 00 00 movl $0x0,0x125458
10e34e: 00 00 00 tail->previous = head;
10e351: c7 05 5c 54 12 00 54 movl $0x125454,0x12545c
10e358: 54 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10e35b: 85 f6 test %esi,%esi
10e35d: 74 64 je 10e3c3 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10e35f: 89 c2 mov %eax,%edx 10e361: 8d 04 40 lea (%eax,%eax,2),%eax 10e364: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e367: c1 e1 02 shl $0x2,%ecx 10e36a: 83 ec 0c sub $0xc,%esp 10e36d: 51 push %ecx 10e36e: 89 4d d8 mov %ecx,-0x28(%ebp) 10e371: e8 c6 04 00 00 call 10e83c <_Workspace_Allocate_or_fatal_error> 10e376: 89 c3 mov %eax,%ebx
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10e378: 31 c0 xor %eax,%eax 10e37a: 8b 4d d8 mov -0x28(%ebp),%ecx 10e37d: 89 df mov %ebx,%edi 10e37f: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e381: 83 c4 10 add $0x10,%esp 10e384: 8b 45 dc mov -0x24(%ebp),%eax 10e387: 85 c0 test %eax,%eax
10e389: 74 38 je 10e3c3 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN
10e38b: 89 75 e4 mov %esi,-0x1c(%ebp) 10e38e: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e395: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10e398: 8d 7b 14 lea 0x14(%ebx),%edi 10e39b: 8b 75 e4 mov -0x1c(%ebp),%esi 10e39e: b9 08 00 00 00 mov $0x8,%ecx 10e3a3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10e3a5: 83 ec 0c sub $0xc,%esp 10e3a8: 53 push %ebx 10e3a9: e8 6a 2a 00 00 call 110e18 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10e3ae: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e3b1: ff 45 e0 incl -0x20(%ebp) 10e3b4: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e3b8: 83 c4 10 add $0x10,%esp 10e3bb: 8b 45 e0 mov -0x20(%ebp),%eax 10e3be: 39 45 dc cmp %eax,-0x24(%ebp)
10e3c1: 77 d5 ja 10e398 <_User_extensions_Handler_initialization+0x90>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10e3c3: 8d 65 f4 lea -0xc(%ebp),%esp 10e3c6: 5b pop %ebx 10e3c7: 5e pop %esi 10e3c8: 5f pop %edi 10e3c9: c9 leave 10e3ca: c3 ret
0010f88c <_User_extensions_Remove_set>:
#include <rtems/score/userext.h>
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
10f88c: 55 push %ebp 10f88d: 89 e5 mov %esp,%ebp 10f88f: 53 push %ebx 10f890: 83 ec 10 sub $0x10,%esp 10f893: 8b 5d 08 mov 0x8(%ebp),%ebx
_Chain_Extract( &the_extension->Node );
10f896: 53 push %ebx 10f897: e8 b0 da ff ff call 10d34c <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
10f89c: 83 c4 10 add $0x10,%esp 10f89f: 8b 43 24 mov 0x24(%ebx),%eax 10f8a2: 85 c0 test %eax,%eax
10f8a4: 74 12 je 10f8b8 <_User_extensions_Remove_set+0x2c>
_Chain_Extract( &the_extension->Switch.Node );
10f8a6: 83 c3 08 add $0x8,%ebx 10f8a9: 89 5d 08 mov %ebx,0x8(%ebp)
}
10f8ac: 8b 5d fc mov -0x4(%ebp),%ebx 10f8af: c9 leave
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
10f8b0: e9 97 da ff ff jmp 10d34c <_Chain_Extract> 10f8b5: 8d 76 00 lea 0x0(%esi),%esi
}
10f8b8: 8b 5d fc mov -0x4(%ebp),%ebx 10f8bb: c9 leave 10f8bc: c3 ret
0010e3cc <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
10e3cc: 55 push %ebp 10e3cd: 89 e5 mov %esp,%ebp 10e3cf: 56 push %esi 10e3d0: 53 push %ebx 10e3d1: 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 );
}
}
10e3d4: 8b 1d ac 56 12 00 mov 0x1256ac,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e3da: 81 fb b0 56 12 00 cmp $0x1256b0,%ebx
10e3e0: 74 1c je 10e3fe <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
10e3e2: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
10e3e4: 8b 43 28 mov 0x28(%ebx),%eax 10e3e7: 85 c0 test %eax,%eax
10e3e9: 74 09 je 10e3f4 <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
10e3eb: 83 ec 0c sub $0xc,%esp 10e3ee: 56 push %esi 10e3ef: ff d0 call *%eax 10e3f1: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e3f4: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e3f6: 81 fb b0 56 12 00 cmp $0x1256b0,%ebx
10e3fc: 75 e6 jne 10e3e4 <_User_extensions_Thread_begin+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
10e3fe: 8d 65 f8 lea -0x8(%ebp),%esp 10e401: 5b pop %ebx 10e402: 5e pop %esi 10e403: c9 leave 10e404: c3 ret
0010e494 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
10e494: 55 push %ebp 10e495: 89 e5 mov %esp,%ebp 10e497: 56 push %esi 10e498: 53 push %ebx 10e499: 8b 75 08 mov 0x8(%ebp),%esi
return false;
}
}
return true;
}
10e49c: 8b 1d ac 56 12 00 mov 0x1256ac,%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
10e4a2: 81 fb b0 56 12 00 cmp $0x1256b0,%ebx
10e4a8: 74 26 je 10e4d0 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
10e4aa: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
10e4ac: 8b 43 14 mov 0x14(%ebx),%eax 10e4af: 85 c0 test %eax,%eax
10e4b1: 74 13 je 10e4c6 <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
10e4b3: 83 ec 08 sub $0x8,%esp 10e4b6: 56 push %esi 10e4b7: ff 35 18 57 12 00 pushl 0x125718 10e4bd: ff d0 call *%eax
_Thread_Executing,
the_thread
);
if ( !status )
10e4bf: 83 c4 10 add $0x10,%esp 10e4c2: 84 c0 test %al,%al
10e4c4: 74 16 je 10e4dc <_User_extensions_Thread_create+0x48>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e4c6: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
10e4c8: 81 fb b0 56 12 00 cmp $0x1256b0,%ebx
10e4ce: 75 dc jne 10e4ac <_User_extensions_Thread_create+0x18>
if ( !status )
return false;
}
}
return true;
10e4d0: b0 01 mov $0x1,%al
}
10e4d2: 8d 65 f8 lea -0x8(%ebp),%esp 10e4d5: 5b pop %ebx 10e4d6: 5e pop %esi 10e4d7: c9 leave 10e4d8: c3 ret 10e4d9: 8d 76 00 lea 0x0(%esi),%esi
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
return false;
10e4dc: 31 c0 xor %eax,%eax
}
}
return true;
}
10e4de: 8d 65 f8 lea -0x8(%ebp),%esp 10e4e1: 5b pop %ebx 10e4e2: 5e pop %esi 10e4e3: c9 leave 10e4e4: c3 ret
0010e4e8 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
10e4e8: 55 push %ebp 10e4e9: 89 e5 mov %esp,%ebp 10e4eb: 56 push %esi 10e4ec: 53 push %ebx 10e4ed: 8b 75 08 mov 0x8(%ebp),%esi
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10e4f0: 8b 1d b4 56 12 00 mov 0x1256b4,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e4f6: 81 fb ac 56 12 00 cmp $0x1256ac,%ebx
10e4fc: 74 23 je 10e521 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN
10e4fe: 66 90 xchg %ax,%ax
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
10e500: 8b 43 20 mov 0x20(%ebx),%eax 10e503: 85 c0 test %eax,%eax
10e505: 74 0f je 10e516 <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
10e507: 83 ec 08 sub $0x8,%esp 10e50a: 56 push %esi 10e50b: ff 35 18 57 12 00 pushl 0x125718 10e511: ff d0 call *%eax 10e513: 83 c4 10 add $0x10,%esp
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 ) {
10e516: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e519: 81 fb ac 56 12 00 cmp $0x1256ac,%ebx
10e51f: 75 df jne 10e500 <_User_extensions_Thread_delete+0x18>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10e521: 8d 65 f8 lea -0x8(%ebp),%esp 10e524: 5b pop %ebx 10e525: 5e pop %esi 10e526: c9 leave 10e527: c3 ret
0010e408 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10e408: 55 push %ebp 10e409: 89 e5 mov %esp,%ebp 10e40b: 56 push %esi 10e40c: 53 push %ebx 10e40d: 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 );
}
}
10e410: 8b 1d b4 56 12 00 mov 0x1256b4,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e416: 81 fb ac 56 12 00 cmp $0x1256ac,%ebx
10e41c: 74 1d je 10e43b <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN
10e41e: 66 90 xchg %ax,%ax
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
10e420: 8b 43 2c mov 0x2c(%ebx),%eax 10e423: 85 c0 test %eax,%eax
10e425: 74 09 je 10e430 <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
10e427: 83 ec 0c sub $0xc,%esp 10e42a: 56 push %esi 10e42b: ff d0 call *%eax
10e42d: 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 ) {
10e430: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e433: 81 fb ac 56 12 00 cmp $0x1256ac,%ebx
10e439: 75 e5 jne 10e420 <_User_extensions_Thread_exitted+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
10e43b: 8d 65 f8 lea -0x8(%ebp),%esp 10e43e: 5b pop %ebx 10e43f: 5e pop %esi 10e440: c9 leave 10e441: c3 ret
0010f0d8 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
10f0d8: 55 push %ebp 10f0d9: 89 e5 mov %esp,%ebp 10f0db: 56 push %esi 10f0dc: 53 push %ebx 10f0dd: 8b 75 08 mov 0x8(%ebp),%esi
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10f0e0: 8b 1d 2c 77 12 00 mov 0x12772c,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10f0e6: 81 fb 30 77 12 00 cmp $0x127730,%ebx
10f0ec: 74 22 je 10f110 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
10f0ee: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
10f0f0: 8b 43 1c mov 0x1c(%ebx),%eax 10f0f3: 85 c0 test %eax,%eax
10f0f5: 74 0f je 10f106 <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
10f0f7: 83 ec 08 sub $0x8,%esp 10f0fa: 56 push %esi 10f0fb: ff 35 98 77 12 00 pushl 0x127798 10f101: ff d0 call *%eax 10f103: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10f106: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10f108: 81 fb 30 77 12 00 cmp $0x127730,%ebx
10f10e: 75 e0 jne 10f0f0 <_User_extensions_Thread_restart+0x18>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10f110: 8d 65 f8 lea -0x8(%ebp),%esp 10f113: 5b pop %ebx 10f114: 5e pop %esi 10f115: c9 leave 10f116: c3 ret
0010e528 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
10e528: 55 push %ebp 10e529: 89 e5 mov %esp,%ebp 10e52b: 56 push %esi 10e52c: 53 push %ebx 10e52d: 8b 75 08 mov 0x8(%ebp),%esi
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10e530: 8b 1d ac 56 12 00 mov 0x1256ac,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e536: 81 fb b0 56 12 00 cmp $0x1256b0,%ebx
10e53c: 74 22 je 10e560 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
10e53e: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
10e540: 8b 43 18 mov 0x18(%ebx),%eax 10e543: 85 c0 test %eax,%eax
10e545: 74 0f je 10e556 <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
10e547: 83 ec 08 sub $0x8,%esp 10e54a: 56 push %esi 10e54b: ff 35 18 57 12 00 pushl 0x125718 10e551: ff d0 call *%eax 10e553: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e556: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e558: 81 fb b0 56 12 00 cmp $0x1256b0,%ebx
10e55e: 75 e0 jne 10e540 <_User_extensions_Thread_start+0x18>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10e560: 8d 65 f8 lea -0x8(%ebp),%esp 10e563: 5b pop %ebx 10e564: 5e pop %esi 10e565: c9 leave 10e566: c3 ret
0010e568 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
10e568: 55 push %ebp 10e569: 89 e5 mov %esp,%ebp 10e56b: 57 push %edi 10e56c: 56 push %esi 10e56d: 53 push %ebx 10e56e: 83 ec 0c sub $0xc,%esp 10e571: 8b 7d 08 mov 0x8(%ebp),%edi 10e574: 8b 75 0c mov 0xc(%ebp),%esi
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10e577: 8b 1d 54 54 12 00 mov 0x125454,%ebx
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
10e57d: 81 fb 58 54 12 00 cmp $0x125458,%ebx
10e583: 74 18 je 10e59d <_User_extensions_Thread_switch+0x35><== NEVER TAKEN
10e585: 8d 76 00 lea 0x0(%esi),%esi
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
10e588: 83 ec 08 sub $0x8,%esp 10e58b: 56 push %esi 10e58c: 57 push %edi 10e58d: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
10e590: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
10e592: 83 c4 10 add $0x10,%esp 10e595: 81 fb 58 54 12 00 cmp $0x125458,%ebx
10e59b: 75 eb jne 10e588 <_User_extensions_Thread_switch+0x20>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10e59d: 8d 65 f4 lea -0xc(%ebp),%esp 10e5a0: 5b pop %ebx 10e5a1: 5e pop %esi 10e5a2: 5f pop %edi 10e5a3: c9 leave 10e5a4: c3 ret
0010fe74 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10fe74: 55 push %ebp 10fe75: 89 e5 mov %esp,%ebp 10fe77: 57 push %edi 10fe78: 56 push %esi 10fe79: 53 push %ebx 10fe7a: 83 ec 1c sub $0x1c,%esp 10fe7d: 8b 75 08 mov 0x8(%ebp),%esi 10fe80: 8b 4d 0c mov 0xc(%ebp),%ecx 10fe83: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
10fe86: 9c pushf 10fe87: fa cli 10fe88: 58 pop %eax
}
}
_ISR_Enable( level );
}
10fe89: 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 );
10fe8b: 8d 7e 04 lea 0x4(%esi),%edi 10fe8e: 89 7d e4 mov %edi,-0x1c(%ebp)
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
10fe91: 39 fa cmp %edi,%edx
10fe93: 74 3d je 10fed2 <_Watchdog_Adjust+0x5e>
switch ( direction ) {
10fe95: 85 c9 test %ecx,%ecx
10fe97: 75 43 jne 10fedc <_Watchdog_Adjust+0x68>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10fe99: 85 db test %ebx,%ebx
10fe9b: 74 35 je 10fed2 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
10fe9d: 8b 7a 10 mov 0x10(%edx),%edi 10fea0: 39 fb cmp %edi,%ebx
10fea2: 73 0f jae 10feb3 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN
10fea4: eb 3e jmp 10fee4 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10fea6: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10fea8: 29 fb sub %edi,%ebx
10feaa: 74 26 je 10fed2 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
10feac: 8b 7a 10 mov 0x10(%edx),%edi 10feaf: 39 df cmp %ebx,%edi
10feb1: 77 31 ja 10fee4 <_Watchdog_Adjust+0x70>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
10feb3: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
10feba: 50 push %eax 10febb: 9d popf
_Watchdog_Tickle( header );
10febc: 83 ec 0c sub $0xc,%esp 10febf: 56 push %esi 10fec0: e8 cb 01 00 00 call 110090 <_Watchdog_Tickle>
_ISR_Disable( level );
10fec5: 9c pushf 10fec6: fa cli 10fec7: 58 pop %eax
}
}
_ISR_Enable( level );
}
10fec8: 8b 16 mov (%esi),%edx
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
10feca: 83 c4 10 add $0x10,%esp 10fecd: 39 55 e4 cmp %edx,-0x1c(%ebp)
10fed0: 75 d6 jne 10fea8 <_Watchdog_Adjust+0x34>
}
break;
}
}
_ISR_Enable( level );
10fed2: 50 push %eax 10fed3: 9d popf
}
10fed4: 8d 65 f4 lea -0xc(%ebp),%esp 10fed7: 5b pop %ebx 10fed8: 5e pop %esi 10fed9: 5f pop %edi 10feda: c9 leave 10fedb: c3 ret
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
10fedc: 49 dec %ecx
10fedd: 75 f3 jne 10fed2 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
10fedf: 01 5a 10 add %ebx,0x10(%edx)
break;
10fee2: eb ee jmp 10fed2 <_Watchdog_Adjust+0x5e>
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
10fee4: 29 df sub %ebx,%edi 10fee6: 89 7a 10 mov %edi,0x10(%edx)
break;
10fee9: eb e7 jmp 10fed2 <_Watchdog_Adjust+0x5e>
0010e5a8 <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
10e5a8: 55 push %ebp 10e5a9: 89 e5 mov %esp,%ebp 10e5ab: 57 push %edi 10e5ac: 56 push %esi 10e5ad: 53 push %ebx 10e5ae: 83 ec 04 sub $0x4,%esp 10e5b1: 8b 5d 0c mov 0xc(%ebp),%ebx
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
10e5b4: 8b 3d 14 57 12 00 mov 0x125714,%edi
_ISR_Disable( level );
10e5ba: 9c pushf 10e5bb: fa cli 10e5bc: 8f 45 f0 popl -0x10(%ebp)
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
10e5bf: 8b 43 08 mov 0x8(%ebx),%eax 10e5c2: 85 c0 test %eax,%eax
10e5c4: 0f 85 9e 00 00 00 jne 10e668 <_Watchdog_Insert+0xc0>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
10e5ca: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx)
_Watchdog_Sync_count++;
10e5d1: a1 c0 55 12 00 mov 0x1255c0,%eax 10e5d6: 40 inc %eax 10e5d7: a3 c0 55 12 00 mov %eax,0x1255c0
restart:
delta_interval = the_watchdog->initial;
10e5dc: 8b 43 0c mov 0xc(%ebx),%eax
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
10e5df: 8b 4d 08 mov 0x8(%ebp),%ecx 10e5e2: 8b 11 mov (%ecx),%edx
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10e5e4: 85 c0 test %eax,%eax
10e5e6: 74 5d je 10e645 <_Watchdog_Insert+0x9d>
10e5e8: 8b 32 mov (%edx),%esi 10e5ea: 85 f6 test %esi,%esi
10e5ec: 74 57 je 10e645 <_Watchdog_Insert+0x9d>
break;
if ( delta_interval < after->delta_interval ) {
10e5ee: 8b 4a 10 mov 0x10(%edx),%ecx 10e5f1: 39 c8 cmp %ecx,%eax
10e5f3: 73 22 jae 10e617 <_Watchdog_Insert+0x6f>
10e5f5: eb 49 jmp 10e640 <_Watchdog_Insert+0x98> 10e5f7: 90 nop
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
10e5f8: 8b 35 40 55 12 00 mov 0x125540,%esi 10e5fe: 39 f7 cmp %esi,%edi
10e600: 72 72 jb 10e674 <_Watchdog_Insert+0xcc>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
10e602: 29 c8 sub %ecx,%eax
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
10e604: 8b 12 mov (%edx),%edx
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10e606: 85 c0 test %eax,%eax
10e608: 74 3b je 10e645 <_Watchdog_Insert+0x9d>
10e60a: 8b 0a mov (%edx),%ecx 10e60c: 85 c9 test %ecx,%ecx
10e60e: 74 35 je 10e645 <_Watchdog_Insert+0x9d>
break;
if ( delta_interval < after->delta_interval ) {
10e610: 8b 4a 10 mov 0x10(%edx),%ecx 10e613: 39 c1 cmp %eax,%ecx
10e615: 77 29 ja 10e640 <_Watchdog_Insert+0x98>
break;
}
delta_interval -= after->delta_interval;
_ISR_Flash( level );
10e617: ff 75 f0 pushl -0x10(%ebp) 10e61a: 9d popf 10e61b: fa cli
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
10e61c: 83 7b 08 01 cmpl $0x1,0x8(%ebx)
10e620: 74 d6 je 10e5f8 <_Watchdog_Insert+0x50>
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
10e622: 89 3d 40 55 12 00 mov %edi,0x125540
_Watchdog_Sync_count--;
10e628: a1 c0 55 12 00 mov 0x1255c0,%eax 10e62d: 48 dec %eax 10e62e: a3 c0 55 12 00 mov %eax,0x1255c0
_ISR_Enable( level );
10e633: ff 75 f0 pushl -0x10(%ebp) 10e636: 9d popf
}
10e637: 58 pop %eax 10e638: 5b pop %ebx 10e639: 5e pop %esi 10e63a: 5f pop %edi 10e63b: c9 leave 10e63c: c3 ret 10e63d: 8d 76 00 lea 0x0(%esi),%esi
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
10e640: 29 c1 sub %eax,%ecx 10e642: 89 4a 10 mov %ecx,0x10(%edx)
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
10e645: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
10e64c: 89 43 10 mov %eax,0x10(%ebx)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
10e64f: 8b 42 04 mov 0x4(%edx),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10e652: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10e655: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10e657: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10e659: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10e65b: 89 5a 04 mov %ebx,0x4(%edx)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
10e65e: a1 c4 55 12 00 mov 0x1255c4,%eax 10e663: 89 43 14 mov %eax,0x14(%ebx) 10e666: eb ba jmp 10e622 <_Watchdog_Insert+0x7a>
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
10e668: ff 75 f0 pushl -0x10(%ebp) 10e66b: 9d popf
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
10e66c: 58 pop %eax 10e66d: 5b pop %ebx 10e66e: 5e pop %esi 10e66f: 5f pop %edi 10e670: c9 leave 10e671: c3 ret 10e672: 66 90 xchg %ax,%ax
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
10e674: 89 3d 40 55 12 00 mov %edi,0x125540
goto restart;
10e67a: e9 5d ff ff ff jmp 10e5dc <_Watchdog_Insert+0x34>
0010e6e0 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10e6e0: 55 push %ebp 10e6e1: 89 e5 mov %esp,%ebp 10e6e3: 56 push %esi 10e6e4: 53 push %ebx 10e6e5: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10e6e8: 9c pushf 10e6e9: fa cli 10e6ea: 59 pop %ecx
previous_state = the_watchdog->state;
10e6eb: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10e6ee: 83 f8 01 cmp $0x1,%eax
10e6f1: 74 4d je 10e740 <_Watchdog_Remove+0x60>
10e6f3: 73 0f jae 10e704 <_Watchdog_Remove+0x24>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10e6f5: 8b 1d c4 55 12 00 mov 0x1255c4,%ebx 10e6fb: 89 5a 18 mov %ebx,0x18(%edx)
_ISR_Enable( level );
10e6fe: 51 push %ecx 10e6ff: 9d popf
return( previous_state ); }
10e700: 5b pop %ebx 10e701: 5e pop %esi 10e702: c9 leave 10e703: c3 ret
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
10e704: 83 f8 03 cmp $0x3,%eax
10e707: 77 ec ja 10e6f5 <_Watchdog_Remove+0x15> <== NEVER TAKEN
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10e709: 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 );
}
10e710: 8b 1a mov (%edx),%ebx
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10e712: 8b 33 mov (%ebx),%esi 10e714: 85 f6 test %esi,%esi
10e716: 74 06 je 10e71e <_Watchdog_Remove+0x3e>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10e718: 8b 72 10 mov 0x10(%edx),%esi 10e71b: 01 73 10 add %esi,0x10(%ebx)
if ( _Watchdog_Sync_count )
10e71e: 8b 35 c0 55 12 00 mov 0x1255c0,%esi 10e724: 85 f6 test %esi,%esi
10e726: 74 0c je 10e734 <_Watchdog_Remove+0x54>
_Watchdog_Sync_level = _ISR_Nest_level;
10e728: 8b 35 14 57 12 00 mov 0x125714,%esi 10e72e: 89 35 40 55 12 00 mov %esi,0x125540
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10e734: 8b 72 04 mov 0x4(%edx),%esi
next->previous = previous;
10e737: 89 73 04 mov %esi,0x4(%ebx)
previous->next = next;
10e73a: 89 1e mov %ebx,(%esi) 10e73c: eb b7 jmp 10e6f5 <_Watchdog_Remove+0x15> 10e73e: 66 90 xchg %ax,%ax
/*
* 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;
10e740: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10e747: eb ac jmp 10e6f5 <_Watchdog_Remove+0x15>
0010fa80 <_Watchdog_Report>:
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
10fa80: 55 push %ebp 10fa81: 89 e5 mov %esp,%ebp 10fa83: 57 push %edi 10fa84: 56 push %esi 10fa85: 53 push %ebx 10fa86: 83 ec 2c sub $0x2c,%esp 10fa89: 8b 55 08 mov 0x8(%ebp),%edx 10fa8c: 8b 45 0c mov 0xc(%ebp),%eax
printk(
10fa8f: 8b 78 24 mov 0x24(%eax),%edi 10fa92: 8b 70 20 mov 0x20(%eax),%esi 10fa95: 8b 58 1c mov 0x1c(%eax),%ebx 10fa98: 8b 48 0c mov 0xc(%eax),%ecx 10fa9b: 89 4d d4 mov %ecx,-0x2c(%ebp) 10fa9e: 8b 48 10 mov 0x10(%eax),%ecx 10faa1: 89 4d e4 mov %ecx,-0x1c(%ebp) 10faa4: 85 d2 test %edx,%edx
10faa6: 74 2c je 10fad4 <_Watchdog_Report+0x54>
10faa8: b9 03 18 12 00 mov $0x121803,%ecx 10faad: 83 ec 0c sub $0xc,%esp 10fab0: 57 push %edi 10fab1: 56 push %esi 10fab2: 53 push %ebx 10fab3: 50 push %eax 10fab4: ff 75 d4 pushl -0x2c(%ebp) 10fab7: ff 75 e4 pushl -0x1c(%ebp) 10faba: 51 push %ecx 10fabb: 52 push %edx 10fabc: 68 66 22 12 00 push $0x122266 10fac1: e8 be 9f ff ff call 109a84 <printk> 10fac6: 83 c4 30 add $0x30,%esp
watch,
watch->routine,
watch->id,
watch->user_data
);
}
10fac9: 8d 65 f4 lea -0xc(%ebp),%esp 10facc: 5b pop %ebx 10facd: 5e pop %esi 10face: 5f pop %edi 10facf: c9 leave 10fad0: c3 ret 10fad1: 8d 76 00 lea 0x0(%esi),%esi
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
printk(
10fad4: b9 c9 20 12 00 mov $0x1220c9,%ecx 10fad9: 89 ca mov %ecx,%edx 10fadb: eb d0 jmp 10faad <_Watchdog_Report+0x2d>
0010fa10 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10fa10: 55 push %ebp 10fa11: 89 e5 mov %esp,%ebp 10fa13: 57 push %edi 10fa14: 56 push %esi 10fa15: 53 push %ebx 10fa16: 83 ec 20 sub $0x20,%esp 10fa19: 8b 7d 08 mov 0x8(%ebp),%edi 10fa1c: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10fa1f: 9c pushf 10fa20: fa cli 10fa21: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
10fa24: 56 push %esi 10fa25: 57 push %edi 10fa26: 68 30 22 12 00 push $0x122230 10fa2b: e8 54 a0 ff ff call 109a84 <printk>
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
10fa30: 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 );
10fa32: 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 ) ) {
10fa35: 83 c4 10 add $0x10,%esp 10fa38: 39 f3 cmp %esi,%ebx
10fa3a: 74 31 je 10fa6d <_Watchdog_Report_chain+0x5d>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10fa3c: 83 ec 08 sub $0x8,%esp 10fa3f: 53 push %ebx 10fa40: 6a 00 push $0x0 10fa42: e8 39 00 00 00 call 10fa80 <_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 )
10fa47: 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 ) ;
10fa49: 83 c4 10 add $0x10,%esp 10fa4c: 39 f3 cmp %esi,%ebx
10fa4e: 75 ec jne 10fa3c <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10fa50: 83 ec 08 sub $0x8,%esp 10fa53: 57 push %edi 10fa54: 68 47 22 12 00 push $0x122247 10fa59: e8 26 a0 ff ff call 109a84 <printk> 10fa5e: 83 c4 10 add $0x10,%esp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
10fa61: ff 75 e4 pushl -0x1c(%ebp) 10fa64: 9d popf
}
10fa65: 8d 65 f4 lea -0xc(%ebp),%esp 10fa68: 5b pop %ebx 10fa69: 5e pop %esi 10fa6a: 5f pop %edi 10fa6b: c9 leave 10fa6c: c3 ret
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
10fa6d: 83 ec 0c sub $0xc,%esp 10fa70: 68 56 22 12 00 push $0x122256 10fa75: e8 0a a0 ff ff call 109a84 <printk> 10fa7a: 83 c4 10 add $0x10,%esp 10fa7d: eb e2 jmp 10fa61 <_Watchdog_Report_chain+0x51>
0010e74c <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
10e74c: 55 push %ebp 10e74d: 89 e5 mov %esp,%ebp 10e74f: 57 push %edi 10e750: 56 push %esi 10e751: 53 push %ebx 10e752: 83 ec 1c sub $0x1c,%esp 10e755: 8b 7d 08 mov 0x8(%ebp),%edi
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
10e758: 9c pushf 10e759: fa cli 10e75a: 5e pop %esi
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
10e75b: 8b 1f mov (%edi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10e75d: 8d 47 04 lea 0x4(%edi),%eax 10e760: 89 45 e4 mov %eax,-0x1c(%ebp)
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
10e763: 39 c3 cmp %eax,%ebx
10e765: 74 11 je 10e778 <_Watchdog_Tickle+0x2c>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
10e767: 8b 43 10 mov 0x10(%ebx),%eax 10e76a: 85 c0 test %eax,%eax
10e76c: 74 34 je 10e7a2 <_Watchdog_Tickle+0x56>
the_watchdog->delta_interval--;
10e76e: 48 dec %eax 10e76f: 89 43 10 mov %eax,0x10(%ebx)
if ( the_watchdog->delta_interval != 0 )
10e772: 85 c0 test %eax,%eax
10e774: 74 2c je 10e7a2 <_Watchdog_Tickle+0x56>
10e776: 66 90 xchg %ax,%ax
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
10e778: 56 push %esi 10e779: 9d popf
}
10e77a: 8d 65 f4 lea -0xc(%ebp),%esp 10e77d: 5b pop %ebx 10e77e: 5e pop %esi 10e77f: 5f pop %edi 10e780: c9 leave 10e781: c3 ret
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
10e782: 83 ec 08 sub $0x8,%esp 10e785: ff 73 24 pushl 0x24(%ebx) 10e788: ff 73 20 pushl 0x20(%ebx) 10e78b: ff 53 1c call *0x1c(%ebx)
the_watchdog->id,
the_watchdog->user_data
);
break;
10e78e: 83 c4 10 add $0x10,%esp
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
10e791: 9c pushf 10e792: fa cli 10e793: 5e pop %esi
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
10e794: 8b 1f mov (%edi),%ebx
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
10e796: 3b 5d e4 cmp -0x1c(%ebp),%ebx
10e799: 74 dd je 10e778 <_Watchdog_Tickle+0x2c>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
10e79b: 8b 43 10 mov 0x10(%ebx),%eax 10e79e: 85 c0 test %eax,%eax
10e7a0: 75 d6 jne 10e778 <_Watchdog_Tickle+0x2c>
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
10e7a2: 83 ec 0c sub $0xc,%esp 10e7a5: 53 push %ebx 10e7a6: e8 35 ff ff ff call 10e6e0 <_Watchdog_Remove>
_ISR_Enable( level );
10e7ab: 56 push %esi 10e7ac: 9d popf
switch( watchdog_state ) {
10e7ad: 83 c4 10 add $0x10,%esp 10e7b0: 83 f8 02 cmp $0x2,%eax
10e7b3: 75 dc jne 10e791 <_Watchdog_Tickle+0x45> <== NEVER TAKEN
10e7b5: eb cb jmp 10e782 <_Watchdog_Tickle+0x36>
0010e7b8 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
10e7b8: 55 push %ebp 10e7b9: 89 e5 mov %esp,%ebp 10e7bb: 57 push %edi 10e7bc: 53 push %ebx
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start;
10e7bd: 8b 1d 20 12 12 00 mov 0x121220,%ebx
uintptr_t size = Configuration.work_space_size;
10e7c3: 8b 15 24 12 12 00 mov 0x121224,%edx
if ( Configuration.do_zero_of_workspace )
10e7c9: 80 3d 4c 12 12 00 00 cmpb $0x0,0x12124c
10e7d0: 75 1e jne 10e7f0 <_Workspace_Handler_initialization+0x38>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
10e7d2: 6a 04 push $0x4 10e7d4: 52 push %edx 10e7d5: 53 push %ebx 10e7d6: 68 80 54 12 00 push $0x125480 10e7db: e8 44 de ff ff call 10c624 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
10e7e0: 83 c4 10 add $0x10,%esp 10e7e3: 85 c0 test %eax,%eax
10e7e5: 74 13 je 10e7fa <_Workspace_Handler_initialization+0x42>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
10e7e7: 8d 65 f8 lea -0x8(%ebp),%esp 10e7ea: 5b pop %ebx 10e7eb: 5f pop %edi 10e7ec: c9 leave 10e7ed: c3 ret 10e7ee: 66 90 xchg %ax,%ax
uintptr_t memory_available = 0;
void *starting_address = Configuration.work_space_start;
uintptr_t size = Configuration.work_space_size;
if ( Configuration.do_zero_of_workspace )
memset( starting_address, 0, size );
10e7f0: 31 c0 xor %eax,%eax 10e7f2: 89 df mov %ebx,%edi 10e7f4: 89 d1 mov %edx,%ecx 10e7f6: f3 aa rep stos %al,%es:(%edi) 10e7f8: eb d8 jmp 10e7d2 <_Workspace_Handler_initialization+0x1a>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
10e7fa: 50 push %eax 10e7fb: 6a 02 push $0x2 10e7fd: 6a 01 push $0x1 10e7ff: 6a 00 push $0x0 10e801: e8 26 e0 ff ff call 10c82c <_Internal_error_Occurred>
00112ab4 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
112ab4: 55 push %ebp 112ab5: 89 e5 mov %esp,%ebp 112ab7: 57 push %edi 112ab8: 56 push %esi 112ab9: 53 push %ebx 112aba: 83 ec 2c sub $0x2c,%esp 112abd: 8b 5d 08 mov 0x8(%ebp),%ebx 112ac0: 8b 7d 0c mov 0xc(%ebp),%edi 112ac3: 8b 45 10 mov 0x10(%ebp),%eax 112ac6: 8b 75 14 mov 0x14(%ebp),%esi
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
112ac9: 85 db test %ebx,%ebx
112acb: 0f 84 87 00 00 00 je 112b58 <rtems_barrier_create+0xa4>
return RTEMS_INVALID_NAME;
if ( !id )
112ad1: 85 f6 test %esi,%esi
112ad3: 0f 84 bf 00 00 00 je 112b98 <rtems_barrier_create+0xe4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
112ad9: f7 c7 10 00 00 00 test $0x10,%edi
112adf: 0f 84 83 00 00 00 je 112b68 <rtems_barrier_create+0xb4>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
112ae5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
if ( maximum_waiters == 0 )
112aec: 85 c0 test %eax,%eax
112aee: 0f 84 80 00 00 00 je 112b74 <rtems_barrier_create+0xc0>
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
112af4: 89 45 e4 mov %eax,-0x1c(%ebp) 112af7: a1 10 88 12 00 mov 0x128810,%eax 112afc: 40 inc %eax 112afd: a3 10 88 12 00 mov %eax,0x128810
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void )
{
return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information );
112b02: 83 ec 0c sub $0xc,%esp 112b05: 68 40 8b 12 00 push $0x128b40 112b0a: e8 e9 ba ff ff call 10e5f8 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
112b0f: 83 c4 10 add $0x10,%esp 112b12: 85 c0 test %eax,%eax
112b14: 74 6e je 112b84 <rtems_barrier_create+0xd0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
112b16: 89 78 10 mov %edi,0x10(%eax)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
112b19: 83 ec 08 sub $0x8,%esp 112b1c: 8d 55 e0 lea -0x20(%ebp),%edx 112b1f: 52 push %edx 112b20: 8d 50 14 lea 0x14(%eax),%edx 112b23: 52 push %edx 112b24: 89 45 d4 mov %eax,-0x2c(%ebp) 112b27: e8 c0 07 00 00 call 1132ec <_CORE_barrier_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
112b2c: 8b 45 d4 mov -0x2c(%ebp),%eax 112b2f: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
112b32: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
112b35: 8b 0d 5c 8b 12 00 mov 0x128b5c,%ecx 112b3b: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
112b3e: 89 58 0c mov %ebx,0xc(%eax)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
112b41: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
112b43: e8 20 ca ff ff call 10f568 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
112b48: 83 c4 10 add $0x10,%esp 112b4b: 31 c0 xor %eax,%eax
}
112b4d: 8d 65 f4 lea -0xc(%ebp),%esp 112b50: 5b pop %ebx 112b51: 5e pop %esi 112b52: 5f pop %edi 112b53: c9 leave 112b54: c3 ret 112b55: 8d 76 00 lea 0x0(%esi),%esi
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
112b58: b8 03 00 00 00 mov $0x3,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
112b5d: 8d 65 f4 lea -0xc(%ebp),%esp 112b60: 5b pop %ebx 112b61: 5e pop %esi 112b62: 5f pop %edi 112b63: c9 leave 112b64: c3 ret 112b65: 8d 76 00 lea 0x0(%esi),%esi
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
112b68: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 112b6f: eb 83 jmp 112af4 <rtems_barrier_create+0x40> 112b71: 8d 76 00 lea 0x0(%esi),%esi
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
112b74: b8 0a 00 00 00 mov $0xa,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
112b79: 8d 65 f4 lea -0xc(%ebp),%esp 112b7c: 5b pop %ebx 112b7d: 5e pop %esi 112b7e: 5f pop %edi 112b7f: c9 leave 112b80: c3 ret 112b81: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
112b84: e8 df c9 ff ff call 10f568 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
112b89: b8 05 00 00 00 mov $0x5,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
112b8e: 8d 65 f4 lea -0xc(%ebp),%esp 112b91: 5b pop %ebx 112b92: 5e pop %esi 112b93: 5f pop %edi 112b94: c9 leave 112b95: c3 ret 112b96: 66 90 xchg %ax,%ax
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
112b98: b8 09 00 00 00 mov $0x9,%eax 112b9d: eb ae jmp 112b4d <rtems_barrier_create+0x99>
0010c13c <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
10c13c: 55 push %ebp 10c13d: 89 e5 mov %esp,%ebp 10c13f: 56 push %esi 10c140: 53 push %ebx 10c141: 8b 5d 10 mov 0x10(%ebp),%ebx 10c144: 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 );
10c147: 83 ec 08 sub $0x8,%esp 10c14a: ff 75 0c pushl 0xc(%ebp) 10c14d: ff 75 08 pushl 0x8(%ebp) 10c150: e8 97 04 00 00 call 10c5ec <_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 ) {
10c155: 83 c4 10 add $0x10,%esp 10c158: 84 c0 test %al,%al
10c15a: 75 0c jne 10c168 <rtems_chain_append_with_notification+0x2c><== ALWAYS TAKEN
sc = rtems_event_send( task, events );
}
return sc;
}
10c15c: 31 c0 xor %eax,%eax
10c15e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c161: 5b pop %ebx <== NOT EXECUTED 10c162: 5e pop %esi <== NOT EXECUTED 10c163: c9 leave <== NOT EXECUTED 10c164: c3 ret <== NOT EXECUTED 10c165: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
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 );
10c168: 89 75 0c mov %esi,0xc(%ebp) 10c16b: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10c16e: 8d 65 f8 lea -0x8(%ebp),%esp 10c171: 5b pop %ebx 10c172: 5e pop %esi 10c173: 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 );
10c174: e9 a3 f5 ff ff jmp 10b71c <rtems_event_send>
0010c17c <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
10c17c: 55 push %ebp 10c17d: 89 e5 mov %esp,%ebp 10c17f: 56 push %esi 10c180: 53 push %ebx 10c181: 8b 5d 0c mov 0xc(%ebp),%ebx 10c184: 8b 75 10 mov 0x10(%ebp),%esi
RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node **node
)
{
return _Chain_Get_with_empty_check( chain, node );
10c187: 83 ec 08 sub $0x8,%esp 10c18a: ff 75 14 pushl 0x14(%ebp) 10c18d: ff 75 08 pushl 0x8(%ebp) 10c190: e8 bf 04 00 00 call 10c654 <_Chain_Get_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
10c195: 83 c4 10 add $0x10,%esp 10c198: 84 c0 test %al,%al
10c19a: 75 0c jne 10c1a8 <rtems_chain_get_with_notification+0x2c>
sc = rtems_event_send( task, events );
}
return sc;
}
10c19c: 31 c0 xor %eax,%eax 10c19e: 8d 65 f8 lea -0x8(%ebp),%esp 10c1a1: 5b pop %ebx 10c1a2: 5e pop %esi 10c1a3: c9 leave 10c1a4: c3 ret 10c1a5: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
10c1a8: 89 75 0c mov %esi,0xc(%ebp) 10c1ab: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10c1ae: 8d 65 f8 lea -0x8(%ebp),%esp 10c1b1: 5b pop %ebx 10c1b2: 5e pop %esi 10c1b3: c9 leave
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
10c1b4: e9 63 f5 ff ff jmp 10b71c <rtems_event_send>
0010c1bc <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10c1bc: 55 push %ebp 10c1bd: 89 e5 mov %esp,%ebp 10c1bf: 57 push %edi 10c1c0: 56 push %esi 10c1c1: 53 push %ebx 10c1c2: 83 ec 1c sub $0x1c,%esp 10c1c5: 8b 75 08 mov 0x8(%ebp),%esi
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
10c1c8: 8d 7d e4 lea -0x1c(%ebp),%edi 10c1cb: 90 nop
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10c1cc: 83 ec 0c sub $0xc,%esp 10c1cf: 56 push %esi 10c1d0: e8 bb 04 00 00 call 10c690 <_Chain_Get> 10c1d5: 89 c3 mov %eax,%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10c1d7: 83 c4 10 add $0x10,%esp 10c1da: 85 c0 test %eax,%eax
10c1dc: 75 22 jne 10c200 <rtems_chain_get_with_wait+0x44>
) {
rtems_event_set out;
sc = rtems_event_receive(
10c1de: 57 push %edi 10c1df: ff 75 10 pushl 0x10(%ebp) 10c1e2: 6a 00 push $0x0 10c1e4: ff 75 0c pushl 0xc(%ebp) 10c1e7: e8 a8 f3 ff ff call 10b594 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10c1ec: 83 c4 10 add $0x10,%esp 10c1ef: 85 c0 test %eax,%eax
10c1f1: 74 d9 je 10c1cc <rtems_chain_get_with_wait+0x10><== NEVER TAKEN
timeout,
&out
);
}
*node_ptr = node;
10c1f3: 8b 55 14 mov 0x14(%ebp),%edx 10c1f6: 89 1a mov %ebx,(%edx)
return sc;
}
10c1f8: 8d 65 f4 lea -0xc(%ebp),%esp 10c1fb: 5b pop %ebx 10c1fc: 5e pop %esi 10c1fd: 5f pop %edi 10c1fe: c9 leave 10c1ff: c3 ret
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10c200: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10c202: 8b 55 14 mov 0x14(%ebp),%edx 10c205: 89 1a mov %ebx,(%edx)
return sc;
}
10c207: 8d 65 f4 lea -0xc(%ebp),%esp 10c20a: 5b pop %ebx 10c20b: 5e pop %esi 10c20c: 5f pop %edi 10c20d: c9 leave 10c20e: c3 ret
0010c210 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
10c210: 55 push %ebp 10c211: 89 e5 mov %esp,%ebp 10c213: 56 push %esi 10c214: 53 push %ebx 10c215: 8b 5d 10 mov 0x10(%ebp),%ebx 10c218: 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 );
10c21b: 83 ec 08 sub $0x8,%esp 10c21e: ff 75 0c pushl 0xc(%ebp) 10c221: ff 75 08 pushl 0x8(%ebp) 10c224: e8 ab 04 00 00 call 10c6d4 <_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) {
10c229: 83 c4 10 add $0x10,%esp 10c22c: 84 c0 test %al,%al
10c22e: 75 0c jne 10c23c <rtems_chain_prepend_with_notification+0x2c><== ALWAYS TAKEN
sc = rtems_event_send( task, events );
}
return sc;
}
10c230: 31 c0 xor %eax,%eax
10c232: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c235: 5b pop %ebx <== NOT EXECUTED 10c236: 5e pop %esi <== NOT EXECUTED 10c237: c9 leave <== NOT EXECUTED 10c238: c3 ret <== NOT EXECUTED 10c239: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
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 );
10c23c: 89 75 0c mov %esi,0xc(%ebp) 10c23f: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10c242: 8d 65 f8 lea -0x8(%ebp),%esp 10c245: 5b pop %ebx 10c246: 5e pop %esi 10c247: 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 );
10c248: e9 cf f4 ff ff jmp 10b71c <rtems_event_send>
00115a4c <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
115a4c: 55 push %ebp 115a4d: 89 e5 mov %esp,%ebp 115a4f: 53 push %ebx 115a50: 83 ec 04 sub $0x4,%esp 115a53: 8b 45 08 mov 0x8(%ebp),%eax 115a56: 8b 5d 0c mov 0xc(%ebp),%ebx
if ( !time_buffer )
115a59: 85 db test %ebx,%ebx
115a5b: 74 3b je 115a98 <rtems_clock_get+0x4c>
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
115a5d: 85 c0 test %eax,%eax
115a5f: 74 2b je 115a8c <rtems_clock_get+0x40>
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
115a61: 83 f8 01 cmp $0x1,%eax
115a64: 74 3e je 115aa4 <rtems_clock_get+0x58>
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
115a66: 83 f8 02 cmp $0x2,%eax
115a69: 74 45 je 115ab0 <rtems_clock_get+0x64>
*interval = rtems_clock_get_ticks_since_boot();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
115a6b: 83 f8 03 cmp $0x3,%eax
115a6e: 74 4c je 115abc <rtems_clock_get+0x70>
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
115a70: 83 f8 04 cmp $0x4,%eax
115a73: 74 0b je 115a80 <rtems_clock_get+0x34>
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
115a75: b8 0a 00 00 00 mov $0xa,%eax
}
115a7a: 5a pop %edx 115a7b: 5b pop %ebx 115a7c: c9 leave 115a7d: c3 ret 115a7e: 66 90 xchg %ax,%ax
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
115a80: 89 5d 08 mov %ebx,0x8(%ebp)
return RTEMS_INVALID_NUMBER;
}
115a83: 59 pop %ecx 115a84: 5b pop %ebx 115a85: c9 leave
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
115a86: e9 41 01 00 00 jmp 115bcc <rtems_clock_get_tod_timeval> 115a8b: 90 nop
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
115a8c: 89 5d 08 mov %ebx,0x8(%ebp)
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
115a8f: 58 pop %eax 115a90: 5b pop %ebx 115a91: c9 leave
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
115a92: e9 81 00 00 00 jmp 115b18 <rtems_clock_get_tod> 115a97: 90 nop
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
115a98: b8 09 00 00 00 mov $0x9,%eax
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
115a9d: 5a pop %edx 115a9e: 5b pop %ebx 115a9f: c9 leave 115aa0: c3 ret 115aa1: 8d 76 00 lea 0x0(%esi),%esi
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
115aa4: 89 5d 08 mov %ebx,0x8(%ebp)
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
115aa7: 5b pop %ebx 115aa8: 5b pop %ebx 115aa9: c9 leave
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
115aaa: e9 19 00 00 00 jmp 115ac8 <rtems_clock_get_seconds_since_epoch> 115aaf: 90 nop
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
115ab0: e8 57 00 00 00 call 115b0c <rtems_clock_get_ticks_since_boot> 115ab5: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
115ab7: 31 c0 xor %eax,%eax 115ab9: eb bf jmp 115a7a <rtems_clock_get+0x2e> 115abb: 90 nop
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
115abc: e8 37 00 00 00 call 115af8 <rtems_clock_get_ticks_per_second> 115ac1: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
115ac3: 31 c0 xor %eax,%eax 115ac5: eb b3 jmp 115a7a <rtems_clock_get+0x2e>
00115bcc <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
115bcc: 55 push %ebp 115bcd: 89 e5 mov %esp,%ebp 115bcf: 56 push %esi 115bd0: 53 push %ebx 115bd1: 83 ec 10 sub $0x10,%esp 115bd4: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !time )
115bd7: 85 db test %ebx,%ebx
115bd9: 74 51 je 115c2c <rtems_clock_get_tod_timeval+0x60>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
115bdb: 80 3d 64 0a 14 00 00 cmpb $0x0,0x140a64
115be2: 75 0c jne 115bf0 <rtems_clock_get_tod_timeval+0x24>
return RTEMS_NOT_DEFINED;
115be4: b8 0b 00 00 00 mov $0xb,%eax
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
115be9: 8d 65 f8 lea -0x8(%ebp),%esp 115bec: 5b pop %ebx 115bed: 5e pop %esi 115bee: c9 leave 115bef: c3 ret
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
115bf0: 9c pushf 115bf1: fa cli 115bf2: 5e pop %esi
_TOD_Get( &now );
115bf3: 83 ec 0c sub $0xc,%esp 115bf6: 8d 45 f0 lea -0x10(%ebp),%eax 115bf9: 50 push %eax 115bfa: e8 e9 42 00 00 call 119ee8 <_TOD_Get>
_ISR_Enable(level);
115bff: 56 push %esi 115c00: 9d popf
useconds = (suseconds_t)now.tv_nsec;
115c01: 8b 4d f4 mov -0xc(%ebp),%ecx
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
115c04: 8b 45 f0 mov -0x10(%ebp),%eax 115c07: 89 03 mov %eax,(%ebx)
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
115c09: b8 d3 4d 62 10 mov $0x10624dd3,%eax 115c0e: f7 e9 imul %ecx 115c10: 89 d0 mov %edx,%eax 115c12: c1 f8 06 sar $0x6,%eax 115c15: c1 f9 1f sar $0x1f,%ecx 115c18: 29 c8 sub %ecx,%eax 115c1a: 89 43 04 mov %eax,0x4(%ebx)
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
115c1d: 83 c4 10 add $0x10,%esp 115c20: 31 c0 xor %eax,%eax
}
115c22: 8d 65 f8 lea -0x8(%ebp),%esp 115c25: 5b pop %ebx 115c26: 5e pop %esi 115c27: c9 leave 115c28: c3 ret 115c29: 8d 76 00 lea 0x0(%esi),%esi
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
if ( !time )
return RTEMS_INVALID_ADDRESS;
115c2c: b8 09 00 00 00 mov $0x9,%eax 115c31: eb b6 jmp 115be9 <rtems_clock_get_tod_timeval+0x1d>
0010b1e0 <rtems_clock_get_uptime>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
10b1e0: 55 push %ebp 10b1e1: 89 e5 mov %esp,%ebp 10b1e3: 83 ec 08 sub $0x8,%esp 10b1e6: 8b 45 08 mov 0x8(%ebp),%eax
if ( !uptime )
10b1e9: 85 c0 test %eax,%eax
10b1eb: 74 13 je 10b200 <rtems_clock_get_uptime+0x20>
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
10b1ed: 83 ec 0c sub $0xc,%esp 10b1f0: 50 push %eax 10b1f1: e8 ae 15 00 00 call 10c7a4 <_TOD_Get_uptime_as_timespec>
return RTEMS_SUCCESSFUL;
10b1f6: 83 c4 10 add $0x10,%esp 10b1f9: 31 c0 xor %eax,%eax
}
10b1fb: c9 leave 10b1fc: c3 ret 10b1fd: 8d 76 00 lea 0x0(%esi),%esi
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
return RTEMS_INVALID_ADDRESS;
10b200: b8 09 00 00 00 mov $0x9,%eax
_TOD_Get_uptime_as_timespec( uptime );
return RTEMS_SUCCESSFUL;
}
10b205: c9 leave 10b206: c3 ret
0010c100 <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
10c100: 55 push %ebp 10c101: 89 e5 mov %esp,%ebp 10c103: 53 push %ebx 10c104: 83 ec 14 sub $0x14,%esp 10c107: 8b 5d 08 mov 0x8(%ebp),%ebx
struct timespec newtime;
if ( !time_buffer )
10c10a: 85 db test %ebx,%ebx
10c10c: 74 66 je 10c174 <rtems_clock_set+0x74>
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
10c10e: 83 ec 0c sub $0xc,%esp 10c111: 53 push %ebx 10c112: e8 39 01 00 00 call 10c250 <_TOD_Validate> 10c117: 83 c4 10 add $0x10,%esp 10c11a: 84 c0 test %al,%al
10c11c: 75 0a jne 10c128 <rtems_clock_set+0x28>
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
10c11e: b8 14 00 00 00 mov $0x14,%eax
}
10c123: 8b 5d fc mov -0x4(%ebp),%ebx 10c126: c9 leave 10c127: c3 ret
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
10c128: 83 ec 0c sub $0xc,%esp 10c12b: 53 push %ebx 10c12c: e8 93 00 00 00 call 10c1c4 <_TOD_To_seconds> 10c131: 89 45 f0 mov %eax,-0x10(%ebp)
newtime.tv_nsec = time_buffer->ticks *
10c134: 8b 43 18 mov 0x18(%ebx),%eax 10c137: 0f af 05 ac 53 12 00 imul 0x1253ac,%eax 10c13e: 8d 04 80 lea (%eax,%eax,4),%eax 10c141: 8d 04 80 lea (%eax,%eax,4),%eax 10c144: 8d 04 80 lea (%eax,%eax,4),%eax 10c147: c1 e0 03 shl $0x3,%eax 10c14a: 89 45 f4 mov %eax,-0xc(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c14d: a1 30 14 13 00 mov 0x131430,%eax 10c152: 40 inc %eax 10c153: a3 30 14 13 00 mov %eax,0x131430
rtems_configuration_get_nanoseconds_per_tick();
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
10c158: 8d 45 f0 lea -0x10(%ebp),%eax 10c15b: 89 04 24 mov %eax,(%esp) 10c15e: e8 95 18 00 00 call 10d9f8 <_TOD_Set>
_Thread_Enable_dispatch();
10c163: e8 e0 2d 00 00 call 10ef48 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c168: 83 c4 10 add $0x10,%esp 10c16b: 31 c0 xor %eax,%eax
} return RTEMS_INVALID_CLOCK; }
10c16d: 8b 5d fc mov -0x4(%ebp),%ebx 10c170: c9 leave 10c171: c3 ret 10c172: 66 90 xchg %ax,%ax
)
{
struct timespec newtime;
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
10c174: b8 09 00 00 00 mov $0x9,%eax
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10c179: 8b 5d fc mov -0x4(%ebp),%ebx 10c17c: c9 leave 10c17d: c3 ret
0010afd0 <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
10afd0: 55 push %ebp 10afd1: 89 e5 mov %esp,%ebp 10afd3: 83 ec 08 sub $0x8,%esp
_TOD_Tickle_ticks();
10afd6: e8 71 14 00 00 call 10c44c <_TOD_Tickle_ticks>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
{
_Watchdog_Tickle( &_Watchdog_Ticks_chain );
10afdb: 83 ec 0c sub $0xc,%esp 10afde: 68 5c 55 12 00 push $0x12555c 10afe3: e8 64 37 00 00 call 10e74c <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
10afe8: e8 4f 32 00 00 call 10e23c <_Thread_Tickle_timeslice>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
{
return ( _Thread_Dispatch_necessary );
10afed: a0 24 57 12 00 mov 0x125724,%al
if ( _Thread_Is_context_switch_necessary() &&
10aff2: 83 c4 10 add $0x10,%esp 10aff5: 84 c0 test %al,%al
10aff7: 74 09 je 10b002 <rtems_clock_tick+0x32>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
10aff9: a1 50 54 12 00 mov 0x125450,%eax 10affe: 85 c0 test %eax,%eax
10b000: 74 06 je 10b008 <rtems_clock_tick+0x38>
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
10b002: 31 c0 xor %eax,%eax 10b004: c9 leave 10b005: c3 ret 10b006: 66 90 xchg %ax,%ax
_Thread_Tickle_timeslice();
if ( _Thread_Is_context_switch_necessary() &&
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
10b008: e8 77 26 00 00 call 10d684 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
}
10b00d: 31 c0 xor %eax,%eax 10b00f: c9 leave 10b010: c3 ret
0010b19c <rtems_event_send>:
rtems_status_code rtems_event_send(
rtems_id id,
rtems_event_set event_in
)
{
10b19c: 55 push %ebp 10b19d: 89 e5 mov %esp,%ebp 10b19f: 53 push %ebx 10b1a0: 83 ec 1c sub $0x1c,%esp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
the_thread = _Thread_Get( id, &location );
10b1a3: 8d 45 f4 lea -0xc(%ebp),%eax 10b1a6: 50 push %eax 10b1a7: ff 75 08 pushl 0x8(%ebp) 10b1aa: e8 71 26 00 00 call 10d820 <_Thread_Get>
switch ( location ) {
10b1af: 83 c4 10 add $0x10,%esp 10b1b2: 8b 55 f4 mov -0xc(%ebp),%edx 10b1b5: 85 d2 test %edx,%edx
10b1b7: 75 2b jne 10b1e4 <rtems_event_send+0x48>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
10b1b9: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx
rtems_event_set *the_event_set
)
{
ISR_Level level;
_ISR_Disable( level );
10b1bf: 9c pushf 10b1c0: fa cli 10b1c1: 59 pop %ecx
*the_event_set |= the_new_events;
10b1c2: 8b 5d 0c mov 0xc(%ebp),%ebx 10b1c5: 09 1a or %ebx,(%edx)
_ISR_Enable( level );
10b1c7: 51 push %ecx 10b1c8: 9d popf
_Event_sets_Post( event_in, &api->pending_events );
_Event_Surrender( the_thread );
10b1c9: 83 ec 0c sub $0xc,%esp 10b1cc: 50 push %eax 10b1cd: e8 1e 00 00 00 call 10b1f0 <_Event_Surrender>
_Thread_Enable_dispatch();
10b1d2: e8 25 26 00 00 call 10d7fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b1d7: 83 c4 10 add $0x10,%esp 10b1da: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b1dc: 8b 5d fc mov -0x4(%ebp),%ebx 10b1df: c9 leave 10b1e0: c3 ret 10b1e1: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b1e4: b8 04 00 00 00 mov $0x4,%eax
}
10b1e9: 8b 5d fc mov -0x4(%ebp),%ebx 10b1ec: c9 leave 10b1ed: c3 ret
0010d004 <rtems_extension_delete>:
#include <rtems/extension.h>
rtems_status_code rtems_extension_delete(
rtems_id id
)
{
10d004: 55 push %ebp 10d005: 89 e5 mov %esp,%ebp 10d007: 53 push %ebx 10d008: 83 ec 18 sub $0x18,%esp
Extension_Control *the_extension;
Objects_Locations location;
the_extension = _Extension_Get( id, &location );
10d00b: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Extension_Control *)
_Objects_Get( &_Extension_Information, id, location );
10d00e: 50 push %eax 10d00f: ff 75 08 pushl 0x8(%ebp) 10d012: 68 40 05 13 00 push $0x130540 10d017: e8 5c 11 00 00 call 10e178 <_Objects_Get> 10d01c: 89 c3 mov %eax,%ebx
switch ( location ) {
10d01e: 83 c4 10 add $0x10,%esp 10d021: 8b 55 f4 mov -0xc(%ebp),%edx 10d024: 85 d2 test %edx,%edx
10d026: 75 38 jne 10d060 <rtems_extension_delete+0x5c>
case OBJECTS_LOCAL:
_User_extensions_Remove_set( &the_extension->Extension );
10d028: 83 ec 0c sub $0xc,%esp 10d02b: 8d 40 10 lea 0x10(%eax),%eax 10d02e: 50 push %eax 10d02f: e8 58 28 00 00 call 10f88c <_User_extensions_Remove_set>
_Objects_Close( &_Extension_Information, &the_extension->Object );
10d034: 59 pop %ecx 10d035: 58 pop %eax 10d036: 53 push %ebx 10d037: 68 40 05 13 00 push $0x130540 10d03c: e8 fb 0c 00 00 call 10dd3c <_Objects_Close>
RTEMS_INLINE_ROUTINE void _Extension_Free (
Extension_Control *the_extension
)
{
_Objects_Free( &_Extension_Information, &the_extension->Object );
10d041: 58 pop %eax 10d042: 5a pop %edx 10d043: 53 push %ebx 10d044: 68 40 05 13 00 push $0x130540 10d049: e8 ea 0f 00 00 call 10e038 <_Objects_Free>
_Extension_Free( the_extension );
_Thread_Enable_dispatch();
10d04e: e8 ad 1b 00 00 call 10ec00 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d053: 83 c4 10 add $0x10,%esp 10d056: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d058: 8b 5d fc mov -0x4(%ebp),%ebx 10d05b: c9 leave 10d05c: c3 ret 10d05d: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d060: b8 04 00 00 00 mov $0x4,%eax
}
10d065: 8b 5d fc mov -0x4(%ebp),%ebx 10d068: c9 leave 10d069: c3 ret
001120a8 <rtems_io_close>:
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
1120a8: 55 push %ebp 1120a9: 89 e5 mov %esp,%ebp 1120ab: 53 push %ebx 1120ac: 83 ec 04 sub $0x4,%esp 1120af: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
1120b2: 39 05 20 58 12 00 cmp %eax,0x125820
1120b8: 76 1a jbe 1120d4 <rtems_io_close+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
1120ba: 8d 14 40 lea (%eax,%eax,2),%edx 1120bd: c1 e2 03 shl $0x3,%edx 1120c0: 03 15 24 58 12 00 add 0x125824,%edx 1120c6: 8b 52 08 mov 0x8(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1120c9: 85 d2 test %edx,%edx
1120cb: 74 13 je 1120e0 <rtems_io_close+0x38> }
1120cd: 59 pop %ecx 1120ce: 5b pop %ebx 1120cf: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1120d0: ff e2 jmp *%edx 1120d2: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
1120d4: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
1120d9: 5a pop %edx 1120da: 5b pop %ebx 1120db: c9 leave 1120dc: c3 ret 1120dd: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1120e0: 31 c0 xor %eax,%eax
}
1120e2: 5a pop %edx 1120e3: 5b pop %ebx 1120e4: c9 leave 1120e5: c3 ret
001120e8 <rtems_io_control>:
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
1120e8: 55 push %ebp 1120e9: 89 e5 mov %esp,%ebp 1120eb: 53 push %ebx 1120ec: 83 ec 04 sub $0x4,%esp 1120ef: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
1120f2: 39 05 20 58 12 00 cmp %eax,0x125820
1120f8: 76 1a jbe 112114 <rtems_io_control+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
1120fa: 8d 14 40 lea (%eax,%eax,2),%edx 1120fd: c1 e2 03 shl $0x3,%edx 112100: 03 15 24 58 12 00 add 0x125824,%edx 112106: 8b 52 14 mov 0x14(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
112109: 85 d2 test %edx,%edx
11210b: 74 13 je 112120 <rtems_io_control+0x38> }
11210d: 59 pop %ecx 11210e: 5b pop %ebx 11210f: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
112110: ff e2 jmp *%edx 112112: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
112114: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
112119: 5a pop %edx 11211a: 5b pop %ebx 11211b: c9 leave 11211c: c3 ret 11211d: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
112120: 31 c0 xor %eax,%eax
}
112122: 5a pop %edx 112123: 5b pop %ebx 112124: c9 leave 112125: c3 ret
001104f8 <rtems_io_initialize>:
rtems_status_code rtems_io_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
1104f8: 55 push %ebp 1104f9: 89 e5 mov %esp,%ebp 1104fb: 53 push %ebx 1104fc: 83 ec 04 sub $0x4,%esp 1104ff: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
110502: 39 05 20 58 12 00 cmp %eax,0x125820
110508: 76 1a jbe 110524 <rtems_io_initialize+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
11050a: 8d 14 40 lea (%eax,%eax,2),%edx 11050d: c1 e2 03 shl $0x3,%edx 110510: 03 15 24 58 12 00 add 0x125824,%edx 110516: 8b 12 mov (%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
110518: 85 d2 test %edx,%edx
11051a: 74 14 je 110530 <rtems_io_initialize+0x38> }
11051c: 59 pop %ecx 11051d: 5b pop %ebx 11051e: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
11051f: ff e2 jmp *%edx 110521: 8d 76 00 lea 0x0(%esi),%esi
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
110524: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
110529: 5a pop %edx 11052a: 5b pop %ebx 11052b: c9 leave 11052c: c3 ret 11052d: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
110530: 31 c0 xor %eax,%eax
}
110532: 5a pop %edx 110533: 5b pop %ebx 110534: c9 leave 110535: c3 ret
00112128 <rtems_io_open>:
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
112128: 55 push %ebp 112129: 89 e5 mov %esp,%ebp 11212b: 53 push %ebx 11212c: 83 ec 04 sub $0x4,%esp 11212f: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
112132: 39 05 20 58 12 00 cmp %eax,0x125820
112138: 76 1a jbe 112154 <rtems_io_open+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
11213a: 8d 14 40 lea (%eax,%eax,2),%edx 11213d: c1 e2 03 shl $0x3,%edx 112140: 03 15 24 58 12 00 add 0x125824,%edx 112146: 8b 52 04 mov 0x4(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
112149: 85 d2 test %edx,%edx
11214b: 74 13 je 112160 <rtems_io_open+0x38> }
11214d: 59 pop %ecx 11214e: 5b pop %ebx 11214f: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
112150: ff e2 jmp *%edx 112152: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
112154: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
112159: 5a pop %edx 11215a: 5b pop %ebx 11215b: c9 leave 11215c: c3 ret 11215d: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
112160: 31 c0 xor %eax,%eax
}
112162: 5a pop %edx 112163: 5b pop %ebx 112164: c9 leave 112165: c3 ret
00112168 <rtems_io_read>:
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
112168: 55 push %ebp 112169: 89 e5 mov %esp,%ebp 11216b: 53 push %ebx 11216c: 83 ec 04 sub $0x4,%esp 11216f: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
112172: 39 05 20 58 12 00 cmp %eax,0x125820
112178: 76 1a jbe 112194 <rtems_io_read+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
11217a: 8d 14 40 lea (%eax,%eax,2),%edx 11217d: c1 e2 03 shl $0x3,%edx 112180: 03 15 24 58 12 00 add 0x125824,%edx 112186: 8b 52 0c mov 0xc(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
112189: 85 d2 test %edx,%edx
11218b: 74 13 je 1121a0 <rtems_io_read+0x38> }
11218d: 59 pop %ecx 11218e: 5b pop %ebx 11218f: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
112190: ff e2 jmp *%edx 112192: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
112194: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
112199: 5a pop %edx 11219a: 5b pop %ebx 11219b: c9 leave 11219c: c3 ret 11219d: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1121a0: 31 c0 xor %eax,%eax
}
1121a2: 5a pop %edx 1121a3: 5b pop %ebx 1121a4: c9 leave 1121a5: c3 ret
0010ceb8 <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
)
{
10ceb8: 55 push %ebp 10ceb9: 89 e5 mov %esp,%ebp 10cebb: 57 push %edi 10cebc: 56 push %esi 10cebd: 53 push %ebx 10cebe: 83 ec 0c sub $0xc,%esp 10cec1: 8b 5d 08 mov 0x8(%ebp),%ebx 10cec4: 8b 75 0c mov 0xc(%ebp),%esi 10cec7: 8b 55 10 mov 0x10(%ebp),%edx
rtems_device_major_number major_limit = _IO_Number_of_drivers;
10ceca: a1 e0 98 12 00 mov 0x1298e0,%eax
if ( rtems_interrupt_is_in_progress() )
10cecf: 8b 0d d4 97 12 00 mov 0x1297d4,%ecx 10ced5: 85 c9 test %ecx,%ecx
10ced7: 0f 85 ab 00 00 00 jne 10cf88 <rtems_io_register_driver+0xd0>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
10cedd: 85 d2 test %edx,%edx
10cedf: 0f 84 e7 00 00 00 je 10cfcc <rtems_io_register_driver+0x114>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
10cee5: 89 02 mov %eax,(%edx)
if ( driver_table == NULL )
10cee7: 85 f6 test %esi,%esi
10cee9: 0f 84 dd 00 00 00 je 10cfcc <rtems_io_register_driver+0x114>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10ceef: 8b 3e mov (%esi),%edi 10cef1: 85 ff test %edi,%edi
10cef3: 0f 84 c7 00 00 00 je 10cfc0 <rtems_io_register_driver+0x108>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
10cef9: 39 d8 cmp %ebx,%eax
10cefb: 76 7b jbe 10cf78 <rtems_io_register_driver+0xc0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10cefd: a1 10 95 12 00 mov 0x129510,%eax 10cf02: 40 inc %eax 10cf03: a3 10 95 12 00 mov %eax,0x129510
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
10cf08: 85 db test %ebx,%ebx
10cf0a: 0f 85 88 00 00 00 jne 10cf98 <rtems_io_register_driver+0xe0>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
10cf10: 8b 0d e0 98 12 00 mov 0x1298e0,%ecx
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10cf16: 85 c9 test %ecx,%ecx
10cf18: 0f 84 bb 00 00 00 je 10cfd9 <rtems_io_register_driver+0x121><== NEVER TAKEN
10cf1e: 8b 3d e4 98 12 00 mov 0x1298e4,%edi 10cf24: 89 f8 mov %edi,%eax 10cf26: eb 08 jmp 10cf30 <rtems_io_register_driver+0x78> 10cf28: 43 inc %ebx 10cf29: 83 c0 18 add $0x18,%eax 10cf2c: 39 d9 cmp %ebx,%ecx
10cf2e: 76 0b jbe 10cf3b <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;
10cf30: 83 38 00 cmpl $0x0,(%eax)
10cf33: 75 f3 jne 10cf28 <rtems_io_register_driver+0x70>
10cf35: 83 78 04 00 cmpl $0x0,0x4(%eax)
10cf39: 75 ed jne 10cf28 <rtems_io_register_driver+0x70>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10cf3b: 89 1a mov %ebx,(%edx)
if ( m != n )
10cf3d: 39 d9 cmp %ebx,%ecx
10cf3f: 0f 84 9b 00 00 00 je 10cfe0 <rtems_io_register_driver+0x128>
10cf45: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cf48: c1 e0 03 shl $0x3,%eax
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
10cf4b: 01 c7 add %eax,%edi 10cf4d: b9 06 00 00 00 mov $0x6,%ecx 10cf52: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
10cf54: e8 af 1b 00 00 call 10eb08 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
10cf59: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10cf60: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10cf67: 89 5d 08 mov %ebx,0x8(%ebp)
}
10cf6a: 83 c4 0c add $0xc,%esp 10cf6d: 5b pop %ebx 10cf6e: 5e pop %esi 10cf6f: 5f pop %edi 10cf70: c9 leave
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10cf71: e9 16 73 00 00 jmp 11428c <rtems_io_initialize> 10cf76: 66 90 xchg %ax,%ax
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
10cf78: 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 );
}
10cf7d: 83 c4 0c add $0xc,%esp 10cf80: 5b pop %ebx 10cf81: 5e pop %esi 10cf82: 5f pop %edi 10cf83: c9 leave 10cf84: c3 ret 10cf85: 8d 76 00 lea 0x0(%esi),%esi
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
10cf88: b8 12 00 00 00 mov $0x12,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10cf8d: 83 c4 0c add $0xc,%esp 10cf90: 5b pop %ebx 10cf91: 5e pop %esi 10cf92: 5f pop %edi 10cf93: c9 leave 10cf94: c3 ret 10cf95: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
10cf98: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cf9b: c1 e0 03 shl $0x3,%eax 10cf9e: 8b 0d e4 98 12 00 mov 0x1298e4,%ecx 10cfa4: 01 c1 add %eax,%ecx
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10cfa6: 8b 39 mov (%ecx),%edi 10cfa8: 85 ff test %edi,%edi
10cfaa: 74 40 je 10cfec <rtems_io_register_driver+0x134>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
10cfac: e8 57 1b 00 00 call 10eb08 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10cfb1: b8 0c 00 00 00 mov $0xc,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10cfb6: 83 c4 0c add $0xc,%esp 10cfb9: 5b pop %ebx 10cfba: 5e pop %esi 10cfbb: 5f pop %edi 10cfbc: c9 leave 10cfbd: c3 ret 10cfbe: 66 90 xchg %ax,%ax
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10cfc0: 8b 4e 04 mov 0x4(%esi),%ecx 10cfc3: 85 c9 test %ecx,%ecx
10cfc5: 0f 85 2e ff ff ff jne 10cef9 <rtems_io_register_driver+0x41>
10cfcb: 90 nop
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
10cfcc: b8 09 00 00 00 mov $0x9,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10cfd1: 83 c4 0c add $0xc,%esp 10cfd4: 5b pop %ebx 10cfd5: 5e pop %esi 10cfd6: 5f pop %edi 10cfd7: c9 leave 10cfd8: c3 ret
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10cfd9: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10cfdf: 90 nop <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
10cfe0: e8 23 1b 00 00 call 10eb08 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
10cfe5: 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;
10cfea: eb 91 jmp 10cf7d <rtems_io_register_driver+0xc5>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10cfec: 8b 49 04 mov 0x4(%ecx),%ecx 10cfef: 85 c9 test %ecx,%ecx
10cff1: 75 b9 jne 10cfac <rtems_io_register_driver+0xf4>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
10cff3: 89 1a mov %ebx,(%edx) 10cff5: 8b 3d e4 98 12 00 mov 0x1298e4,%edi 10cffb: e9 4b ff ff ff jmp 10cf4b <rtems_io_register_driver+0x93>
0010d000 <rtems_io_unregister_driver>:
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
10d000: 55 push %ebp 10d001: 89 e5 mov %esp,%ebp 10d003: 57 push %edi 10d004: 83 ec 04 sub $0x4,%esp 10d007: 8b 45 08 mov 0x8(%ebp),%eax
if ( rtems_interrupt_is_in_progress() )
10d00a: 8b 0d d4 97 12 00 mov 0x1297d4,%ecx 10d010: 85 c9 test %ecx,%ecx
10d012: 75 44 jne 10d058 <rtems_io_unregister_driver+0x58>
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
10d014: 39 05 e0 98 12 00 cmp %eax,0x1298e0
10d01a: 77 0c ja 10d028 <rtems_io_unregister_driver+0x28>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
10d01c: b8 0d 00 00 00 mov $0xd,%eax
}
10d021: 5a pop %edx 10d022: 5f pop %edi 10d023: c9 leave 10d024: c3 ret 10d025: 8d 76 00 lea 0x0(%esi),%esi 10d028: 8b 15 10 95 12 00 mov 0x129510,%edx 10d02e: 42 inc %edx 10d02f: 89 15 10 95 12 00 mov %edx,0x129510
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
&_IO_Driver_address_table[major],
10d035: 8d 14 40 lea (%eax,%eax,2),%edx 10d038: c1 e2 03 shl $0x3,%edx
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
10d03b: 03 15 e4 98 12 00 add 0x1298e4,%edx 10d041: b9 18 00 00 00 mov $0x18,%ecx 10d046: 31 c0 xor %eax,%eax 10d048: 89 d7 mov %edx,%edi 10d04a: f3 aa rep stos %al,%es:(%edi)
&_IO_Driver_address_table[major],
0,
sizeof( rtems_driver_address_table )
);
_Thread_Enable_dispatch();
10d04c: e8 b7 1a 00 00 call 10eb08 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d051: 31 c0 xor %eax,%eax
}
return RTEMS_UNSATISFIED;
}
10d053: 5a pop %edx 10d054: 5f pop %edi 10d055: c9 leave 10d056: c3 ret 10d057: 90 nop
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
10d058: b8 12 00 00 00 mov $0x12,%eax
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10d05d: 5a pop %edx 10d05e: 5f pop %edi 10d05f: c9 leave 10d060: c3 ret
001121a8 <rtems_io_write>:
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
1121a8: 55 push %ebp 1121a9: 89 e5 mov %esp,%ebp 1121ab: 53 push %ebx 1121ac: 83 ec 04 sub $0x4,%esp 1121af: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
1121b2: 39 05 20 58 12 00 cmp %eax,0x125820
1121b8: 76 1a jbe 1121d4 <rtems_io_write+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
1121ba: 8d 14 40 lea (%eax,%eax,2),%edx 1121bd: c1 e2 03 shl $0x3,%edx 1121c0: 03 15 24 58 12 00 add 0x125824,%edx 1121c6: 8b 52 10 mov 0x10(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1121c9: 85 d2 test %edx,%edx
1121cb: 74 13 je 1121e0 <rtems_io_write+0x38> }
1121cd: 59 pop %ecx 1121ce: 5b pop %ebx 1121cf: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1121d0: ff e2 jmp *%edx 1121d2: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
1121d4: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
1121d9: 5a pop %edx 1121da: 5b pop %ebx 1121db: c9 leave 1121dc: c3 ret 1121dd: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1121e0: 31 c0 xor %eax,%eax
}
1121e2: 5a pop %edx 1121e3: 5b pop %ebx 1121e4: c9 leave 1121e5: c3 ret
0010ded4 <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)
{
10ded4: 55 push %ebp 10ded5: 89 e5 mov %esp,%ebp 10ded7: 57 push %edi 10ded8: 56 push %esi 10ded9: 53 push %ebx 10deda: 83 ec 1c sub $0x1c,%esp 10dedd: 8b 7d 08 mov 0x8(%ebp),%edi
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10dee0: 85 ff test %edi,%edi
10dee2: 74 4d je 10df31 <rtems_iterate_over_all_threads+0x5d><== NEVER TAKEN
10dee4: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp)
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 ] )
10deeb: 8b 55 e4 mov -0x1c(%ebp),%edx 10deee: 8b 04 95 08 14 13 00 mov 0x131408(,%edx,4),%eax 10def5: 85 c0 test %eax,%eax
10def7: 74 2f je 10df28 <rtems_iterate_over_all_threads+0x54>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10def9: 8b 70 04 mov 0x4(%eax),%esi
if ( !information )
10defc: 85 f6 test %esi,%esi
10defe: 74 28 je 10df28 <rtems_iterate_over_all_threads+0x54>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10df00: 66 83 7e 10 00 cmpw $0x0,0x10(%esi)
10df05: 74 21 je 10df28 <rtems_iterate_over_all_threads+0x54><== NEVER TAKEN
10df07: bb 01 00 00 00 mov $0x1,%ebx
the_thread = (Thread_Control *)information->local_table[ i ];
10df0c: 8b 46 1c mov 0x1c(%esi),%eax 10df0f: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !the_thread )
10df12: 85 c0 test %eax,%eax
10df14: 74 09 je 10df1f <rtems_iterate_over_all_threads+0x4b><== NEVER TAKEN
continue;
(*routine)(the_thread);
10df16: 83 ec 0c sub $0xc,%esp 10df19: 50 push %eax 10df1a: ff d7 call *%edi 10df1c: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10df1f: 43 inc %ebx 10df20: 0f b7 46 10 movzwl 0x10(%esi),%eax 10df24: 39 d8 cmp %ebx,%eax
10df26: 73 e4 jae 10df0c <rtems_iterate_over_all_threads+0x38>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10df28: ff 45 e4 incl -0x1c(%ebp) 10df2b: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp)
10df2f: 75 ba jne 10deeb <rtems_iterate_over_all_threads+0x17>
(*routine)(the_thread);
}
}
}
10df31: 8d 65 f4 lea -0xc(%ebp),%esp 10df34: 5b pop %ebx 10df35: 5e pop %esi 10df36: 5f pop %edi 10df37: c9 leave 10df38: c3 ret
001163a8 <rtems_message_queue_broadcast>:
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
1163a8: 55 push %ebp 1163a9: 89 e5 mov %esp,%ebp 1163ab: 57 push %edi 1163ac: 56 push %esi 1163ad: 53 push %ebx 1163ae: 83 ec 1c sub $0x1c,%esp 1163b1: 8b 7d 08 mov 0x8(%ebp),%edi 1163b4: 8b 5d 0c mov 0xc(%ebp),%ebx 1163b7: 8b 75 14 mov 0x14(%ebp),%esi
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
1163ba: 85 db test %ebx,%ebx
1163bc: 74 62 je 116420 <rtems_message_queue_broadcast+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !count )
1163be: 85 f6 test %esi,%esi
1163c0: 74 5e je 116420 <rtems_message_queue_broadcast+0x78>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
1163c2: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
1163c3: 8d 45 e4 lea -0x1c(%ebp),%eax 1163c6: 50 push %eax 1163c7: 57 push %edi 1163c8: 68 a0 0d 14 00 push $0x140da0 1163cd: e8 be 4d 00 00 call 11b190 <_Objects_Get>
switch ( location ) {
1163d2: 83 c4 10 add $0x10,%esp 1163d5: 8b 55 e4 mov -0x1c(%ebp),%edx 1163d8: 85 d2 test %edx,%edx
1163da: 74 10 je 1163ec <rtems_message_queue_broadcast+0x44>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1163dc: b8 04 00 00 00 mov $0x4,%eax
}
1163e1: 8d 65 f4 lea -0xc(%ebp),%esp 1163e4: 5b pop %ebx 1163e5: 5e pop %esi 1163e6: 5f pop %edi 1163e7: c9 leave 1163e8: c3 ret 1163e9: 8d 76 00 lea 0x0(%esi),%esi
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
1163ec: 83 ec 08 sub $0x8,%esp 1163ef: 56 push %esi 1163f0: 6a 00 push $0x0 1163f2: 57 push %edi 1163f3: ff 75 10 pushl 0x10(%ebp) 1163f6: 53 push %ebx 1163f7: 83 c0 14 add $0x14,%eax 1163fa: 50 push %eax 1163fb: e8 80 34 00 00 call 119880 <_CORE_message_queue_Broadcast> 116400: 89 c3 mov %eax,%ebx
NULL,
#endif
count
);
_Thread_Enable_dispatch();
116402: 83 c4 20 add $0x20,%esp 116405: e8 0e 58 00 00 call 11bc18 <_Thread_Enable_dispatch>
return
11640a: 83 ec 0c sub $0xc,%esp 11640d: 53 push %ebx 11640e: e8 69 03 00 00 call 11677c <_Message_queue_Translate_core_message_queue_return_code> 116413: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116416: 8d 65 f4 lea -0xc(%ebp),%esp 116419: 5b pop %ebx 11641a: 5e pop %esi 11641b: 5f pop %edi 11641c: c9 leave 11641d: c3 ret 11641e: 66 90 xchg %ax,%ax
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !count )
return RTEMS_INVALID_ADDRESS;
116420: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116425: 8d 65 f4 lea -0xc(%ebp),%esp 116428: 5b pop %ebx 116429: 5e pop %esi 11642a: 5f pop %edi 11642b: c9 leave 11642c: c3 ret
00113844 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
113844: 55 push %ebp 113845: 89 e5 mov %esp,%ebp 113847: 57 push %edi 113848: 56 push %esi 113849: 53 push %ebx 11384a: 83 ec 2c sub $0x2c,%esp 11384d: 8b 5d 08 mov 0x8(%ebp),%ebx 113850: 8b 75 0c mov 0xc(%ebp),%esi 113853: 8b 4d 10 mov 0x10(%ebp),%ecx 113856: 8b 7d 18 mov 0x18(%ebp),%edi
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
113859: 85 db test %ebx,%ebx
11385b: 74 2f je 11388c <rtems_message_queue_create+0x48>
return RTEMS_INVALID_NAME;
if ( !id )
11385d: 85 ff test %edi,%edi
11385f: 0f 84 a3 00 00 00 je 113908 <rtems_message_queue_create+0xc4>
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
113865: 85 f6 test %esi,%esi
113867: 74 13 je 11387c <rtems_message_queue_create+0x38>
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
113869: 85 c9 test %ecx,%ecx
11386b: 75 2f jne 11389c <rtems_message_queue_create+0x58>
return RTEMS_INVALID_SIZE;
11386d: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113872: 8d 65 f4 lea -0xc(%ebp),%esp 113875: 5b pop %ebx 113876: 5e pop %esi 113877: 5f pop %edi 113878: c9 leave 113879: c3 ret 11387a: 66 90 xchg %ax,%ax
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
return RTEMS_INVALID_NUMBER;
11387c: b8 0a 00 00 00 mov $0xa,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113881: 8d 65 f4 lea -0xc(%ebp),%esp 113884: 5b pop %ebx 113885: 5e pop %esi 113886: 5f pop %edi 113887: c9 leave 113888: c3 ret 113889: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
11388c: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113891: 8d 65 f4 lea -0xc(%ebp),%esp 113894: 5b pop %ebx 113895: 5e pop %esi 113896: 5f pop %edi 113897: c9 leave 113898: c3 ret 113899: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
11389c: a1 30 f9 12 00 mov 0x12f930,%eax 1138a1: 40 inc %eax 1138a2: a3 30 f9 12 00 mov %eax,0x12f930
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
1138a7: 89 4d d4 mov %ecx,-0x2c(%ebp) 1138aa: e8 51 54 00 00 call 118d00 <_Message_queue_Allocate> 1138af: 89 c2 mov %eax,%edx
if ( !the_message_queue ) {
1138b1: 85 c0 test %eax,%eax 1138b3: 8b 4d d4 mov -0x2c(%ebp),%ecx
1138b6: 74 7c je 113934 <rtems_message_queue_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
1138b8: 8b 45 14 mov 0x14(%ebp),%eax 1138bb: 89 42 10 mov %eax,0x10(%edx)
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
1138be: a8 04 test $0x4,%al 1138c0: 0f 95 c0 setne %al 1138c3: 0f b6 c0 movzbl %al,%eax 1138c6: 89 45 e4 mov %eax,-0x1c(%ebp)
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
1138c9: 51 push %ecx 1138ca: 56 push %esi 1138cb: 8d 45 e4 lea -0x1c(%ebp),%eax 1138ce: 50 push %eax 1138cf: 8d 42 14 lea 0x14(%edx),%eax 1138d2: 50 push %eax 1138d3: 89 55 d4 mov %edx,-0x2c(%ebp) 1138d6: e8 e5 10 00 00 call 1149c0 <_CORE_message_queue_Initialize> 1138db: 83 c4 10 add $0x10,%esp 1138de: 84 c0 test %al,%al 1138e0: 8b 55 d4 mov -0x2c(%ebp),%edx
1138e3: 75 2f jne 113914 <rtems_message_queue_create+0xd0>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
1138e5: 83 ec 08 sub $0x8,%esp 1138e8: 52 push %edx 1138e9: 68 80 fc 12 00 push $0x12fc80 1138ee: e8 89 1e 00 00 call 11577c <_Objects_Free>
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
1138f3: e8 cc 2a 00 00 call 1163c4 <_Thread_Enable_dispatch>
return RTEMS_UNSATISFIED;
1138f8: 83 c4 10 add $0x10,%esp 1138fb: b8 0d 00 00 00 mov $0xd,%eax 113900: e9 6d ff ff ff jmp 113872 <rtems_message_queue_create+0x2e> 113905: 8d 76 00 lea 0x0(%esi),%esi
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
113908: b8 09 00 00 00 mov $0x9,%eax 11390d: e9 60 ff ff ff jmp 113872 <rtems_message_queue_create+0x2e> 113912: 66 90 xchg %ax,%ax
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
113914: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
113917: 0f b7 f0 movzwl %ax,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
11391a: 8b 0d 9c fc 12 00 mov 0x12fc9c,%ecx 113920: 89 14 b1 mov %edx,(%ecx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
113923: 89 5a 0c mov %ebx,0xc(%edx)
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
113926: 89 07 mov %eax,(%edi)
name,
0
);
#endif
_Thread_Enable_dispatch();
113928: e8 97 2a 00 00 call 1163c4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11392d: 31 c0 xor %eax,%eax 11392f: e9 3e ff ff ff jmp 113872 <rtems_message_queue_create+0x2e>
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
if ( !the_message_queue ) {
_Thread_Enable_dispatch();
113934: e8 8b 2a 00 00 call 1163c4 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
113939: b8 05 00 00 00 mov $0x5,%eax 11393e: e9 2f ff ff ff jmp 113872 <rtems_message_queue_create+0x2e>
00116530 <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
rtems_id id
)
{
116530: 55 push %ebp 116531: 89 e5 mov %esp,%ebp 116533: 53 push %ebx 116534: 83 ec 18 sub $0x18,%esp
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
116537: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
11653a: 50 push %eax 11653b: ff 75 08 pushl 0x8(%ebp) 11653e: 68 a0 0d 14 00 push $0x140da0 116543: e8 48 4c 00 00 call 11b190 <_Objects_Get> 116548: 89 c3 mov %eax,%ebx
switch ( location ) {
11654a: 83 c4 10 add $0x10,%esp 11654d: 8b 4d f4 mov -0xc(%ebp),%ecx 116550: 85 c9 test %ecx,%ecx
116552: 75 3c jne 116590 <rtems_message_queue_delete+0x60>
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
116554: 83 ec 08 sub $0x8,%esp 116557: 50 push %eax 116558: 68 a0 0d 14 00 push $0x140da0 11655d: e8 b6 47 00 00 call 11ad18 <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
116562: 83 c4 0c add $0xc,%esp 116565: 6a 05 push $0x5 116567: 6a 00 push $0x0 116569: 8d 43 14 lea 0x14(%ebx),%eax 11656c: 50 push %eax 11656d: e8 92 33 00 00 call 119904 <_CORE_message_queue_Close>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
116572: 58 pop %eax 116573: 5a pop %edx 116574: 53 push %ebx 116575: 68 a0 0d 14 00 push $0x140da0 11657a: e8 95 4a 00 00 call 11b014 <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
11657f: e8 94 56 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116584: 83 c4 10 add $0x10,%esp 116587: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116589: 8b 5d fc mov -0x4(%ebp),%ebx 11658c: c9 leave 11658d: c3 ret 11658e: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116590: b8 04 00 00 00 mov $0x4,%eax
}
116595: 8b 5d fc mov -0x4(%ebp),%ebx 116598: c9 leave 116599: c3 ret
0011659c <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
rtems_id id,
uint32_t *count
)
{
11659c: 55 push %ebp 11659d: 89 e5 mov %esp,%ebp 11659f: 53 push %ebx 1165a0: 83 ec 14 sub $0x14,%esp 1165a3: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
1165a6: 85 db test %ebx,%ebx
1165a8: 74 46 je 1165f0 <rtems_message_queue_flush+0x54>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
1165aa: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
1165ab: 8d 45 f4 lea -0xc(%ebp),%eax 1165ae: 50 push %eax 1165af: ff 75 08 pushl 0x8(%ebp) 1165b2: 68 a0 0d 14 00 push $0x140da0 1165b7: e8 d4 4b 00 00 call 11b190 <_Objects_Get>
switch ( location ) {
1165bc: 83 c4 10 add $0x10,%esp 1165bf: 8b 55 f4 mov -0xc(%ebp),%edx 1165c2: 85 d2 test %edx,%edx
1165c4: 74 0a je 1165d0 <rtems_message_queue_flush+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1165c6: b8 04 00 00 00 mov $0x4,%eax
}
1165cb: 8b 5d fc mov -0x4(%ebp),%ebx 1165ce: c9 leave 1165cf: c3 ret
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
1165d0: 83 ec 0c sub $0xc,%esp 1165d3: 83 c0 14 add $0x14,%eax 1165d6: 50 push %eax 1165d7: e8 64 33 00 00 call 119940 <_CORE_message_queue_Flush> 1165dc: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
1165de: e8 35 56 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1165e3: 83 c4 10 add $0x10,%esp 1165e6: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1165e8: 8b 5d fc mov -0x4(%ebp),%ebx 1165eb: c9 leave 1165ec: c3 ret 1165ed: 8d 76 00 lea 0x0(%esi),%esi
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
return RTEMS_INVALID_ADDRESS;
1165f0: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1165f5: 8b 5d fc mov -0x4(%ebp),%ebx 1165f8: c9 leave 1165f9: c3 ret
001165fc <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
1165fc: 55 push %ebp 1165fd: 89 e5 mov %esp,%ebp 1165ff: 53 push %ebx 116600: 83 ec 14 sub $0x14,%esp 116603: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116606: 85 db test %ebx,%ebx
116608: 74 3a je 116644 <rtems_message_queue_get_number_pending+0x48>
11660a: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
11660b: 8d 45 f4 lea -0xc(%ebp),%eax 11660e: 50 push %eax 11660f: ff 75 08 pushl 0x8(%ebp) 116612: 68 a0 0d 14 00 push $0x140da0 116617: e8 74 4b 00 00 call 11b190 <_Objects_Get>
switch ( location ) {
11661c: 83 c4 10 add $0x10,%esp 11661f: 8b 55 f4 mov -0xc(%ebp),%edx 116622: 85 d2 test %edx,%edx
116624: 74 0a je 116630 <rtems_message_queue_get_number_pending+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116626: b8 04 00 00 00 mov $0x4,%eax
}
11662b: 8b 5d fc mov -0x4(%ebp),%ebx 11662e: c9 leave 11662f: c3 ret
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
116630: 8b 40 5c mov 0x5c(%eax),%eax 116633: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
116635: e8 de 55 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11663a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11663c: 8b 5d fc mov -0x4(%ebp),%ebx 11663f: c9 leave 116640: c3 ret 116641: 8d 76 00 lea 0x0(%esi),%esi
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
return RTEMS_INVALID_ADDRESS;
116644: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116649: 8b 5d fc mov -0x4(%ebp),%ebx 11664c: c9 leave 11664d: c3 ret
00113968 <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
113968: 55 push %ebp 113969: 89 e5 mov %esp,%ebp 11396b: 56 push %esi 11396c: 53 push %ebx 11396d: 83 ec 10 sub $0x10,%esp 113970: 8b 5d 0c mov 0xc(%ebp),%ebx 113973: 8b 75 10 mov 0x10(%ebp),%esi
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
113976: 85 db test %ebx,%ebx
113978: 74 6e je 1139e8 <rtems_message_queue_receive+0x80>
return RTEMS_INVALID_ADDRESS;
if ( !size )
11397a: 85 f6 test %esi,%esi
11397c: 74 6a je 1139e8 <rtems_message_queue_receive+0x80>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
11397e: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
11397f: 8d 45 f4 lea -0xc(%ebp),%eax 113982: 50 push %eax 113983: ff 75 08 pushl 0x8(%ebp) 113986: 68 80 fc 12 00 push $0x12fc80 11398b: e8 2c 1f 00 00 call 1158bc <_Objects_Get>
switch ( location ) {
113990: 83 c4 10 add $0x10,%esp 113993: 8b 55 f4 mov -0xc(%ebp),%edx 113996: 85 d2 test %edx,%edx
113998: 75 42 jne 1139dc <rtems_message_queue_receive+0x74>
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
11399a: 83 ec 08 sub $0x8,%esp 11399d: ff 75 18 pushl 0x18(%ebp)
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
1139a0: 8b 55 14 mov 0x14(%ebp),%edx 1139a3: 83 e2 01 and $0x1,%edx 1139a6: 83 f2 01 xor $0x1,%edx 1139a9: 52 push %edx 1139aa: 56 push %esi 1139ab: 53 push %ebx 1139ac: ff 70 08 pushl 0x8(%eax) 1139af: 83 c0 14 add $0x14,%eax 1139b2: 50 push %eax 1139b3: e8 a8 10 00 00 call 114a60 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
1139b8: 83 c4 20 add $0x20,%esp 1139bb: e8 04 2a 00 00 call 1163c4 <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
1139c0: 83 ec 0c sub $0xc,%esp
_Thread_Executing->Wait.return_code
1139c3: a1 f8 fb 12 00 mov 0x12fbf8,%eax
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
1139c8: ff 70 34 pushl 0x34(%eax) 1139cb: e8 a0 00 00 00 call 113a70 <_Message_queue_Translate_core_message_queue_return_code> 1139d0: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1139d3: 8d 65 f8 lea -0x8(%ebp),%esp 1139d6: 5b pop %ebx 1139d7: 5e pop %esi 1139d8: c9 leave 1139d9: c3 ret 1139da: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1139dc: b8 04 00 00 00 mov $0x4,%eax
}
1139e1: 8d 65 f8 lea -0x8(%ebp),%esp 1139e4: 5b pop %ebx 1139e5: 5e pop %esi 1139e6: c9 leave 1139e7: c3 ret
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
1139e8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1139ed: 8d 65 f8 lea -0x8(%ebp),%esp 1139f0: 5b pop %ebx 1139f1: 5e pop %esi 1139f2: c9 leave 1139f3: c3 ret
0010b3a8 <rtems_message_queue_send>:
rtems_status_code rtems_message_queue_send(
rtems_id id,
const void *buffer,
size_t size
)
{
10b3a8: 55 push %ebp 10b3a9: 89 e5 mov %esp,%ebp 10b3ab: 56 push %esi 10b3ac: 53 push %ebx 10b3ad: 83 ec 10 sub $0x10,%esp 10b3b0: 8b 75 08 mov 0x8(%ebp),%esi 10b3b3: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
10b3b6: 85 db test %ebx,%ebx
10b3b8: 74 5e je 10b418 <rtems_message_queue_send+0x70>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
10b3ba: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
10b3bb: 8d 45 f4 lea -0xc(%ebp),%eax 10b3be: 50 push %eax 10b3bf: 56 push %esi 10b3c0: 68 a0 57 12 00 push $0x1257a0 10b3c5: e8 aa 19 00 00 call 10cd74 <_Objects_Get>
switch ( location ) {
10b3ca: 83 c4 10 add $0x10,%esp 10b3cd: 8b 55 f4 mov -0xc(%ebp),%edx 10b3d0: 85 d2 test %edx,%edx
10b3d2: 74 0c je 10b3e0 <rtems_message_queue_send+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b3d4: b8 04 00 00 00 mov $0x4,%eax
}
10b3d9: 8d 65 f8 lea -0x8(%ebp),%esp 10b3dc: 5b pop %ebx 10b3dd: 5e pop %esi 10b3de: c9 leave 10b3df: c3 ret
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
10b3e0: 6a 00 push $0x0 10b3e2: 6a 00 push $0x0 10b3e4: 68 ff ff ff 7f push $0x7fffffff 10b3e9: 6a 00 push $0x0 10b3eb: 56 push %esi 10b3ec: ff 75 10 pushl 0x10(%ebp) 10b3ef: 53 push %ebx
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_message_queue_Send(
10b3f0: 83 c0 14 add $0x14,%eax 10b3f3: 50 push %eax 10b3f4: e8 f7 0b 00 00 call 10bff0 <_CORE_message_queue_Submit> 10b3f9: 89 c3 mov %eax,%ebx
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
10b3fb: 83 c4 20 add $0x20,%esp 10b3fe: e8 f9 23 00 00 call 10d7fc <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
10b403: 83 ec 0c sub $0xc,%esp 10b406: 53 push %ebx 10b407: e8 18 00 00 00 call 10b424 <_Message_queue_Translate_core_message_queue_return_code> 10b40c: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b40f: 8d 65 f8 lea -0x8(%ebp),%esp 10b412: 5b pop %ebx 10b413: 5e pop %esi 10b414: c9 leave 10b415: c3 ret 10b416: 66 90 xchg %ax,%ax
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
10b418: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b41d: 8d 65 f8 lea -0x8(%ebp),%esp 10b420: 5b pop %ebx 10b421: 5e pop %esi 10b422: c9 leave 10b423: c3 ret
0011678c <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
rtems_id id,
const void *buffer,
size_t size
)
{
11678c: 55 push %ebp 11678d: 89 e5 mov %esp,%ebp 11678f: 56 push %esi 116790: 53 push %ebx 116791: 83 ec 10 sub $0x10,%esp 116794: 8b 75 08 mov 0x8(%ebp),%esi 116797: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
11679a: 85 db test %ebx,%ebx
11679c: 74 5e je 1167fc <rtems_message_queue_urgent+0x70>
11679e: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
11679f: 8d 45 f4 lea -0xc(%ebp),%eax 1167a2: 50 push %eax 1167a3: 56 push %esi 1167a4: 68 a0 0d 14 00 push $0x140da0 1167a9: e8 e2 49 00 00 call 11b190 <_Objects_Get>
switch ( location ) {
1167ae: 83 c4 10 add $0x10,%esp 1167b1: 8b 55 f4 mov -0xc(%ebp),%edx 1167b4: 85 d2 test %edx,%edx
1167b6: 74 0c je 1167c4 <rtems_message_queue_urgent+0x38>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1167b8: b8 04 00 00 00 mov $0x4,%eax
}
1167bd: 8d 65 f8 lea -0x8(%ebp),%esp 1167c0: 5b pop %ebx 1167c1: 5e pop %esi 1167c2: c9 leave 1167c3: c3 ret
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
1167c4: 6a 00 push $0x0 1167c6: 6a 00 push $0x0 1167c8: 68 00 00 00 80 push $0x80000000 1167cd: 6a 00 push $0x0 1167cf: 56 push %esi 1167d0: ff 75 10 pushl 0x10(%ebp) 1167d3: 53 push %ebx
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_message_queue_Urgent(
1167d4: 83 c0 14 add $0x14,%eax 1167d7: 50 push %eax 1167d8: e8 3f 33 00 00 call 119b1c <_CORE_message_queue_Submit> 1167dd: 89 c3 mov %eax,%ebx
id,
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
1167df: 83 c4 20 add $0x20,%esp 1167e2: e8 31 54 00 00 call 11bc18 <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
1167e7: 83 ec 0c sub $0xc,%esp 1167ea: 53 push %ebx 1167eb: e8 8c ff ff ff call 11677c <_Message_queue_Translate_core_message_queue_return_code> 1167f0: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1167f3: 8d 65 f8 lea -0x8(%ebp),%esp 1167f6: 5b pop %ebx 1167f7: 5e pop %esi 1167f8: c9 leave 1167f9: c3 ret 1167fa: 66 90 xchg %ax,%ax
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
1167fc: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116801: 8d 65 f8 lea -0x8(%ebp),%esp 116804: 5b pop %ebx 116805: 5e pop %esi 116806: c9 leave 116807: c3 ret
0010cea0 <rtems_object_get_api_class_name>:
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
10cea0: 55 push %ebp 10cea1: 89 e5 mov %esp,%ebp 10cea3: 83 ec 08 sub $0x8,%esp 10cea6: 8b 45 08 mov 0x8(%ebp),%eax
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
10cea9: 83 f8 01 cmp $0x1,%eax
10ceac: 74 2a je 10ced8 <rtems_object_get_api_class_name+0x38>
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
10ceae: 83 f8 02 cmp $0x2,%eax
10ceb1: 74 09 je 10cebc <rtems_object_get_api_class_name+0x1c>
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
10ceb3: b8 9b 30 12 00 mov $0x12309b,%eax
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
}
10ceb8: c9 leave 10ceb9: c3 ret 10ceba: 66 90 xchg %ax,%ax
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
10cebc: b8 a0 71 12 00 mov $0x1271a0,%eax
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
10cec1: 83 ec 08 sub $0x8,%esp 10cec4: ff 75 0c pushl 0xc(%ebp) 10cec7: 50 push %eax 10cec8: e8 43 4a 00 00 call 111910 <rtems_assoc_ptr_by_local>
if ( class_assoc )
10cecd: 83 c4 10 add $0x10,%esp 10ced0: 85 c0 test %eax,%eax
10ced2: 74 0c je 10cee0 <rtems_object_get_api_class_name+0x40>
return class_assoc->name;
10ced4: 8b 00 mov (%eax),%eax
return "BAD CLASS"; }
10ced6: c9 leave 10ced7: c3 ret
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
10ced8: b8 80 71 12 00 mov $0x127180,%eax 10cedd: eb e2 jmp 10cec1 <rtems_object_get_api_class_name+0x21> 10cedf: 90 nop
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
10cee0: b8 a3 30 12 00 mov $0x1230a3,%eax
}
10cee5: c9 leave 10cee6: c3 ret
0010cee8 <rtems_object_get_api_name>:
};
const char *rtems_object_get_api_name(
int api
)
{
10cee8: 55 push %ebp 10cee9: 89 e5 mov %esp,%ebp 10ceeb: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
10ceee: ff 75 08 pushl 0x8(%ebp) 10cef1: 68 20 72 12 00 push $0x127220 10cef6: e8 15 4a 00 00 call 111910 <rtems_assoc_ptr_by_local>
if ( api_assoc )
10cefb: 83 c4 10 add $0x10,%esp 10cefe: 85 c0 test %eax,%eax
10cf00: 74 06 je 10cf08 <rtems_object_get_api_name+0x20>
return api_assoc->name;
10cf02: 8b 00 mov (%eax),%eax
return "BAD CLASS"; }
10cf04: c9 leave 10cf05: c3 ret 10cf06: 66 90 xchg %ax,%ax
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
if ( api_assoc )
return api_assoc->name;
return "BAD CLASS";
10cf08: b8 a3 30 12 00 mov $0x1230a3,%eax
}
10cf0d: c9 leave 10cf0e: c3 ret
0010cf50 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
10cf50: 55 push %ebp 10cf51: 89 e5 mov %esp,%ebp 10cf53: 57 push %edi 10cf54: 56 push %esi 10cf55: 53 push %ebx 10cf56: 83 ec 0c sub $0xc,%esp 10cf59: 8b 5d 10 mov 0x10(%ebp),%ebx
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10cf5c: 85 db test %ebx,%ebx
10cf5e: 74 60 je 10cfc0 <rtems_object_get_class_information+0x70>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
10cf60: 83 ec 08 sub $0x8,%esp 10cf63: 0f b7 45 0c movzwl 0xc(%ebp),%eax 10cf67: 50 push %eax 10cf68: ff 75 08 pushl 0x8(%ebp) 10cf6b: e8 88 1a 00 00 call 10e9f8 <_Objects_Get_information>
if ( !obj_info )
10cf70: 83 c4 10 add $0x10,%esp 10cf73: 85 c0 test %eax,%eax
10cf75: 74 59 je 10cfd0 <rtems_object_get_class_information+0x80>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
10cf77: 8b 50 08 mov 0x8(%eax),%edx 10cf7a: 89 13 mov %edx,(%ebx)
info->maximum_id = obj_info->maximum_id;
10cf7c: 8b 50 0c mov 0xc(%eax),%edx 10cf7f: 89 53 04 mov %edx,0x4(%ebx)
info->auto_extend = obj_info->auto_extend;
10cf82: 8a 50 12 mov 0x12(%eax),%dl 10cf85: 88 53 0c mov %dl,0xc(%ebx)
info->maximum = obj_info->maximum;
10cf88: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cf8c: 89 73 08 mov %esi,0x8(%ebx)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10cf8f: 85 f6 test %esi,%esi
10cf91: 74 44 je 10cfd7 <rtems_object_get_class_information+0x87><== NEVER TAKEN
10cf93: 8b 78 1c mov 0x1c(%eax),%edi 10cf96: b9 01 00 00 00 mov $0x1,%ecx 10cf9b: b8 01 00 00 00 mov $0x1,%eax 10cfa0: 31 d2 xor %edx,%edx 10cfa2: 66 90 xchg %ax,%ax
if ( !obj_info->local_table[i] )
unallocated++;
10cfa4: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cfa8: 83 d2 00 adc $0x0,%edx
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10cfab: 40 inc %eax 10cfac: 89 c1 mov %eax,%ecx 10cfae: 39 c6 cmp %eax,%esi
10cfb0: 73 f2 jae 10cfa4 <rtems_object_get_class_information+0x54>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
10cfb2: 89 53 10 mov %edx,0x10(%ebx)
return RTEMS_SUCCESSFUL;
10cfb5: 31 c0 xor %eax,%eax
}
10cfb7: 8d 65 f4 lea -0xc(%ebp),%esp 10cfba: 5b pop %ebx 10cfbb: 5e pop %esi 10cfbc: 5f pop %edi 10cfbd: c9 leave 10cfbe: c3 ret 10cfbf: 90 nop
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
10cfc0: b8 09 00 00 00 mov $0x9,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10cfc5: 8d 65 f4 lea -0xc(%ebp),%esp 10cfc8: 5b pop %ebx 10cfc9: 5e pop %esi 10cfca: 5f pop %edi 10cfcb: c9 leave 10cfcc: c3 ret 10cfcd: 8d 76 00 lea 0x0(%esi),%esi
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
10cfd0: b8 0a 00 00 00 mov $0xa,%eax 10cfd5: eb e0 jmp 10cfb7 <rtems_object_get_class_information+0x67>
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10cfd7: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cfd9: eb d7 jmp 10cfb2 <rtems_object_get_class_information+0x62><== NOT EXECUTED
0010c50c <rtems_object_get_classic_name>:
rtems_status_code rtems_object_get_classic_name(
rtems_id id,
rtems_name *name
)
{
10c50c: 55 push %ebp 10c50d: 89 e5 mov %esp,%ebp 10c50f: 53 push %ebx 10c510: 83 ec 14 sub $0x14,%esp 10c513: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
10c516: 85 db test %ebx,%ebx
10c518: 74 26 je 10c540 <rtems_object_get_classic_name+0x34>
return RTEMS_INVALID_ADDRESS;
status = _Objects_Id_to_name( id, &name_u );
10c51a: 83 ec 08 sub $0x8,%esp 10c51d: 8d 45 f4 lea -0xc(%ebp),%eax 10c520: 50 push %eax 10c521: ff 75 08 pushl 0x8(%ebp) 10c524: e8 e3 1a 00 00 call 10e00c <_Objects_Id_to_name>
*name = name_u.name_u32;
10c529: 8b 55 f4 mov -0xc(%ebp),%edx 10c52c: 89 13 mov %edx,(%ebx)
return _Status_Object_name_errors_to_status[ status ];
10c52e: 8b 04 85 8c 1b 12 00 mov 0x121b8c(,%eax,4),%eax 10c535: 83 c4 10 add $0x10,%esp
}
10c538: 8b 5d fc mov -0x4(%ebp),%ebx 10c53b: c9 leave 10c53c: c3 ret 10c53d: 8d 76 00 lea 0x0(%esi),%esi
{
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
return RTEMS_INVALID_ADDRESS;
10c540: b8 09 00 00 00 mov $0x9,%eax
status = _Objects_Id_to_name( id, &name_u );
*name = name_u.name_u32;
return _Status_Object_name_errors_to_status[ status ];
}
10c545: 8b 5d fc mov -0x4(%ebp),%ebx 10c548: c9 leave 10c549: c3 ret
0010d034 <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
10d034: 55 push %ebp 10d035: 89 e5 mov %esp,%ebp 10d037: 57 push %edi 10d038: 56 push %esi 10d039: 53 push %ebx 10d03a: 83 ec 1c sub $0x1c,%esp 10d03d: 8b 75 08 mov 0x8(%ebp),%esi 10d040: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
10d043: 85 ff test %edi,%edi
10d045: 74 61 je 10d0a8 <rtems_object_set_name+0x74>
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10d047: 85 f6 test %esi,%esi
10d049: 74 35 je 10d080 <rtems_object_set_name+0x4c>
information = _Objects_Get_information_id( tmpId );
10d04b: 83 ec 0c sub $0xc,%esp 10d04e: 56 push %esi 10d04f: e8 84 19 00 00 call 10e9d8 <_Objects_Get_information_id> 10d054: 89 c3 mov %eax,%ebx
if ( !information )
10d056: 83 c4 10 add $0x10,%esp 10d059: 85 c0 test %eax,%eax
10d05b: 74 16 je 10d073 <rtems_object_set_name+0x3f>
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
10d05d: 50 push %eax 10d05e: 8d 45 e4 lea -0x1c(%ebp),%eax 10d061: 50 push %eax 10d062: 56 push %esi 10d063: 53 push %ebx 10d064: e8 0b 1b 00 00 call 10eb74 <_Objects_Get>
switch ( location ) {
10d069: 83 c4 10 add $0x10,%esp 10d06c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d06f: 85 c9 test %ecx,%ecx
10d071: 74 19 je 10d08c <rtems_object_set_name+0x58>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d073: b8 04 00 00 00 mov $0x4,%eax
}
10d078: 8d 65 f4 lea -0xc(%ebp),%esp 10d07b: 5b pop %ebx 10d07c: 5e pop %esi 10d07d: 5f pop %edi 10d07e: c9 leave 10d07f: c3 ret
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10d080: a1 58 98 12 00 mov 0x129858,%eax 10d085: 8b 70 08 mov 0x8(%eax),%esi 10d088: eb c1 jmp 10d04b <rtems_object_set_name+0x17> 10d08a: 66 90 xchg %ax,%ax
the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
10d08c: 52 push %edx 10d08d: 57 push %edi 10d08e: 50 push %eax 10d08f: 53 push %ebx 10d090: e8 17 1d 00 00 call 10edac <_Objects_Set_name>
_Thread_Enable_dispatch();
10d095: e8 4a 26 00 00 call 10f6e4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d09a: 83 c4 10 add $0x10,%esp 10d09d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d09f: 8d 65 f4 lea -0xc(%ebp),%esp 10d0a2: 5b pop %ebx 10d0a3: 5e pop %esi 10d0a4: 5f pop %edi 10d0a5: c9 leave 10d0a6: c3 ret 10d0a7: 90 nop
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
10d0a8: b8 09 00 00 00 mov $0x9,%eax 10d0ad: eb c9 jmp 10d078 <rtems_object_set_name+0x44>
00116808 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
116808: 55 push %ebp 116809: 89 e5 mov %esp,%ebp 11680b: 57 push %edi 11680c: 56 push %esi 11680d: 53 push %ebx 11680e: 83 ec 1c sub $0x1c,%esp 116811: 8b 5d 08 mov 0x8(%ebp),%ebx 116814: 8b 75 0c mov 0xc(%ebp),%esi 116817: 8b 55 10 mov 0x10(%ebp),%edx 11681a: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
11681d: 85 db test %ebx,%ebx
11681f: 74 47 je 116868 <rtems_partition_create+0x60>
return RTEMS_INVALID_NAME;
if ( !starting_address )
116821: 85 f6 test %esi,%esi
116823: 74 23 je 116848 <rtems_partition_create+0x40>
return RTEMS_INVALID_ADDRESS;
if ( !id )
116825: 8b 45 1c mov 0x1c(%ebp),%eax 116828: 85 c0 test %eax,%eax
11682a: 74 1c je 116848 <rtems_partition_create+0x40><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
11682c: 85 d2 test %edx,%edx
11682e: 74 28 je 116858 <rtems_partition_create+0x50>
116830: 85 ff test %edi,%edi
116832: 74 24 je 116858 <rtems_partition_create+0x50>
116834: 39 fa cmp %edi,%edx
116836: 72 20 jb 116858 <rtems_partition_create+0x50>
116838: f7 c7 03 00 00 00 test $0x3,%edi
11683e: 75 18 jne 116858 <rtems_partition_create+0x50>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
116840: f7 c6 03 00 00 00 test $0x3,%esi
116846: 74 30 je 116878 <rtems_partition_create+0x70>
return RTEMS_INVALID_ADDRESS;
116848: b8 09 00 00 00 mov $0x9,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11684d: 8d 65 f4 lea -0xc(%ebp),%esp 116850: 5b pop %ebx 116851: 5e pop %esi 116852: 5f pop %edi 116853: c9 leave 116854: c3 ret 116855: 8d 76 00 lea 0x0(%esi),%esi
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;
116858: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11685d: 8d 65 f4 lea -0xc(%ebp),%esp 116860: 5b pop %ebx 116861: 5e pop %esi 116862: 5f pop %edi 116863: c9 leave 116864: c3 ret 116865: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
116868: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11686d: 8d 65 f4 lea -0xc(%ebp),%esp 116870: 5b pop %ebx 116871: 5e pop %esi 116872: 5f pop %edi 116873: c9 leave 116874: c3 ret 116875: 8d 76 00 lea 0x0(%esi),%esi 116878: a1 50 0a 14 00 mov 0x140a50,%eax 11687d: 40 inc %eax 11687e: a3 50 0a 14 00 mov %eax,0x140a50
* 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 );
116883: 83 ec 0c sub $0xc,%esp 116886: 68 e0 08 14 00 push $0x1408e0 11688b: 89 55 e0 mov %edx,-0x20(%ebp) 11688e: e8 09 44 00 00 call 11ac9c <_Objects_Allocate> 116893: 89 45 e4 mov %eax,-0x1c(%ebp)
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
116896: 83 c4 10 add $0x10,%esp 116899: 85 c0 test %eax,%eax 11689b: 8b 55 e0 mov -0x20(%ebp),%edx
11689e: 74 58 je 1168f8 <rtems_partition_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
1168a0: 8b 45 e4 mov -0x1c(%ebp),%eax 1168a3: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
1168a6: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
1168a9: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
1168ac: 8b 4d 18 mov 0x18(%ebp),%ecx 1168af: 89 48 1c mov %ecx,0x1c(%eax)
the_partition->number_of_used_blocks = 0;
1168b2: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
_Chain_Initialize( &the_partition->Memory, starting_address,
1168b9: 57 push %edi 1168ba: 89 d0 mov %edx,%eax 1168bc: 31 d2 xor %edx,%edx 1168be: f7 f7 div %edi 1168c0: 50 push %eax 1168c1: 56 push %esi 1168c2: 8b 45 e4 mov -0x1c(%ebp),%eax 1168c5: 83 c0 24 add $0x24,%eax 1168c8: 50 push %eax 1168c9: e8 56 2f 00 00 call 119824 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
1168ce: 8b 7d e4 mov -0x1c(%ebp),%edi 1168d1: 8b 47 08 mov 0x8(%edi),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
1168d4: 0f b7 f0 movzwl %ax,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1168d7: 8b 15 fc 08 14 00 mov 0x1408fc,%edx 1168dd: 89 3c b2 mov %edi,(%edx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1168e0: 89 5f 0c mov %ebx,0xc(%edi)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
1168e3: 8b 55 1c mov 0x1c(%ebp),%edx 1168e6: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
1168e8: e8 2b 53 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1168ed: 83 c4 10 add $0x10,%esp 1168f0: 31 c0 xor %eax,%eax 1168f2: e9 66 ff ff ff jmp 11685d <rtems_partition_create+0x55> 1168f7: 90 nop
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
1168f8: e8 1b 53 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
1168fd: b8 05 00 00 00 mov $0x5,%eax 116902: e9 56 ff ff ff jmp 11685d <rtems_partition_create+0x55>
00116974 <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
rtems_id id,
void **buffer
)
{
116974: 55 push %ebp 116975: 89 e5 mov %esp,%ebp 116977: 56 push %esi 116978: 53 push %ebx 116979: 83 ec 20 sub $0x20,%esp 11697c: 8b 5d 0c mov 0xc(%ebp),%ebx
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
11697f: 85 db test %ebx,%ebx
116981: 74 59 je 1169dc <rtems_partition_get_buffer+0x68>
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
116983: 52 push %edx
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
116984: 8d 45 f4 lea -0xc(%ebp),%eax 116987: 50 push %eax 116988: ff 75 08 pushl 0x8(%ebp) 11698b: 68 e0 08 14 00 push $0x1408e0 116990: e8 fb 47 00 00 call 11b190 <_Objects_Get> 116995: 89 c6 mov %eax,%esi
switch ( location ) {
116997: 83 c4 10 add $0x10,%esp 11699a: 8b 45 f4 mov -0xc(%ebp),%eax 11699d: 85 c0 test %eax,%eax
11699f: 75 2f jne 1169d0 <rtems_partition_get_buffer+0x5c>
*/
RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
Partition_Control *the_partition
)
{
return _Chain_Get( &the_partition->Memory );
1169a1: 83 ec 0c sub $0xc,%esp 1169a4: 8d 46 24 lea 0x24(%esi),%eax 1169a7: 50 push %eax 1169a8: e8 53 2e 00 00 call 119800 <_Chain_Get>
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
1169ad: 83 c4 10 add $0x10,%esp 1169b0: 85 c0 test %eax,%eax
1169b2: 74 34 je 1169e8 <rtems_partition_get_buffer+0x74>
the_partition->number_of_used_blocks += 1;
1169b4: ff 46 20 incl 0x20(%esi)
_Thread_Enable_dispatch();
1169b7: 89 45 e4 mov %eax,-0x1c(%ebp) 1169ba: e8 59 52 00 00 call 11bc18 <_Thread_Enable_dispatch>
*buffer = the_buffer;
1169bf: 8b 45 e4 mov -0x1c(%ebp),%eax 1169c2: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
1169c4: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1169c6: 8d 65 f8 lea -0x8(%ebp),%esp 1169c9: 5b pop %ebx 1169ca: 5e pop %esi 1169cb: c9 leave 1169cc: c3 ret 1169cd: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1169d0: b8 04 00 00 00 mov $0x4,%eax
}
1169d5: 8d 65 f8 lea -0x8(%ebp),%esp 1169d8: 5b pop %ebx 1169d9: 5e pop %esi 1169da: c9 leave 1169db: c3 ret
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
1169dc: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1169e1: 8d 65 f8 lea -0x8(%ebp),%esp 1169e4: 5b pop %ebx 1169e5: 5e pop %esi 1169e6: c9 leave 1169e7: c3 ret
the_partition->number_of_used_blocks += 1;
_Thread_Enable_dispatch();
*buffer = the_buffer;
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
1169e8: e8 2b 52 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_UNSATISFIED;
1169ed: b8 0d 00 00 00 mov $0xd,%eax 1169f2: eb e1 jmp 1169d5 <rtems_partition_get_buffer+0x61>
00116a18 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
116a18: 55 push %ebp 116a19: 89 e5 mov %esp,%ebp 116a1b: 56 push %esi 116a1c: 53 push %ebx 116a1d: 83 ec 14 sub $0x14,%esp 116a20: 8b 75 0c mov 0xc(%ebp),%esi
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
116a23: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
116a26: 50 push %eax 116a27: ff 75 08 pushl 0x8(%ebp) 116a2a: 68 e0 08 14 00 push $0x1408e0 116a2f: e8 5c 47 00 00 call 11b190 <_Objects_Get> 116a34: 89 c3 mov %eax,%ebx
switch ( location ) {
116a36: 83 c4 10 add $0x10,%esp 116a39: 8b 45 f4 mov -0xc(%ebp),%eax 116a3c: 85 c0 test %eax,%eax
116a3e: 74 0c je 116a4c <rtems_partition_return_buffer+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116a40: b8 04 00 00 00 mov $0x4,%eax
}
116a45: 8d 65 f8 lea -0x8(%ebp),%esp 116a48: 5b pop %ebx 116a49: 5e pop %esi 116a4a: c9 leave 116a4b: c3 ret
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
116a4c: 8b 43 10 mov 0x10(%ebx),%eax
ending = _Addresses_Add_offset( starting, the_partition->length );
116a4f: 8b 53 14 mov 0x14(%ebx),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
116a52: 39 c6 cmp %eax,%esi
116a54: 72 3a jb 116a90 <rtems_partition_return_buffer+0x78>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
116a56: 8d 14 10 lea (%eax,%edx,1),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
116a59: 39 d6 cmp %edx,%esi
116a5b: 77 33 ja 116a90 <rtems_partition_return_buffer+0x78><== NEVER TAKEN
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
116a5d: 89 f2 mov %esi,%edx 116a5f: 29 c2 sub %eax,%edx 116a61: 89 d0 mov %edx,%eax
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
116a63: 31 d2 xor %edx,%edx 116a65: f7 73 18 divl 0x18(%ebx)
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
116a68: 85 d2 test %edx,%edx
116a6a: 75 24 jne 116a90 <rtems_partition_return_buffer+0x78>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
116a6c: 83 ec 08 sub $0x8,%esp 116a6f: 56 push %esi 116a70: 8d 43 24 lea 0x24(%ebx),%eax 116a73: 50 push %eax 116a74: e8 4b 2d 00 00 call 1197c4 <_Chain_Append>
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
116a79: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
116a7c: e8 97 51 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116a81: 83 c4 10 add $0x10,%esp 116a84: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116a86: 8d 65 f8 lea -0x8(%ebp),%esp 116a89: 5b pop %ebx 116a8a: 5e pop %esi 116a8b: c9 leave 116a8c: c3 ret 116a8d: 8d 76 00 lea 0x0(%esi),%esi
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
116a90: e8 83 51 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
116a95: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116a9a: 8d 65 f8 lea -0x8(%ebp),%esp 116a9d: 5b pop %ebx 116a9e: 5e pop %esi 116a9f: c9 leave 116aa0: c3 ret
00115e3c <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
115e3c: 55 push %ebp 115e3d: 89 e5 mov %esp,%ebp 115e3f: 57 push %edi 115e40: 56 push %esi 115e41: 53 push %ebx 115e42: 83 ec 1c sub $0x1c,%esp 115e45: 8b 5d 08 mov 0x8(%ebp),%ebx 115e48: 8b 55 0c mov 0xc(%ebp),%edx 115e4b: 8b 7d 10 mov 0x10(%ebp),%edi 115e4e: 8b 75 18 mov 0x18(%ebp),%esi
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
115e51: 85 db test %ebx,%ebx
115e53: 74 1b je 115e70 <rtems_port_create+0x34>
return RTEMS_INVALID_NAME;
if ( !id )
115e55: 85 f6 test %esi,%esi
115e57: 74 08 je 115e61 <rtems_port_create+0x25>
* id - port id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_port_create(
115e59: 89 f8 mov %edi,%eax 115e5b: 09 d0 or %edx,%eax
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
115e5d: a8 03 test $0x3,%al
115e5f: 74 1f je 115e80 <rtems_port_create+0x44>
!_Addresses_Is_aligned( external_start ) )
return RTEMS_INVALID_ADDRESS;
115e61: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
115e66: 8d 65 f4 lea -0xc(%ebp),%esp 115e69: 5b pop %ebx 115e6a: 5e pop %esi 115e6b: 5f pop %edi 115e6c: c9 leave 115e6d: c3 ret 115e6e: 66 90 xchg %ax,%ax
)
{
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
115e70: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
115e75: 8d 65 f4 lea -0xc(%ebp),%esp 115e78: 5b pop %ebx 115e79: 5e pop %esi 115e7a: 5f pop %edi 115e7b: c9 leave 115e7c: c3 ret 115e7d: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
115e80: a1 50 0a 14 00 mov 0x140a50,%eax 115e85: 40 inc %eax 115e86: a3 50 0a 14 00 mov %eax,0x140a50
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
_Objects_Allocate( &_Dual_ported_memory_Information );
115e8b: 83 ec 0c sub $0xc,%esp 115e8e: 68 a0 08 14 00 push $0x1408a0 115e93: 89 55 e4 mov %edx,-0x1c(%ebp) 115e96: e8 01 4e 00 00 call 11ac9c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
115e9b: 83 c4 10 add $0x10,%esp 115e9e: 85 c0 test %eax,%eax 115ea0: 8b 55 e4 mov -0x1c(%ebp),%edx
115ea3: 74 33 je 115ed8 <rtems_port_create+0x9c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
115ea5: 89 50 10 mov %edx,0x10(%eax)
the_port->external_base = external_start;
115ea8: 89 78 14 mov %edi,0x14(%eax)
the_port->length = length - 1;
115eab: 8b 55 14 mov 0x14(%ebp),%edx 115eae: 4a dec %edx 115eaf: 89 50 18 mov %edx,0x18(%eax)
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
115eb2: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
115eb5: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
115eb8: 8b 0d bc 08 14 00 mov 0x1408bc,%ecx 115ebe: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
115ec1: 89 58 0c mov %ebx,0xc(%eax)
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
115ec4: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
115ec6: e8 4d 5d 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115ecb: 31 c0 xor %eax,%eax
}
115ecd: 8d 65 f4 lea -0xc(%ebp),%esp 115ed0: 5b pop %ebx 115ed1: 5e pop %esi 115ed2: 5f pop %edi 115ed3: c9 leave 115ed4: c3 ret 115ed5: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
_Thread_Enable_dispatch();
115ed8: e8 3b 5d 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
115edd: b8 05 00 00 00 mov $0x5,%eax 115ee2: eb 82 jmp 115e66 <rtems_port_create+0x2a>
00115ee4 <rtems_port_delete>:
*/
rtems_status_code rtems_port_delete(
rtems_id id
)
{
115ee4: 55 push %ebp 115ee5: 89 e5 mov %esp,%ebp 115ee7: 83 ec 2c sub $0x2c,%esp
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
115eea: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
_Objects_Get( &_Dual_ported_memory_Information, id, location );
115eed: 50 push %eax 115eee: ff 75 08 pushl 0x8(%ebp) 115ef1: 68 a0 08 14 00 push $0x1408a0 115ef6: e8 95 52 00 00 call 11b190 <_Objects_Get>
switch ( location ) {
115efb: 83 c4 10 add $0x10,%esp 115efe: 8b 4d f4 mov -0xc(%ebp),%ecx 115f01: 85 c9 test %ecx,%ecx
115f03: 75 2f jne 115f34 <rtems_port_delete+0x50>
case OBJECTS_LOCAL:
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
115f05: 83 ec 08 sub $0x8,%esp 115f08: 50 push %eax 115f09: 68 a0 08 14 00 push $0x1408a0 115f0e: 89 45 e4 mov %eax,-0x1c(%ebp) 115f11: e8 02 4e 00 00 call 11ad18 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free (
Dual_ported_memory_Control *the_port
)
{
_Objects_Free( &_Dual_ported_memory_Information, &the_port->Object );
115f16: 58 pop %eax 115f17: 5a pop %edx 115f18: 8b 45 e4 mov -0x1c(%ebp),%eax 115f1b: 50 push %eax 115f1c: 68 a0 08 14 00 push $0x1408a0 115f21: e8 ee 50 00 00 call 11b014 <_Objects_Free>
_Dual_ported_memory_Free( the_port );
_Thread_Enable_dispatch();
115f26: e8 ed 5c 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115f2b: 83 c4 10 add $0x10,%esp 115f2e: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115f30: c9 leave 115f31: c3 ret 115f32: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115f34: b8 04 00 00 00 mov $0x4,%eax
}
115f39: c9 leave 115f3a: c3 ret
00115f3c <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
rtems_id id,
void *external,
void **internal
)
{
115f3c: 55 push %ebp 115f3d: 89 e5 mov %esp,%ebp 115f3f: 56 push %esi 115f40: 53 push %ebx 115f41: 83 ec 10 sub $0x10,%esp 115f44: 8b 75 0c mov 0xc(%ebp),%esi 115f47: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
115f4a: 85 db test %ebx,%ebx
115f4c: 74 4e je 115f9c <rtems_port_external_to_internal+0x60>
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
_Objects_Get( &_Dual_ported_memory_Information, id, location );
115f4e: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
115f4f: 8d 45 f4 lea -0xc(%ebp),%eax 115f52: 50 push %eax 115f53: ff 75 08 pushl 0x8(%ebp) 115f56: 68 a0 08 14 00 push $0x1408a0 115f5b: e8 30 52 00 00 call 11b190 <_Objects_Get>
switch ( location ) {
115f60: 83 c4 10 add $0x10,%esp 115f63: 8b 55 f4 mov -0xc(%ebp),%edx 115f66: 85 d2 test %edx,%edx
115f68: 74 0e je 115f78 <rtems_port_external_to_internal+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115f6a: b8 04 00 00 00 mov $0x4,%eax
}
115f6f: 8d 65 f8 lea -0x8(%ebp),%esp 115f72: 5b pop %ebx 115f73: 5e pop %esi 115f74: c9 leave 115f75: c3 ret 115f76: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
115f78: 89 f2 mov %esi,%edx 115f7a: 2b 50 14 sub 0x14(%eax),%edx
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
115f7d: 3b 50 18 cmp 0x18(%eax),%edx
115f80: 77 16 ja 115f98 <rtems_port_external_to_internal+0x5c>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
115f82: 03 50 10 add 0x10(%eax),%edx 115f85: 89 13 mov %edx,(%ebx)
*internal = external;
else
*internal = _Addresses_Add_offset( the_port->internal_base,
ending );
_Thread_Enable_dispatch();
115f87: e8 8c 5c 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115f8c: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115f8e: 8d 65 f8 lea -0x8(%ebp),%esp 115f91: 5b pop %ebx 115f92: 5e pop %esi 115f93: c9 leave 115f94: c3 ret 115f95: 8d 76 00 lea 0x0(%esi),%esi
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
*internal = external;
115f98: 89 33 mov %esi,(%ebx) 115f9a: eb eb jmp 115f87 <rtems_port_external_to_internal+0x4b>
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
return RTEMS_INVALID_ADDRESS;
115f9c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115fa1: 8d 65 f8 lea -0x8(%ebp),%esp 115fa4: 5b pop %ebx 115fa5: 5e pop %esi 115fa6: c9 leave 115fa7: c3 ret
00115fcc <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
rtems_id id,
void *internal,
void **external
)
{
115fcc: 55 push %ebp 115fcd: 89 e5 mov %esp,%ebp 115fcf: 56 push %esi 115fd0: 53 push %ebx 115fd1: 83 ec 10 sub $0x10,%esp 115fd4: 8b 75 0c mov 0xc(%ebp),%esi 115fd7: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
115fda: 85 db test %ebx,%ebx
115fdc: 74 4e je 11602c <rtems_port_internal_to_external+0x60><== NEVER TAKEN
115fde: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
115fdf: 8d 45 f4 lea -0xc(%ebp),%eax 115fe2: 50 push %eax 115fe3: ff 75 08 pushl 0x8(%ebp) 115fe6: 68 a0 08 14 00 push $0x1408a0 115feb: e8 a0 51 00 00 call 11b190 <_Objects_Get>
switch ( location ) {
115ff0: 83 c4 10 add $0x10,%esp 115ff3: 8b 55 f4 mov -0xc(%ebp),%edx 115ff6: 85 d2 test %edx,%edx
115ff8: 74 0e je 116008 <rtems_port_internal_to_external+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115ffa: b8 04 00 00 00 mov $0x4,%eax
}
115fff: 8d 65 f8 lea -0x8(%ebp),%esp 116002: 5b pop %ebx 116003: 5e pop %esi 116004: c9 leave 116005: c3 ret 116006: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
116008: 89 f2 mov %esi,%edx 11600a: 2b 50 10 sub 0x10(%eax),%edx
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
11600d: 3b 50 18 cmp 0x18(%eax),%edx
116010: 77 16 ja 116028 <rtems_port_internal_to_external+0x5c>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
116012: 03 50 14 add 0x14(%eax),%edx 116015: 89 13 mov %edx,(%ebx)
*external = internal;
else
*external = _Addresses_Add_offset( the_port->external_base,
ending );
_Thread_Enable_dispatch();
116017: e8 fc 5b 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11601c: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11601e: 8d 65 f8 lea -0x8(%ebp),%esp 116021: 5b pop %ebx 116022: 5e pop %esi 116023: c9 leave 116024: c3 ret 116025: 8d 76 00 lea 0x0(%esi),%esi
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
*external = internal;
116028: 89 33 mov %esi,(%ebx) 11602a: eb eb jmp 116017 <rtems_port_internal_to_external+0x4b>
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
return RTEMS_INVALID_ADDRESS;
11602c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116031: 8d 65 f8 lea -0x8(%ebp),%esp 116034: 5b pop %ebx 116035: 5e pop %esi 116036: c9 leave 116037: c3 ret
00116aa4 <rtems_rate_monotonic_cancel>:
*/
rtems_status_code rtems_rate_monotonic_cancel(
rtems_id id
)
{
116aa4: 55 push %ebp 116aa5: 89 e5 mov %esp,%ebp 116aa7: 53 push %ebx 116aa8: 83 ec 18 sub $0x18,%esp
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
116aab: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
116aae: 50 push %eax 116aaf: ff 75 08 pushl 0x8(%ebp) 116ab2: 68 20 09 14 00 push $0x140920 116ab7: e8 d4 46 00 00 call 11b190 <_Objects_Get> 116abc: 89 c3 mov %eax,%ebx
switch ( location ) {
116abe: 83 c4 10 add $0x10,%esp 116ac1: 8b 45 f4 mov -0xc(%ebp),%eax 116ac4: 85 c0 test %eax,%eax
116ac6: 74 0c je 116ad4 <rtems_rate_monotonic_cancel+0x30>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116ac8: b8 04 00 00 00 mov $0x4,%eax
}
116acd: 8b 5d fc mov -0x4(%ebp),%ebx 116ad0: c9 leave 116ad1: c3 ret 116ad2: 66 90 xchg %ax,%ax
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
116ad4: a1 18 0d 14 00 mov 0x140d18,%eax 116ad9: 39 43 40 cmp %eax,0x40(%ebx)
116adc: 74 12 je 116af0 <rtems_rate_monotonic_cancel+0x4c>
_Thread_Enable_dispatch();
116ade: e8 35 51 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
116ae3: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116ae8: 8b 5d fc mov -0x4(%ebp),%ebx 116aeb: c9 leave 116aec: c3 ret 116aed: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
(void) _Watchdog_Remove( &the_period->Timer );
116af0: 83 ec 0c sub $0xc,%esp 116af3: 8d 43 10 lea 0x10(%ebx),%eax 116af6: 50 push %eax 116af7: e8 94 62 00 00 call 11cd90 <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
116afc: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
_Thread_Enable_dispatch();
116b03: e8 10 51 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116b08: 83 c4 10 add $0x10,%esp 116b0b: 31 c0 xor %eax,%eax 116b0d: eb be jmp 116acd <rtems_rate_monotonic_cancel+0x29>
0010c32c <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
10c32c: 55 push %ebp 10c32d: 89 e5 mov %esp,%ebp 10c32f: 57 push %edi 10c330: 56 push %esi 10c331: 53 push %ebx 10c332: 83 ec 1c sub $0x1c,%esp 10c335: 8b 5d 08 mov 0x8(%ebp),%ebx 10c338: 8b 75 0c mov 0xc(%ebp),%esi
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
10c33b: 85 db test %ebx,%ebx
10c33d: 0f 84 a9 00 00 00 je 10c3ec <rtems_rate_monotonic_create+0xc0>
return RTEMS_INVALID_NAME;
if ( !id )
10c343: 85 f6 test %esi,%esi
10c345: 0f 84 c5 00 00 00 je 10c410 <rtems_rate_monotonic_create+0xe4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c34b: a1 70 85 12 00 mov 0x128570,%eax 10c350: 40 inc %eax 10c351: a3 70 85 12 00 mov %eax,0x128570
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
_Objects_Allocate( &_Rate_monotonic_Information );
10c356: 83 ec 0c sub $0xc,%esp 10c359: 68 80 84 12 00 push $0x128480 10c35e: e8 61 1e 00 00 call 10e1c4 <_Objects_Allocate> 10c363: 89 c2 mov %eax,%edx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
10c365: 83 c4 10 add $0x10,%esp 10c368: 85 c0 test %eax,%eax
10c36a: 0f 84 8c 00 00 00 je 10c3fc <rtems_rate_monotonic_create+0xd0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
10c370: a1 38 88 12 00 mov 0x128838,%eax 10c375: 89 42 40 mov %eax,0x40(%edx)
the_period->state = RATE_MONOTONIC_INACTIVE;
10c378: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c37f: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
10c386: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx)
the_watchdog->id = id;
10c38d: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
the_watchdog->user_data = user_data;
10c394: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
10c39b: 8d 42 54 lea 0x54(%edx),%eax 10c39e: 89 45 e4 mov %eax,-0x1c(%ebp) 10c3a1: b9 38 00 00 00 mov $0x38,%ecx 10c3a6: 31 c0 xor %eax,%eax 10c3a8: 8b 7d e4 mov -0x1c(%ebp),%edi 10c3ab: f3 aa rep stos %al,%es:(%edi) 10c3ad: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c3b4: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c3bb: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c3c2: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx)
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c3c9: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10c3cc: 0f b7 f8 movzwl %ax,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c3cf: 8b 0d 9c 84 12 00 mov 0x12849c,%ecx 10c3d5: 89 14 b9 mov %edx,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c3d8: 89 5a 0c mov %ebx,0xc(%edx)
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
10c3db: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10c3dd: e8 ee 2d 00 00 call 10f1d0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c3e2: 31 c0 xor %eax,%eax
}
10c3e4: 8d 65 f4 lea -0xc(%ebp),%esp 10c3e7: 5b pop %ebx 10c3e8: 5e pop %esi 10c3e9: 5f pop %edi 10c3ea: c9 leave 10c3eb: c3 ret
)
{
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10c3ec: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c3f1: 8d 65 f4 lea -0xc(%ebp),%esp 10c3f4: 5b pop %ebx 10c3f5: 5e pop %esi 10c3f6: 5f pop %edi 10c3f7: c9 leave 10c3f8: c3 ret 10c3f9: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
_Thread_Enable_dispatch();
10c3fc: e8 cf 2d 00 00 call 10f1d0 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10c401: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c406: 8d 65 f4 lea -0xc(%ebp),%esp 10c409: 5b pop %ebx 10c40a: 5e pop %esi 10c40b: 5f pop %edi 10c40c: c9 leave 10c40d: c3 ret 10c40e: 66 90 xchg %ax,%ax
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10c410: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c415: 8d 65 f4 lea -0xc(%ebp),%esp 10c418: 5b pop %ebx 10c419: 5e pop %esi 10c41a: 5f pop %edi 10c41b: c9 leave 10c41c: c3 ret
00111d84 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
111d84: 55 push %ebp 111d85: 89 e5 mov %esp,%ebp 111d87: 53 push %ebx 111d88: 83 ec 24 sub $0x24,%esp 111d8b: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
111d8e: 85 db test %ebx,%ebx
111d90: 0f 84 92 00 00 00 je 111e28 <rtems_rate_monotonic_get_status+0xa4>
111d96: 50 push %eax
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
111d97: 8d 45 f4 lea -0xc(%ebp),%eax 111d9a: 50 push %eax 111d9b: ff 75 08 pushl 0x8(%ebp) 111d9e: 68 80 84 12 00 push $0x128480 111da3: e8 a0 c9 ff ff call 10e748 <_Objects_Get>
switch ( location ) {
111da8: 83 c4 10 add $0x10,%esp 111dab: 8b 4d f4 mov -0xc(%ebp),%ecx 111dae: 85 c9 test %ecx,%ecx
111db0: 74 0a je 111dbc <rtems_rate_monotonic_get_status+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
111db2: b8 04 00 00 00 mov $0x4,%eax
}
111db7: 8b 5d fc mov -0x4(%ebp),%ebx 111dba: c9 leave 111dbb: c3 ret
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
111dbc: 8b 50 40 mov 0x40(%eax),%edx 111dbf: 8b 52 08 mov 0x8(%edx),%edx 111dc2: 89 13 mov %edx,(%ebx)
status->state = the_period->state;
111dc4: 8b 50 38 mov 0x38(%eax),%edx 111dc7: 89 53 04 mov %edx,0x4(%ebx)
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
111dca: 85 d2 test %edx,%edx
111dcc: 75 2a jne 111df8 <rtems_rate_monotonic_get_status+0x74>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
111dce: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 111dd5: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_Timespec_Set_to_zero( &status->executed_since_last_period );
111ddc: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 111de3: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
111dea: e8 e1 d3 ff ff call 10f1d0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
111def: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111df1: 8b 5d fc mov -0x4(%ebp),%ebx 111df4: c9 leave 111df5: c3 ret 111df6: 66 90 xchg %ax,%ax
} else {
/*
* Grab the current status.
*/
valid_status =
111df8: 52 push %edx
_Rate_monotonic_Get_status(
111df9: 8d 55 ec lea -0x14(%ebp),%edx
} else {
/*
* Grab the current status.
*/
valid_status =
111dfc: 52 push %edx
_Rate_monotonic_Get_status(
111dfd: 8d 55 e4 lea -0x1c(%ebp),%edx
} else {
/*
* Grab the current status.
*/
valid_status =
111e00: 52 push %edx 111e01: 50 push %eax 111e02: e8 3d a6 ff ff call 10c444 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
111e07: 83 c4 10 add $0x10,%esp 111e0a: 84 c0 test %al,%al
111e0c: 74 26 je 111e34 <rtems_rate_monotonic_get_status+0xb0>
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
111e0e: 8b 45 e4 mov -0x1c(%ebp),%eax 111e11: 8b 55 e8 mov -0x18(%ebp),%edx 111e14: 89 43 08 mov %eax,0x8(%ebx) 111e17: 89 53 0c mov %edx,0xc(%ebx)
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
111e1a: 8b 45 ec mov -0x14(%ebp),%eax 111e1d: 8b 55 f0 mov -0x10(%ebp),%edx 111e20: 89 43 10 mov %eax,0x10(%ebx) 111e23: 89 53 14 mov %edx,0x14(%ebx) 111e26: eb c2 jmp 111dea <rtems_rate_monotonic_get_status+0x66>
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
return RTEMS_INVALID_ADDRESS;
111e28: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111e2d: 8b 5d fc mov -0x4(%ebp),%ebx 111e30: c9 leave 111e31: c3 ret 111e32: 66 90 xchg %ax,%ax
valid_status =
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
_Thread_Enable_dispatch();
111e34: e8 97 d3 ff ff call 10f1d0 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
111e39: b8 0b 00 00 00 mov $0xb,%eax 111e3e: e9 74 ff ff ff jmp 111db7 <rtems_rate_monotonic_get_status+0x33>
0010c640 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
10c640: 55 push %ebp 10c641: 89 e5 mov %esp,%ebp 10c643: 57 push %edi 10c644: 56 push %esi 10c645: 53 push %ebx 10c646: 83 ec 30 sub $0x30,%esp 10c649: 8b 5d 08 mov 0x8(%ebp),%ebx 10c64c: 8b 75 0c mov 0xc(%ebp),%esi
Objects_Locations location;
rtems_status_code return_value;
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
10c64f: 8d 45 e4 lea -0x1c(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
10c652: 50 push %eax 10c653: 53 push %ebx 10c654: 68 80 84 12 00 push $0x128480 10c659: e8 ea 20 00 00 call 10e748 <_Objects_Get>
switch ( location ) {
10c65e: 83 c4 10 add $0x10,%esp 10c661: 8b 55 e4 mov -0x1c(%ebp),%edx 10c664: 85 d2 test %edx,%edx
10c666: 74 10 je 10c678 <rtems_rate_monotonic_period+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c668: b8 04 00 00 00 mov $0x4,%eax
}
10c66d: 8d 65 f4 lea -0xc(%ebp),%esp 10c670: 5b pop %ebx 10c671: 5e pop %esi 10c672: 5f pop %edi 10c673: c9 leave 10c674: c3 ret 10c675: 8d 76 00 lea 0x0(%esi),%esi
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10c678: 8b 15 38 88 12 00 mov 0x128838,%edx 10c67e: 39 50 40 cmp %edx,0x40(%eax)
10c681: 74 15 je 10c698 <rtems_rate_monotonic_period+0x58>
_Thread_Enable_dispatch();
10c683: e8 48 2b 00 00 call 10f1d0 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
10c688: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c68d: 8d 65 f4 lea -0xc(%ebp),%esp 10c690: 5b pop %ebx 10c691: 5e pop %esi 10c692: 5f pop %edi 10c693: c9 leave 10c694: c3 ret 10c695: 8d 76 00 lea 0x0(%esi),%esi
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
10c698: 85 f6 test %esi,%esi
10c69a: 75 1c jne 10c6b8 <rtems_rate_monotonic_period+0x78>
switch ( the_period->state ) {
10c69c: 8b 40 38 mov 0x38(%eax),%eax 10c69f: 83 f8 04 cmp $0x4,%eax
10c6a2: 77 6c ja 10c710 <rtems_rate_monotonic_period+0xd0><== NEVER TAKEN
10c6a4: 8b 04 85 3c 20 12 00 mov 0x12203c(,%eax,4),%eax
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10c6ab: 89 45 d4 mov %eax,-0x2c(%ebp) 10c6ae: e8 1d 2b 00 00 call 10f1d0 <_Thread_Enable_dispatch>
return( return_value );
10c6b3: 8b 45 d4 mov -0x2c(%ebp),%eax 10c6b6: eb b5 jmp 10c66d <rtems_rate_monotonic_period+0x2d>
}
_ISR_Disable( level );
10c6b8: 9c pushf 10c6b9: fa cli 10c6ba: 5f pop %edi
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
10c6bb: 8b 50 38 mov 0x38(%eax),%edx 10c6be: 85 d2 test %edx,%edx
10c6c0: 74 52 je 10c714 <rtems_rate_monotonic_period+0xd4>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
10c6c2: 83 fa 02 cmp $0x2,%edx
10c6c5: 0f 84 9e 00 00 00 je 10c769 <rtems_rate_monotonic_period+0x129>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
10c6cb: 83 fa 04 cmp $0x4,%edx
10c6ce: 75 98 jne 10c668 <rtems_rate_monotonic_period+0x28><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10c6d0: 83 ec 0c sub $0xc,%esp 10c6d3: 50 push %eax 10c6d4: 89 45 d4 mov %eax,-0x2c(%ebp) 10c6d7: e8 74 fe ff ff call 10c550 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10c6dc: 57 push %edi 10c6dd: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10c6de: 8b 45 d4 mov -0x2c(%ebp),%eax 10c6e1: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
the_period->next_length = length;
10c6e8: 89 70 3c mov %esi,0x3c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c6eb: 89 70 1c mov %esi,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c6ee: 5b pop %ebx 10c6ef: 5e pop %esi
_Watchdog_Insert_ticks( &the_period->Timer, length );
10c6f0: 83 c0 10 add $0x10,%eax 10c6f3: 50 push %eax 10c6f4: 68 7c 86 12 00 push $0x12867c 10c6f9: e8 82 39 00 00 call 110080 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10c6fe: e8 cd 2a 00 00 call 10f1d0 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
10c703: 83 c4 10 add $0x10,%esp 10c706: b8 06 00 00 00 mov $0x6,%eax 10c70b: e9 5d ff ff ff jmp 10c66d <rtems_rate_monotonic_period+0x2d>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
10c710: 31 c0 xor %eax,%eax
10c712: eb 97 jmp 10c6ab <rtems_rate_monotonic_period+0x6b><== NOT EXECUTED
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
10c714: 57 push %edi 10c715: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10c716: 83 ec 0c sub $0xc,%esp 10c719: 50 push %eax 10c71a: 89 45 d4 mov %eax,-0x2c(%ebp) 10c71d: e8 ba fd ff ff call 10c4dc <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10c722: 8b 45 d4 mov -0x2c(%ebp),%eax 10c725: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c72c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10c733: c7 40 2c 98 ca 10 00 movl $0x10ca98,0x2c(%eax)
the_watchdog->id = id;
10c73a: 89 58 30 mov %ebx,0x30(%eax)
the_watchdog->user_data = user_data;
10c73d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10c744: 89 70 3c mov %esi,0x3c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c747: 89 70 1c mov %esi,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c74a: 5e pop %esi 10c74b: 5f pop %edi
_Watchdog_Insert_ticks( &the_period->Timer, length );
10c74c: 83 c0 10 add $0x10,%eax 10c74f: 50 push %eax 10c750: 68 7c 86 12 00 push $0x12867c 10c755: e8 26 39 00 00 call 110080 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10c75a: e8 71 2a 00 00 call 10f1d0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c75f: 83 c4 10 add $0x10,%esp 10c762: 31 c0 xor %eax,%eax 10c764: e9 04 ff ff ff jmp 10c66d <rtems_rate_monotonic_period+0x2d>
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10c769: 83 ec 0c sub $0xc,%esp 10c76c: 50 push %eax 10c76d: 89 45 d4 mov %eax,-0x2c(%ebp) 10c770: e8 db fd ff ff call 10c550 <_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;
10c775: 8b 45 d4 mov -0x2c(%ebp),%eax 10c778: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax)
the_period->next_length = length;
10c77f: 89 70 3c mov %esi,0x3c(%eax)
_ISR_Enable( level );
10c782: 57 push %edi 10c783: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10c784: 8b 15 38 88 12 00 mov 0x128838,%edx 10c78a: 8b 48 08 mov 0x8(%eax),%ecx 10c78d: 89 4a 20 mov %ecx,0x20(%edx)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10c790: 59 pop %ecx 10c791: 5b pop %ebx 10c792: 68 00 40 00 00 push $0x4000 10c797: 52 push %edx 10c798: 89 45 d4 mov %eax,-0x2c(%ebp) 10c79b: e8 70 32 00 00 call 10fa10 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10c7a0: 9c pushf 10c7a1: fa cli 10c7a2: 59 pop %ecx
local_state = the_period->state;
10c7a3: 8b 45 d4 mov -0x2c(%ebp),%eax 10c7a6: 8b 50 38 mov 0x38(%eax),%edx
the_period->state = RATE_MONOTONIC_ACTIVE;
10c7a9: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
_ISR_Enable( level );
10c7b0: 51 push %ecx 10c7b1: 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 )
10c7b2: 83 c4 10 add $0x10,%esp 10c7b5: 83 fa 03 cmp $0x3,%edx
10c7b8: 74 0c je 10c7c6 <rtems_rate_monotonic_period+0x186>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
10c7ba: e8 11 2a 00 00 call 10f1d0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c7bf: 31 c0 xor %eax,%eax 10c7c1: e9 a7 fe ff ff jmp 10c66d <rtems_rate_monotonic_period+0x2d>
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10c7c6: 57 push %edi 10c7c7: 57 push %edi 10c7c8: 68 00 40 00 00 push $0x4000 10c7cd: ff 35 38 88 12 00 pushl 0x128838 10c7d3: e8 78 26 00 00 call 10ee50 <_Thread_Clear_state> 10c7d8: 83 c4 10 add $0x10,%esp 10c7db: eb dd jmp 10c7ba <rtems_rate_monotonic_period+0x17a>
0010c7e0 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10c7e0: 55 push %ebp 10c7e1: 89 e5 mov %esp,%ebp 10c7e3: 57 push %edi 10c7e4: 56 push %esi 10c7e5: 53 push %ebx 10c7e6: 81 ec 8c 00 00 00 sub $0x8c,%esp 10c7ec: 8b 75 08 mov 0x8(%ebp),%esi
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
10c7ef: 8b 7d 0c mov 0xc(%ebp),%edi 10c7f2: 85 ff test %edi,%edi
10c7f4: 0f 84 be 00 00 00 je 10c8b8 <rtems_rate_monotonic_report_statistics_with_plugin+0xd8><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10c7fa: 83 ec 08 sub $0x8,%esp 10c7fd: 68 50 20 12 00 push $0x122050 10c802: 56 push %esi 10c803: ff 55 0c call *0xc(%ebp)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
10c806: 59 pop %ecx 10c807: 5b pop %ebx 10c808: 68 88 20 12 00 push $0x122088 10c80d: 56 push %esi 10c80e: ff 55 0c call *0xc(%ebp)
(*print)( context, "--- Wall times are in seconds ---\n" );
10c811: 58 pop %eax 10c812: 5a pop %edx 10c813: 68 ac 20 12 00 push $0x1220ac 10c818: 56 push %esi 10c819: ff 55 0c call *0xc(%ebp)
Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED "
10c81c: 5b pop %ebx 10c81d: 5f pop %edi 10c81e: 68 d0 20 12 00 push $0x1220d0 10c823: 56 push %esi 10c824: ff 55 0c call *0xc(%ebp)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10c827: 5a pop %edx 10c828: 59 pop %ecx 10c829: 68 1c 21 12 00 push $0x12211c 10c82e: 56 push %esi 10c82f: ff 55 0c call *0xc(%ebp)
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
10c832: 8b 1d 88 84 12 00 mov 0x128488,%ebx 10c838: 83 c4 10 add $0x10,%esp 10c83b: 3b 1d 8c 84 12 00 cmp 0x12848c,%ebx
10c841: 77 75 ja 10c8b8 <rtems_rate_monotonic_report_statistics_with_plugin+0xd8><== NEVER TAKEN
10c843: 8d 7d 88 lea -0x78(%ebp),%edi 10c846: eb 09 jmp 10c851 <rtems_rate_monotonic_report_statistics_with_plugin+0x71>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
10c848: 43 inc %ebx
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
10c849: 39 1d 8c 84 12 00 cmp %ebx,0x12848c
10c84f: 72 67 jb 10c8b8 <rtems_rate_monotonic_report_statistics_with_plugin+0xd8>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10c851: 83 ec 08 sub $0x8,%esp 10c854: 57 push %edi 10c855: 53 push %ebx 10c856: e8 7d 54 00 00 call 111cd8 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10c85b: 83 c4 10 add $0x10,%esp 10c85e: 85 c0 test %eax,%eax
10c860: 75 e6 jne 10c848 <rtems_rate_monotonic_report_statistics_with_plugin+0x68>
#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 );
10c862: 83 ec 08 sub $0x8,%esp 10c865: 8d 45 c0 lea -0x40(%ebp),%eax 10c868: 50 push %eax 10c869: 53 push %ebx 10c86a: e8 15 55 00 00 call 111d84 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
10c86f: 83 c4 0c add $0xc,%esp 10c872: 8d 55 e3 lea -0x1d(%ebp),%edx 10c875: 52 push %edx 10c876: 6a 05 push $0x5 10c878: ff 75 c0 pushl -0x40(%ebp) 10c87b: e8 b4 02 00 00 call 10cb34 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10c880: 59 pop %ecx 10c881: 58 pop %eax 10c882: ff 75 8c pushl -0x74(%ebp) 10c885: ff 75 88 pushl -0x78(%ebp) 10c888: 8d 45 e3 lea -0x1d(%ebp),%eax 10c88b: 50 push %eax 10c88c: 53 push %ebx 10c88d: 68 6e 20 12 00 push $0x12206e 10c892: 56 push %esi 10c893: ff 55 0c call *0xc(%ebp)
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10c896: 8b 45 88 mov -0x78(%ebp),%eax 10c899: 83 c4 20 add $0x20,%esp 10c89c: 85 c0 test %eax,%eax
10c89e: 75 20 jne 10c8c0 <rtems_rate_monotonic_report_statistics_with_plugin+0xe0>
(*print)( context, "\n" );
10c8a0: 83 ec 08 sub $0x8,%esp 10c8a3: 68 59 01 12 00 push $0x120159 10c8a8: 56 push %esi 10c8a9: ff 55 0c call *0xc(%ebp)
continue;
10c8ac: 83 c4 10 add $0x10,%esp
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
10c8af: 43 inc %ebx
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
10c8b0: 39 1d 8c 84 12 00 cmp %ebx,0x12848c
10c8b6: 73 99 jae 10c851 <rtems_rate_monotonic_report_statistics_with_plugin+0x71><== ALWAYS TAKEN
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10c8b8: 8d 65 f4 lea -0xc(%ebp),%esp 10c8bb: 5b pop %ebx 10c8bc: 5e pop %esi 10c8bd: 5f pop %edi 10c8be: c9 leave 10c8bf: c3 ret
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
10c8c0: 52 push %edx 10c8c1: 8d 55 d8 lea -0x28(%ebp),%edx 10c8c4: 52 push %edx 10c8c5: 50 push %eax 10c8c6: 8d 45 a0 lea -0x60(%ebp),%eax 10c8c9: 50 push %eax 10c8ca: e8 11 34 00 00 call 10fce0 <_Timespec_Divide_by_integer>
(*print)( context,
10c8cf: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10c8d4: 8b 45 dc mov -0x24(%ebp),%eax 10c8d7: f7 e9 imul %ecx 10c8d9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c8df: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c8e5: c1 f8 06 sar $0x6,%eax 10c8e8: 8b 55 dc mov -0x24(%ebp),%edx 10c8eb: c1 fa 1f sar $0x1f,%edx 10c8ee: 29 d0 sub %edx,%eax 10c8f0: 50 push %eax 10c8f1: ff 75 d8 pushl -0x28(%ebp) 10c8f4: 8b 45 9c mov -0x64(%ebp),%eax 10c8f7: f7 e9 imul %ecx 10c8f9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c8ff: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c905: c1 f8 06 sar $0x6,%eax 10c908: 8b 55 9c mov -0x64(%ebp),%edx 10c90b: c1 fa 1f sar $0x1f,%edx 10c90e: 29 d0 sub %edx,%eax 10c910: 50 push %eax 10c911: ff 75 98 pushl -0x68(%ebp) 10c914: 8b 45 94 mov -0x6c(%ebp),%eax 10c917: f7 e9 imul %ecx 10c919: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c91f: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c925: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c92b: c1 f8 06 sar $0x6,%eax 10c92e: 8b 55 94 mov -0x6c(%ebp),%edx 10c931: c1 fa 1f sar $0x1f,%edx 10c934: 29 d0 sub %edx,%eax 10c936: 50 push %eax 10c937: ff 75 90 pushl -0x70(%ebp) 10c93a: 68 68 21 12 00 push $0x122168 10c93f: 56 push %esi 10c940: 89 4d 84 mov %ecx,-0x7c(%ebp) 10c943: ff 55 0c call *0xc(%ebp)
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
10c946: 83 c4 2c add $0x2c,%esp 10c949: 8d 55 d8 lea -0x28(%ebp),%edx 10c94c: 52 push %edx 10c94d: ff 75 88 pushl -0x78(%ebp) 10c950: 8d 45 b8 lea -0x48(%ebp),%eax 10c953: 50 push %eax 10c954: e8 87 33 00 00 call 10fce0 <_Timespec_Divide_by_integer>
(*print)( context,
10c959: 8b 4d 84 mov -0x7c(%ebp),%ecx 10c95c: 8b 45 dc mov -0x24(%ebp),%eax 10c95f: f7 e9 imul %ecx 10c961: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c967: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c96d: c1 f8 06 sar $0x6,%eax 10c970: 8b 55 dc mov -0x24(%ebp),%edx 10c973: c1 fa 1f sar $0x1f,%edx 10c976: 29 d0 sub %edx,%eax 10c978: 50 push %eax 10c979: ff 75 d8 pushl -0x28(%ebp) 10c97c: 8b 45 b4 mov -0x4c(%ebp),%eax 10c97f: f7 e9 imul %ecx 10c981: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c987: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c98d: c1 f8 06 sar $0x6,%eax 10c990: 8b 55 b4 mov -0x4c(%ebp),%edx 10c993: c1 fa 1f sar $0x1f,%edx 10c996: 29 d0 sub %edx,%eax 10c998: 50 push %eax 10c999: ff 75 b0 pushl -0x50(%ebp) 10c99c: 8b 45 ac mov -0x54(%ebp),%eax 10c99f: f7 e9 imul %ecx 10c9a1: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c9a7: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c9ad: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c9b3: c1 f8 06 sar $0x6,%eax 10c9b6: 8b 55 ac mov -0x54(%ebp),%edx 10c9b9: c1 fa 1f sar $0x1f,%edx 10c9bc: 29 d0 sub %edx,%eax 10c9be: 50 push %eax 10c9bf: ff 75 a8 pushl -0x58(%ebp) 10c9c2: 68 88 21 12 00 push $0x122188 10c9c7: 56 push %esi 10c9c8: ff 55 0c call *0xc(%ebp) 10c9cb: 83 c4 30 add $0x30,%esp 10c9ce: e9 75 fe ff ff jmp 10c848 <rtems_rate_monotonic_report_statistics_with_plugin+0x68>
0010c9ec <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
10c9ec: 55 push %ebp 10c9ed: 89 e5 mov %esp,%ebp 10c9ef: 53 push %ebx 10c9f0: 83 ec 04 sub $0x4,%esp 10c9f3: a1 70 85 12 00 mov 0x128570,%eax 10c9f8: 40 inc %eax 10c9f9: a3 70 85 12 00 mov %eax,0x128570
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
10c9fe: 8b 1d 88 84 12 00 mov 0x128488,%ebx 10ca04: 3b 1d 8c 84 12 00 cmp 0x12848c,%ebx
10ca0a: 77 15 ja 10ca21 <rtems_rate_monotonic_reset_all_statistics+0x35><== NEVER TAKEN
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
10ca0c: 83 ec 0c sub $0xc,%esp 10ca0f: 53 push %ebx 10ca10: e8 17 00 00 00 call 10ca2c <rtems_rate_monotonic_reset_statistics>
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
10ca15: 43 inc %ebx
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
10ca16: 83 c4 10 add $0x10,%esp 10ca19: 39 1d 8c 84 12 00 cmp %ebx,0x12848c
10ca1f: 73 eb jae 10ca0c <rtems_rate_monotonic_reset_all_statistics+0x20>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
10ca21: 8b 5d fc mov -0x4(%ebp),%ebx 10ca24: c9 leave
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
10ca25: e9 a6 27 00 00 jmp 10f1d0 <_Thread_Enable_dispatch>
0010ca2c <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
rtems_id id
)
{
10ca2c: 55 push %ebp 10ca2d: 89 e5 mov %esp,%ebp 10ca2f: 57 push %edi 10ca30: 53 push %ebx 10ca31: 83 ec 14 sub $0x14,%esp
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
10ca34: 8d 45 f4 lea -0xc(%ebp),%eax 10ca37: 50 push %eax 10ca38: ff 75 08 pushl 0x8(%ebp) 10ca3b: 68 80 84 12 00 push $0x128480 10ca40: e8 03 1d 00 00 call 10e748 <_Objects_Get> 10ca45: 89 c2 mov %eax,%edx
switch ( location ) {
10ca47: 83 c4 10 add $0x10,%esp 10ca4a: 8b 45 f4 mov -0xc(%ebp),%eax 10ca4d: 85 c0 test %eax,%eax
10ca4f: 75 3b jne 10ca8c <rtems_rate_monotonic_reset_statistics+0x60>
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
10ca51: 8d 5a 54 lea 0x54(%edx),%ebx 10ca54: b9 38 00 00 00 mov $0x38,%ecx 10ca59: 31 c0 xor %eax,%eax 10ca5b: 89 df mov %ebx,%edi 10ca5d: f3 aa rep stos %al,%es:(%edi) 10ca5f: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10ca66: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10ca6d: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10ca74: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx)
_Thread_Enable_dispatch();
10ca7b: e8 50 27 00 00 call 10f1d0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ca80: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ca82: 8d 65 f8 lea -0x8(%ebp),%esp 10ca85: 5b pop %ebx 10ca86: 5f pop %edi 10ca87: c9 leave 10ca88: c3 ret 10ca89: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10ca8c: b8 04 00 00 00 mov $0x4,%eax
}
10ca91: 8d 65 f8 lea -0x8(%ebp),%esp 10ca94: 5b pop %ebx 10ca95: 5f pop %edi 10ca96: c9 leave 10ca97: c3 ret
00117238 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
117238: 55 push %ebp 117239: 89 e5 mov %esp,%ebp 11723b: 57 push %edi 11723c: 56 push %esi 11723d: 53 push %ebx 11723e: 83 ec 1c sub $0x1c,%esp 117241: 8b 7d 08 mov 0x8(%ebp),%edi 117244: 8b 75 0c mov 0xc(%ebp),%esi
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
117247: 85 ff test %edi,%edi
117249: 0f 84 c1 00 00 00 je 117310 <rtems_region_create+0xd8>
return RTEMS_INVALID_NAME;
if ( !starting_address )
11724f: 85 f6 test %esi,%esi
117251: 0f 84 e1 00 00 00 je 117338 <rtems_region_create+0x100>
return RTEMS_INVALID_ADDRESS;
if ( !id )
117257: 8b 45 1c mov 0x1c(%ebp),%eax 11725a: 85 c0 test %eax,%eax
11725c: 0f 84 d6 00 00 00 je 117338 <rtems_region_create+0x100>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
117262: 83 ec 0c sub $0xc,%esp 117265: ff 35 3c 0b 14 00 pushl 0x140b3c 11726b: e8 dc 24 00 00 call 11974c <_API_Mutex_Lock>
* This function allocates a region control block from
* the inactive chain of free region control blocks.
*/
RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void )
{
return (Region_Control *) _Objects_Allocate( &_Region_Information );
117270: c7 04 24 60 09 14 00 movl $0x140960,(%esp) 117277: e8 20 3a 00 00 call 11ac9c <_Objects_Allocate> 11727c: 89 c3 mov %eax,%ebx
the_region = _Region_Allocate();
if ( !the_region )
11727e: 83 c4 10 add $0x10,%esp 117281: 85 c0 test %eax,%eax
117283: 0f 84 bf 00 00 00 je 117348 <rtems_region_create+0x110>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
117289: ff 75 14 pushl 0x14(%ebp) 11728c: ff 75 10 pushl 0x10(%ebp) 11728f: 56 push %esi 117290: 8d 40 68 lea 0x68(%eax),%eax 117293: 50 push %eax 117294: e8 0f 36 00 00 call 11a8a8 <_Heap_Initialize> 117299: 89 43 5c mov %eax,0x5c(%ebx)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
11729c: 83 c4 10 add $0x10,%esp 11729f: 85 c0 test %eax,%eax
1172a1: 74 7d je 117320 <rtems_region_create+0xe8>
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
1172a3: 89 73 50 mov %esi,0x50(%ebx)
the_region->length = length;
1172a6: 8b 45 10 mov 0x10(%ebp),%eax 1172a9: 89 43 54 mov %eax,0x54(%ebx)
the_region->page_size = page_size;
1172ac: 8b 55 14 mov 0x14(%ebp),%edx 1172af: 89 53 58 mov %edx,0x58(%ebx)
the_region->attribute_set = attribute_set;
1172b2: 8b 45 18 mov 0x18(%ebp),%eax 1172b5: 89 43 60 mov %eax,0x60(%ebx)
the_region->number_of_used_blocks = 0;
1172b8: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
_Thread_queue_Initialize(
1172bf: 6a 06 push $0x6 1172c1: 6a 40 push $0x40 1172c3: a8 04 test $0x4,%al 1172c5: 0f 95 c0 setne %al 1172c8: 0f b6 c0 movzbl %al,%eax 1172cb: 50 push %eax 1172cc: 8d 43 10 lea 0x10(%ebx),%eax 1172cf: 50 push %eax 1172d0: e8 63 50 00 00 call 11c338 <_Thread_queue_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
1172d5: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
1172d8: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1172db: 8b 15 7c 09 14 00 mov 0x14097c,%edx 1172e1: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1172e4: 89 7b 0c mov %edi,0xc(%ebx)
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
1172e7: 8b 55 1c mov 0x1c(%ebp),%edx 1172ea: 89 02 mov %eax,(%edx) 1172ec: 83 c4 10 add $0x10,%esp
return_status = RTEMS_SUCCESSFUL;
1172ef: 31 c0 xor %eax,%eax
}
}
_RTEMS_Unlock_allocator();
1172f1: 83 ec 0c sub $0xc,%esp 1172f4: ff 35 3c 0b 14 00 pushl 0x140b3c 1172fa: 89 45 e4 mov %eax,-0x1c(%ebp) 1172fd: e8 92 24 00 00 call 119794 <_API_Mutex_Unlock>
return return_status;
117302: 83 c4 10 add $0x10,%esp 117305: 8b 45 e4 mov -0x1c(%ebp),%eax
}
117308: 8d 65 f4 lea -0xc(%ebp),%esp 11730b: 5b pop %ebx 11730c: 5e pop %esi 11730d: 5f pop %edi 11730e: c9 leave 11730f: c3 ret
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
117310: b8 03 00 00 00 mov $0x3,%eax
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
117315: 8d 65 f4 lea -0xc(%ebp),%esp 117318: 5b pop %ebx 117319: 5e pop %esi 11731a: 5f pop %edi 11731b: c9 leave 11731c: c3 ret 11731d: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
117320: 83 ec 08 sub $0x8,%esp 117323: 53 push %ebx 117324: 68 60 09 14 00 push $0x140960 117329: e8 e6 3c 00 00 call 11b014 <_Objects_Free> 11732e: 83 c4 10 add $0x10,%esp
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
_Region_Free( the_region );
return_status = RTEMS_INVALID_SIZE;
117331: b8 08 00 00 00 mov $0x8,%eax 117336: eb b9 jmp 1172f1 <rtems_region_create+0xb9>
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
117338: b8 09 00 00 00 mov $0x9,%eax
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
11733d: 8d 65 f4 lea -0xc(%ebp),%esp 117340: 5b pop %ebx 117341: 5e pop %esi 117342: 5f pop %edi 117343: c9 leave 117344: c3 ret 117345: 8d 76 00 lea 0x0(%esi),%esi
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
return_status = RTEMS_TOO_MANY;
117348: b8 05 00 00 00 mov $0x5,%eax 11734d: eb a2 jmp 1172f1 <rtems_region_create+0xb9>
00117350 <rtems_region_delete>:
*/
rtems_status_code rtems_region_delete(
rtems_id id
)
{
117350: 55 push %ebp 117351: 89 e5 mov %esp,%ebp 117353: 53 push %ebx 117354: 83 ec 30 sub $0x30,%esp
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
_RTEMS_Lock_allocator();
117357: ff 35 3c 0b 14 00 pushl 0x140b3c 11735d: e8 ea 23 00 00 call 11974c <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
117362: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
117365: 8d 45 f4 lea -0xc(%ebp),%eax 117368: 50 push %eax 117369: ff 75 08 pushl 0x8(%ebp) 11736c: 68 60 09 14 00 push $0x140960 117371: e8 de 3d 00 00 call 11b154 <_Objects_Get_no_protection>
switch ( location ) {
117376: 83 c4 10 add $0x10,%esp 117379: 8b 5d f4 mov -0xc(%ebp),%ebx 11737c: 85 db test %ebx,%ebx
11737e: 74 1c je 11739c <rtems_region_delete+0x4c>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
117380: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
117385: 83 ec 0c sub $0xc,%esp 117388: ff 35 3c 0b 14 00 pushl 0x140b3c 11738e: e8 01 24 00 00 call 119794 <_API_Mutex_Unlock>
return return_status; }
117393: 89 d8 mov %ebx,%eax 117395: 8b 5d fc mov -0x4(%ebp),%ebx 117398: c9 leave 117399: c3 ret 11739a: 66 90 xchg %ax,%ax
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 5 );
if ( the_region->number_of_used_blocks != 0 )
11739c: 8b 48 64 mov 0x64(%eax),%ecx 11739f: 85 c9 test %ecx,%ecx
1173a1: 74 09 je 1173ac <rtems_region_delete+0x5c>
return_status = RTEMS_RESOURCE_IN_USE;
1173a3: bb 0c 00 00 00 mov $0xc,%ebx 1173a8: eb db jmp 117385 <rtems_region_delete+0x35> 1173aa: 66 90 xchg %ax,%ax
else {
_Objects_Close( &_Region_Information, &the_region->Object );
1173ac: 83 ec 08 sub $0x8,%esp 1173af: 50 push %eax 1173b0: 68 60 09 14 00 push $0x140960 1173b5: 89 45 e4 mov %eax,-0x1c(%ebp) 1173b8: e8 5b 39 00 00 call 11ad18 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
1173bd: 58 pop %eax 1173be: 5a pop %edx 1173bf: 8b 45 e4 mov -0x1c(%ebp),%eax 1173c2: 50 push %eax 1173c3: 68 60 09 14 00 push $0x140960 1173c8: e8 47 3c 00 00 call 11b014 <_Objects_Free> 1173cd: 83 c4 10 add $0x10,%esp
_Region_Free( the_region );
return_status = RTEMS_SUCCESSFUL;
1173d0: 31 db xor %ebx,%ebx 1173d2: eb b1 jmp 117385 <rtems_region_delete+0x35>
001173d4 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
1173d4: 55 push %ebp 1173d5: 89 e5 mov %esp,%ebp 1173d7: 56 push %esi 1173d8: 53 push %ebx 1173d9: 83 ec 10 sub $0x10,%esp 1173dc: 8b 5d 0c mov 0xc(%ebp),%ebx
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
1173df: 85 db test %ebx,%ebx
1173e1: 74 75 je 117458 <rtems_region_extend+0x84>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
1173e3: 83 ec 0c sub $0xc,%esp 1173e6: ff 35 3c 0b 14 00 pushl 0x140b3c 1173ec: e8 5b 23 00 00 call 11974c <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
1173f1: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
1173f4: 8d 45 f0 lea -0x10(%ebp),%eax 1173f7: 50 push %eax 1173f8: ff 75 08 pushl 0x8(%ebp) 1173fb: 68 60 09 14 00 push $0x140960 117400: e8 4f 3d 00 00 call 11b154 <_Objects_Get_no_protection> 117405: 89 c6 mov %eax,%esi
switch ( location ) {
117407: 83 c4 10 add $0x10,%esp 11740a: 8b 45 f0 mov -0x10(%ebp),%eax 11740d: 85 c0 test %eax,%eax
11740f: 74 1f je 117430 <rtems_region_extend+0x5c>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
117411: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
117416: 83 ec 0c sub $0xc,%esp 117419: ff 35 3c 0b 14 00 pushl 0x140b3c 11741f: e8 70 23 00 00 call 119794 <_API_Mutex_Unlock>
return return_status;
117424: 83 c4 10 add $0x10,%esp
}
117427: 89 d8 mov %ebx,%eax 117429: 8d 65 f8 lea -0x8(%ebp),%esp 11742c: 5b pop %ebx 11742d: 5e pop %esi 11742e: c9 leave 11742f: c3 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
117430: 8d 45 f4 lea -0xc(%ebp),%eax 117433: 50 push %eax 117434: ff 75 10 pushl 0x10(%ebp) 117437: 53 push %ebx 117438: 8d 46 68 lea 0x68(%esi),%eax 11743b: 50 push %eax 11743c: e8 73 2e 00 00 call 11a2b4 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
117441: 83 c4 10 add $0x10,%esp 117444: 84 c0 test %al,%al
117446: 74 20 je 117468 <rtems_region_extend+0x94>
the_region->length += amount_extended;
117448: 8b 45 f4 mov -0xc(%ebp),%eax 11744b: 01 46 54 add %eax,0x54(%esi)
the_region->maximum_segment_size += amount_extended;
11744e: 01 46 5c add %eax,0x5c(%esi)
return_status = RTEMS_SUCCESSFUL;
117451: 31 db xor %ebx,%ebx 117453: eb c1 jmp 117416 <rtems_region_extend+0x42> 117455: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
117458: bb 09 00 00 00 mov $0x9,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
11745d: 89 d8 mov %ebx,%eax 11745f: 8d 65 f8 lea -0x8(%ebp),%esp 117462: 5b pop %ebx 117463: 5e pop %esi 117464: c9 leave 117465: c3 ret 117466: 66 90 xchg %ax,%ax
if ( extend_ok ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else {
return_status = RTEMS_INVALID_ADDRESS;
117468: bb 09 00 00 00 mov $0x9,%ebx 11746d: eb a7 jmp 117416 <rtems_region_extend+0x42>
00117470 <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
117470: 55 push %ebp 117471: 89 e5 mov %esp,%ebp 117473: 53 push %ebx 117474: 83 ec 14 sub $0x14,%esp 117477: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
11747a: 85 db test %ebx,%ebx
11747c: 74 76 je 1174f4 <rtems_region_get_free_information+0x84>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
11747e: 83 ec 0c sub $0xc,%esp 117481: ff 35 3c 0b 14 00 pushl 0x140b3c 117487: e8 c0 22 00 00 call 11974c <_API_Mutex_Lock> 11748c: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
11748f: 8d 45 f4 lea -0xc(%ebp),%eax 117492: 50 push %eax 117493: ff 75 08 pushl 0x8(%ebp) 117496: 68 60 09 14 00 push $0x140960 11749b: e8 b4 3c 00 00 call 11b154 <_Objects_Get_no_protection>
switch ( location ) {
1174a0: 83 c4 10 add $0x10,%esp 1174a3: 8b 55 f4 mov -0xc(%ebp),%edx 1174a6: 85 d2 test %edx,%edx
1174a8: 74 1e je 1174c8 <rtems_region_get_free_information+0x58>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
1174aa: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
1174af: 83 ec 0c sub $0xc,%esp 1174b2: ff 35 3c 0b 14 00 pushl 0x140b3c 1174b8: e8 d7 22 00 00 call 119794 <_API_Mutex_Unlock>
return return_status;
1174bd: 83 c4 10 add $0x10,%esp
}
1174c0: 89 d8 mov %ebx,%eax 1174c2: 8b 5d fc mov -0x4(%ebp),%ebx 1174c5: c9 leave 1174c6: c3 ret 1174c7: 90 nop
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->Used.number = 0;
1174c8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_info->Used.total = 0;
1174cf: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
the_info->Used.largest = 0;
1174d6: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
1174dd: 83 ec 08 sub $0x8,%esp 1174e0: 53 push %ebx 1174e1: 83 c0 68 add $0x68,%eax 1174e4: 50 push %eax 1174e5: e8 a6 31 00 00 call 11a690 <_Heap_Get_free_information>
return_status = RTEMS_SUCCESSFUL;
break;
1174ea: 83 c4 10 add $0x10,%esp
the_info->Used.total = 0;
the_info->Used.largest = 0;
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
return_status = RTEMS_SUCCESSFUL;
1174ed: 31 db xor %ebx,%ebx
break;
1174ef: eb be jmp 1174af <rtems_region_get_free_information+0x3f> 1174f1: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
1174f4: bb 09 00 00 00 mov $0x9,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1174f9: 89 d8 mov %ebx,%eax 1174fb: 8b 5d fc mov -0x4(%ebp),%ebx 1174fe: c9 leave 1174ff: c3 ret
00117578 <rtems_region_get_segment>:
uintptr_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
117578: 55 push %ebp 117579: 89 e5 mov %esp,%ebp 11757b: 57 push %edi 11757c: 56 push %esi 11757d: 53 push %ebx 11757e: 83 ec 2c sub $0x2c,%esp 117581: 8b 75 0c mov 0xc(%ebp),%esi 117584: 8b 5d 18 mov 0x18(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
117587: 85 db test %ebx,%ebx
117589: 0f 84 a1 00 00 00 je 117630 <rtems_region_get_segment+0xb8>
return RTEMS_INVALID_ADDRESS;
*segment = NULL;
11758f: c7 03 00 00 00 00 movl $0x0,(%ebx)
if ( size == 0 )
117595: 85 f6 test %esi,%esi
117597: 75 0f jne 1175a8 <rtems_region_get_segment+0x30>
return RTEMS_INVALID_SIZE;
117599: b8 08 00 00 00 mov $0x8,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
11759e: 8d 65 f4 lea -0xc(%ebp),%esp 1175a1: 5b pop %ebx 1175a2: 5e pop %esi 1175a3: 5f pop %edi 1175a4: c9 leave 1175a5: c3 ret 1175a6: 66 90 xchg %ax,%ax
*segment = NULL;
if ( size == 0 )
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
1175a8: 83 ec 0c sub $0xc,%esp 1175ab: ff 35 3c 0b 14 00 pushl 0x140b3c 1175b1: e8 96 21 00 00 call 11974c <_API_Mutex_Lock>
executing = _Thread_Executing;
1175b6: a1 18 0d 14 00 mov 0x140d18,%eax 1175bb: 89 45 d4 mov %eax,-0x2c(%ebp) 1175be: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
1175c1: 8d 45 e4 lea -0x1c(%ebp),%eax 1175c4: 50 push %eax 1175c5: ff 75 08 pushl 0x8(%ebp) 1175c8: 68 60 09 14 00 push $0x140960 1175cd: e8 82 3b 00 00 call 11b154 <_Objects_Get_no_protection> 1175d2: 89 c7 mov %eax,%edi
switch ( location ) {
1175d4: 83 c4 10 add $0x10,%esp 1175d7: 8b 45 e4 mov -0x1c(%ebp),%eax 1175da: 85 c0 test %eax,%eax
1175dc: 75 2a jne 117608 <rtems_region_get_segment+0x90>
case OBJECTS_LOCAL:
if ( size > the_region->maximum_segment_size )
1175de: 3b 77 5c cmp 0x5c(%edi),%esi
1175e1: 76 2d jbe 117610 <rtems_region_get_segment+0x98>
return_status = RTEMS_INVALID_SIZE;
1175e3: b8 08 00 00 00 mov $0x8,%eax
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1175e8: 83 ec 0c sub $0xc,%esp 1175eb: ff 35 3c 0b 14 00 pushl 0x140b3c 1175f1: 89 45 d0 mov %eax,-0x30(%ebp) 1175f4: e8 9b 21 00 00 call 119794 <_API_Mutex_Unlock>
return return_status;
1175f9: 83 c4 10 add $0x10,%esp 1175fc: 8b 45 d0 mov -0x30(%ebp),%eax
}
1175ff: 8d 65 f4 lea -0xc(%ebp),%esp 117602: 5b pop %ebx 117603: 5e pop %esi 117604: 5f pop %edi 117605: c9 leave 117606: c3 ret 117607: 90 nop
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
117608: b8 04 00 00 00 mov $0x4,%eax 11760d: eb d9 jmp 1175e8 <rtems_region_get_segment+0x70> 11760f: 90 nop
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and
* boundary equals zero.
*/
RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size )
{
return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
117610: 6a 00 push $0x0 117612: 6a 00 push $0x0 117614: 56 push %esi
RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
Region_Control *the_region,
uintptr_t size
)
{
return _Heap_Allocate( &the_region->Memory, size );
117615: 8d 47 68 lea 0x68(%edi),%eax 117618: 50 push %eax 117619: e8 c2 2a 00 00 call 11a0e0 <_Heap_Allocate_aligned_with_boundary>
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
11761e: 83 c4 10 add $0x10,%esp 117621: 85 c0 test %eax,%eax
117623: 74 17 je 11763c <rtems_region_get_segment+0xc4>
the_region->number_of_used_blocks += 1;
117625: ff 47 64 incl 0x64(%edi)
*segment = the_segment;
117628: 89 03 mov %eax,(%ebx)
return_status = RTEMS_SUCCESSFUL;
11762a: 31 c0 xor %eax,%eax 11762c: eb ba jmp 1175e8 <rtems_region_get_segment+0x70> 11762e: 66 90 xchg %ax,%ax
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
return RTEMS_INVALID_ADDRESS;
117630: b8 09 00 00 00 mov $0x9,%eax 117635: e9 64 ff ff ff jmp 11759e <rtems_region_get_segment+0x26> 11763a: 66 90 xchg %ax,%ax
if ( the_segment ) {
the_region->number_of_used_blocks += 1;
*segment = the_segment;
return_status = RTEMS_SUCCESSFUL;
} else if ( _Options_Is_no_wait( option_set ) ) {
11763c: f6 45 10 01 testb $0x1,0x10(%ebp)
117640: 74 07 je 117649 <rtems_region_get_segment+0xd1>
return_status = RTEMS_UNSATISFIED;
117642: b8 0d 00 00 00 mov $0xd,%eax 117647: eb 9f jmp 1175e8 <rtems_region_get_segment+0x70>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
117649: a1 50 0a 14 00 mov 0x140a50,%eax 11764e: 40 inc %eax 11764f: a3 50 0a 14 00 mov %eax,0x140a50
* Switch from using the memory allocation mutex to using a
* dispatching disabled critical section. We have to do this
* because this thread is going to block.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
117654: 83 ec 0c sub $0xc,%esp 117657: ff 35 3c 0b 14 00 pushl 0x140b3c 11765d: e8 32 21 00 00 call 119794 <_API_Mutex_Unlock>
executing->Wait.queue = &the_region->Wait_queue;
117662: 8d 47 10 lea 0x10(%edi),%eax 117665: 8b 55 d4 mov -0x2c(%ebp),%edx 117668: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
11766b: 8b 4d 08 mov 0x8(%ebp),%ecx 11766e: 89 4a 20 mov %ecx,0x20(%edx)
executing->Wait.count = size;
117671: 89 72 24 mov %esi,0x24(%edx)
executing->Wait.return_argument = segment;
117674: 89 5a 28 mov %ebx,0x28(%edx)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
117677: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi)
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
11767e: 83 c4 0c add $0xc,%esp 117681: 68 fc c3 11 00 push $0x11c3fc 117686: ff 75 14 pushl 0x14(%ebp) 117689: 50 push %eax 11768a: e8 41 4a 00 00 call 11c0d0 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
11768f: e8 84 45 00 00 call 11bc18 <_Thread_Enable_dispatch>
return (rtems_status_code) executing->Wait.return_code;
117694: 8b 55 d4 mov -0x2c(%ebp),%edx 117697: 8b 42 34 mov 0x34(%edx),%eax 11769a: 83 c4 10 add $0x10,%esp 11769d: e9 fc fe ff ff jmp 11759e <rtems_region_get_segment+0x26>
00117758 <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
117758: 55 push %ebp 117759: 89 e5 mov %esp,%ebp 11775b: 56 push %esi 11775c: 53 push %ebx 11775d: 83 ec 20 sub $0x20,%esp 117760: 8b 5d 14 mov 0x14(%ebp),%ebx
uintptr_t osize;
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
117763: 85 db test %ebx,%ebx
117765: 0f 84 89 00 00 00 je 1177f4 <rtems_region_resize_segment+0x9c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
11776b: 83 ec 0c sub $0xc,%esp 11776e: ff 35 3c 0b 14 00 pushl 0x140b3c 117774: e8 d3 1f 00 00 call 11974c <_API_Mutex_Lock> 117779: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
11777c: 8d 45 f0 lea -0x10(%ebp),%eax 11777f: 50 push %eax 117780: ff 75 08 pushl 0x8(%ebp) 117783: 68 60 09 14 00 push $0x140960 117788: e8 c7 39 00 00 call 11b154 <_Objects_Get_no_protection> 11778d: 89 c6 mov %eax,%esi
switch ( location ) {
11778f: 83 c4 10 add $0x10,%esp 117792: 8b 45 f0 mov -0x10(%ebp),%eax 117795: 85 c0 test %eax,%eax
117797: 74 1f je 1177b8 <rtems_region_resize_segment+0x60>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117799: 83 ec 0c sub $0xc,%esp 11779c: ff 35 3c 0b 14 00 pushl 0x140b3c 1177a2: e8 ed 1f 00 00 call 119794 <_API_Mutex_Unlock>
return return_status;
1177a7: 83 c4 10 add $0x10,%esp 1177aa: b8 04 00 00 00 mov $0x4,%eax
}
1177af: 8d 65 f8 lea -0x8(%ebp),%esp 1177b2: 5b pop %ebx 1177b3: 5e pop %esi 1177b4: c9 leave 1177b5: c3 ret 1177b6: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
1177b8: 83 ec 0c sub $0xc,%esp 1177bb: 8d 45 f4 lea -0xc(%ebp),%eax 1177be: 50 push %eax 1177bf: 8d 45 ec lea -0x14(%ebp),%eax 1177c2: 50 push %eax 1177c3: ff 75 10 pushl 0x10(%ebp) 1177c6: ff 75 0c pushl 0xc(%ebp) 1177c9: 8d 46 68 lea 0x68(%esi),%eax 1177cc: 50 push %eax 1177cd: e8 de 32 00 00 call 11aab0 <_Heap_Resize_block>
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
1177d2: 8b 55 ec mov -0x14(%ebp),%edx 1177d5: 89 13 mov %edx,(%ebx)
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
1177d7: 83 c4 20 add $0x20,%esp 1177da: 85 c0 test %eax,%eax
1177dc: 75 22 jne 117800 <rtems_region_resize_segment+0xa8>
_Region_Process_queue( the_region ); /* unlocks allocator */
1177de: 83 ec 0c sub $0xc,%esp 1177e1: 56 push %esi 1177e2: e8 1d 71 00 00 call 11e904 <_Region_Process_queue> 1177e7: 83 c4 10 add $0x10,%esp
else
_RTEMS_Unlock_allocator();
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
1177ea: 31 c0 xor %eax,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1177ec: 8d 65 f8 lea -0x8(%ebp),%esp 1177ef: 5b pop %ebx 1177f0: 5e pop %esi 1177f1: c9 leave 1177f2: c3 ret 1177f3: 90 nop
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
return RTEMS_INVALID_ADDRESS;
1177f4: b8 09 00 00 00 mov $0x9,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1177f9: 8d 65 f8 lea -0x8(%ebp),%esp 1177fc: 5b pop %ebx 1177fd: 5e pop %esi 1177fe: c9 leave 1177ff: c3 ret
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
117800: 83 ec 0c sub $0xc,%esp 117803: ff 35 3c 0b 14 00 pushl 0x140b3c 117809: 89 45 e4 mov %eax,-0x1c(%ebp) 11780c: e8 83 1f 00 00 call 119794 <_API_Mutex_Unlock>
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
117811: 83 c4 10 add $0x10,%esp
return RTEMS_UNSATISFIED;
117814: 8b 45 e4 mov -0x1c(%ebp),%eax 117817: 48 dec %eax 117818: 0f 94 c0 sete %al 11781b: 0f b6 c0 movzbl %al,%eax 11781e: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117825: 8d 65 f8 lea -0x8(%ebp),%esp 117828: 5b pop %ebx 117829: 5e pop %esi 11782a: c9 leave 11782b: c3 ret
0011782c <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
11782c: 55 push %ebp 11782d: 89 e5 mov %esp,%ebp 11782f: 53 push %ebx 117830: 83 ec 20 sub $0x20,%esp
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
117833: ff 35 3c 0b 14 00 pushl 0x140b3c 117839: e8 0e 1f 00 00 call 11974c <_API_Mutex_Lock> 11783e: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
117841: 8d 45 f4 lea -0xc(%ebp),%eax 117844: 50 push %eax 117845: ff 75 08 pushl 0x8(%ebp) 117848: 68 60 09 14 00 push $0x140960 11784d: e8 02 39 00 00 call 11b154 <_Objects_Get_no_protection> 117852: 89 c3 mov %eax,%ebx
switch ( location ) {
117854: 83 c4 10 add $0x10,%esp 117857: 8b 45 f4 mov -0xc(%ebp),%eax 11785a: 85 c0 test %eax,%eax
11785c: 75 1e jne 11787c <rtems_region_return_segment+0x50>
RTEMS_INLINE_ROUTINE bool _Region_Free_segment (
Region_Control *the_region,
void *the_segment
)
{
return _Heap_Free( &the_region->Memory, the_segment );
11785e: 83 ec 08 sub $0x8,%esp 117861: ff 75 0c pushl 0xc(%ebp) 117864: 8d 43 68 lea 0x68(%ebx),%eax 117867: 50 push %eax 117868: e8 d3 2c 00 00 call 11a540 <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
11786d: 83 c4 10 add $0x10,%esp 117870: 84 c0 test %al,%al
117872: 75 28 jne 11789c <rtems_region_return_segment+0x70>
return_status = RTEMS_INVALID_ADDRESS;
117874: bb 09 00 00 00 mov $0x9,%ebx 117879: eb 06 jmp 117881 <rtems_region_return_segment+0x55> 11787b: 90 nop
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
11787c: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
117881: 83 ec 0c sub $0xc,%esp 117884: ff 35 3c 0b 14 00 pushl 0x140b3c 11788a: e8 05 1f 00 00 call 119794 <_API_Mutex_Unlock>
return return_status;
11788f: 83 c4 10 add $0x10,%esp
}
117892: 89 d8 mov %ebx,%eax 117894: 8b 5d fc mov -0x4(%ebp),%ebx 117897: c9 leave 117898: c3 ret 117899: 8d 76 00 lea 0x0(%esi),%esi
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
11789c: ff 4b 64 decl 0x64(%ebx)
_Region_Process_queue(the_region); /* unlocks allocator */
11789f: 83 ec 0c sub $0xc,%esp 1178a2: 53 push %ebx 1178a3: e8 5c 70 00 00 call 11e904 <_Region_Process_queue>
return RTEMS_SUCCESSFUL;
1178a8: 83 c4 10 add $0x10,%esp 1178ab: 31 db xor %ebx,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1178ad: 89 d8 mov %ebx,%eax 1178af: 8b 5d fc mov -0x4(%ebp),%ebx 1178b2: c9 leave 1178b3: c3 ret
0010b434 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
10b434: 55 push %ebp 10b435: 89 e5 mov %esp,%ebp 10b437: 57 push %edi 10b438: 56 push %esi 10b439: 53 push %ebx 10b43a: 83 ec 3c sub $0x3c,%esp 10b43d: 8b 75 08 mov 0x8(%ebp),%esi 10b440: 8b 5d 10 mov 0x10(%ebp),%ebx 10b443: 8b 7d 18 mov 0x18(%ebp),%edi
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
10b446: 85 f6 test %esi,%esi
10b448: 74 4a je 10b494 <rtems_semaphore_create+0x60>
return RTEMS_INVALID_NAME;
if ( !id )
10b44a: 85 ff test %edi,%edi
10b44c: 0f 84 f6 00 00 00 je 10b548 <rtems_semaphore_create+0x114>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
10b452: 89 da mov %ebx,%edx 10b454: 81 e2 c0 00 00 00 and $0xc0,%edx
10b45a: 74 48 je 10b4a4 <rtems_semaphore_create+0x70>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
10b45c: 89 d8 mov %ebx,%eax 10b45e: 83 e0 30 and $0x30,%eax
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
10b461: 83 f8 10 cmp $0x10,%eax
10b464: 74 0e je 10b474 <rtems_semaphore_create+0x40>
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
10b466: b8 0b 00 00 00 mov $0xb,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b46b: 8d 65 f4 lea -0xc(%ebp),%esp 10b46e: 5b pop %ebx 10b46f: 5e pop %esi 10b470: 5f pop %edi 10b471: c9 leave 10b472: c3 ret 10b473: 90 nop
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
10b474: f6 c3 04 test $0x4,%bl
10b477: 74 ed je 10b466 <rtems_semaphore_create+0x32>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
10b479: 81 fa c0 00 00 00 cmp $0xc0,%edx
10b47f: 74 e5 je 10b466 <rtems_semaphore_create+0x32>
10b481: b9 10 00 00 00 mov $0x10,%ecx
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
10b486: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10b48a: 76 1f jbe 10b4ab <rtems_semaphore_create+0x77>
return RTEMS_INVALID_NUMBER;
10b48c: b8 0a 00 00 00 mov $0xa,%eax 10b491: eb d8 jmp 10b46b <rtems_semaphore_create+0x37> 10b493: 90 nop
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10b494: b8 03 00 00 00 mov $0x3,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b499: 8d 65 f4 lea -0xc(%ebp),%esp 10b49c: 5b pop %ebx 10b49d: 5e pop %esi 10b49e: 5f pop %edi 10b49f: c9 leave 10b4a0: c3 ret 10b4a1: 8d 76 00 lea 0x0(%esi),%esi
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
10b4a4: 89 d9 mov %ebx,%ecx 10b4a6: 83 e1 30 and $0x30,%ecx
10b4a9: 75 db jne 10b486 <rtems_semaphore_create+0x52>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b4ab: a1 50 54 12 00 mov 0x125450,%eax 10b4b0: 40 inc %eax 10b4b1: a3 50 54 12 00 mov %eax,0x125450
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
10b4b6: 83 ec 0c sub $0xc,%esp 10b4b9: 68 a0 53 12 00 push $0x1253a0 10b4be: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b4c1: e8 f6 13 00 00 call 10c8bc <_Objects_Allocate> 10b4c6: 89 c2 mov %eax,%edx
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
10b4c8: 83 c4 10 add $0x10,%esp 10b4cb: 85 c0 test %eax,%eax 10b4cd: 8b 4d c4 mov -0x3c(%ebp),%ecx
10b4d0: 0f 84 ba 00 00 00 je 10b590 <rtems_semaphore_create+0x15c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
10b4d6: 89 58 10 mov %ebx,0x10(%eax)
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
10b4d9: 85 c9 test %ecx,%ecx
10b4db: 74 77 je 10b554 <rtems_semaphore_create+0x120>
/*
* It is either simple binary semaphore or a more powerful mutex
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
10b4dd: 31 c0 xor %eax,%eax 10b4df: f6 c3 04 test $0x4,%bl 10b4e2: 0f 95 c0 setne %al 10b4e5: 89 45 d8 mov %eax,-0x28(%ebp)
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
10b4e8: 83 f9 10 cmp $0x10,%ecx
10b4eb: 0f 84 ae 00 00 00 je 10b59f <rtems_semaphore_create+0x16b>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
10b4f1: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp)
the_mutex_attr.only_owner_release = false;
10b4f8: c6 45 d4 00 movb $0x0,-0x2c(%ebp)
}
mutex_status = _CORE_mutex_Initialize(
10b4fc: 50 push %eax 10b4fd: 31 c0 xor %eax,%eax 10b4ff: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b503: 0f 94 c0 sete %al 10b506: 50 push %eax 10b507: 8d 45 d0 lea -0x30(%ebp),%eax 10b50a: 50 push %eax 10b50b: 8d 42 14 lea 0x14(%edx),%eax 10b50e: 50 push %eax 10b50f: 89 55 c4 mov %edx,-0x3c(%ebp) 10b512: e8 95 0b 00 00 call 10c0ac <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attr,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
10b517: 83 c4 10 add $0x10,%esp 10b51a: 83 f8 06 cmp $0x6,%eax 10b51d: 8b 55 c4 mov -0x3c(%ebp),%edx
10b520: 0f 84 a9 00 00 00 je 10b5cf <rtems_semaphore_create+0x19b>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10b526: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10b529: 0f b7 d8 movzwl %ax,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b52c: 8b 0d bc 53 12 00 mov 0x1253bc,%ecx 10b532: 89 14 99 mov %edx,(%ecx,%ebx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10b535: 89 72 0c mov %esi,0xc(%edx)
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
10b538: 89 07 mov %eax,(%edi)
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
10b53a: e8 bd 22 00 00 call 10d7fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b53f: 31 c0 xor %eax,%eax 10b541: e9 25 ff ff ff jmp 10b46b <rtems_semaphore_create+0x37> 10b546: 66 90 xchg %ax,%ax
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10b548: b8 09 00 00 00 mov $0x9,%eax 10b54d: e9 19 ff ff ff jmp 10b46b <rtems_semaphore_create+0x37> 10b552: 66 90 xchg %ax,%ax
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
10b554: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
10b55b: 31 c0 xor %eax,%eax 10b55d: f6 c3 04 test $0x4,%bl 10b560: 0f 95 c0 setne %al 10b563: 89 45 e4 mov %eax,-0x1c(%ebp)
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10b566: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
10b56d: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
_CORE_semaphore_Initialize(
10b574: 51 push %ecx 10b575: ff 75 0c pushl 0xc(%ebp) 10b578: 8d 45 e0 lea -0x20(%ebp),%eax 10b57b: 50 push %eax 10b57c: 8d 42 14 lea 0x14(%edx),%eax 10b57f: 50 push %eax 10b580: 89 55 c4 mov %edx,-0x3c(%ebp) 10b583: e8 b4 0d 00 00 call 10c33c <_CORE_semaphore_Initialize> 10b588: 83 c4 10 add $0x10,%esp 10b58b: 8b 55 c4 mov -0x3c(%ebp),%edx 10b58e: eb 96 jmp 10b526 <rtems_semaphore_create+0xf2>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
10b590: e8 67 22 00 00 call 10d7fc <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10b595: b8 05 00 00 00 mov $0x5,%eax 10b59a: e9 cc fe ff ff jmp 10b46b <rtems_semaphore_create+0x37>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
10b59f: 8b 45 14 mov 0x14(%ebp),%eax 10b5a2: 89 45 dc mov %eax,-0x24(%ebp)
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10b5a5: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
the_mutex_attr.only_owner_release = false;
10b5ac: c6 45 d4 00 movb $0x0,-0x2c(%ebp)
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
10b5b0: 83 7d d8 01 cmpl $0x1,-0x28(%ebp)
10b5b4: 0f 85 42 ff ff ff jne 10b4fc <rtems_semaphore_create+0xc8>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
10b5ba: f6 c3 40 test $0x40,%bl
10b5bd: 74 30 je 10b5ef <rtems_semaphore_create+0x1bb>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10b5bf: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp)
the_mutex_attr.only_owner_release = true;
10b5c6: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b5ca: e9 2d ff ff ff jmp 10b4fc <rtems_semaphore_create+0xc8>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
10b5cf: 83 ec 08 sub $0x8,%esp 10b5d2: 52 push %edx 10b5d3: 68 a0 53 12 00 push $0x1253a0 10b5d8: e8 57 16 00 00 call 10cc34 <_Objects_Free>
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
10b5dd: e8 1a 22 00 00 call 10d7fc <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
10b5e2: 83 c4 10 add $0x10,%esp 10b5e5: b8 13 00 00 00 mov $0x13,%eax 10b5ea: e9 7c fe ff ff jmp 10b46b <rtems_semaphore_create+0x37>
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
the_mutex_attr.only_owner_release = true;
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
10b5ef: 81 e3 80 00 00 00 and $0x80,%ebx
10b5f5: 0f 84 01 ff ff ff je 10b4fc <rtems_semaphore_create+0xc8>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
10b5fb: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp)
the_mutex_attr.only_owner_release = true;
10b602: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b606: e9 f1 fe ff ff jmp 10b4fc <rtems_semaphore_create+0xc8>
0010b60c <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
10b60c: 55 push %ebp 10b60d: 89 e5 mov %esp,%ebp 10b60f: 53 push %ebx 10b610: 83 ec 18 sub $0x18,%esp
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
10b613: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
10b616: 50 push %eax 10b617: ff 75 08 pushl 0x8(%ebp) 10b61a: 68 a0 53 12 00 push $0x1253a0 10b61f: e8 50 17 00 00 call 10cd74 <_Objects_Get> 10b624: 89 c3 mov %eax,%ebx
switch ( location ) {
10b626: 83 c4 10 add $0x10,%esp 10b629: 8b 4d f4 mov -0xc(%ebp),%ecx 10b62c: 85 c9 test %ecx,%ecx
10b62e: 74 0c je 10b63c <rtems_semaphore_delete+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b630: b8 04 00 00 00 mov $0x4,%eax
}
10b635: 8b 5d fc mov -0x4(%ebp),%ebx 10b638: c9 leave 10b639: c3 ret 10b63a: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
10b63c: 8b 40 10 mov 0x10(%eax),%eax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10b63f: 83 e0 30 and $0x30,%eax
10b642: 74 58 je 10b69c <rtems_semaphore_delete+0x90>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
10b644: 8b 53 64 mov 0x64(%ebx),%edx 10b647: 85 d2 test %edx,%edx
10b649: 75 15 jne 10b660 <rtems_semaphore_delete+0x54>
10b64b: 83 f8 20 cmp $0x20,%eax
10b64e: 74 10 je 10b660 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
10b650: e8 a7 21 00 00 call 10d7fc <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10b655: b8 0c 00 00 00 mov $0xc,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b65a: 8b 5d fc mov -0x4(%ebp),%ebx 10b65d: c9 leave 10b65e: c3 ret 10b65f: 90 nop
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
10b660: 50 push %eax 10b661: 6a 04 push $0x4 10b663: 6a 00 push $0x0 10b665: 8d 43 14 lea 0x14(%ebx),%eax 10b668: 50 push %eax 10b669: e8 32 0a 00 00 call 10c0a0 <_CORE_mutex_Flush> 10b66e: 83 c4 10 add $0x10,%esp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
10b671: 83 ec 08 sub $0x8,%esp 10b674: 53 push %ebx 10b675: 68 a0 53 12 00 push $0x1253a0 10b67a: e8 b9 12 00 00 call 10c938 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
10b67f: 58 pop %eax 10b680: 5a pop %edx 10b681: 53 push %ebx 10b682: 68 a0 53 12 00 push $0x1253a0 10b687: e8 a8 15 00 00 call 10cc34 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
10b68c: e8 6b 21 00 00 call 10d7fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b691: 83 c4 10 add $0x10,%esp 10b694: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b696: 8b 5d fc mov -0x4(%ebp),%ebx 10b699: c9 leave 10b69a: c3 ret 10b69b: 90 nop
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
10b69c: 51 push %ecx 10b69d: 6a 02 push $0x2 10b69f: 6a 00 push $0x0 10b6a1: 8d 43 14 lea 0x14(%ebx),%eax 10b6a4: 50 push %eax 10b6a5: e8 86 0c 00 00 call 10c330 <_CORE_semaphore_Flush> 10b6aa: 83 c4 10 add $0x10,%esp 10b6ad: eb c2 jmp 10b671 <rtems_semaphore_delete+0x65>
0010b6b0 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
10b6b0: 55 push %ebp 10b6b1: 89 e5 mov %esp,%ebp 10b6b3: 57 push %edi 10b6b4: 56 push %esi 10b6b5: 53 push %ebx 10b6b6: 83 ec 1c sub $0x1c,%esp 10b6b9: 8b 5d 08 mov 0x8(%ebp),%ebx 10b6bc: 8b 75 0c mov 0xc(%ebp),%esi 10b6bf: 8b 7d 10 mov 0x10(%ebp),%edi
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
10b6c2: 8d 45 e0 lea -0x20(%ebp),%eax
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
_Objects_Get_isr_disable( &_Semaphore_Information, id, location, level );
10b6c5: 50 push %eax 10b6c6: 8d 45 e4 lea -0x1c(%ebp),%eax 10b6c9: 50 push %eax 10b6ca: 53 push %ebx 10b6cb: 68 a0 53 12 00 push $0x1253a0 10b6d0: e8 47 16 00 00 call 10cd1c <_Objects_Get_isr_disable>
switch ( location ) {
10b6d5: 83 c4 10 add $0x10,%esp 10b6d8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b6db: 85 c9 test %ecx,%ecx
10b6dd: 74 0d je 10b6ec <rtems_semaphore_obtain+0x3c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b6df: b8 04 00 00 00 mov $0x4,%eax
}
10b6e4: 8d 65 f4 lea -0xc(%ebp),%esp 10b6e7: 5b pop %ebx 10b6e8: 5e pop %esi 10b6e9: 5f pop %edi 10b6ea: c9 leave 10b6eb: c3 ret
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10b6ec: f6 40 10 30 testb $0x30,0x10(%eax)
10b6f0: 74 36 je 10b728 <rtems_semaphore_obtain+0x78>
_CORE_mutex_Seize(
10b6f2: 83 ec 0c sub $0xc,%esp 10b6f5: ff 75 e0 pushl -0x20(%ebp) 10b6f8: 57 push %edi
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
10b6f9: 83 e6 01 and $0x1,%esi 10b6fc: 83 f6 01 xor $0x1,%esi 10b6ff: 56 push %esi 10b700: 53 push %ebx 10b701: 83 c0 14 add $0x14,%eax 10b704: 50 push %eax 10b705: e8 9a 0a 00 00 call 10c1a4 <_CORE_mutex_Seize>
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
10b70a: 83 c4 14 add $0x14,%esp
_Thread_Executing->Wait.return_code );
10b70d: a1 18 57 12 00 mov 0x125718,%eax
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
10b712: ff 70 34 pushl 0x34(%eax) 10b715: e8 12 01 00 00 call 10b82c <_Semaphore_Translate_core_mutex_return_code> 10b71a: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10b71d: 8d 65 f4 lea -0xc(%ebp),%esp 10b720: 5b pop %ebx 10b721: 5e pop %esi 10b722: 5f pop %edi 10b723: c9 leave 10b724: c3 ret 10b725: 8d 76 00 lea 0x0(%esi),%esi
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
10b728: 8b 15 18 57 12 00 mov 0x125718,%edx
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10b72e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( the_semaphore->count != 0 ) {
10b735: 8b 48 5c mov 0x5c(%eax),%ecx 10b738: 85 c9 test %ecx,%ecx
10b73a: 75 2c jne 10b768 <rtems_semaphore_obtain+0xb8>
the_semaphore->count -= 1;
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
10b73c: 83 e6 01 and $0x1,%esi
10b73f: 74 33 je 10b774 <rtems_semaphore_obtain+0xc4>
_ISR_Enable( *level_p );
10b741: ff 75 e0 pushl -0x20(%ebp) 10b744: 9d popf
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
10b745: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx)
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
10b74c: 83 ec 0c sub $0xc,%esp
_Thread_Executing->Wait.return_code );
10b74f: a1 18 57 12 00 mov 0x125718,%eax
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
10b754: ff 70 34 pushl 0x34(%eax) 10b757: e8 e0 00 00 00 call 10b83c <_Semaphore_Translate_core_semaphore_return_code> 10b75c: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10b75f: 8d 65 f4 lea -0xc(%ebp),%esp 10b762: 5b pop %ebx 10b763: 5e pop %esi 10b764: 5f pop %edi 10b765: c9 leave 10b766: c3 ret 10b767: 90 nop
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
10b768: 49 dec %ecx 10b769: 89 48 5c mov %ecx,0x5c(%eax)
_ISR_Enable( *level_p );
10b76c: ff 75 e0 pushl -0x20(%ebp) 10b76f: 9d popf 10b770: eb da jmp 10b74c <rtems_semaphore_obtain+0x9c> 10b772: 66 90 xchg %ax,%ax 10b774: 8b 0d 50 54 12 00 mov 0x125450,%ecx 10b77a: 41 inc %ecx 10b77b: 89 0d 50 54 12 00 mov %ecx,0x125450
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;
10b781: c7 40 44 01 00 00 00 movl $0x1,0x44(%eax)
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
10b788: 83 c0 14 add $0x14,%eax 10b78b: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10b78e: 89 5a 20 mov %ebx,0x20(%edx)
_ISR_Enable( *level_p );
10b791: ff 75 e0 pushl -0x20(%ebp) 10b794: 9d popf
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
10b795: 52 push %edx 10b796: 68 e0 df 10 00 push $0x10dfe0 10b79b: 57 push %edi 10b79c: 50 push %eax 10b79d: e8 12 25 00 00 call 10dcb4 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10b7a2: e8 55 20 00 00 call 10d7fc <_Thread_Enable_dispatch> 10b7a7: 83 c4 10 add $0x10,%esp 10b7aa: eb a0 jmp 10b74c <rtems_semaphore_obtain+0x9c>
0010b7ac <rtems_semaphore_release>:
#endif
rtems_status_code rtems_semaphore_release(
rtems_id id
)
{
10b7ac: 55 push %ebp 10b7ad: 89 e5 mov %esp,%ebp 10b7af: 53 push %ebx 10b7b0: 83 ec 18 sub $0x18,%esp 10b7b3: 8b 5d 08 mov 0x8(%ebp),%ebx
register Semaphore_Control *the_semaphore;
Objects_Locations location;
CORE_mutex_Status mutex_status;
CORE_semaphore_Status semaphore_status;
the_semaphore = _Semaphore_Get( id, &location );
10b7b6: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
10b7b9: 50 push %eax 10b7ba: 53 push %ebx 10b7bb: 68 a0 53 12 00 push $0x1253a0 10b7c0: e8 af 15 00 00 call 10cd74 <_Objects_Get>
switch ( location ) {
10b7c5: 83 c4 10 add $0x10,%esp 10b7c8: 8b 55 f4 mov -0xc(%ebp),%edx 10b7cb: 85 d2 test %edx,%edx
10b7cd: 74 0d je 10b7dc <rtems_semaphore_release+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b7cf: b8 04 00 00 00 mov $0x4,%eax
}
10b7d4: 8b 5d fc mov -0x4(%ebp),%ebx 10b7d7: c9 leave 10b7d8: c3 ret 10b7d9: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10b7dc: f6 40 10 30 testb $0x30,0x10(%eax)
10b7e0: 75 26 jne 10b808 <rtems_semaphore_release+0x5c>
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
} else {
semaphore_status = _CORE_semaphore_Surrender(
10b7e2: 52 push %edx 10b7e3: 6a 00 push $0x0 10b7e5: 53 push %ebx 10b7e6: 83 c0 14 add $0x14,%eax 10b7e9: 50 push %eax 10b7ea: e8 8d 0b 00 00 call 10c37c <_CORE_semaphore_Surrender> 10b7ef: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.semaphore,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10b7f1: e8 06 20 00 00 call 10d7fc <_Thread_Enable_dispatch>
return
10b7f6: 89 1c 24 mov %ebx,(%esp) 10b7f9: e8 3e 00 00 00 call 10b83c <_Semaphore_Translate_core_semaphore_return_code> 10b7fe: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b801: 8b 5d fc mov -0x4(%ebp),%ebx 10b804: c9 leave 10b805: c3 ret 10b806: 66 90 xchg %ax,%ax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
mutex_status = _CORE_mutex_Surrender(
10b808: 51 push %ecx 10b809: 6a 00 push $0x0 10b80b: 53 push %ebx 10b80c: 83 c0 14 add $0x14,%eax 10b80f: 50 push %eax 10b810: e8 2f 0a 00 00 call 10c244 <_CORE_mutex_Surrender> 10b815: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.mutex,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10b817: e8 e0 1f 00 00 call 10d7fc <_Thread_Enable_dispatch>
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
10b81c: 89 1c 24 mov %ebx,(%esp) 10b81f: e8 08 00 00 00 call 10b82c <_Semaphore_Translate_core_mutex_return_code> 10b824: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b827: 8b 5d fc mov -0x4(%ebp),%ebx 10b82a: c9 leave 10b82b: c3 ret
00117d4c <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
117d4c: 55 push %ebp 117d4d: 89 e5 mov %esp,%ebp 117d4f: 53 push %ebx 117d50: 83 ec 14 sub $0x14,%esp 117d53: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
117d56: 85 db test %ebx,%ebx
117d58: 75 0a jne 117d64 <rtems_signal_send+0x18>
return RTEMS_INVALID_NUMBER;
117d5a: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117d5f: 8b 5d fc mov -0x4(%ebp),%ebx 117d62: c9 leave 117d63: c3 ret
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
117d64: 83 ec 08 sub $0x8,%esp 117d67: 8d 45 f4 lea -0xc(%ebp),%eax 117d6a: 50 push %eax 117d6b: ff 75 08 pushl 0x8(%ebp) 117d6e: e8 c9 3e 00 00 call 11bc3c <_Thread_Get>
switch ( location ) {
117d73: 83 c4 10 add $0x10,%esp 117d76: 8b 55 f4 mov -0xc(%ebp),%edx 117d79: 85 d2 test %edx,%edx
117d7b: 74 0b je 117d88 <rtems_signal_send+0x3c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
117d7d: b8 04 00 00 00 mov $0x4,%eax
}
117d82: 8b 5d fc mov -0x4(%ebp),%ebx 117d85: c9 leave 117d86: c3 ret 117d87: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
117d88: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
117d8e: 8b 4a 0c mov 0xc(%edx),%ecx 117d91: 85 c9 test %ecx,%ecx
117d93: 74 3f je 117dd4 <rtems_signal_send+0x88>
if ( asr->is_enabled ) {
117d95: 80 7a 08 00 cmpb $0x0,0x8(%edx)
117d99: 74 25 je 117dc0 <rtems_signal_send+0x74>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
117d9b: 9c pushf 117d9c: fa cli 117d9d: 59 pop %ecx
*signal_set |= signals;
117d9e: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
117da1: 51 push %ecx 117da2: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
117da3: 8b 15 14 0d 14 00 mov 0x140d14,%edx 117da9: 85 d2 test %edx,%edx
117dab: 74 1b je 117dc8 <rtems_signal_send+0x7c>
117dad: 3b 05 18 0d 14 00 cmp 0x140d18,%eax
117db3: 75 13 jne 117dc8 <rtems_signal_send+0x7c><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
117db5: c6 05 24 0d 14 00 01 movb $0x1,0x140d24 117dbc: eb 0a jmp 117dc8 <rtems_signal_send+0x7c> 117dbe: 66 90 xchg %ax,%ax
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
117dc0: 9c pushf 117dc1: fa cli 117dc2: 58 pop %eax
*signal_set |= signals;
117dc3: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
117dc6: 50 push %eax 117dc7: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
117dc8: e8 4b 3e 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
117dcd: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117dcf: 8b 5d fc mov -0x4(%ebp),%ebx 117dd2: c9 leave 117dd3: c3 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
117dd4: e8 3f 3e 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
117dd9: b8 0b 00 00 00 mov $0xb,%eax 117dde: e9 7c ff ff ff jmp 117d5f <rtems_signal_send+0x13>
0010b84c <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
rtems_id *id
)
{
10b84c: 55 push %ebp 10b84d: 89 e5 mov %esp,%ebp 10b84f: 57 push %edi 10b850: 56 push %esi 10b851: 53 push %ebx 10b852: 83 ec 1c sub $0x1c,%esp 10b855: 8b 5d 08 mov 0x8(%ebp),%ebx 10b858: 8b 7d 0c mov 0xc(%ebp),%edi 10b85b: 8b 75 1c mov 0x1c(%ebp),%esi
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
10b85e: 85 f6 test %esi,%esi
10b860: 0f 84 3e 01 00 00 je 10b9a4 <rtems_task_create+0x158>
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10b866: 85 db test %ebx,%ebx
10b868: 0f 84 d2 00 00 00 je 10b940 <rtems_task_create+0xf4>
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
10b86e: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp)
10b875: 75 17 jne 10b88e <rtems_task_create+0x42>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10b877: 85 ff test %edi,%edi
10b879: 0f 84 b1 00 00 00 je 10b930 <rtems_task_create+0xe4>
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10b87f: 0f b6 05 14 12 12 00 movzbl 0x121214,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10b886: 39 c7 cmp %eax,%edi
10b888: 0f 87 a2 00 00 00 ja 10b930 <rtems_task_create+0xe4>
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10b88e: 83 ec 0c sub $0xc,%esp 10b891: ff 35 3c 55 12 00 pushl 0x12553c 10b897: e8 7c 06 00 00 call 10bf18 <_API_Mutex_Lock>
* This function allocates a task control block from
* the inactive chain of free task control blocks.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
10b89c: c7 04 24 e0 53 12 00 movl $0x1253e0,(%esp) 10b8a3: e8 14 10 00 00 call 10c8bc <_Objects_Allocate> 10b8a8: 89 c2 mov %eax,%edx
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
10b8aa: 83 c4 10 add $0x10,%esp 10b8ad: 85 c0 test %eax,%eax
10b8af: 0f 84 cf 00 00 00 je 10b984 <rtems_task_create+0x138>
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
10b8b5: 50 push %eax 10b8b6: 53 push %ebx
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
10b8b7: 8b 45 14 mov 0x14(%ebp),%eax 10b8ba: 83 e0 01 and $0x1,%eax 10b8bd: 50 push %eax 10b8be: 6a 00 push $0x0 10b8c0: 31 c0 xor %eax,%eax 10b8c2: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp) 10b8c9: 0f 95 c0 setne %al 10b8cc: 50 push %eax 10b8cd: 31 c0 xor %eax,%eax 10b8cf: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp) 10b8d6: 0f 94 c0 sete %al 10b8d9: 50 push %eax 10b8da: 57 push %edi
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point(
rtems_attribute attribute_set
)
{
return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false;
10b8db: 8b 45 18 mov 0x18(%ebp),%eax 10b8de: 83 e0 01 and $0x1,%eax 10b8e1: 50 push %eax 10b8e2: ff 75 10 pushl 0x10(%ebp) 10b8e5: 6a 00 push $0x0 10b8e7: 52 push %edx 10b8e8: 68 e0 53 12 00 push $0x1253e0 10b8ed: 89 55 e4 mov %edx,-0x1c(%ebp) 10b8f0: e8 a3 1f 00 00 call 10d898 <_Thread_Initialize>
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
10b8f5: 83 c4 30 add $0x30,%esp 10b8f8: 84 c0 test %al,%al 10b8fa: 8b 55 e4 mov -0x1c(%ebp),%edx
10b8fd: 74 51 je 10b950 <rtems_task_create+0x104>
_RTEMS_Unlock_allocator();
return RTEMS_UNSATISFIED;
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
10b8ff: 8b 82 e4 00 00 00 mov 0xe4(%edx),%eax
* id - thread id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_task_create(
10b905: f7 45 14 00 04 00 00 testl $0x400,0x14(%ebp)
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
10b90c: 0f 94 40 08 sete 0x8(%eax)
*id = the_thread->Object.id;
10b910: 8b 42 08 mov 0x8(%edx),%eax 10b913: 89 06 mov %eax,(%esi)
);
}
#endif
_RTEMS_Unlock_allocator();
10b915: 83 ec 0c sub $0xc,%esp 10b918: ff 35 3c 55 12 00 pushl 0x12553c 10b91e: e8 3d 06 00 00 call 10bf60 <_API_Mutex_Unlock>
return RTEMS_SUCCESSFUL;
10b923: 83 c4 10 add $0x10,%esp 10b926: 31 c0 xor %eax,%eax
}
10b928: 8d 65 f4 lea -0xc(%ebp),%esp 10b92b: 5b pop %ebx 10b92c: 5e pop %esi 10b92d: 5f pop %edi 10b92e: c9 leave 10b92f: c3 ret
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) )
return RTEMS_INVALID_PRIORITY;
10b930: b8 13 00 00 00 mov $0x13,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b935: 8d 65 f4 lea -0xc(%ebp),%esp 10b938: 5b pop %ebx 10b939: 5e pop %esi 10b93a: 5f pop %edi 10b93b: c9 leave 10b93c: c3 ret 10b93d: 8d 76 00 lea 0x0(%esi),%esi
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10b940: b8 03 00 00 00 mov $0x3,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b945: 8d 65 f4 lea -0xc(%ebp),%esp 10b948: 5b pop %ebx 10b949: 5e pop %esi 10b94a: 5f pop %edi 10b94b: c9 leave 10b94c: c3 ret 10b94d: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
_Objects_Free(
10b950: 83 ec 0c sub $0xc,%esp 10b953: ff 72 08 pushl 0x8(%edx) 10b956: e8 49 13 00 00 call 10cca4 <_Objects_Get_information_id> 10b95b: 5a pop %edx 10b95c: 59 pop %ecx 10b95d: 8b 55 e4 mov -0x1c(%ebp),%edx 10b960: 52 push %edx 10b961: 50 push %eax 10b962: e8 cd 12 00 00 call 10cc34 <_Objects_Free>
#if defined(RTEMS_MULTIPROCESSING)
if ( is_global )
_Objects_MP_Free_global_object( the_global_object );
#endif
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10b967: 58 pop %eax 10b968: ff 35 3c 55 12 00 pushl 0x12553c 10b96e: e8 ed 05 00 00 call 10bf60 <_API_Mutex_Unlock>
return RTEMS_UNSATISFIED;
10b973: 83 c4 10 add $0x10,%esp 10b976: b8 0d 00 00 00 mov $0xd,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b97b: 8d 65 f4 lea -0xc(%ebp),%esp 10b97e: 5b pop %ebx 10b97f: 5e pop %esi 10b980: 5f pop %edi 10b981: c9 leave 10b982: c3 ret 10b983: 90 nop
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10b984: 83 ec 0c sub $0xc,%esp 10b987: ff 35 3c 55 12 00 pushl 0x12553c 10b98d: e8 ce 05 00 00 call 10bf60 <_API_Mutex_Unlock>
return RTEMS_TOO_MANY;
10b992: 83 c4 10 add $0x10,%esp 10b995: b8 05 00 00 00 mov $0x5,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b99a: 8d 65 f4 lea -0xc(%ebp),%esp 10b99d: 5b pop %ebx 10b99e: 5e pop %esi 10b99f: 5f pop %edi 10b9a0: c9 leave 10b9a1: c3 ret 10b9a2: 66 90 xchg %ax,%ax
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10b9a4: b8 09 00 00 00 mov $0x9,%eax 10b9a9: eb 8a jmp 10b935 <rtems_task_create+0xe9>
0010b9ac <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
rtems_id id
)
{
10b9ac: 55 push %ebp 10b9ad: 89 e5 mov %esp,%ebp 10b9af: 53 push %ebx 10b9b0: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
10b9b3: ff 35 3c 55 12 00 pushl 0x12553c 10b9b9: e8 5a 05 00 00 call 10bf18 <_API_Mutex_Lock>
the_thread = _Thread_Get( id, &location );
10b9be: 5a pop %edx 10b9bf: 59 pop %ecx 10b9c0: 8d 45 f4 lea -0xc(%ebp),%eax 10b9c3: 50 push %eax 10b9c4: ff 75 08 pushl 0x8(%ebp) 10b9c7: e8 54 1e 00 00 call 10d820 <_Thread_Get> 10b9cc: 89 c3 mov %eax,%ebx
switch ( location ) {
10b9ce: 83 c4 10 add $0x10,%esp 10b9d1: 8b 45 f4 mov -0xc(%ebp),%eax 10b9d4: 85 c0 test %eax,%eax
10b9d6: 75 44 jne 10ba1c <rtems_task_delete+0x70>
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
10b9d8: 83 ec 0c sub $0xc,%esp 10b9db: ff 73 08 pushl 0x8(%ebx) 10b9de: e8 c1 12 00 00 call 10cca4 <_Objects_Get_information_id>
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
10b9e3: 5a pop %edx 10b9e4: 59 pop %ecx 10b9e5: 53 push %ebx 10b9e6: 50 push %eax 10b9e7: e8 d0 1a 00 00 call 10d4bc <_Thread_Close> 10b9ec: 58 pop %eax 10b9ed: ff 73 08 pushl 0x8(%ebx) 10b9f0: e8 af 12 00 00 call 10cca4 <_Objects_Get_information_id> 10b9f5: 5a pop %edx 10b9f6: 59 pop %ecx 10b9f7: 53 push %ebx 10b9f8: 50 push %eax 10b9f9: e8 36 12 00 00 call 10cc34 <_Objects_Free>
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10b9fe: 58 pop %eax 10b9ff: ff 35 3c 55 12 00 pushl 0x12553c 10ba05: e8 56 05 00 00 call 10bf60 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
10ba0a: e8 ed 1d 00 00 call 10d7fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ba0f: 83 c4 10 add $0x10,%esp 10ba12: 31 c0 xor %eax,%eax
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
10ba14: 8b 5d fc mov -0x4(%ebp),%ebx 10ba17: c9 leave 10ba18: c3 ret 10ba19: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
10ba1c: 83 ec 0c sub $0xc,%esp 10ba1f: ff 35 3c 55 12 00 pushl 0x12553c 10ba25: e8 36 05 00 00 call 10bf60 <_API_Mutex_Unlock>
return RTEMS_INVALID_ID;
10ba2a: 83 c4 10 add $0x10,%esp 10ba2d: b8 04 00 00 00 mov $0x4,%eax
}
10ba32: 8b 5d fc mov -0x4(%ebp),%ebx 10ba35: c9 leave 10ba36: c3 ret
0010d4d0 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
10d4d0: 55 push %ebp 10d4d1: 89 e5 mov %esp,%ebp 10d4d3: 56 push %esi 10d4d4: 53 push %ebx 10d4d5: 83 ec 10 sub $0x10,%esp 10d4d8: 8b 45 08 mov 0x8(%ebp),%eax 10d4db: 8b 75 0c mov 0xc(%ebp),%esi 10d4de: 8b 5d 10 mov 0x10(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10d4e1: 80 3d e4 51 12 00 00 cmpb $0x0,0x1251e4
10d4e8: 74 6e je 10d558 <rtems_task_get_note+0x88>
return RTEMS_NOT_CONFIGURED;
if ( !note )
10d4ea: 85 db test %ebx,%ebx
10d4ec: 74 7e je 10d56c <rtems_task_get_note+0x9c><== NEVER TAKEN
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10d4ee: 83 fe 0f cmp $0xf,%esi
10d4f1: 77 3d ja 10d530 <rtems_task_get_note+0x60><== NEVER TAKEN
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d4f3: 85 c0 test %eax,%eax
10d4f5: 74 45 je 10d53c <rtems_task_get_note+0x6c>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
10d4f7: 8b 15 38 9a 12 00 mov 0x129a38,%edx
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d4fd: 3b 42 08 cmp 0x8(%edx),%eax
10d500: 74 40 je 10d542 <rtems_task_get_note+0x72>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10d502: 83 ec 08 sub $0x8,%esp 10d505: 8d 55 f4 lea -0xc(%ebp),%edx 10d508: 52 push %edx 10d509: 50 push %eax 10d50a: e8 45 21 00 00 call 10f654 <_Thread_Get>
switch ( location ) {
10d50f: 83 c4 10 add $0x10,%esp 10d512: 8b 55 f4 mov -0xc(%ebp),%edx 10d515: 85 d2 test %edx,%edx
10d517: 75 4b jne 10d564 <rtems_task_get_note+0x94>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10d519: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax 10d51f: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d523: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10d525: e8 06 21 00 00 call 10f630 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d52a: 31 c0 xor %eax,%eax 10d52c: eb 07 jmp 10d535 <rtems_task_get_note+0x65> 10d52e: 66 90 xchg %ax,%ax
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
return RTEMS_INVALID_NUMBER;
10d530: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d535: 8d 65 f8 lea -0x8(%ebp),%esp 10d538: 5b pop %ebx 10d539: 5e pop %esi 10d53a: c9 leave 10d53b: c3 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d53c: 8b 15 38 9a 12 00 mov 0x129a38,%edx
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10d542: 8b 82 e4 00 00 00 mov 0xe4(%edx),%eax 10d548: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d54c: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
10d54e: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d550: 8d 65 f8 lea -0x8(%ebp),%esp 10d553: 5b pop %ebx 10d554: 5e pop %esi 10d555: c9 leave 10d556: c3 ret 10d557: 90 nop
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
10d558: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d55d: 8d 65 f8 lea -0x8(%ebp),%esp 10d560: 5b pop %ebx 10d561: 5e pop %esi 10d562: c9 leave 10d563: c3 ret
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d564: b8 04 00 00 00 mov $0x4,%eax 10d569: eb ca jmp 10d535 <rtems_task_get_note+0x65> 10d56b: 90 nop
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
return RTEMS_INVALID_ADDRESS;
10d56c: b8 09 00 00 00 mov $0x9,%eax 10d571: eb c2 jmp 10d535 <rtems_task_get_note+0x65>
00118130 <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
rtems_id id
)
{
118130: 55 push %ebp 118131: 89 e5 mov %esp,%ebp 118133: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
118136: 8d 45 f4 lea -0xc(%ebp),%eax 118139: 50 push %eax 11813a: ff 75 08 pushl 0x8(%ebp) 11813d: e8 fa 3a 00 00 call 11bc3c <_Thread_Get>
switch ( location ) {
118142: 83 c4 10 add $0x10,%esp 118145: 8b 55 f4 mov -0xc(%ebp),%edx 118148: 85 d2 test %edx,%edx
11814a: 74 08 je 118154 <rtems_task_is_suspended+0x24>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11814c: b8 04 00 00 00 mov $0x4,%eax
}
118151: c9 leave 118152: c3 ret 118153: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
118154: f6 40 10 02 testb $0x2,0x10(%eax)
118158: 74 0e je 118168 <rtems_task_is_suspended+0x38><== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
11815a: e8 b9 3a 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_ALREADY_SUSPENDED;
11815f: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118164: c9 leave 118165: c3 ret 118166: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Enable_dispatch();
118168: e8 ab 3a 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11816d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11816f: c9 leave 118170: c3 ret
00111f44 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
111f44: 55 push %ebp 111f45: 89 e5 mov %esp,%ebp 111f47: 57 push %edi 111f48: 56 push %esi 111f49: 53 push %ebx 111f4a: 83 ec 1c sub $0x1c,%esp 111f4d: 8b 4d 10 mov 0x10(%ebp),%ecx
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
111f50: 85 c9 test %ecx,%ecx
111f52: 0f 84 40 01 00 00 je 112098 <rtems_task_mode+0x154>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
111f58: 8b 1d 18 57 12 00 mov 0x125718,%ebx
api = executing->API_Extensions[ THREAD_API_RTEMS ];
111f5e: 8b bb e4 00 00 00 mov 0xe4(%ebx),%edi
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
111f64: 80 7b 74 01 cmpb $0x1,0x74(%ebx) 111f68: 19 f6 sbb %esi,%esi 111f6a: 81 e6 00 01 00 00 and $0x100,%esi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
111f70: 8b 53 7c mov 0x7c(%ebx),%edx 111f73: 85 d2 test %edx,%edx
111f75: 0f 85 f1 00 00 00 jne 11206c <rtems_task_mode+0x128>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
111f7b: 80 7f 08 01 cmpb $0x1,0x8(%edi) 111f7f: 19 d2 sbb %edx,%edx 111f81: 81 e2 00 04 00 00 and $0x400,%edx
old_mode |= _ISR_Get_level();
111f87: 89 55 e4 mov %edx,-0x1c(%ebp) 111f8a: 89 4d e0 mov %ecx,-0x20(%ebp) 111f8d: e8 7a cc ff ff call 10ec0c <_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;
111f92: 8b 55 e4 mov -0x1c(%ebp),%edx 111f95: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
111f97: 09 f0 or %esi,%eax 111f99: 8b 4d e0 mov -0x20(%ebp),%ecx 111f9c: 89 01 mov %eax,(%ecx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
111f9e: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
111fa5: 74 0b je 111fb2 <rtems_task_mode+0x6e>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
111fa7: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 111fae: 0f 94 43 74 sete 0x74(%ebx)
if ( mask & RTEMS_TIMESLICE_MASK ) {
111fb2: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
111fb9: 74 1c je 111fd7 <rtems_task_mode+0x93>
if ( _Modes_Is_timeslice(mode_set) ) {
111fbb: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
111fc2: 0f 84 b8 00 00 00 je 112080 <rtems_task_mode+0x13c>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
111fc8: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
111fcf: a1 20 54 12 00 mov 0x125420,%eax 111fd4: 89 43 78 mov %eax,0x78(%ebx)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
111fd7: f6 45 0c 01 testb $0x1,0xc(%ebp)
111fdb: 74 0b je 111fe8 <rtems_task_mode+0xa4>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
111fdd: f6 45 08 01 testb $0x1,0x8(%ebp)
111fe1: 0f 84 91 00 00 00 je 112078 <rtems_task_mode+0x134>
111fe7: fa cli
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
111fe8: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
111fef: 74 3f je 112030 <rtems_task_mode+0xec>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
111ff1: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 111ff8: 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 ) {
111ffb: 38 47 08 cmp %al,0x8(%edi)
111ffe: 74 30 je 112030 <rtems_task_mode+0xec>
asr->is_enabled = is_asr_enabled;
112000: 88 47 08 mov %al,0x8(%edi)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
112003: 9c pushf 112004: fa cli 112005: 58 pop %eax
_signals = information->signals_pending;
112006: 8b 57 18 mov 0x18(%edi),%edx
information->signals_pending = information->signals_posted;
112009: 8b 4f 14 mov 0x14(%edi),%ecx 11200c: 89 4f 18 mov %ecx,0x18(%edi)
information->signals_posted = _signals;
11200f: 89 57 14 mov %edx,0x14(%edi)
_ISR_Enable( _level );
112012: 50 push %eax 112013: 9d popf
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
112014: 8b 47 14 mov 0x14(%edi),%eax 112017: 85 c0 test %eax,%eax 112019: 0f 95 c0 setne %al
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
11201c: 83 3d 20 56 12 00 03 cmpl $0x3,0x125620
112023: 74 16 je 11203b <rtems_task_mode+0xf7> <== ALWAYS TAKEN
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
112025: 31 c0 xor %eax,%eax
}
112027: 83 c4 1c add $0x1c,%esp 11202a: 5b pop %ebx 11202b: 5e pop %esi 11202c: 5f pop %edi 11202d: c9 leave 11202e: c3 ret 11202f: 90 nop
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
112030: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
112032: 83 3d 20 56 12 00 03 cmpl $0x3,0x125620
112039: 75 ea jne 112025 <rtems_task_mode+0xe1> <== NEVER TAKEN
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
11203b: 8b 15 18 57 12 00 mov 0x125718,%edx
if ( are_signals_pending ||
112041: 84 c0 test %al,%al
112043: 75 0e jne 112053 <rtems_task_mode+0x10f>
112045: 3b 15 1c 57 12 00 cmp 0x12571c,%edx
11204b: 74 d8 je 112025 <rtems_task_mode+0xe1>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
11204d: 80 7a 74 00 cmpb $0x0,0x74(%edx)
112051: 74 d2 je 112025 <rtems_task_mode+0xe1> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
112053: c6 05 24 57 12 00 01 movb $0x1,0x125724
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
11205a: e8 25 b6 ff ff call 10d684 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
11205f: 31 c0 xor %eax,%eax
}
112061: 83 c4 1c add $0x1c,%esp 112064: 5b pop %ebx 112065: 5e pop %esi 112066: 5f pop %edi 112067: c9 leave 112068: c3 ret 112069: 8d 76 00 lea 0x0(%esi),%esi
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
11206c: 81 ce 00 02 00 00 or $0x200,%esi 112072: e9 04 ff ff ff jmp 111f7b <rtems_task_mode+0x37> 112077: 90 nop 112078: fb sti 112079: e9 6a ff ff ff jmp 111fe8 <rtems_task_mode+0xa4> 11207e: 66 90 xchg %ax,%ax
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
112080: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
112087: f6 45 0c 01 testb $0x1,0xc(%ebp)
11208b: 0f 84 57 ff ff ff je 111fe8 <rtems_task_mode+0xa4>
112091: e9 47 ff ff ff jmp 111fdd <rtems_task_mode+0x99> 112096: 66 90 xchg %ax,%ax
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
112098: b8 09 00 00 00 mov $0x9,%eax
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
11209d: 83 c4 1c add $0x1c,%esp 1120a0: 5b pop %ebx 1120a1: 5e pop %esi 1120a2: 5f pop %edi 1120a3: c9 leave 1120a4: c3 ret
0010ecb8 <rtems_task_resume>:
*/
rtems_status_code rtems_task_resume(
rtems_id id
)
{
10ecb8: 55 push %ebp 10ecb9: 89 e5 mov %esp,%ebp 10ecbb: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10ecbe: 8d 45 f4 lea -0xc(%ebp),%eax 10ecc1: 50 push %eax 10ecc2: ff 75 08 pushl 0x8(%ebp) 10ecc5: e8 6a 1e 00 00 call 110b34 <_Thread_Get>
switch ( location ) {
10ecca: 83 c4 10 add $0x10,%esp 10eccd: 8b 55 f4 mov -0xc(%ebp),%edx 10ecd0: 85 d2 test %edx,%edx
10ecd2: 74 08 je 10ecdc <rtems_task_resume+0x24>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10ecd4: b8 04 00 00 00 mov $0x4,%eax
}
10ecd9: c9 leave 10ecda: c3 ret 10ecdb: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
10ecdc: f6 40 10 02 testb $0x2,0x10(%eax)
10ece0: 75 0e jne 10ecf0 <rtems_task_resume+0x38>
_Thread_Resume( the_thread, true );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10ece2: e8 29 1e 00 00 call 110b10 <_Thread_Enable_dispatch>
return RTEMS_INCORRECT_STATE;
10ece7: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ecec: c9 leave 10eced: c3 ret 10ecee: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
_Thread_Resume( the_thread, true );
10ecf0: 83 ec 08 sub $0x8,%esp 10ecf3: 6a 01 push $0x1 10ecf5: 50 push %eax 10ecf6: e8 31 26 00 00 call 11132c <_Thread_Resume>
_Thread_Enable_dispatch();
10ecfb: e8 10 1e 00 00 call 110b10 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ed00: 83 c4 10 add $0x10,%esp 10ed03: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ed05: c9 leave 10ed06: c3 ret
0010d648 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
10d648: 55 push %ebp 10d649: 89 e5 mov %esp,%ebp 10d64b: 56 push %esi 10d64c: 53 push %ebx 10d64d: 83 ec 10 sub $0x10,%esp 10d650: 8b 45 08 mov 0x8(%ebp),%eax 10d653: 8b 5d 0c mov 0xc(%ebp),%ebx 10d656: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10d659: 80 3d e4 51 12 00 00 cmpb $0x0,0x1251e4
10d660: 74 66 je 10d6c8 <rtems_task_set_note+0x80>
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10d662: 83 fb 0f cmp $0xf,%ebx
10d665: 77 39 ja 10d6a0 <rtems_task_set_note+0x58>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d667: 85 c0 test %eax,%eax
10d669: 74 41 je 10d6ac <rtems_task_set_note+0x64>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
10d66b: 8b 15 38 9a 12 00 mov 0x129a38,%edx
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d671: 3b 42 08 cmp 0x8(%edx),%eax
10d674: 74 3c je 10d6b2 <rtems_task_set_note+0x6a>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10d676: 83 ec 08 sub $0x8,%esp 10d679: 8d 55 f4 lea -0xc(%ebp),%edx 10d67c: 52 push %edx 10d67d: 50 push %eax 10d67e: e8 d1 1f 00 00 call 10f654 <_Thread_Get>
switch ( location ) {
10d683: 83 c4 10 add $0x10,%esp 10d686: 8b 55 f4 mov -0xc(%ebp),%edx 10d689: 85 d2 test %edx,%edx
10d68b: 75 47 jne 10d6d4 <rtems_task_set_note+0x8c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10d68d: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax 10d693: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4)
_Thread_Enable_dispatch();
10d697: e8 94 1f 00 00 call 10f630 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d69c: 31 c0 xor %eax,%eax 10d69e: eb 05 jmp 10d6a5 <rtems_task_set_note+0x5d>
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
return RTEMS_INVALID_NUMBER;
10d6a0: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d6a5: 8d 65 f8 lea -0x8(%ebp),%esp 10d6a8: 5b pop %ebx 10d6a9: 5e pop %esi 10d6aa: c9 leave 10d6ab: c3 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d6ac: 8b 15 38 9a 12 00 mov 0x129a38,%edx
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10d6b2: 8b 82 e4 00 00 00 mov 0xe4(%edx),%eax 10d6b8: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4)
return RTEMS_SUCCESSFUL;
10d6bc: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d6be: 8d 65 f8 lea -0x8(%ebp),%esp 10d6c1: 5b pop %ebx 10d6c2: 5e pop %esi 10d6c3: c9 leave 10d6c4: c3 ret 10d6c5: 8d 76 00 lea 0x0(%esi),%esi
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
10d6c8: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d6cd: 8d 65 f8 lea -0x8(%ebp),%esp 10d6d0: 5b pop %ebx 10d6d1: 5e pop %esi 10d6d2: c9 leave 10d6d3: c3 ret
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d6d4: b8 04 00 00 00 mov $0x4,%eax
}
10d6d9: 8d 65 f8 lea -0x8(%ebp),%esp 10d6dc: 5b pop %ebx 10d6dd: 5e pop %esi 10d6de: c9 leave 10d6df: c3 ret
0010f98c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10f98c: 55 push %ebp 10f98d: 89 e5 mov %esp,%ebp 10f98f: 56 push %esi 10f990: 53 push %ebx 10f991: 83 ec 10 sub $0x10,%esp 10f994: 8b 5d 0c mov 0xc(%ebp),%ebx 10f997: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10f99a: 85 db test %ebx,%ebx
10f99c: 74 0b je 10f9a9 <rtems_task_set_priority+0x1d>
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 ) );
10f99e: 0f b6 05 14 52 12 00 movzbl 0x125214,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10f9a5: 39 c3 cmp %eax,%ebx
10f9a7: 77 5f ja 10fa08 <rtems_task_set_priority+0x7c>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10f9a9: 85 f6 test %esi,%esi
10f9ab: 74 67 je 10fa14 <rtems_task_set_priority+0x88>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10f9ad: 83 ec 08 sub $0x8,%esp 10f9b0: 8d 45 f4 lea -0xc(%ebp),%eax 10f9b3: 50 push %eax 10f9b4: ff 75 08 pushl 0x8(%ebp) 10f9b7: e8 c8 1f 00 00 call 111984 <_Thread_Get>
switch ( location ) {
10f9bc: 83 c4 10 add $0x10,%esp 10f9bf: 8b 55 f4 mov -0xc(%ebp),%edx 10f9c2: 85 d2 test %edx,%edx
10f9c4: 75 36 jne 10f9fc <rtems_task_set_priority+0x70>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10f9c6: 8b 50 14 mov 0x14(%eax),%edx 10f9c9: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10f9cb: 85 db test %ebx,%ebx
10f9cd: 74 1c je 10f9eb <rtems_task_set_priority+0x5f>
the_thread->real_priority = new_priority;
10f9cf: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10f9d2: 8b 48 1c mov 0x1c(%eax),%ecx 10f9d5: 85 c9 test %ecx,%ecx
10f9d7: 74 05 je 10f9de <rtems_task_set_priority+0x52>
10f9d9: 3b 58 14 cmp 0x14(%eax),%ebx
10f9dc: 73 0d jae 10f9eb <rtems_task_set_priority+0x5f><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10f9de: 52 push %edx 10f9df: 6a 00 push $0x0 10f9e1: 53 push %ebx 10f9e2: 50 push %eax 10f9e3: e8 c4 1a 00 00 call 1114ac <_Thread_Change_priority> 10f9e8: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10f9eb: e8 70 1f 00 00 call 111960 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10f9f0: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10f9f2: 8d 65 f8 lea -0x8(%ebp),%esp 10f9f5: 5b pop %ebx 10f9f6: 5e pop %esi 10f9f7: c9 leave 10f9f8: c3 ret 10f9f9: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10f9fc: b8 04 00 00 00 mov $0x4,%eax
}
10fa01: 8d 65 f8 lea -0x8(%ebp),%esp 10fa04: 5b pop %ebx 10fa05: 5e pop %esi 10fa06: c9 leave 10fa07: c3 ret
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10fa08: b8 13 00 00 00 mov $0x13,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa0d: 8d 65 f8 lea -0x8(%ebp),%esp 10fa10: 5b pop %ebx 10fa11: 5e pop %esi 10fa12: c9 leave 10fa13: c3 ret
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10fa14: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa19: 8d 65 f8 lea -0x8(%ebp),%esp 10fa1c: 5b pop %ebx 10fa1d: 5e pop %esi 10fa1e: c9 leave 10fa1f: c3 ret
0010baf4 <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
10baf4: 55 push %ebp 10baf5: 89 e5 mov %esp,%ebp 10baf7: 53 push %ebx 10baf8: 83 ec 14 sub $0x14,%esp 10bafb: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
10bafe: 85 db test %ebx,%ebx
10bb00: 74 4e je 10bb50 <rtems_task_start+0x5c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10bb02: 83 ec 08 sub $0x8,%esp 10bb05: 8d 45 f4 lea -0xc(%ebp),%eax 10bb08: 50 push %eax 10bb09: ff 75 08 pushl 0x8(%ebp) 10bb0c: e8 0f 1d 00 00 call 10d820 <_Thread_Get>
switch ( location ) {
10bb11: 83 c4 10 add $0x10,%esp 10bb14: 8b 55 f4 mov -0xc(%ebp),%edx 10bb17: 85 d2 test %edx,%edx
10bb19: 75 29 jne 10bb44 <rtems_task_start+0x50>
case OBJECTS_LOCAL:
if ( _Thread_Start(
10bb1b: 83 ec 0c sub $0xc,%esp 10bb1e: ff 75 10 pushl 0x10(%ebp) 10bb21: 6a 00 push $0x0 10bb23: 53 push %ebx 10bb24: 6a 00 push $0x0 10bb26: 50 push %eax 10bb27: e8 b0 26 00 00 call 10e1dc <_Thread_Start> 10bb2c: 83 c4 20 add $0x20,%esp 10bb2f: 84 c0 test %al,%al
10bb31: 75 29 jne 10bb5c <rtems_task_start+0x68>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10bb33: e8 c4 1c 00 00 call 10d7fc <_Thread_Enable_dispatch>
return RTEMS_INCORRECT_STATE;
10bb38: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bb3d: 8b 5d fc mov -0x4(%ebp),%ebx 10bb40: c9 leave 10bb41: c3 ret 10bb42: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10bb44: b8 04 00 00 00 mov $0x4,%eax
}
10bb49: 8b 5d fc mov -0x4(%ebp),%ebx 10bb4c: c9 leave 10bb4d: c3 ret 10bb4e: 66 90 xchg %ax,%ax
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
10bb50: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bb55: 8b 5d fc mov -0x4(%ebp),%ebx 10bb58: c9 leave 10bb59: c3 ret 10bb5a: 66 90 xchg %ax,%ax
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
10bb5c: e8 9b 1c 00 00 call 10d7fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10bb61: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bb63: 8b 5d fc mov -0x4(%ebp),%ebx 10bb66: c9 leave 10bb67: c3 ret
00110424 <rtems_task_suspend>:
*/
rtems_status_code rtems_task_suspend(
rtems_id id
)
{
110424: 55 push %ebp 110425: 89 e5 mov %esp,%ebp 110427: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
11042a: 8d 45 f4 lea -0xc(%ebp),%eax 11042d: 50 push %eax 11042e: ff 75 08 pushl 0x8(%ebp) 110431: e8 ea d3 ff ff call 10d820 <_Thread_Get>
switch ( location ) {
110436: 83 c4 10 add $0x10,%esp 110439: 8b 55 f4 mov -0xc(%ebp),%edx 11043c: 85 d2 test %edx,%edx
11043e: 74 08 je 110448 <rtems_task_suspend+0x24>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
110440: b8 04 00 00 00 mov $0x4,%eax
}
110445: c9 leave 110446: c3 ret 110447: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
110448: f6 40 10 02 testb $0x2,0x10(%eax)
11044c: 74 0e je 11045c <rtems_task_suspend+0x38>
_Thread_Suspend( the_thread );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
11044e: e8 a9 d3 ff ff call 10d7fc <_Thread_Enable_dispatch>
return RTEMS_ALREADY_SUSPENDED;
110453: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110458: c9 leave 110459: c3 ret 11045a: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Suspend( the_thread );
11045c: 83 ec 0c sub $0xc,%esp 11045f: 50 push %eax 110460: e8 6f 09 00 00 call 110dd4 <_Thread_Suspend>
_Thread_Enable_dispatch();
110465: e8 92 d3 ff ff call 10d7fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11046a: 83 c4 10 add $0x10,%esp 11046d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11046f: c9 leave 110470: c3 ret
0010c650 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
10c650: 55 push %ebp 10c651: 89 e5 mov %esp,%ebp 10c653: 57 push %edi 10c654: 56 push %esi 10c655: 53 push %ebx 10c656: 83 ec 1c sub $0x1c,%esp 10c659: 8b 5d 0c mov 0xc(%ebp),%ebx 10c65c: 8b 7d 10 mov 0x10(%ebp),%edi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
10c65f: 85 db test %ebx,%ebx
10c661: 0f 84 9d 00 00 00 je 10c704 <rtems_task_variable_add+0xb4>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10c667: 83 ec 08 sub $0x8,%esp 10c66a: 8d 45 e4 lea -0x1c(%ebp),%eax 10c66d: 50 push %eax 10c66e: ff 75 08 pushl 0x8(%ebp) 10c671: e8 ba 1e 00 00 call 10e530 <_Thread_Get> 10c676: 89 c6 mov %eax,%esi
switch (location) {
10c678: 83 c4 10 add $0x10,%esp 10c67b: 8b 45 e4 mov -0x1c(%ebp),%eax 10c67e: 85 c0 test %eax,%eax
10c680: 74 0e je 10c690 <rtems_task_variable_add+0x40>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c682: b8 04 00 00 00 mov $0x4,%eax
}
10c687: 8d 65 f4 lea -0xc(%ebp),%esp 10c68a: 5b pop %ebx 10c68b: 5e pop %esi 10c68c: 5f pop %edi 10c68d: c9 leave 10c68e: c3 ret 10c68f: 90 nop
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
10c690: 8b 86 f0 00 00 00 mov 0xf0(%esi),%eax
while (tvp) {
10c696: 85 c0 test %eax,%eax
10c698: 75 44 jne 10c6de <rtems_task_variable_add+0x8e>
10c69a: 66 90 xchg %ax,%ax
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
10c69c: 83 ec 0c sub $0xc,%esp 10c69f: 6a 14 push $0x14 10c6a1: e8 72 2e 00 00 call 10f518 <_Workspace_Allocate>
if (new == NULL) {
10c6a6: 83 c4 10 add $0x10,%esp 10c6a9: 85 c0 test %eax,%eax
10c6ab: 74 4b je 10c6f8 <rtems_task_variable_add+0xa8>
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
10c6ad: 8b 13 mov (%ebx),%edx 10c6af: 89 50 08 mov %edx,0x8(%eax)
new->ptr = ptr;
10c6b2: 89 58 04 mov %ebx,0x4(%eax)
new->dtor = dtor;
10c6b5: 89 78 10 mov %edi,0x10(%eax)
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
10c6b8: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10c6be: 89 10 mov %edx,(%eax)
the_thread->task_variables = new;
10c6c0: 89 86 f0 00 00 00 mov %eax,0xf0(%esi)
_Thread_Enable_dispatch();
10c6c6: e8 41 1e 00 00 call 10e50c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c6cb: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c6cd: 8d 65 f4 lea -0xc(%ebp),%esp 10c6d0: 5b pop %ebx 10c6d1: 5e pop %esi 10c6d2: 5f pop %edi 10c6d3: c9 leave 10c6d4: c3 ret 10c6d5: 8d 76 00 lea 0x0(%esi),%esi
if (tvp->ptr == ptr) {
tvp->dtor = dtor;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10c6d8: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
10c6da: 85 c0 test %eax,%eax
10c6dc: 74 be je 10c69c <rtems_task_variable_add+0x4c>
if (tvp->ptr == ptr) {
10c6de: 39 58 04 cmp %ebx,0x4(%eax)
10c6e1: 75 f5 jne 10c6d8 <rtems_task_variable_add+0x88>
tvp->dtor = dtor;
10c6e3: 89 78 10 mov %edi,0x10(%eax)
_Thread_Enable_dispatch();
10c6e6: e8 21 1e 00 00 call 10e50c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c6eb: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c6ed: 8d 65 f4 lea -0xc(%ebp),%esp 10c6f0: 5b pop %ebx 10c6f1: 5e pop %esi 10c6f2: 5f pop %edi 10c6f3: c9 leave 10c6f4: c3 ret 10c6f5: 8d 76 00 lea 0x0(%esi),%esi
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
10c6f8: e8 0f 1e 00 00 call 10e50c <_Thread_Enable_dispatch>
return RTEMS_NO_MEMORY;
10c6fd: b8 1a 00 00 00 mov $0x1a,%eax 10c702: eb 83 jmp 10c687 <rtems_task_variable_add+0x37>
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
10c704: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c709: 8d 65 f4 lea -0xc(%ebp),%esp 10c70c: 5b pop %ebx 10c70d: 5e pop %esi 10c70e: 5f pop %edi 10c70f: c9 leave 10c710: c3 ret
0010c714 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
10c714: 55 push %ebp 10c715: 89 e5 mov %esp,%ebp 10c717: 53 push %ebx 10c718: 83 ec 14 sub $0x14,%esp 10c71b: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
10c71e: 85 db test %ebx,%ebx
10c720: 74 76 je 10c798 <rtems_task_variable_delete+0x84>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
10c722: 83 ec 08 sub $0x8,%esp 10c725: 8d 45 f4 lea -0xc(%ebp),%eax 10c728: 50 push %eax 10c729: ff 75 08 pushl 0x8(%ebp) 10c72c: e8 ff 1d 00 00 call 10e530 <_Thread_Get>
switch (location) {
10c731: 83 c4 10 add $0x10,%esp 10c734: 8b 55 f4 mov -0xc(%ebp),%edx 10c737: 85 d2 test %edx,%edx
10c739: 74 0d je 10c748 <rtems_task_variable_delete+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c73b: b8 04 00 00 00 mov $0x4,%eax
}
10c740: 8b 5d fc mov -0x4(%ebp),%ebx 10c743: c9 leave 10c744: c3 ret 10c745: 8d 76 00 lea 0x0(%esi),%esi
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
10c748: 8b 88 f0 00 00 00 mov 0xf0(%eax),%ecx
while (tvp) {
10c74e: 85 c9 test %ecx,%ecx
10c750: 74 17 je 10c769 <rtems_task_variable_delete+0x55>
if (tvp->ptr == ptr) {
10c752: 39 59 04 cmp %ebx,0x4(%ecx)
10c755: 75 0c jne 10c763 <rtems_task_variable_delete+0x4f>
10c757: eb 49 jmp 10c7a2 <rtems_task_variable_delete+0x8e> 10c759: 8d 76 00 lea 0x0(%esi),%esi 10c75c: 39 5a 04 cmp %ebx,0x4(%edx)
10c75f: 74 17 je 10c778 <rtems_task_variable_delete+0x64>
10c761: 89 d1 mov %edx,%ecx
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
10c763: 8b 11 mov (%ecx),%edx
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
10c765: 85 d2 test %edx,%edx
10c767: 75 f3 jne 10c75c <rtems_task_variable_delete+0x48><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10c769: e8 9e 1d 00 00 call 10e50c <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
10c76e: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c773: 8b 5d fc mov -0x4(%ebp),%ebx 10c776: c9 leave 10c777: c3 ret
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
10c778: 8b 1a mov (%edx),%ebx 10c77a: 89 19 mov %ebx,(%ecx)
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
10c77c: 83 ec 08 sub $0x8,%esp 10c77f: 52 push %edx 10c780: 50 push %eax 10c781: e8 b2 00 00 00 call 10c838 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
10c786: e8 81 1d 00 00 call 10e50c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c78b: 83 c4 10 add $0x10,%esp 10c78e: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c790: 8b 5d fc mov -0x4(%ebp),%ebx 10c793: c9 leave 10c794: c3 ret 10c795: 8d 76 00 lea 0x0(%esi),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
10c798: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c79d: 8b 5d fc mov -0x4(%ebp),%ebx 10c7a0: c9 leave 10c7a1: c3 ret
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
10c7a2: 8b 11 mov (%ecx),%edx 10c7a4: 89 90 f0 00 00 00 mov %edx,0xf0(%eax) 10c7aa: 89 ca mov %ecx,%edx 10c7ac: eb ce jmp 10c77c <rtems_task_variable_delete+0x68>
0010c7b0 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
10c7b0: 55 push %ebp 10c7b1: 89 e5 mov %esp,%ebp 10c7b3: 56 push %esi 10c7b4: 53 push %ebx 10c7b5: 83 ec 10 sub $0x10,%esp 10c7b8: 8b 5d 0c mov 0xc(%ebp),%ebx 10c7bb: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
10c7be: 85 db test %ebx,%ebx
10c7c0: 74 56 je 10c818 <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
if ( !result )
10c7c2: 85 f6 test %esi,%esi
10c7c4: 74 52 je 10c818 <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10c7c6: 83 ec 08 sub $0x8,%esp 10c7c9: 8d 45 f4 lea -0xc(%ebp),%eax 10c7cc: 50 push %eax 10c7cd: ff 75 08 pushl 0x8(%ebp) 10c7d0: e8 5b 1d 00 00 call 10e530 <_Thread_Get>
switch (location) {
10c7d5: 83 c4 10 add $0x10,%esp 10c7d8: 8b 55 f4 mov -0xc(%ebp),%edx 10c7db: 85 d2 test %edx,%edx
10c7dd: 75 2d jne 10c80c <rtems_task_variable_get+0x5c>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
10c7df: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax
while (tvp) {
10c7e5: 85 c0 test %eax,%eax
10c7e7: 75 09 jne 10c7f2 <rtems_task_variable_get+0x42>
10c7e9: eb 39 jmp 10c824 <rtems_task_variable_get+0x74> 10c7eb: 90 nop
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10c7ec: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
10c7ee: 85 c0 test %eax,%eax
10c7f0: 74 32 je 10c824 <rtems_task_variable_get+0x74><== NEVER TAKEN
if (tvp->ptr == ptr) {
10c7f2: 39 58 04 cmp %ebx,0x4(%eax)
10c7f5: 75 f5 jne 10c7ec <rtems_task_variable_get+0x3c>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
10c7f7: 8b 40 0c mov 0xc(%eax),%eax 10c7fa: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10c7fc: e8 0b 1d 00 00 call 10e50c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c801: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c803: 8d 65 f8 lea -0x8(%ebp),%esp 10c806: 5b pop %ebx 10c807: 5e pop %esi 10c808: c9 leave 10c809: c3 ret 10c80a: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c80c: b8 04 00 00 00 mov $0x4,%eax
}
10c811: 8d 65 f8 lea -0x8(%ebp),%esp 10c814: 5b pop %ebx 10c815: 5e pop %esi 10c816: c9 leave 10c817: c3 ret
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
10c818: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c81d: 8d 65 f8 lea -0x8(%ebp),%esp 10c820: 5b pop %ebx 10c821: 5e pop %esi 10c822: c9 leave 10c823: c3 ret
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10c824: e8 e3 1c 00 00 call 10e50c <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
10c829: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c82e: 8d 65 f8 lea -0x8(%ebp),%esp 10c831: 5b pop %ebx 10c832: 5e pop %esi 10c833: c9 leave 10c834: c3 ret
0010c9b8 <rtems_task_wake_when>:
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
10c9b8: 55 push %ebp 10c9b9: 89 e5 mov %esp,%ebp 10c9bb: 53 push %ebx 10c9bc: 83 ec 14 sub $0x14,%esp 10c9bf: 8b 5d 08 mov 0x8(%ebp),%ebx
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
10c9c2: 80 3d 24 85 12 00 00 cmpb $0x0,0x128524
10c9c9: 0f 84 a9 00 00 00 je 10ca78 <rtems_task_wake_when+0xc0>
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
10c9cf: 85 db test %ebx,%ebx
10c9d1: 0f 84 ad 00 00 00 je 10ca84 <rtems_task_wake_when+0xcc>
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
10c9d7: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
if ( !_TOD_Validate( time_buffer ) )
10c9de: 83 ec 0c sub $0xc,%esp 10c9e1: 53 push %ebx 10c9e2: e8 c5 f3 ff ff call 10bdac <_TOD_Validate> 10c9e7: 83 c4 10 add $0x10,%esp 10c9ea: 84 c0 test %al,%al
10c9ec: 75 0a jne 10c9f8 <rtems_task_wake_when+0x40>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
10c9ee: b8 14 00 00 00 mov $0x14,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c9f3: 8b 5d fc mov -0x4(%ebp),%ebx 10c9f6: c9 leave 10c9f7: c3 ret
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
10c9f8: 83 ec 0c sub $0xc,%esp 10c9fb: 53 push %ebx 10c9fc: e8 1f f3 ff ff call 10bd20 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
10ca01: 83 c4 10 add $0x10,%esp 10ca04: 3b 05 e4 85 12 00 cmp 0x1285e4,%eax
10ca0a: 76 e2 jbe 10c9ee <rtems_task_wake_when+0x36>
10ca0c: 8b 15 10 85 12 00 mov 0x128510,%edx 10ca12: 42 inc %edx 10ca13: 89 15 10 85 12 00 mov %edx,0x128510
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
10ca19: 83 ec 08 sub $0x8,%esp 10ca1c: 6a 10 push $0x10 10ca1e: ff 35 d8 87 12 00 pushl 0x1287d8 10ca24: 89 45 f4 mov %eax,-0xc(%ebp) 10ca27: e8 4c 25 00 00 call 10ef78 <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
10ca2c: 8b 15 d8 87 12 00 mov 0x1287d8,%edx
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
_Watchdog_Initialize(
10ca32: 8b 4a 08 mov 0x8(%edx),%ecx
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10ca35: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
the_watchdog->routine = routine;
10ca3c: c7 42 64 84 e5 10 00 movl $0x10e584,0x64(%edx)
the_watchdog->id = id;
10ca43: 89 4a 68 mov %ecx,0x68(%edx)
the_watchdog->user_data = user_data;
10ca46: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx)
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_seconds(
10ca4d: 8b 45 f4 mov -0xc(%ebp),%eax 10ca50: 2b 05 e4 85 12 00 sub 0x1285e4,%eax 10ca56: 89 42 54 mov %eax,0x54(%edx)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
10ca59: 58 pop %eax 10ca5a: 59 pop %ecx 10ca5b: 83 c2 48 add $0x48,%edx 10ca5e: 52 push %edx 10ca5f: 68 10 86 12 00 push $0x128610 10ca64: e8 f3 2a 00 00 call 10f55c <_Watchdog_Insert>
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
10ca69: e8 ca 1c 00 00 call 10e738 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ca6e: 83 c4 10 add $0x10,%esp 10ca71: 31 c0 xor %eax,%eax 10ca73: e9 7b ff ff ff jmp 10c9f3 <rtems_task_wake_when+0x3b>
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
10ca78: b8 0b 00 00 00 mov $0xb,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10ca7d: 8b 5d fc mov -0x4(%ebp),%ebx 10ca80: c9 leave 10ca81: c3 ret 10ca82: 66 90 xchg %ax,%ax
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
10ca84: b8 09 00 00 00 mov $0x9,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10ca89: 8b 5d fc mov -0x4(%ebp),%ebx 10ca8c: c9 leave 10ca8d: c3 ret
001186cc <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
1186cc: 55 push %ebp 1186cd: 89 e5 mov %esp,%ebp 1186cf: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
1186d2: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
1186d5: 50 push %eax 1186d6: ff 75 08 pushl 0x8(%ebp) 1186d9: 68 e0 0d 14 00 push $0x140de0 1186de: e8 ad 2a 00 00 call 11b190 <_Objects_Get>
switch ( location ) {
1186e3: 83 c4 10 add $0x10,%esp 1186e6: 8b 55 f4 mov -0xc(%ebp),%edx 1186e9: 85 d2 test %edx,%edx
1186eb: 74 07 je 1186f4 <rtems_timer_cancel+0x28>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1186ed: b8 04 00 00 00 mov $0x4,%eax
}
1186f2: c9 leave 1186f3: c3 ret
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
1186f4: 83 78 38 04 cmpl $0x4,0x38(%eax)
1186f8: 74 0f je 118709 <rtems_timer_cancel+0x3d><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
1186fa: 83 ec 0c sub $0xc,%esp 1186fd: 83 c0 10 add $0x10,%eax 118700: 50 push %eax 118701: e8 8a 46 00 00 call 11cd90 <_Watchdog_Remove> 118706: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
118709: e8 0a 35 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11870e: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118710: c9 leave 118711: c3 ret
0010bfe8 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
10bfe8: 55 push %ebp 10bfe9: 89 e5 mov %esp,%ebp 10bfeb: 57 push %edi 10bfec: 56 push %esi 10bfed: 53 push %ebx 10bfee: 83 ec 0c sub $0xc,%esp 10bff1: 8b 5d 08 mov 0x8(%ebp),%ebx 10bff4: 8b 75 0c mov 0xc(%ebp),%esi
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
10bff7: 85 db test %ebx,%ebx
10bff9: 74 6d je 10c068 <rtems_timer_create+0x80>
return RTEMS_INVALID_NAME;
if ( !id )
10bffb: 85 f6 test %esi,%esi
10bffd: 0f 84 89 00 00 00 je 10c08c <rtems_timer_create+0xa4>
10c003: a1 b0 78 12 00 mov 0x1278b0,%eax 10c008: 40 inc %eax 10c009: a3 b0 78 12 00 mov %eax,0x1278b0
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
10c00e: 83 ec 0c sub $0xc,%esp 10c011: 68 40 7c 12 00 push $0x127c40 10c016: e8 5d 0e 00 00 call 10ce78 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
10c01b: 83 c4 10 add $0x10,%esp 10c01e: 85 c0 test %eax,%eax
10c020: 74 56 je 10c078 <rtems_timer_create+0x90>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
10c022: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c029: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10c030: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10c037: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10c03e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c045: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10c048: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c04b: 8b 0d 5c 7c 12 00 mov 0x127c5c,%ecx 10c051: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c054: 89 58 0c mov %ebx,0xc(%eax)
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
10c057: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10c059: e8 5a 1d 00 00 call 10ddb8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c05e: 31 c0 xor %eax,%eax
}
10c060: 8d 65 f4 lea -0xc(%ebp),%esp 10c063: 5b pop %ebx 10c064: 5e pop %esi 10c065: 5f pop %edi 10c066: c9 leave 10c067: c3 ret
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10c068: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c06d: 8d 65 f4 lea -0xc(%ebp),%esp 10c070: 5b pop %ebx 10c071: 5e pop %esi 10c072: 5f pop %edi 10c073: c9 leave 10c074: c3 ret 10c075: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
10c078: e8 3b 1d 00 00 call 10ddb8 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10c07d: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c082: 8d 65 f4 lea -0xc(%ebp),%esp 10c085: 5b pop %ebx 10c086: 5e pop %esi 10c087: 5f pop %edi 10c088: c9 leave 10c089: c3 ret 10c08a: 66 90 xchg %ax,%ax
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10c08c: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c091: 8d 65 f4 lea -0xc(%ebp),%esp 10c094: 5b pop %ebx 10c095: 5e pop %esi 10c096: 5f pop %edi 10c097: c9 leave 10c098: c3 ret
001187c8 <rtems_timer_delete>:
*/
rtems_status_code rtems_timer_delete(
rtems_id id
)
{
1187c8: 55 push %ebp 1187c9: 89 e5 mov %esp,%ebp 1187cb: 53 push %ebx 1187cc: 83 ec 18 sub $0x18,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
1187cf: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
1187d2: 50 push %eax 1187d3: ff 75 08 pushl 0x8(%ebp) 1187d6: 68 e0 0d 14 00 push $0x140de0 1187db: e8 b0 29 00 00 call 11b190 <_Objects_Get> 1187e0: 89 c3 mov %eax,%ebx
switch ( location ) {
1187e2: 83 c4 10 add $0x10,%esp 1187e5: 8b 4d f4 mov -0xc(%ebp),%ecx 1187e8: 85 c9 test %ecx,%ecx
1187ea: 75 38 jne 118824 <rtems_timer_delete+0x5c>
case OBJECTS_LOCAL:
_Objects_Close( &_Timer_Information, &the_timer->Object );
1187ec: 83 ec 08 sub $0x8,%esp 1187ef: 50 push %eax 1187f0: 68 e0 0d 14 00 push $0x140de0 1187f5: e8 1e 25 00 00 call 11ad18 <_Objects_Close>
(void) _Watchdog_Remove( &the_timer->Ticker );
1187fa: 8d 43 10 lea 0x10(%ebx),%eax 1187fd: 89 04 24 mov %eax,(%esp) 118800: e8 8b 45 00 00 call 11cd90 <_Watchdog_Remove>
*/
RTEMS_INLINE_ROUTINE void _Timer_Free (
Timer_Control *the_timer
)
{
_Objects_Free( &_Timer_Information, &the_timer->Object );
118805: 58 pop %eax 118806: 5a pop %edx 118807: 53 push %ebx 118808: 68 e0 0d 14 00 push $0x140de0 11880d: e8 02 28 00 00 call 11b014 <_Objects_Free>
_Timer_Free( the_timer );
_Thread_Enable_dispatch();
118812: e8 01 34 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118817: 83 c4 10 add $0x10,%esp 11881a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11881c: 8b 5d fc mov -0x4(%ebp),%ebx 11881f: c9 leave 118820: c3 ret 118821: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118824: b8 04 00 00 00 mov $0x4,%eax
}
118829: 8b 5d fc mov -0x4(%ebp),%ebx 11882c: c9 leave 11882d: c3 ret
0010c09c <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
10c09c: 55 push %ebp 10c09d: 89 e5 mov %esp,%ebp 10c09f: 57 push %edi 10c0a0: 56 push %esi 10c0a1: 53 push %ebx 10c0a2: 83 ec 2c sub $0x2c,%esp 10c0a5: 8b 5d 0c mov 0xc(%ebp),%ebx 10c0a8: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
10c0ab: 85 db test %ebx,%ebx
10c0ad: 0f 84 99 00 00 00 je 10c14c <rtems_timer_fire_after+0xb0>
return RTEMS_INVALID_NUMBER;
if ( !routine )
10c0b3: 85 f6 test %esi,%esi
10c0b5: 0f 84 b1 00 00 00 je 10c16c <rtems_timer_fire_after+0xd0>
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
10c0bb: 57 push %edi
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
10c0bc: 8d 45 e4 lea -0x1c(%ebp),%eax 10c0bf: 50 push %eax 10c0c0: ff 75 08 pushl 0x8(%ebp) 10c0c3: 68 40 7c 12 00 push $0x127c40 10c0c8: e8 63 12 00 00 call 10d330 <_Objects_Get> 10c0cd: 89 c7 mov %eax,%edi
switch ( location ) {
10c0cf: 83 c4 10 add $0x10,%esp 10c0d2: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c0d5: 85 c9 test %ecx,%ecx
10c0d7: 74 0f je 10c0e8 <rtems_timer_fire_after+0x4c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c0d9: b8 04 00 00 00 mov $0x4,%eax
}
10c0de: 8d 65 f4 lea -0xc(%ebp),%esp 10c0e1: 5b pop %ebx 10c0e2: 5e pop %esi 10c0e3: 5f pop %edi 10c0e4: c9 leave 10c0e5: c3 ret 10c0e6: 66 90 xchg %ax,%ax
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
10c0e8: 8d 50 10 lea 0x10(%eax),%edx 10c0eb: 83 ec 0c sub $0xc,%esp 10c0ee: 52 push %edx 10c0ef: 89 55 d4 mov %edx,-0x2c(%ebp) 10c0f2: e8 a5 2b 00 00 call 10ec9c <_Watchdog_Remove>
_ISR_Disable( level );
10c0f7: 9c pushf 10c0f8: fa cli 10c0f9: 58 pop %eax
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
10c0fa: 83 c4 10 add $0x10,%esp 10c0fd: 8b 57 18 mov 0x18(%edi),%edx 10c100: 85 d2 test %edx,%edx 10c102: 8b 55 d4 mov -0x2c(%ebp),%edx
10c105: 75 55 jne 10c15c <rtems_timer_fire_after+0xc0>
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL;
10c107: c7 47 38 00 00 00 00 movl $0x0,0x38(%edi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c10e: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10c115: 89 77 2c mov %esi,0x2c(%edi)
the_watchdog->id = id;
10c118: 8b 4d 08 mov 0x8(%ebp),%ecx 10c11b: 89 4f 30 mov %ecx,0x30(%edi)
the_watchdog->user_data = user_data;
10c11e: 8b 4d 14 mov 0x14(%ebp),%ecx 10c121: 89 4f 34 mov %ecx,0x34(%edi)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
10c124: 50 push %eax 10c125: 9d popf
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c126: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c129: 83 ec 08 sub $0x8,%esp 10c12c: 52 push %edx 10c12d: 68 bc 79 12 00 push $0x1279bc 10c132: e8 2d 2a 00 00 call 10eb64 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
10c137: e8 7c 1c 00 00 call 10ddb8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c13c: 83 c4 10 add $0x10,%esp 10c13f: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c141: 8d 65 f4 lea -0xc(%ebp),%esp 10c144: 5b pop %ebx 10c145: 5e pop %esi 10c146: 5f pop %edi 10c147: c9 leave 10c148: c3 ret 10c149: 8d 76 00 lea 0x0(%esi),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
10c14c: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c151: 8d 65 f4 lea -0xc(%ebp),%esp 10c154: 5b pop %ebx 10c155: 5e pop %esi 10c156: 5f pop %edi 10c157: c9 leave 10c158: c3 ret 10c159: 8d 76 00 lea 0x0(%esi),%esi
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
10c15c: 50 push %eax 10c15d: 9d popf
_Thread_Enable_dispatch();
10c15e: e8 55 1c 00 00 call 10ddb8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c163: 31 c0 xor %eax,%eax 10c165: e9 74 ff ff ff jmp 10c0de <rtems_timer_fire_after+0x42> 10c16a: 66 90 xchg %ax,%ax
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
10c16c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c171: 8d 65 f4 lea -0xc(%ebp),%esp 10c174: 5b pop %ebx 10c175: 5e pop %esi 10c176: 5f pop %edi 10c177: c9 leave 10c178: c3 ret
00118910 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
118910: 55 push %ebp 118911: 89 e5 mov %esp,%ebp 118913: 57 push %edi 118914: 56 push %esi 118915: 53 push %ebx 118916: 83 ec 2c sub $0x2c,%esp 118919: 8b 75 08 mov 0x8(%ebp),%esi 11891c: 8b 7d 0c mov 0xc(%ebp),%edi 11891f: 8b 5d 10 mov 0x10(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
118922: 80 3d 64 0a 14 00 00 cmpb $0x0,0x140a64
118929: 75 0d jne 118938 <rtems_timer_fire_when+0x28>
return RTEMS_NOT_DEFINED;
11892b: b8 0b 00 00 00 mov $0xb,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118930: 8d 65 f4 lea -0xc(%ebp),%esp 118933: 5b pop %ebx 118934: 5e pop %esi 118935: 5f pop %edi 118936: c9 leave 118937: c3 ret
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
118938: 83 ec 0c sub $0xc,%esp 11893b: 57 push %edi 11893c: e8 87 d4 ff ff call 115dc8 <_TOD_Validate> 118941: 83 c4 10 add $0x10,%esp 118944: 84 c0 test %al,%al
118946: 74 1e je 118966 <rtems_timer_fire_when+0x56>
return RTEMS_INVALID_CLOCK;
if ( !routine )
118948: 85 db test %ebx,%ebx
11894a: 0f 84 a4 00 00 00 je 1189f4 <rtems_timer_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
118950: 83 ec 0c sub $0xc,%esp 118953: 57 push %edi 118954: e8 e3 d3 ff ff call 115d3c <_TOD_To_seconds> 118959: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
11895b: 83 c4 10 add $0x10,%esp 11895e: 3b 05 24 0b 14 00 cmp 0x140b24,%eax
118964: 77 0e ja 118974 <rtems_timer_fire_when+0x64>
return RTEMS_INVALID_CLOCK;
118966: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11896b: 8d 65 f4 lea -0xc(%ebp),%esp 11896e: 5b pop %ebx 11896f: 5e pop %esi 118970: 5f pop %edi 118971: c9 leave 118972: c3 ret 118973: 90 nop 118974: 50 push %eax
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
118975: 8d 45 e4 lea -0x1c(%ebp),%eax 118978: 50 push %eax 118979: 56 push %esi 11897a: 68 e0 0d 14 00 push $0x140de0 11897f: e8 0c 28 00 00 call 11b190 <_Objects_Get>
switch ( location ) {
118984: 83 c4 10 add $0x10,%esp 118987: 8b 4d e4 mov -0x1c(%ebp),%ecx 11898a: 85 c9 test %ecx,%ecx
11898c: 75 5a jne 1189e8 <rtems_timer_fire_when+0xd8>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
11898e: 8d 48 10 lea 0x10(%eax),%ecx 118991: 83 ec 0c sub $0xc,%esp 118994: 51 push %ecx 118995: 89 45 d0 mov %eax,-0x30(%ebp) 118998: 89 4d d4 mov %ecx,-0x2c(%ebp) 11899b: e8 f0 43 00 00 call 11cd90 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY;
1189a0: 8b 55 d0 mov -0x30(%ebp),%edx 1189a3: c7 42 38 02 00 00 00 movl $0x2,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1189aa: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
1189b1: 89 5a 2c mov %ebx,0x2c(%edx)
the_watchdog->id = id;
1189b4: 89 72 30 mov %esi,0x30(%edx)
the_watchdog->user_data = user_data;
1189b7: 8b 45 14 mov 0x14(%ebp),%eax 1189ba: 89 42 34 mov %eax,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
1189bd: 2b 3d 24 0b 14 00 sub 0x140b24,%edi 1189c3: 89 7a 1c mov %edi,0x1c(%edx)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
1189c6: 58 pop %eax 1189c7: 5a pop %edx 1189c8: 8b 4d d4 mov -0x2c(%ebp),%ecx 1189cb: 51 push %ecx 1189cc: 68 50 0b 14 00 push $0x140b50 1189d1: e8 82 42 00 00 call 11cc58 <_Watchdog_Insert>
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
1189d6: e8 3d 32 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1189db: 83 c4 10 add $0x10,%esp 1189de: 31 c0 xor %eax,%eax 1189e0: e9 4b ff ff ff jmp 118930 <rtems_timer_fire_when+0x20> 1189e5: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1189e8: b8 04 00 00 00 mov $0x4,%eax 1189ed: e9 3e ff ff ff jmp 118930 <rtems_timer_fire_when+0x20> 1189f2: 66 90 xchg %ax,%ax
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
1189f4: b8 09 00 00 00 mov $0x9,%eax 1189f9: e9 32 ff ff ff jmp 118930 <rtems_timer_fire_when+0x20>
001190a8 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
1190a8: 55 push %ebp 1190a9: 89 e5 mov %esp,%ebp 1190ab: 56 push %esi 1190ac: 53 push %ebx 1190ad: 83 ec 10 sub $0x10,%esp 1190b0: 8b 45 08 mov 0x8(%ebp),%eax 1190b3: 85 c0 test %eax,%eax
1190b5: 74 41 je 1190f8 <rtems_timer_initiate_server+0x50>
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
1190b7: 0f b6 15 d4 83 13 00 movzbl 0x1383d4,%edx
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
1190be: 39 d0 cmp %edx,%eax
1190c0: 76 42 jbe 119104 <rtems_timer_initiate_server+0x5c>
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
1190c2: 40 inc %eax
1190c3: 75 33 jne 1190f8 <rtems_timer_initiate_server+0x50>
return RTEMS_INVALID_PRIORITY;
_priority = 0;
1190c5: 31 f6 xor %esi,%esi 1190c7: 8b 15 50 0a 14 00 mov 0x140a50,%edx 1190cd: 42 inc %edx 1190ce: 89 15 50 0a 14 00 mov %edx,0x140a50
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
1190d4: 8a 1d 80 c3 13 00 mov 0x13c380,%bl
initialized = true;
1190da: c6 05 80 c3 13 00 01 movb $0x1,0x13c380
_Thread_Enable_dispatch();
1190e1: e8 32 2b 00 00 call 11bc18 <_Thread_Enable_dispatch>
if ( tmpInitialized )
1190e6: 84 db test %bl,%bl
1190e8: 74 1e je 119108 <rtems_timer_initiate_server+0x60>
return RTEMS_INCORRECT_STATE;
1190ea: b8 0e 00 00 00 mov $0xe,%eax
initialized = false;
}
#endif
return status;
}
1190ef: 8d 65 f8 lea -0x8(%ebp),%esp 1190f2: 5b pop %ebx 1190f3: 5e pop %esi 1190f4: c9 leave 1190f5: c3 ret 1190f6: 66 90 xchg %ax,%ax
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
return RTEMS_INVALID_PRIORITY;
1190f8: b8 13 00 00 00 mov $0x13,%eax
initialized = false;
}
#endif
return status;
}
1190fd: 8d 65 f8 lea -0x8(%ebp),%esp 119100: 5b pop %ebx 119101: 5e pop %esi 119102: c9 leave 119103: c3 ret 119104: 89 c6 mov %eax,%esi 119106: eb bf jmp 1190c7 <rtems_timer_initiate_server+0x1f>
* other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create(
119108: 83 ec 08 sub $0x8,%esp 11910b: 8d 45 f4 lea -0xc(%ebp),%eax 11910e: 50 push %eax 11910f: 8b 45 10 mov 0x10(%ebp),%eax 119112: 80 cc 80 or $0x80,%ah 119115: 50 push %eax 119116: 68 00 01 00 00 push $0x100 11911b: ff 75 0c pushl 0xc(%ebp) 11911e: 56 push %esi 11911f: 68 45 4d 49 54 push $0x54494d45 119124: e8 bb ec ff ff call 117de4 <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
119129: 83 c4 20 add $0x20,%esp 11912c: 85 c0 test %eax,%eax
11912e: 74 10 je 119140 <rtems_timer_initiate_server+0x98>
initialized = false;
119130: c6 05 80 c3 13 00 00 movb $0x0,0x13c380
initialized = false;
}
#endif
return status;
}
119137: 8d 65 f8 lea -0x8(%ebp),%esp 11913a: 5b pop %ebx 11913b: 5e pop %esi 11913c: c9 leave 11913d: c3 ret 11913e: 66 90 xchg %ax,%ax
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
119140: 8b 45 f4 mov -0xc(%ebp),%eax
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
119143: 0f b7 c8 movzwl %ax,%ecx 119146: 8b 15 fc 09 14 00 mov 0x1409fc,%edx
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
11914c: 8b 14 8a mov (%edx,%ecx,4),%edx 11914f: 89 15 00 c3 13 00 mov %edx,0x13c300
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
119155: c7 05 30 c3 13 00 34 movl $0x13c334,0x13c330
11915c: c3 13 00 head->previous = NULL;
11915f: c7 05 34 c3 13 00 00 movl $0x0,0x13c334
119166: 00 00 00 tail->previous = head;
119169: c7 05 38 c3 13 00 30 movl $0x13c330,0x13c338
119170: c3 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
119173: c7 05 68 c3 13 00 6c movl $0x13c36c,0x13c368
11917a: c3 13 00 head->previous = NULL;
11917d: c7 05 6c c3 13 00 00 movl $0x0,0x13c36c
119184: 00 00 00 tail->previous = head;
119187: c7 05 70 c3 13 00 68 movl $0x13c368,0x13c370
11918e: c3 13 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
119191: c7 05 10 c3 13 00 00 movl $0x0,0x13c310
119198: 00 00 00 the_watchdog->routine = routine;
11919b: c7 05 24 c3 13 00 64 movl $0x11ba64,0x13c324
1191a2: ba 11 00 the_watchdog->id = id;
1191a5: a3 28 c3 13 00 mov %eax,0x13c328
the_watchdog->user_data = user_data;
1191aa: c7 05 2c c3 13 00 00 movl $0x0,0x13c32c
1191b1: 00 00 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1191b4: c7 05 48 c3 13 00 00 movl $0x0,0x13c348
1191bb: 00 00 00 the_watchdog->routine = routine;
1191be: c7 05 5c c3 13 00 64 movl $0x11ba64,0x13c35c
1191c5: ba 11 00 the_watchdog->id = id;
1191c8: a3 60 c3 13 00 mov %eax,0x13c360
the_watchdog->user_data = user_data;
1191cd: c7 05 64 c3 13 00 00 movl $0x0,0x13c364
1191d4: 00 00 00
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
1191d7: c7 05 04 c3 13 00 78 movl $0x118f78,0x13c304
1191de: 8f 11 00
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
1191e1: 8b 15 c4 0b 14 00 mov 0x140bc4,%edx 1191e7: 89 15 3c c3 13 00 mov %edx,0x13c33c
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
1191ed: 8b 15 24 0b 14 00 mov 0x140b24,%edx 1191f3: 89 15 74 c3 13 00 mov %edx,0x13c374
ts->insert_chain = NULL;
1191f9: c7 05 78 c3 13 00 00 movl $0x0,0x13c378
119200: 00 00 00 ts->active = false;
119203: c6 05 7c c3 13 00 00 movb $0x0,0x13c37c
/*
* The default timer server is now available.
*/
_Timer_server = ts;
11920a: c7 05 20 0e 14 00 00 movl $0x13c300,0x140e20
119211: c3 13 00
/*
* Start the timer server
*/
status = rtems_task_start(
119214: 53 push %ebx 119215: 68 00 c3 13 00 push $0x13c300 11921a: 68 b0 8d 11 00 push $0x118db0 11921f: 50 push %eax 119220: e8 7f f2 ff ff call 1184a4 <rtems_task_start>
if (status) {
initialized = false;
}
#endif
return status;
119225: 83 c4 10 add $0x10,%esp 119228: e9 d0 fe ff ff jmp 1190fd <rtems_timer_initiate_server+0x55>
00118a88 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
118a88: 55 push %ebp 118a89: 89 e5 mov %esp,%ebp 118a8b: 56 push %esi 118a8c: 53 push %ebx 118a8d: 83 ec 24 sub $0x24,%esp
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
118a90: 8d 45 f4 lea -0xc(%ebp),%eax 118a93: 50 push %eax 118a94: ff 75 08 pushl 0x8(%ebp) 118a97: 68 e0 0d 14 00 push $0x140de0 118a9c: e8 ef 26 00 00 call 11b190 <_Objects_Get> 118aa1: 89 c3 mov %eax,%ebx
switch ( location ) {
118aa3: 83 c4 10 add $0x10,%esp 118aa6: 8b 45 f4 mov -0xc(%ebp),%eax 118aa9: 85 c0 test %eax,%eax
118aab: 74 0f je 118abc <rtems_timer_reset+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118aad: b8 04 00 00 00 mov $0x4,%eax
}
118ab2: 8d 65 f8 lea -0x8(%ebp),%esp 118ab5: 5b pop %ebx 118ab6: 5e pop %esi 118ab7: c9 leave 118ab8: c3 ret 118ab9: 8d 76 00 lea 0x0(%esi),%esi
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
118abc: 8b 43 38 mov 0x38(%ebx),%eax 118abf: 85 c0 test %eax,%eax
118ac1: 74 1d je 118ae0 <rtems_timer_reset+0x58>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
118ac3: 48 dec %eax
118ac4: 74 3a je 118b00 <rtems_timer_reset+0x78>
/*
* Must be dormant or time of day timer (e.g. TIMER_DORMANT,
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
118ac6: b8 0b 00 00 00 mov $0xb,%eax
}
_Thread_Enable_dispatch();
118acb: 89 45 e4 mov %eax,-0x1c(%ebp) 118ace: e8 45 31 00 00 call 11bc18 <_Thread_Enable_dispatch>
return status;
118ad3: 8b 45 e4 mov -0x1c(%ebp),%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118ad6: 8d 65 f8 lea -0x8(%ebp),%esp 118ad9: 5b pop %ebx 118ada: 5e pop %esi 118adb: c9 leave 118adc: c3 ret 118add: 8d 76 00 lea 0x0(%esi),%esi
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
118ae0: 83 c3 10 add $0x10,%ebx 118ae3: 83 ec 0c sub $0xc,%esp 118ae6: 53 push %ebx 118ae7: e8 a4 42 00 00 call 11cd90 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
118aec: 59 pop %ecx 118aed: 5e pop %esi 118aee: 53 push %ebx 118aef: 68 5c 0b 14 00 push $0x140b5c 118af4: e8 5f 41 00 00 call 11cc58 <_Watchdog_Insert> 118af9: 83 c4 10 add $0x10,%esp
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
118afc: 31 c0 xor %eax,%eax 118afe: eb cb jmp 118acb <rtems_timer_reset+0x43>
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
118b00: 8b 35 20 0e 14 00 mov 0x140e20,%esi
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
118b06: 83 ec 0c sub $0xc,%esp 118b09: 8d 43 10 lea 0x10(%ebx),%eax 118b0c: 50 push %eax 118b0d: e8 7e 42 00 00 call 11cd90 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
118b12: 58 pop %eax 118b13: 5a pop %edx 118b14: 53 push %ebx 118b15: 56 push %esi 118b16: ff 56 04 call *0x4(%esi) 118b19: 83 c4 10 add $0x10,%esp
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
118b1c: 31 c0 xor %eax,%eax 118b1e: eb ab jmp 118acb <rtems_timer_reset+0x43>
00118b20 <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
118b20: 55 push %ebp 118b21: 89 e5 mov %esp,%ebp 118b23: 57 push %edi 118b24: 56 push %esi 118b25: 53 push %ebx 118b26: 83 ec 2c sub $0x2c,%esp 118b29: 8b 7d 0c mov 0xc(%ebp),%edi 118b2c: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server;
118b2f: 8b 1d 20 0e 14 00 mov 0x140e20,%ebx
if ( !timer_server )
118b35: 85 db test %ebx,%ebx
118b37: 0f 84 9f 00 00 00 je 118bdc <rtems_timer_server_fire_after+0xbc>
return RTEMS_INCORRECT_STATE;
if ( !routine )
118b3d: 85 f6 test %esi,%esi
118b3f: 0f 84 a3 00 00 00 je 118be8 <rtems_timer_server_fire_after+0xc8>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
118b45: 85 ff test %edi,%edi
118b47: 75 0f jne 118b58 <rtems_timer_server_fire_after+0x38>
return RTEMS_INVALID_NUMBER;
118b49: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118b4e: 8d 65 f4 lea -0xc(%ebp),%esp 118b51: 5b pop %ebx 118b52: 5e pop %esi 118b53: 5f pop %edi 118b54: c9 leave 118b55: c3 ret 118b56: 66 90 xchg %ax,%ax 118b58: 52 push %edx
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
118b59: 8d 45 e4 lea -0x1c(%ebp),%eax 118b5c: 50 push %eax 118b5d: ff 75 08 pushl 0x8(%ebp) 118b60: 68 e0 0d 14 00 push $0x140de0 118b65: e8 26 26 00 00 call 11b190 <_Objects_Get> 118b6a: 89 c2 mov %eax,%edx
switch ( location ) {
118b6c: 83 c4 10 add $0x10,%esp 118b6f: 8b 45 e4 mov -0x1c(%ebp),%eax 118b72: 85 c0 test %eax,%eax
118b74: 75 56 jne 118bcc <rtems_timer_server_fire_after+0xac>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
118b76: 83 ec 0c sub $0xc,%esp 118b79: 8d 42 10 lea 0x10(%edx),%eax 118b7c: 50 push %eax 118b7d: 89 55 d4 mov %edx,-0x2c(%ebp) 118b80: e8 0b 42 00 00 call 11cd90 <_Watchdog_Remove>
_ISR_Disable( level );
118b85: 9c pushf 118b86: fa cli 118b87: 58 pop %eax
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
118b88: 83 c4 10 add $0x10,%esp 118b8b: 8b 55 d4 mov -0x2c(%ebp),%edx 118b8e: 8b 4a 18 mov 0x18(%edx),%ecx 118b91: 85 c9 test %ecx,%ecx
118b93: 75 5f jne 118bf4 <rtems_timer_server_fire_after+0xd4>
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
118b95: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
118b9c: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
118ba3: 89 72 2c mov %esi,0x2c(%edx)
the_watchdog->id = id;
118ba6: 8b 4d 08 mov 0x8(%ebp),%ecx 118ba9: 89 4a 30 mov %ecx,0x30(%edx)
the_watchdog->user_data = user_data;
118bac: 8b 4d 14 mov 0x14(%ebp),%ecx 118baf: 89 4a 34 mov %ecx,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
118bb2: 89 7a 1c mov %edi,0x1c(%edx)
_ISR_Enable( level );
118bb5: 50 push %eax 118bb6: 9d popf
(*timer_server->schedule_operation)( timer_server, the_timer );
118bb7: 83 ec 08 sub $0x8,%esp 118bba: 52 push %edx 118bbb: 53 push %ebx 118bbc: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
118bbf: e8 54 30 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118bc4: 83 c4 10 add $0x10,%esp 118bc7: 31 c0 xor %eax,%eax 118bc9: eb 83 jmp 118b4e <rtems_timer_server_fire_after+0x2e> 118bcb: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118bcc: b8 04 00 00 00 mov $0x4,%eax
}
118bd1: 8d 65 f4 lea -0xc(%ebp),%esp 118bd4: 5b pop %ebx 118bd5: 5e pop %esi 118bd6: 5f pop %edi 118bd7: c9 leave 118bd8: c3 ret 118bd9: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
118bdc: b8 0e 00 00 00 mov $0xe,%eax 118be1: e9 68 ff ff ff jmp 118b4e <rtems_timer_server_fire_after+0x2e> 118be6: 66 90 xchg %ax,%ax
if ( !routine )
return RTEMS_INVALID_ADDRESS;
118be8: b8 09 00 00 00 mov $0x9,%eax 118bed: e9 5c ff ff ff jmp 118b4e <rtems_timer_server_fire_after+0x2e> 118bf2: 66 90 xchg %ax,%ax
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
118bf4: 50 push %eax 118bf5: 9d popf
_Thread_Enable_dispatch();
118bf6: e8 1d 30 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118bfb: 31 c0 xor %eax,%eax 118bfd: e9 4c ff ff ff jmp 118b4e <rtems_timer_server_fire_after+0x2e>
00118c04 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
118c04: 55 push %ebp 118c05: 89 e5 mov %esp,%ebp 118c07: 57 push %edi 118c08: 56 push %esi 118c09: 53 push %ebx 118c0a: 83 ec 2c sub $0x2c,%esp 118c0d: 8b 7d 0c mov 0xc(%ebp),%edi 118c10: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server;
118c13: 8b 1d 20 0e 14 00 mov 0x140e20,%ebx
if ( !timer_server )
118c19: 85 db test %ebx,%ebx
118c1b: 0f 84 d7 00 00 00 je 118cf8 <rtems_timer_server_fire_when+0xf4>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
118c21: 80 3d 64 0a 14 00 00 cmpb $0x0,0x140a64
118c28: 0f 84 aa 00 00 00 je 118cd8 <rtems_timer_server_fire_when+0xd4><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
118c2e: 85 f6 test %esi,%esi
118c30: 0f 84 b2 00 00 00 je 118ce8 <rtems_timer_server_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
118c36: 83 ec 0c sub $0xc,%esp 118c39: 57 push %edi 118c3a: e8 89 d1 ff ff call 115dc8 <_TOD_Validate> 118c3f: 83 c4 10 add $0x10,%esp 118c42: 84 c0 test %al,%al
118c44: 75 0e jne 118c54 <rtems_timer_server_fire_when+0x50>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
118c46: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118c4b: 8d 65 f4 lea -0xc(%ebp),%esp 118c4e: 5b pop %ebx 118c4f: 5e pop %esi 118c50: 5f pop %edi 118c51: c9 leave 118c52: c3 ret 118c53: 90 nop
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
118c54: 83 ec 0c sub $0xc,%esp 118c57: 57 push %edi 118c58: e8 df d0 ff ff call 115d3c <_TOD_To_seconds> 118c5d: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
118c5f: 83 c4 10 add $0x10,%esp 118c62: 3b 05 24 0b 14 00 cmp 0x140b24,%eax
118c68: 76 dc jbe 118c46 <rtems_timer_server_fire_when+0x42>
118c6a: 52 push %edx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
118c6b: 8d 45 e4 lea -0x1c(%ebp),%eax 118c6e: 50 push %eax 118c6f: ff 75 08 pushl 0x8(%ebp) 118c72: 68 e0 0d 14 00 push $0x140de0 118c77: e8 14 25 00 00 call 11b190 <_Objects_Get> 118c7c: 89 c2 mov %eax,%edx
switch ( location ) {
118c7e: 83 c4 10 add $0x10,%esp 118c81: 8b 45 e4 mov -0x1c(%ebp),%eax 118c84: 85 c0 test %eax,%eax
118c86: 75 7c jne 118d04 <rtems_timer_server_fire_when+0x100>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
118c88: 83 ec 0c sub $0xc,%esp 118c8b: 8d 42 10 lea 0x10(%edx),%eax 118c8e: 50 push %eax 118c8f: 89 55 d4 mov %edx,-0x2c(%ebp) 118c92: e8 f9 40 00 00 call 11cd90 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
118c97: 8b 55 d4 mov -0x2c(%ebp),%edx 118c9a: c7 42 38 03 00 00 00 movl $0x3,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
118ca1: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
118ca8: 89 72 2c mov %esi,0x2c(%edx)
the_watchdog->id = id;
118cab: 8b 45 08 mov 0x8(%ebp),%eax 118cae: 89 42 30 mov %eax,0x30(%edx)
the_watchdog->user_data = user_data;
118cb1: 8b 45 14 mov 0x14(%ebp),%eax 118cb4: 89 42 34 mov %eax,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
118cb7: 2b 3d 24 0b 14 00 sub 0x140b24,%edi 118cbd: 89 7a 1c mov %edi,0x1c(%edx)
(*timer_server->schedule_operation)( timer_server, the_timer );
118cc0: 58 pop %eax 118cc1: 59 pop %ecx 118cc2: 52 push %edx 118cc3: 53 push %ebx 118cc4: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
118cc7: e8 4c 2f 00 00 call 11bc18 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118ccc: 83 c4 10 add $0x10,%esp 118ccf: 31 c0 xor %eax,%eax 118cd1: e9 75 ff ff ff jmp 118c4b <rtems_timer_server_fire_when+0x47> 118cd6: 66 90 xchg %ax,%ax
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
118cd8: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118cdd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118ce0: 5b pop %ebx <== NOT EXECUTED 118ce1: 5e pop %esi <== NOT EXECUTED 118ce2: 5f pop %edi <== NOT EXECUTED 118ce3: c9 leave <== NOT EXECUTED 118ce4: c3 ret <== NOT EXECUTED 118ce5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
118ce8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118ced: 8d 65 f4 lea -0xc(%ebp),%esp 118cf0: 5b pop %ebx 118cf1: 5e pop %esi 118cf2: 5f pop %edi 118cf3: c9 leave 118cf4: c3 ret 118cf5: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
118cf8: b8 0e 00 00 00 mov $0xe,%eax 118cfd: e9 49 ff ff ff jmp 118c4b <rtems_timer_server_fire_when+0x47> 118d02: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118d04: b8 04 00 00 00 mov $0x4,%eax 118d09: e9 3d ff ff ff jmp 118c4b <rtems_timer_server_fire_when+0x47>