RTEMS 4.11Annotated Report
Wed Sep 12 21:13:22 2012
00120030 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
static void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
120030: 55 push %ebp <== NOT EXECUTED
120031: 89 e5 mov %esp,%ebp <== NOT EXECUTED
120033: 57 push %edi <== NOT EXECUTED
120034: 56 push %esi <== NOT EXECUTED
120035: 53 push %ebx <== NOT EXECUTED
120036: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
120039: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
12003c: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED
12003f: 75 1d jne 12005e <Stack_check_Dump_threads_usage+0x2e><== NOT EXECUTED
if (!Stack_check_Interrupt_stack.area)
120041: 83 3d f0 cc 16 00 00 cmpl $0x0,0x16ccf0 <== NOT EXECUTED
120048: 0f 84 f2 00 00 00 je 120140 <Stack_check_Dump_threads_usage+0x110><== NOT EXECUTED
return;
stack = &Stack_check_Interrupt_stack;
12004e: bf ec cc 16 00 mov $0x16ccec,%edi <== NOT EXECUTED
the_thread = 0;
current = 0;
120053: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
return;
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
12005a: 31 db xor %ebx,%ebx <== NOT EXECUTED
12005c: eb 0f jmp 12006d <Stack_check_Dump_threads_usage+0x3d><== NOT EXECUTED
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
12005e: 8d bb b0 00 00 00 lea 0xb0(%ebx),%edi <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
120064: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx <== NOT EXECUTED
12006a: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
12006d: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED
120070: 8d 50 10 lea 0x10(%eax),%edx <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
120073: 8b 0f mov (%edi),%ecx <== NOT EXECUTED
120075: 83 e9 10 sub $0x10,%ecx <== NOT EXECUTED
120078: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
12007b: 83 c0 20 add $0x20,%eax <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
12007e: 83 e1 fc and $0xfffffffc,%ecx <== NOT EXECUTED
120081: 01 c1 add %eax,%ecx <== NOT EXECUTED
120083: eb 0b jmp 120090 <Stack_check_Dump_threads_usage+0x60><== NOT EXECUTED
if (*base != U32_PATTERN)
120085: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED
12008b: 75 0b jne 120098 <Stack_check_Dump_threads_usage+0x68><== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
12008d: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
120090: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
120092: 72 f1 jb 120085 <Stack_check_Dump_threads_usage+0x55><== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
120094: 31 f6 xor %esi,%esi <== NOT EXECUTED
120096: eb 0d jmp 1200a5 <Stack_check_Dump_threads_usage+0x75><== NOT EXECUTED
120098: 31 f6 xor %esi,%esi <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
12009a: 85 c0 test %eax,%eax <== NOT EXECUTED
12009c: 74 07 je 1200a5 <Stack_check_Dump_threads_usage+0x75><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
12009e: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED
1200a1: 01 d6 add %edx,%esi <== NOT EXECUTED
1200a3: 29 c6 sub %eax,%esi <== NOT EXECUTED
else
used = 0;
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
1200a5: 85 db test %ebx,%ebx <== NOT EXECUTED
1200a7: 74 31 je 1200da <Stack_check_Dump_threads_usage+0xaa><== NOT EXECUTED
#endif
{
(*print_handler)(
1200a9: 8b 0d d0 c1 16 00 mov 0x16c1d0,%ecx <== NOT EXECUTED
1200af: 50 push %eax <== NOT EXECUTED
1200b0: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED
1200b3: 50 push %eax <== NOT EXECUTED
1200b4: 6a 05 push $0x5 <== NOT EXECUTED
1200b6: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1200b9: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED
1200bc: e8 27 fd fe ff call 10fde8 <rtems_object_get_name> <== NOT EXECUTED
1200c1: 50 push %eax <== NOT EXECUTED
1200c2: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1200c5: 68 eb eb 14 00 push $0x14ebeb <== NOT EXECUTED
1200ca: ff 35 cc c1 16 00 pushl 0x16c1cc <== NOT EXECUTED
1200d0: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
1200d3: ff d1 call *%ecx <== NOT EXECUTED
1200d5: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1200d8: eb 17 jmp 1200f1 <Stack_check_Dump_threads_usage+0xc1><== NOT EXECUTED
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
}
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
1200da: 53 push %ebx <== NOT EXECUTED
1200db: 6a ff push $0xffffffff <== NOT EXECUTED
1200dd: 68 f8 eb 14 00 push $0x14ebf8 <== NOT EXECUTED
1200e2: ff 35 cc c1 16 00 pushl 0x16c1cc <== NOT EXECUTED
1200e8: ff 15 d0 c1 16 00 call *0x16c1d0 <== NOT EXECUTED
1200ee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
1200f1: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
1200f4: 51 push %ecx <== NOT EXECUTED
1200f5: 51 push %ecx <== NOT EXECUTED
1200f6: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
1200f9: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
1200fc: 8b 17 mov (%edi),%edx <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
1200fe: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED
120102: 52 push %edx <== NOT EXECUTED
120103: 50 push %eax <== NOT EXECUTED
120104: 68 06 ec 14 00 push $0x14ec06 <== NOT EXECUTED
120109: ff 35 cc c1 16 00 pushl 0x16c1cc <== NOT EXECUTED
12010f: ff 15 d0 c1 16 00 call *0x16c1d0 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
120115: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
120118: 83 3d c8 c1 16 00 00 cmpl $0x0,0x16c1c8 <== NOT EXECUTED
12011f: 75 09 jne 12012a <Stack_check_Dump_threads_usage+0xfa><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
120121: 52 push %edx <== NOT EXECUTED
120122: 52 push %edx <== NOT EXECUTED
120123: 68 24 ec 14 00 push $0x14ec24 <== NOT EXECUTED
120128: eb 07 jmp 120131 <Stack_check_Dump_threads_usage+0x101><== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
12012a: 50 push %eax <== NOT EXECUTED
12012b: 56 push %esi <== NOT EXECUTED
12012c: 68 31 ec 14 00 push $0x14ec31 <== NOT EXECUTED
120131: ff 35 cc c1 16 00 pushl 0x16c1cc <== NOT EXECUTED
120137: ff 15 d0 c1 16 00 call *0x16c1d0 <== NOT EXECUTED
12013d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
120140: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
120143: 5b pop %ebx <== NOT EXECUTED
120144: 5e pop %esi <== NOT EXECUTED
120145: 5f pop %edi <== NOT EXECUTED
120146: 5d pop %ebp <== NOT EXECUTED
120147: c3 ret <== NOT EXECUTED
001201f6 <Stack_check_report_blown_task>:
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
1201f6: 55 push %ebp <== NOT EXECUTED
1201f7: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1201f9: 56 push %esi <== NOT EXECUTED
1201fa: 53 push %ebx <== NOT EXECUTED
1201fb: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
1201fe: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
120201: 8a 4d 0c mov 0xc(%ebp),%cl <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
120204: 8b b3 b4 00 00 00 mov 0xb4(%ebx),%esi <== NOT EXECUTED
char name[32];
printk("BLOWN STACK!!!\n");
12020a: 68 37 ec 14 00 push $0x14ec37 <== NOT EXECUTED
12020f: 88 4d d4 mov %cl,-0x2c(%ebp) <== NOT EXECUTED
120212: e8 45 70 fe ff call 10725c <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
120217: 58 pop %eax <== NOT EXECUTED
120218: 5a pop %edx <== NOT EXECUTED
120219: 53 push %ebx <== NOT EXECUTED
12021a: 68 47 ec 14 00 push $0x14ec47 <== NOT EXECUTED
12021f: e8 38 70 fe ff call 10725c <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
120224: 59 pop %ecx <== NOT EXECUTED
120225: 58 pop %eax <== NOT EXECUTED
120226: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
120229: 68 64 ec 14 00 push $0x14ec64 <== NOT EXECUTED
12022e: e8 29 70 fe ff call 10725c <printk> <== NOT EXECUTED
printk(
120233: 58 pop %eax <== NOT EXECUTED
120234: 5a pop %edx <== NOT EXECUTED
120235: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
120238: 68 76 ec 14 00 push $0x14ec76 <== NOT EXECUTED
12023d: e8 1a 70 fe ff call 10725c <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
120242: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
120245: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
120248: 50 push %eax <== NOT EXECUTED
120249: 6a 20 push $0x20 <== NOT EXECUTED
12024b: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
12024e: e8 95 fb fe ff call 10fde8 <rtems_object_get_name> <== NOT EXECUTED
120253: 59 pop %ecx <== NOT EXECUTED
120254: 5a pop %edx <== NOT EXECUTED
120255: 50 push %eax <== NOT EXECUTED
120256: 68 8a ec 14 00 push $0x14ec8a <== NOT EXECUTED
12025b: e8 fc 6f fe ff call 10725c <printk> <== NOT EXECUTED
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
120260: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx <== NOT EXECUTED
120266: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
12026c: 8d 1c 02 lea (%edx,%eax,1),%ebx <== NOT EXECUTED
12026f: 53 push %ebx <== NOT EXECUTED
120270: 52 push %edx <== NOT EXECUTED
120271: 50 push %eax <== NOT EXECUTED
120272: 68 a0 ec 14 00 push $0x14eca0 <== NOT EXECUTED
120277: e8 e0 6f fe ff call 10725c <printk> <== NOT EXECUTED
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
12027c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12027f: 8a 4d d4 mov -0x2c(%ebp),%cl <== NOT EXECUTED
120282: 84 c9 test %cl,%cl <== NOT EXECUTED
120284: 75 17 jne 12029d <Stack_check_report_blown_task+0xa7><== NOT EXECUTED
printk(
120286: 8d 46 18 lea 0x18(%esi),%eax <== NOT EXECUTED
120289: 50 push %eax <== NOT EXECUTED
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
12028a: 83 c6 08 add $0x8,%esi <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
12028d: 56 push %esi <== NOT EXECUTED
12028e: 6a 10 push $0x10 <== NOT EXECUTED
120290: 68 d1 ec 14 00 push $0x14ecd1 <== NOT EXECUTED
120295: e8 c2 6f fe ff call 10725c <printk> <== NOT EXECUTED
12029a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
12029d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1202a0: 68 81 00 00 00 push $0x81 <== NOT EXECUTED
1202a5: e8 de 9e fe ff call 10a188 <rtems_fatal_error_occurred><== NOT EXECUTED
00116fcc <_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
)
{
116fcc: 55 push %ebp
116fcd: 89 e5 mov %esp,%ebp
116fcf: 57 push %edi
116fd0: 56 push %esi
116fd1: 53 push %ebx
116fd2: 83 ec 1c sub $0x1c,%esp
116fd5: 8b 55 08 mov 0x8(%ebp),%edx
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;
116fd8: b8 01 00 00 00 mov $0x1,%eax
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
116fdd: 8b 4d 10 mov 0x10(%ebp),%ecx
116fe0: 3b 4a 4c cmp 0x4c(%edx),%ecx
116fe3: 77 44 ja 117029 <_CORE_message_queue_Broadcast+0x5d><== 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 ) {
116fe5: 31 db xor %ebx,%ebx
116fe7: 83 7a 48 00 cmpl $0x0,0x48(%edx)
116feb: 74 1f je 11700c <_CORE_message_queue_Broadcast+0x40>
*count = 0;
116fed: 8b 45 1c mov 0x1c(%ebp),%eax
116ff0: c7 00 00 00 00 00 movl $0x0,(%eax)
116ff6: eb 2f jmp 117027 <_CORE_message_queue_Broadcast+0x5b>
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
116ff8: 43 inc %ebx
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
116ff9: 8b 78 2c mov 0x2c(%eax),%edi
116ffc: 8b 75 0c mov 0xc(%ebp),%esi
116fff: 8b 4d 10 mov 0x10(%ebp),%ecx
117002: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
117004: 8b 40 28 mov 0x28(%eax),%eax
117007: 8b 4d 10 mov 0x10(%ebp),%ecx
11700a: 89 08 mov %ecx,(%eax)
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
11700c: 83 ec 0c sub $0xc,%esp
11700f: 52 push %edx
117010: 89 55 e4 mov %edx,-0x1c(%ebp)
117013: e8 9c 25 00 00 call 1195b4 <_Thread_queue_Dequeue>
117018: 83 c4 10 add $0x10,%esp
11701b: 85 c0 test %eax,%eax
11701d: 8b 55 e4 mov -0x1c(%ebp),%edx
117020: 75 d6 jne 116ff8 <_CORE_message_queue_Broadcast+0x2c>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
117022: 8b 45 1c mov 0x1c(%ebp),%eax
117025: 89 18 mov %ebx,(%eax)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
117027: 31 c0 xor %eax,%eax
}
117029: 8d 65 f4 lea -0xc(%ebp),%esp
11702c: 5b pop %ebx
11702d: 5e pop %esi
11702e: 5f pop %edi
11702f: 5d pop %ebp
117030: c3 ret
0010e600 <_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
)
{
10e600: 55 push %ebp
10e601: 89 e5 mov %esp,%ebp
10e603: 57 push %edi
10e604: 56 push %esi
10e605: 53 push %ebx
10e606: 83 ec 1c sub $0x1c,%esp
10e609: 8b 5d 08 mov 0x8(%ebp),%ebx
10e60c: 8b 75 10 mov 0x10(%ebp),%esi
10e60f: 8b 55 14 mov 0x14(%ebp),%edx
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
10e612: 89 73 44 mov %esi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
10e615: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
10e61c: 89 53 4c mov %edx,0x4c(%ebx)
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
10e61f: f6 c2 03 test $0x3,%dl
10e622: 74 0e je 10e632 <_CORE_message_queue_Initialize+0x32>
allocated_message_size += sizeof(uintptr_t);
10e624: 8d 42 04 lea 0x4(%edx),%eax
allocated_message_size &= ~(sizeof(uintptr_t) - 1);
10e627: 83 e0 fc and $0xfffffffc,%eax
/*
* Check for an overflow. It can occur while increasing allocated_message_size
* to multiplicity of uintptr_t above.
*/
if (allocated_message_size < maximum_message_size)
10e62a: 39 d0 cmp %edx,%eax
10e62c: 73 06 jae 10e634 <_CORE_message_queue_Initialize+0x34>
return false;
10e62e: 31 c0 xor %eax,%eax
10e630: eb 64 jmp 10e696 <_CORE_message_queue_Initialize+0x96>
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
10e632: 89 d0 mov %edx,%eax
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
10e634: 8d 78 10 lea 0x10(%eax),%edi
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
10e637: 89 f0 mov %esi,%eax
10e639: f7 e7 mul %edi
10e63b: 89 45 e0 mov %eax,-0x20(%ebp)
10e63e: 89 55 e4 mov %edx,-0x1c(%ebp)
if ( x > SIZE_MAX )
10e641: 85 d2 test %edx,%edx
10e643: 7f e9 jg 10e62e <_CORE_message_queue_Initialize+0x2e>
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
10e645: 83 ec 0c sub $0xc,%esp
10e648: 50 push %eax
10e649: e8 52 e4 ff ff call 10caa0 <_Workspace_Allocate>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
10e64e: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
10e651: 83 c4 10 add $0x10,%esp
10e654: 85 c0 test %eax,%eax
10e656: 74 d6 je 10e62e <_CORE_message_queue_Initialize+0x2e><== NEVER TAKEN
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
10e658: 57 push %edi
10e659: 56 push %esi
10e65a: 50 push %eax
10e65b: 8d 43 60 lea 0x60(%ebx),%eax
10e65e: 50 push %eax
10e65f: e8 f4 bf ff ff call 10a658 <_Chain_Initialize>
Chain_Node *tail = _Chain_Tail( the_chain );
10e664: 8d 43 50 lea 0x50(%ebx),%eax
10e667: 8d 53 54 lea 0x54(%ebx),%edx
10e66a: 89 53 50 mov %edx,0x50(%ebx)
head->next = tail;
head->previous = NULL;
10e66d: 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 );
10e674: 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(
10e677: 6a 06 push $0x6
10e679: 68 80 00 00 00 push $0x80
*/
RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority(
CORE_message_queue_Attributes *the_attribute
)
{
return
10e67e: 8b 45 0c mov 0xc(%ebp),%eax
10e681: 83 38 01 cmpl $0x1,(%eax)
10e684: 0f 94 c0 sete %al
10e687: 0f b6 c0 movzbl %al,%eax
10e68a: 50 push %eax
10e68b: 53 push %ebx
10e68c: e8 53 dd ff ff call 10c3e4 <_Thread_queue_Initialize>
10e691: 83 c4 20 add $0x20,%esp
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
10e694: b0 01 mov $0x1,%al
}
10e696: 8d 65 f4 lea -0xc(%ebp),%esp
10e699: 5b pop %ebx
10e69a: 5e pop %esi
10e69b: 5f pop %edi
10e69c: 5d pop %ebp
10e69d: c3 ret
0010a958 <_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
)
{
10a958: 55 push %ebp
10a959: 89 e5 mov %esp,%ebp
10a95b: 53 push %ebx
10a95c: 83 ec 10 sub $0x10,%esp
10a95f: 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)) ) {
10a962: 53 push %ebx
10a963: e8 74 17 00 00 call 10c0dc <_Thread_queue_Dequeue>
10a968: 83 c4 10 add $0x10,%esp
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10a96b: 31 d2 xor %edx,%edx
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10a96d: 85 c0 test %eax,%eax
10a96f: 75 15 jne 10a986 <_CORE_semaphore_Surrender+0x2e>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10a971: 9c pushf
10a972: fa cli
10a973: 59 pop %ecx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10a974: 8b 43 48 mov 0x48(%ebx),%eax
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10a977: b2 04 mov $0x4,%dl
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10a979: 3b 43 40 cmp 0x40(%ebx),%eax
10a97c: 73 06 jae 10a984 <_CORE_semaphore_Surrender+0x2c><== NEVER TAKEN
the_semaphore->count += 1;
10a97e: 40 inc %eax
10a97f: 89 43 48 mov %eax,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10a982: 30 d2 xor %dl,%dl
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
10a984: 51 push %ecx
10a985: 9d popf
}
return status;
}
10a986: 89 d0 mov %edx,%eax
10a988: 8b 5d fc mov -0x4(%ebp),%ebx
10a98b: c9 leave
10a98c: c3 ret
00109a10 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
109a10: 55 push %ebp
109a11: 89 e5 mov %esp,%ebp
109a13: 57 push %edi
109a14: 56 push %esi
109a15: 53 push %ebx
109a16: 83 ec 1c sub $0x1c,%esp
109a19: 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 ];
109a1c: 8b b3 e0 00 00 00 mov 0xe0(%ebx),%esi
option_set = (rtems_option) the_thread->Wait.option;
109a22: 8b 43 30 mov 0x30(%ebx),%eax
109a25: 89 45 e0 mov %eax,-0x20(%ebp)
_ISR_Disable( level );
109a28: 9c pushf
109a29: fa cli
109a2a: 58 pop %eax
pending_events = api->pending_events;
109a2b: 8b 16 mov (%esi),%edx
109a2d: 89 55 e4 mov %edx,-0x1c(%ebp)
event_condition = (rtems_event_set) the_thread->Wait.count;
109a30: 8b 4b 24 mov 0x24(%ebx),%ecx
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
109a33: 21 ca and %ecx,%edx
109a35: 75 05 jne 109a3c <_Event_Surrender+0x2c>
109a37: e9 ab 00 00 00 jmp 109ae7 <_Event_Surrender+0xd7>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
109a3c: 83 3d 64 c5 12 00 00 cmpl $0x0,0x12c564
109a43: 74 47 je 109a8c <_Event_Surrender+0x7c>
109a45: 3b 1d 68 c5 12 00 cmp 0x12c568,%ebx
109a4b: 75 3f jne 109a8c <_Event_Surrender+0x7c>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
109a4d: 8b 3d a4 c5 12 00 mov 0x12c5a4,%edi
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
109a53: 83 ff 02 cmp $0x2,%edi
109a56: 74 09 je 109a61 <_Event_Surrender+0x51> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
109a58: 8b 3d a4 c5 12 00 mov 0x12c5a4,%edi
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
109a5e: 4f dec %edi
109a5f: 75 2b jne 109a8c <_Event_Surrender+0x7c>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
109a61: 39 ca cmp %ecx,%edx
109a63: 74 06 je 109a6b <_Event_Surrender+0x5b>
109a65: f6 45 e0 02 testb $0x2,-0x20(%ebp)
109a69: 74 7c je 109ae7 <_Event_Surrender+0xd7> <== 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) );
109a6b: 89 d1 mov %edx,%ecx
109a6d: f7 d1 not %ecx
109a6f: 23 4d e4 and -0x1c(%ebp),%ecx
109a72: 89 0e mov %ecx,(%esi)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
109a74: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109a7b: 8b 4b 28 mov 0x28(%ebx),%ecx
109a7e: 89 11 mov %edx,(%ecx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
109a80: c7 05 a4 c5 12 00 03 movl $0x3,0x12c5a4
109a87: 00 00 00
109a8a: eb 5b jmp 109ae7 <_Event_Surrender+0xd7>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
109a8c: f6 43 11 01 testb $0x1,0x11(%ebx)
109a90: 74 55 je 109ae7 <_Event_Surrender+0xd7>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
109a92: 39 ca cmp %ecx,%edx
109a94: 74 06 je 109a9c <_Event_Surrender+0x8c>
109a96: f6 45 e0 02 testb $0x2,-0x20(%ebp)
109a9a: 74 4b je 109ae7 <_Event_Surrender+0xd7> <== NEVER TAKEN
109a9c: 89 d1 mov %edx,%ecx
109a9e: f7 d1 not %ecx
109aa0: 23 4d e4 and -0x1c(%ebp),%ecx
109aa3: 89 0e mov %ecx,(%esi)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
109aa5: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109aac: 8b 4b 28 mov 0x28(%ebx),%ecx
109aaf: 89 11 mov %edx,(%ecx)
_ISR_Flash( level );
109ab1: 50 push %eax
109ab2: 9d popf
109ab3: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
109ab4: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
109ab8: 74 06 je 109ac0 <_Event_Surrender+0xb0>
_ISR_Enable( level );
109aba: 50 push %eax
109abb: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
109abc: 51 push %ecx
109abd: 51 push %ecx
109abe: eb 17 jmp 109ad7 <_Event_Surrender+0xc7>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
109ac0: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
109ac7: 50 push %eax
109ac8: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
109ac9: 83 ec 0c sub $0xc,%esp
109acc: 8d 43 48 lea 0x48(%ebx),%eax
109acf: 50 push %eax
109ad0: e8 9f 2e 00 00 call 10c974 <_Watchdog_Remove>
109ad5: 58 pop %eax
109ad6: 5a pop %edx
109ad7: 68 f8 ff 03 10 push $0x1003fff8
109adc: 53 push %ebx
109add: e8 8a 1f 00 00 call 10ba6c <_Thread_Clear_state>
109ae2: 83 c4 10 add $0x10,%esp
109ae5: eb 02 jmp 109ae9 <_Event_Surrender+0xd9>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
109ae7: 50 push %eax
109ae8: 9d popf
}
109ae9: 8d 65 f4 lea -0xc(%ebp),%esp
109aec: 5b pop %ebx
109aed: 5e pop %esi
109aee: 5f pop %edi
109aef: 5d pop %ebp
109af0: c3 ret
00109af4 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
109af4: 55 push %ebp
109af5: 89 e5 mov %esp,%ebp
109af7: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
109afa: 8d 45 f4 lea -0xc(%ebp),%eax
109afd: 50 push %eax
109afe: ff 75 08 pushl 0x8(%ebp)
109b01: e8 b6 22 00 00 call 10bdbc <_Thread_Get>
switch ( location ) {
109b06: 83 c4 10 add $0x10,%esp
109b09: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
109b0d: 75 4e jne 109b5d <_Event_Timeout+0x69> <== 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 );
109b0f: 9c pushf
109b10: fa cli
109b11: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
109b12: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
109b19: 3b 05 68 c5 12 00 cmp 0x12c568,%eax
109b1f: 75 13 jne 109b34 <_Event_Timeout+0x40>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
109b21: 8b 0d a4 c5 12 00 mov 0x12c5a4,%ecx
109b27: 49 dec %ecx
109b28: 75 0a jne 109b34 <_Event_Timeout+0x40>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
109b2a: c7 05 a4 c5 12 00 02 movl $0x2,0x12c5a4
109b31: 00 00 00
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
109b34: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
109b3b: 52 push %edx
109b3c: 9d popf
109b3d: 52 push %edx
109b3e: 52 push %edx
109b3f: 68 f8 ff 03 10 push $0x1003fff8
109b44: 50 push %eax
109b45: e8 22 1f 00 00 call 10ba6c <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
109b4a: a1 6c c3 12 00 mov 0x12c36c,%eax
109b4f: 48 dec %eax
109b50: a3 6c c3 12 00 mov %eax,0x12c36c
return _Thread_Dispatch_disable_level;
109b55: a1 6c c3 12 00 mov 0x12c36c,%eax
109b5a: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
109b5d: c9 leave
109b5e: c3 ret
0010ead3 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
10ead3: 55 push %ebp
10ead4: 89 e5 mov %esp,%ebp
10ead6: 57 push %edi
10ead7: 56 push %esi
10ead8: 53 push %ebx
10ead9: 83 ec 4c sub $0x4c,%esp
10eadc: 8b 5d 08 mov 0x8(%ebp),%ebx
10eadf: 8b 45 10 mov 0x10(%ebp),%eax
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
10eae2: 8b 4b 20 mov 0x20(%ebx),%ecx
10eae5: 89 4d b8 mov %ecx,-0x48(%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;
10eae8: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
Heap_Block *extend_last_block = NULL;
10eaef: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
uintptr_t const page_size = heap->page_size;
10eaf6: 8b 73 10 mov 0x10(%ebx),%esi
10eaf9: 89 75 bc mov %esi,-0x44(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10eafc: 8b 53 14 mov 0x14(%ebx),%edx
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;
10eaff: 8b 4b 30 mov 0x30(%ebx),%ecx
10eb02: 89 4d b4 mov %ecx,-0x4c(%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 ) {
10eb05: 8b 75 0c mov 0xc(%ebp),%esi
10eb08: 01 c6 add %eax,%esi
10eb0a: 89 75 d4 mov %esi,-0x2c(%ebp)
10eb0d: 73 07 jae 10eb16 <_Heap_Extend+0x43>
return false;
10eb0f: 31 c0 xor %eax,%eax
10eb11: e9 cb 01 00 00 jmp 10ece1 <_Heap_Extend+0x20e>
}
extend_area_ok = _Heap_Get_first_and_last_block(
10eb16: 51 push %ecx
10eb17: 51 push %ecx
10eb18: 8d 4d e4 lea -0x1c(%ebp),%ecx
10eb1b: 51 push %ecx
10eb1c: 8d 4d e0 lea -0x20(%ebp),%ecx
10eb1f: 51 push %ecx
10eb20: 52 push %edx
10eb21: ff 75 bc pushl -0x44(%ebp)
10eb24: 50 push %eax
10eb25: ff 75 0c pushl 0xc(%ebp)
10eb28: e8 a9 c0 ff ff call 10abd6 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
10eb2d: 83 c4 20 add $0x20,%esp
10eb30: 84 c0 test %al,%al
10eb32: 74 db je 10eb0f <_Heap_Extend+0x3c>
10eb34: 8b 4d b8 mov -0x48(%ebp),%ecx
10eb37: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
10eb3e: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
10eb45: 31 ff xor %edi,%edi
10eb47: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
10eb4e: 8b 73 18 mov 0x18(%ebx),%esi
10eb51: 89 75 c0 mov %esi,-0x40(%ebp)
10eb54: eb 03 jmp 10eb59 <_Heap_Extend+0x86>
10eb56: 89 4d c0 mov %ecx,-0x40(%ebp)
uintptr_t const sub_area_end = start_block->prev_size;
10eb59: 8b 01 mov (%ecx),%eax
10eb5b: 89 45 d0 mov %eax,-0x30(%ebp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10eb5e: 89 c6 mov %eax,%esi
10eb60: 83 ee 08 sub $0x8,%esi
10eb63: 31 d2 xor %edx,%edx
10eb65: f7 75 bc divl -0x44(%ebp)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10eb68: 29 d6 sub %edx,%esi
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
10eb6a: 8b 55 c0 mov -0x40(%ebp),%edx
10eb6d: 39 55 d4 cmp %edx,-0x2c(%ebp)
10eb70: 76 08 jbe 10eb7a <_Heap_Extend+0xa7>
10eb72: 8b 45 d0 mov -0x30(%ebp),%eax
10eb75: 39 45 0c cmp %eax,0xc(%ebp)
10eb78: 72 95 jb 10eb0f <_Heap_Extend+0x3c>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10eb7a: 8b 55 c0 mov -0x40(%ebp),%edx
10eb7d: 39 55 d4 cmp %edx,-0x2c(%ebp)
10eb80: 74 0a je 10eb8c <_Heap_Extend+0xb9>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10eb82: 8b 45 d0 mov -0x30(%ebp),%eax
10eb85: 39 45 d4 cmp %eax,-0x2c(%ebp)
10eb88: 72 07 jb 10eb91 <_Heap_Extend+0xbe>
10eb8a: eb 08 jmp 10eb94 <_Heap_Extend+0xc1>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10eb8c: 89 4d cc mov %ecx,-0x34(%ebp)
10eb8f: eb 03 jmp 10eb94 <_Heap_Extend+0xc1>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10eb91: 89 4d c4 mov %ecx,-0x3c(%ebp)
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
10eb94: 8b 55 0c mov 0xc(%ebp),%edx
10eb97: 39 55 d0 cmp %edx,-0x30(%ebp)
10eb9a: 75 09 jne 10eba5 <_Heap_Extend+0xd2>
start_block->prev_size = extend_area_end;
10eb9c: 8b 45 d4 mov -0x2c(%ebp),%eax
10eb9f: 89 01 mov %eax,(%ecx)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
10eba1: 89 f7 mov %esi,%edi
10eba3: eb 05 jmp 10ebaa <_Heap_Extend+0xd7>
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
10eba5: 73 03 jae 10ebaa <_Heap_Extend+0xd7>
10eba7: 89 75 c8 mov %esi,-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;
10ebaa: 8b 4e 04 mov 0x4(%esi),%ecx
10ebad: 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);
10ebb0: 01 f1 add %esi,%ecx
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
10ebb2: 3b 4d b8 cmp -0x48(%ebp),%ecx
10ebb5: 75 9f jne 10eb56 <_Heap_Extend+0x83>
if ( extend_area_begin < heap->area_begin ) {
10ebb7: 8b 4d 0c mov 0xc(%ebp),%ecx
10ebba: 3b 4b 18 cmp 0x18(%ebx),%ecx
10ebbd: 73 05 jae 10ebc4 <_Heap_Extend+0xf1>
heap->area_begin = extend_area_begin;
10ebbf: 89 4b 18 mov %ecx,0x18(%ebx)
10ebc2: eb 0b jmp 10ebcf <_Heap_Extend+0xfc>
} else if ( heap->area_end < extend_area_end ) {
10ebc4: 8b 75 d4 mov -0x2c(%ebp),%esi
10ebc7: 39 73 1c cmp %esi,0x1c(%ebx)
10ebca: 73 03 jae 10ebcf <_Heap_Extend+0xfc>
heap->area_end = extend_area_end;
10ebcc: 89 73 1c mov %esi,0x1c(%ebx)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
10ebcf: 8b 45 e4 mov -0x1c(%ebp),%eax
10ebd2: 8b 55 e0 mov -0x20(%ebp),%edx
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
10ebd5: 89 c1 mov %eax,%ecx
10ebd7: 29 d1 sub %edx,%ecx
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
10ebd9: 8b 75 d4 mov -0x2c(%ebp),%esi
10ebdc: 89 32 mov %esi,(%edx)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
10ebde: 89 ce mov %ecx,%esi
10ebe0: 83 ce 01 or $0x1,%esi
10ebe3: 89 72 04 mov %esi,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
10ebe6: 89 08 mov %ecx,(%eax)
extend_last_block->size_and_flag = 0;
10ebe8: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
10ebef: 39 53 20 cmp %edx,0x20(%ebx)
10ebf2: 76 05 jbe 10ebf9 <_Heap_Extend+0x126>
heap->first_block = extend_first_block;
10ebf4: 89 53 20 mov %edx,0x20(%ebx)
10ebf7: eb 08 jmp 10ec01 <_Heap_Extend+0x12e>
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
10ebf9: 39 43 24 cmp %eax,0x24(%ebx)
10ebfc: 73 03 jae 10ec01 <_Heap_Extend+0x12e>
heap->last_block = extend_last_block;
10ebfe: 89 43 24 mov %eax,0x24(%ebx)
}
if ( merge_below_block != NULL ) {
10ec01: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10ec05: 74 35 je 10ec3c <_Heap_Extend+0x169>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
10ec07: 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 );
10ec0a: 8b 4d 0c mov 0xc(%ebp),%ecx
10ec0d: 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;
10ec10: 89 c8 mov %ecx,%eax
10ec12: 31 d2 xor %edx,%edx
10ec14: f7 f6 div %esi
if ( remainder != 0 ) {
10ec16: 85 d2 test %edx,%edx
10ec18: 74 04 je 10ec1e <_Heap_Extend+0x14b>
return value - remainder + alignment;
10ec1a: 01 f1 add %esi,%ecx
10ec1c: 29 d1 sub %edx,%ecx
uintptr_t const new_first_block_begin =
10ec1e: 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;
10ec21: 8b 75 cc mov -0x34(%ebp),%esi
10ec24: 8b 06 mov (%esi),%eax
10ec26: 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 =
10ec29: 89 f0 mov %esi,%eax
10ec2b: 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;
10ec2d: 83 c8 01 or $0x1,%eax
10ec30: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
10ec33: 89 d8 mov %ebx,%eax
10ec35: e8 7e fe ff ff call 10eab8 <_Heap_Free_block>
10ec3a: eb 11 jmp 10ec4d <_Heap_Extend+0x17a>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
10ec3c: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
10ec40: 74 0b je 10ec4d <_Heap_Extend+0x17a>
{
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;
10ec42: 8b 55 c4 mov -0x3c(%ebp),%edx
10ec45: 29 c2 sub %eax,%edx
10ec47: 83 ca 01 or $0x1,%edx
10ec4a: 89 50 04 mov %edx,0x4(%eax)
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
10ec4d: 85 ff test %edi,%edi
10ec4f: 74 33 je 10ec84 <_Heap_Extend+0x1b1>
)
{
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,
10ec51: 8b 4d d4 mov -0x2c(%ebp),%ecx
10ec54: 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(
10ec57: 29 f9 sub %edi,%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10ec59: 89 c8 mov %ecx,%eax
10ec5b: 31 d2 xor %edx,%edx
10ec5d: f7 73 10 divl 0x10(%ebx)
10ec60: 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)
10ec62: 8b 47 04 mov 0x4(%edi),%eax
10ec65: 29 c8 sub %ecx,%eax
| HEAP_PREV_BLOCK_USED;
10ec67: 83 c8 01 or $0x1,%eax
10ec6a: 89 44 39 04 mov %eax,0x4(%ecx,%edi,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;
10ec6e: 8b 47 04 mov 0x4(%edi),%eax
10ec71: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
10ec74: 09 c8 or %ecx,%eax
10ec76: 89 47 04 mov %eax,0x4(%edi)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
10ec79: 89 fa mov %edi,%edx
10ec7b: 89 d8 mov %ebx,%eax
10ec7d: e8 36 fe ff ff call 10eab8 <_Heap_Free_block>
10ec82: eb 20 jmp 10eca4 <_Heap_Extend+0x1d1>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
10ec84: 83 7d c8 00 cmpl $0x0,-0x38(%ebp)
10ec88: 74 1a je 10eca4 <_Heap_Extend+0x1d1>
_Heap_Link_above(
10ec8a: 8b 4d e4 mov -0x1c(%ebp),%ecx
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;
10ec8d: 8b 75 c8 mov -0x38(%ebp),%esi
10ec90: 8b 46 04 mov 0x4(%esi),%eax
10ec93: 83 e0 01 and $0x1,%eax
)
{
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 );
10ec96: 8b 55 e0 mov -0x20(%ebp),%edx
10ec99: 29 f2 sub %esi,%edx
block->size_and_flag = size | flag;
10ec9b: 09 d0 or %edx,%eax
10ec9d: 89 46 04 mov %eax,0x4(%esi)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
10eca0: 83 49 04 01 orl $0x1,0x4(%ecx)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
10eca4: 85 ff test %edi,%edi
10eca6: 75 10 jne 10ecb8 <_Heap_Extend+0x1e5>
10eca8: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10ecac: 75 0a jne 10ecb8 <_Heap_Extend+0x1e5>
_Heap_Free_block( heap, extend_first_block );
10ecae: 8b 55 e0 mov -0x20(%ebp),%edx
10ecb1: 89 d8 mov %ebx,%eax
10ecb3: e8 00 fe ff ff call 10eab8 <_Heap_Free_block>
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
10ecb8: 8b 53 24 mov 0x24(%ebx),%edx
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;
10ecbb: 8b 42 04 mov 0x4(%edx),%eax
10ecbe: 83 e0 01 and $0x1,%eax
* 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(
10ecc1: 8b 4b 20 mov 0x20(%ebx),%ecx
10ecc4: 29 d1 sub %edx,%ecx
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
10ecc6: 09 c8 or %ecx,%eax
10ecc8: 89 42 04 mov %eax,0x4(%edx)
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
10eccb: 8b 43 30 mov 0x30(%ebx),%eax
10ecce: 2b 45 b4 sub -0x4c(%ebp),%eax
/* Statistics */
stats->size += extended_size;
10ecd1: 01 43 2c add %eax,0x2c(%ebx)
if ( extended_size_ptr != NULL )
10ecd4: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10ecd8: 74 05 je 10ecdf <_Heap_Extend+0x20c> <== NEVER TAKEN
*extended_size_ptr = extended_size;
10ecda: 8b 4d 14 mov 0x14(%ebp),%ecx
10ecdd: 89 01 mov %eax,(%ecx)
return true;
10ecdf: b0 01 mov $0x1,%al
}
10ece1: 8d 65 f4 lea -0xc(%ebp),%esp
10ece4: 5b pop %ebx
10ece5: 5e pop %esi
10ece6: 5f pop %edi
10ece7: 5d pop %ebp
10ece8: c3 ret
0010ea68 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
10ea68: 55 push %ebp
10ea69: 89 e5 mov %esp,%ebp
10ea6b: 57 push %edi
10ea6c: 56 push %esi
10ea6d: 53 push %ebx
10ea6e: 83 ec 14 sub $0x14,%esp
10ea71: 8b 4d 08 mov 0x8(%ebp),%ecx
10ea74: 8b 45 0c mov 0xc(%ebp),%eax
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
10ea77: 85 c0 test %eax,%eax
10ea79: 0f 84 46 01 00 00 je 10ebc5 <_Heap_Free+0x15d>
10ea7f: 8d 58 f8 lea -0x8(%eax),%ebx
10ea82: 31 d2 xor %edx,%edx
10ea84: f7 71 10 divl 0x10(%ecx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10ea87: 29 d3 sub %edx,%ebx
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
10ea89: 8b 41 20 mov 0x20(%ecx),%eax
10ea8c: 89 45 e8 mov %eax,-0x18(%ebp)
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10ea8f: 31 d2 xor %edx,%edx
10ea91: 39 c3 cmp %eax,%ebx
10ea93: 72 08 jb 10ea9d <_Heap_Free+0x35>
10ea95: 31 d2 xor %edx,%edx
10ea97: 39 59 24 cmp %ebx,0x24(%ecx)
10ea9a: 0f 93 c2 setae %dl
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10ea9d: 31 c0 xor %eax,%eax
}
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
10ea9f: 85 d2 test %edx,%edx
10eaa1: 0f 84 20 01 00 00 je 10ebc7 <_Heap_Free+0x15f>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10eaa7: 8b 43 04 mov 0x4(%ebx),%eax
10eaaa: 89 45 ec mov %eax,-0x14(%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;
10eaad: 89 c7 mov %eax,%edi
10eaaf: 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);
10eab2: 8d 14 1f lea (%edi,%ebx,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;
10eab5: 31 f6 xor %esi,%esi
10eab7: 3b 55 e8 cmp -0x18(%ebp),%edx
10eaba: 72 0a jb 10eac6 <_Heap_Free+0x5e> <== NEVER TAKEN
10eabc: 31 c0 xor %eax,%eax
10eabe: 39 51 24 cmp %edx,0x24(%ecx)
10eac1: 0f 93 c0 setae %al
10eac4: 89 c6 mov %eax,%esi
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10eac6: 31 c0 xor %eax,%eax
_Heap_Protection_block_check( heap, block );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10eac8: 85 f6 test %esi,%esi
10eaca: 0f 84 f7 00 00 00 je 10ebc7 <_Heap_Free+0x15f> <== NEVER TAKEN
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10ead0: 8b 72 04 mov 0x4(%edx),%esi
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
10ead3: f7 c6 01 00 00 00 test $0x1,%esi
10ead9: 0f 84 e8 00 00 00 je 10ebc7 <_Heap_Free+0x15f> <== 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;
10eadf: 83 e6 fe and $0xfffffffe,%esi
10eae2: 89 75 f0 mov %esi,-0x10(%ebp)
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10eae5: 8b 41 24 mov 0x24(%ecx),%eax
10eae8: 89 45 e0 mov %eax,-0x20(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
10eaeb: 39 c2 cmp %eax,%edx
10eaed: 74 0c je 10eafb <_Heap_Free+0x93>
10eaef: 8b 74 32 04 mov 0x4(%edx,%esi,1),%esi
10eaf3: 83 f6 01 xor $0x1,%esi
10eaf6: 83 e6 01 and $0x1,%esi
10eaf9: eb 02 jmp 10eafd <_Heap_Free+0x95>
10eafb: 31 f6 xor %esi,%esi
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10eafd: 89 f0 mov %esi,%eax
10eaff: 88 45 e7 mov %al,-0x19(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
10eb02: f6 45 ec 01 testb $0x1,-0x14(%ebp)
10eb06: 75 5e jne 10eb66 <_Heap_Free+0xfe>
uintptr_t const prev_size = block->prev_size;
10eb08: 8b 33 mov (%ebx),%esi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10eb0a: 29 f3 sub %esi,%ebx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10eb0c: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
10eb13: 3b 5d e8 cmp -0x18(%ebp),%ebx
10eb16: 72 0b jb 10eb23 <_Heap_Free+0xbb> <== NEVER TAKEN
10eb18: 31 c0 xor %eax,%eax
10eb1a: 39 5d e0 cmp %ebx,-0x20(%ebp)
10eb1d: 0f 93 c0 setae %al
10eb20: 89 45 ec mov %eax,-0x14(%ebp)
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10eb23: 31 c0 xor %eax,%eax
if ( !_Heap_Is_prev_used( block ) ) {
uintptr_t const prev_size = block->prev_size;
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
10eb25: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
10eb29: 0f 84 98 00 00 00 je 10ebc7 <_Heap_Free+0x15f> <== 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) ) {
10eb2f: f6 43 04 01 testb $0x1,0x4(%ebx)
10eb33: 0f 84 8e 00 00 00 je 10ebc7 <_Heap_Free+0x15f> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
10eb39: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10eb3d: 8d 34 37 lea (%edi,%esi,1),%esi
10eb40: 74 14 je 10eb56 <_Heap_Free+0xee>
uintptr_t const size = block_size + prev_size + next_block_size;
10eb42: 03 75 f0 add -0x10(%ebp),%esi
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
10eb45: 8b 42 08 mov 0x8(%edx),%eax
Heap_Block *prev = block->prev;
10eb48: 8b 52 0c mov 0xc(%edx),%edx
prev->next = next;
10eb4b: 89 42 08 mov %eax,0x8(%edx)
next->prev = prev;
10eb4e: 89 50 0c mov %edx,0xc(%eax)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
10eb51: ff 49 38 decl 0x38(%ecx)
10eb54: eb 2d jmp 10eb83 <_Heap_Free+0x11b>
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;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10eb56: 89 f0 mov %esi,%eax
10eb58: 83 c8 01 or $0x1,%eax
10eb5b: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10eb5e: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
10eb62: 89 32 mov %esi,(%edx)
10eb64: eb 56 jmp 10ebbc <_Heap_Free+0x154>
}
} else if ( next_is_free ) { /* coalesce next */
10eb66: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10eb6a: 74 24 je 10eb90 <_Heap_Free+0x128>
uintptr_t const size = block_size + next_block_size;
10eb6c: 8b 75 f0 mov -0x10(%ebp),%esi
10eb6f: 01 fe add %edi,%esi
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
10eb71: 8b 42 08 mov 0x8(%edx),%eax
Heap_Block *prev = old_block->prev;
10eb74: 8b 52 0c mov 0xc(%edx),%edx
new_block->next = next;
10eb77: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = prev;
10eb7a: 89 53 0c mov %edx,0xc(%ebx)
next->prev = new_block;
10eb7d: 89 58 0c mov %ebx,0xc(%eax)
prev->next = new_block;
10eb80: 89 5a 08 mov %ebx,0x8(%edx)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10eb83: 89 f0 mov %esi,%eax
10eb85: 83 c8 01 or $0x1,%eax
10eb88: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
10eb8b: 89 34 1e mov %esi,(%esi,%ebx,1)
10eb8e: eb 2c jmp 10ebbc <_Heap_Free+0x154>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10eb90: 8b 41 08 mov 0x8(%ecx),%eax
new_block->next = next;
10eb93: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = block_before;
10eb96: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
10eb99: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
10eb9c: 89 58 0c mov %ebx,0xc(%eax)
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
10eb9f: 89 f8 mov %edi,%eax
10eba1: 83 c8 01 or $0x1,%eax
10eba4: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10eba7: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
10ebab: 89 3a mov %edi,(%edx)
/* Statistics */
++stats->free_blocks;
10ebad: 8b 41 38 mov 0x38(%ecx),%eax
10ebb0: 40 inc %eax
10ebb1: 89 41 38 mov %eax,0x38(%ecx)
if ( stats->max_free_blocks < stats->free_blocks ) {
10ebb4: 39 41 3c cmp %eax,0x3c(%ecx)
10ebb7: 73 03 jae 10ebbc <_Heap_Free+0x154>
stats->max_free_blocks = stats->free_blocks;
10ebb9: 89 41 3c mov %eax,0x3c(%ecx)
}
}
/* Statistics */
--stats->used_blocks;
10ebbc: ff 49 40 decl 0x40(%ecx)
++stats->frees;
10ebbf: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
10ebc2: 01 79 30 add %edi,0x30(%ecx)
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
10ebc5: b0 01 mov $0x1,%al
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10ebc7: 83 c4 14 add $0x14,%esp
10ebca: 5b pop %ebx
10ebcb: 5e pop %esi
10ebcc: 5f pop %edi
10ebcd: 5d pop %ebp
10ebce: c3 ret
0010c4dc <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
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 1c sub $0x1c,%esp
10c4e5: 8b 5d 08 mov 0x8(%ebp),%ebx
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
10c4e8: 31 f6 xor %esi,%esi
const uintptr_t *block_sizes,
size_t block_count
)
{
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *allocated_blocks = NULL;
10c4ea: 31 c9 xor %ecx,%ecx
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
10c4ec: eb 2d jmp 10c51b <_Heap_Greedy_allocate+0x3f>
* @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 );
10c4ee: 6a 00 push $0x0
10c4f0: 6a 00 push $0x0
10c4f2: 8b 45 0c mov 0xc(%ebp),%eax
10c4f5: ff 34 b0 pushl (%eax,%esi,4)
10c4f8: 53 push %ebx
10c4f9: 89 4d e4 mov %ecx,-0x1c(%ebp)
10c4fc: e8 9b 5f 00 00 call 11249c <_Heap_Allocate_aligned_with_boundary>
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
10c501: 83 c4 10 add $0x10,%esp
10c504: 85 c0 test %eax,%eax
10c506: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c509: 74 0f je 10c51a <_Heap_Greedy_allocate+0x3e><== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10c50b: 8d 78 f8 lea -0x8(%eax),%edi
10c50e: 31 d2 xor %edx,%edx
10c510: 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);
10c513: 29 d7 sub %edx,%edi
Heap_Block *next_block = _Heap_Block_of_alloc_area(
(uintptr_t) next,
heap->page_size
);
next_block->next = allocated_blocks;
10c515: 89 4f 08 mov %ecx,0x8(%edi)
10c518: 89 f9 mov %edi,%ecx
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
10c51a: 46 inc %esi
10c51b: 3b 75 10 cmp 0x10(%ebp),%esi
10c51e: 75 ce jne 10c4ee <_Heap_Greedy_allocate+0x12>
10c520: 31 f6 xor %esi,%esi
10c522: eb 23 jmp 10c547 <_Heap_Greedy_allocate+0x6b>
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10c524: 8b 47 04 mov 0x4(%edi),%eax
10c527: 83 e0 fe and $0xfffffffe,%eax
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
_Heap_Block_allocate(
10c52a: 83 e8 08 sub $0x8,%eax
10c52d: 50 push %eax
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10c52e: 8d 47 08 lea 0x8(%edi),%eax
10c531: 50 push %eax
10c532: 57 push %edi
10c533: 53 push %ebx
10c534: 89 4d e4 mov %ecx,-0x1c(%ebp)
10c537: e8 8e 02 00 00 call 10c7ca <_Heap_Block_allocate>
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
10c53c: 89 77 08 mov %esi,0x8(%edi)
10c53f: 89 fe mov %edi,%esi
10c541: 83 c4 10 add $0x10,%esp
10c544: 8b 4d e4 mov -0x1c(%ebp),%ecx
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10c547: 8b 7b 08 mov 0x8(%ebx),%edi
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
10c54a: 39 df cmp %ebx,%edi
10c54c: 75 d6 jne 10c524 <_Heap_Greedy_allocate+0x48>
10c54e: eb 14 jmp 10c564 <_Heap_Greedy_allocate+0x88>
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
10c550: 8b 79 08 mov 0x8(%ecx),%edi
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
10c553: 50 push %eax
10c554: 50 push %eax
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10c555: 83 c1 08 add $0x8,%ecx
10c558: 51 push %ecx
10c559: 53 push %ebx
10c55a: e8 95 60 00 00 call 1125f4 <_Heap_Free>
10c55f: 83 c4 10 add $0x10,%esp
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
10c562: 89 f9 mov %edi,%ecx
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
10c564: 85 c9 test %ecx,%ecx
10c566: 75 e8 jne 10c550 <_Heap_Greedy_allocate+0x74>
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
return blocks;
}
10c568: 89 f0 mov %esi,%eax
10c56a: 8d 65 f4 lea -0xc(%ebp),%esp
10c56d: 5b pop %ebx
10c56e: 5e pop %esi
10c56f: 5f pop %edi
10c570: 5d pop %ebp
10c571: c3 ret
00111dc4 <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
111dc4: 55 push %ebp
111dc5: 89 e5 mov %esp,%ebp
111dc7: 56 push %esi
111dc8: 53 push %ebx
111dc9: 8b 45 08 mov 0x8(%ebp),%eax
Heap_Block *current = heap->first_block;
111dcc: 8b 50 20 mov 0x20(%eax),%edx
Heap_Block *end = heap->last_block;
111dcf: 8b 58 24 mov 0x24(%eax),%ebx
bool stop = false;
111dd2: 31 c0 xor %eax,%eax
while ( !stop && current != end ) {
111dd4: eb 1f jmp 111df5 <_Heap_Iterate+0x31>
111dd6: 8b 42 04 mov 0x4(%edx),%eax
111dd9: 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);
111ddc: 8d 34 02 lea (%edx,%eax,1),%esi
uintptr_t size = _Heap_Block_size( current );
Heap_Block *next = _Heap_Block_at( current, size );
bool used = _Heap_Is_prev_used( next );
stop = (*visitor)( current, size, used, visitor_arg );
111ddf: ff 75 10 pushl 0x10(%ebp)
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
111de2: 8b 4e 04 mov 0x4(%esi),%ecx
111de5: 83 e1 01 and $0x1,%ecx
111de8: 51 push %ecx
111de9: 50 push %eax
111dea: 52 push %edx
111deb: 8b 55 0c mov 0xc(%ebp),%edx
111dee: ff d2 call *%edx
111df0: 89 f2 mov %esi,%edx
111df2: 83 c4 10 add $0x10,%esp
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
111df5: 39 da cmp %ebx,%edx
111df7: 74 04 je 111dfd <_Heap_Iterate+0x39>
111df9: fe c8 dec %al
111dfb: 75 d9 jne 111dd6 <_Heap_Iterate+0x12> <== ALWAYS TAKEN
stop = (*visitor)( current, size, used, visitor_arg );
current = next;
}
}
111dfd: 8d 65 f8 lea -0x8(%ebp),%esp
111e00: 5b pop %ebx
111e01: 5e pop %esi
111e02: 5d pop %ebp
111e03: c3 ret
0010ecc8 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
10ecc8: 55 push %ebp
10ecc9: 89 e5 mov %esp,%ebp
10eccb: 57 push %edi
10eccc: 56 push %esi
10eccd: 53 push %ebx
10ecce: 8b 5d 08 mov 0x8(%ebp),%ebx
10ecd1: 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);
10ecd4: 8d 4e f8 lea -0x8(%esi),%ecx
10ecd7: 89 f0 mov %esi,%eax
10ecd9: 31 d2 xor %edx,%edx
10ecdb: 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);
10ecde: 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
10ece0: 8b 53 20 mov 0x20(%ebx),%edx
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10ece3: 31 ff xor %edi,%edi
10ece5: 39 d1 cmp %edx,%ecx
10ece7: 72 0a jb 10ecf3 <_Heap_Size_of_alloc_area+0x2b>
10ece9: 31 c0 xor %eax,%eax
10eceb: 39 4b 24 cmp %ecx,0x24(%ebx)
10ecee: 0f 93 c0 setae %al
10ecf1: 89 c7 mov %eax,%edi
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10ecf3: 31 c0 xor %eax,%eax
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
10ecf5: 85 ff test %edi,%edi
10ecf7: 74 30 je 10ed29 <_Heap_Size_of_alloc_area+0x61>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10ecf9: 8b 41 04 mov 0x4(%ecx),%eax
10ecfc: 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);
10ecff: 01 c1 add %eax,%ecx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10ed01: 31 ff xor %edi,%edi
10ed03: 39 d1 cmp %edx,%ecx
10ed05: 72 0a jb 10ed11 <_Heap_Size_of_alloc_area+0x49><== NEVER TAKEN
10ed07: 31 c0 xor %eax,%eax
10ed09: 39 4b 24 cmp %ecx,0x24(%ebx)
10ed0c: 0f 93 c0 setae %al
10ed0f: 89 c7 mov %eax,%edi
return false;
10ed11: 31 c0 xor %eax,%eax
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
10ed13: 85 ff test %edi,%edi
10ed15: 74 12 je 10ed29 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
10ed17: f6 41 04 01 testb $0x1,0x4(%ecx)
10ed1b: 74 0c je 10ed29 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
10ed1d: 29 f1 sub %esi,%ecx
10ed1f: 8d 51 04 lea 0x4(%ecx),%edx
10ed22: 8b 45 10 mov 0x10(%ebp),%eax
10ed25: 89 10 mov %edx,(%eax)
return true;
10ed27: b0 01 mov $0x1,%al
}
10ed29: 5b pop %ebx
10ed2a: 5e pop %esi
10ed2b: 5f pop %edi
10ed2c: 5d pop %ebp
10ed2d: c3 ret
0010b586 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10b586: 55 push %ebp
10b587: 89 e5 mov %esp,%ebp
10b589: 57 push %edi
10b58a: 56 push %esi
10b58b: 53 push %ebx
10b58c: 83 ec 3c sub $0x3c,%esp
10b58f: 8b 7d 0c mov 0xc(%ebp),%edi
uintptr_t const page_size = heap->page_size;
10b592: 8b 4d 08 mov 0x8(%ebp),%ecx
10b595: 8b 49 10 mov 0x10(%ecx),%ecx
10b598: 89 4d e0 mov %ecx,-0x20(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10b59b: 8b 4d 08 mov 0x8(%ebp),%ecx
10b59e: 8b 49 14 mov 0x14(%ecx),%ecx
10b5a1: 89 4d d8 mov %ecx,-0x28(%ebp)
Heap_Block *const first_block = heap->first_block;
10b5a4: 8b 4d 08 mov 0x8(%ebp),%ecx
10b5a7: 8b 71 20 mov 0x20(%ecx),%esi
Heap_Block *const last_block = heap->last_block;
10b5aa: 8b 49 24 mov 0x24(%ecx),%ecx
10b5ad: 89 4d d4 mov %ecx,-0x2c(%ebp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10b5b0: bb 48 b5 10 00 mov $0x10b548,%ebx
10b5b5: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10b5b9: 74 05 je 10b5c0 <_Heap_Walk+0x3a>
10b5bb: bb 4d b5 10 00 mov $0x10b54d,%ebx
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10b5c0: 83 3d 30 e5 12 00 03 cmpl $0x3,0x12e530
10b5c7: 74 07 je 10b5d0 <_Heap_Walk+0x4a>
return true;
10b5c9: b0 01 mov $0x1,%al
10b5cb: e9 ec 02 00 00 jmp 10b8bc <_Heap_Walk+0x336>
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)(
10b5d0: 50 push %eax
10b5d1: 8b 4d 08 mov 0x8(%ebp),%ecx
10b5d4: ff 71 0c pushl 0xc(%ecx)
10b5d7: ff 71 08 pushl 0x8(%ecx)
10b5da: ff 75 d4 pushl -0x2c(%ebp)
10b5dd: 56 push %esi
10b5de: ff 71 1c pushl 0x1c(%ecx)
10b5e1: ff 71 18 pushl 0x18(%ecx)
10b5e4: ff 75 d8 pushl -0x28(%ebp)
10b5e7: ff 75 e0 pushl -0x20(%ebp)
10b5ea: 68 00 f7 11 00 push $0x11f700
10b5ef: 6a 00 push $0x0
10b5f1: 57 push %edi
10b5f2: ff d3 call *%ebx
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
10b5f4: 83 c4 30 add $0x30,%esp
10b5f7: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
10b5fb: 75 0b jne 10b608 <_Heap_Walk+0x82>
(*printer)( source, true, "page size is zero\n" );
10b5fd: 50 push %eax
10b5fe: 68 91 f7 11 00 push $0x11f791
10b603: e9 d5 00 00 00 jmp 10b6dd <_Heap_Walk+0x157>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10b608: f6 45 e0 03 testb $0x3,-0x20(%ebp)
10b60c: 74 0d je 10b61b <_Heap_Walk+0x95>
(*printer)(
10b60e: ff 75 e0 pushl -0x20(%ebp)
10b611: 68 a4 f7 11 00 push $0x11f7a4
10b616: e9 c2 00 00 00 jmp 10b6dd <_Heap_Walk+0x157>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b61b: 8b 45 d8 mov -0x28(%ebp),%eax
10b61e: 31 d2 xor %edx,%edx
10b620: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10b623: 85 d2 test %edx,%edx
10b625: 74 0d je 10b634 <_Heap_Walk+0xae>
(*printer)(
10b627: ff 75 d8 pushl -0x28(%ebp)
10b62a: 68 c2 f7 11 00 push $0x11f7c2
10b62f: e9 a9 00 00 00 jmp 10b6dd <_Heap_Walk+0x157>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10b634: 8d 46 08 lea 0x8(%esi),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b637: 31 d2 xor %edx,%edx
10b639: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if (
10b63c: 85 d2 test %edx,%edx
10b63e: 74 0b je 10b64b <_Heap_Walk+0xc5>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10b640: 56 push %esi
10b641: 68 e6 f7 11 00 push $0x11f7e6
10b646: e9 92 00 00 00 jmp 10b6dd <_Heap_Walk+0x157>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10b64b: f6 46 04 01 testb $0x1,0x4(%esi)
10b64f: 75 0b jne 10b65c <_Heap_Walk+0xd6>
(*printer)(
10b651: 50 push %eax
10b652: 68 17 f8 11 00 push $0x11f817
10b657: e9 81 00 00 00 jmp 10b6dd <_Heap_Walk+0x157>
- 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;
10b65c: 8b 4d d4 mov -0x2c(%ebp),%ecx
10b65f: 8b 41 04 mov 0x4(%ecx),%eax
10b662: 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);
10b665: 01 c8 add %ecx,%eax
10b667: 89 45 d0 mov %eax,-0x30(%ebp)
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10b66a: f6 40 04 01 testb $0x1,0x4(%eax)
10b66e: 75 08 jne 10b678 <_Heap_Walk+0xf2>
(*printer)(
10b670: 50 push %eax
10b671: 68 45 f8 11 00 push $0x11f845
10b676: eb 65 jmp 10b6dd <_Heap_Walk+0x157>
);
return false;
}
if (
10b678: 39 75 d0 cmp %esi,-0x30(%ebp)
10b67b: 74 08 je 10b685 <_Heap_Walk+0xff>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10b67d: 56 push %esi
10b67e: 68 5a f8 11 00 push $0x11f85a
10b683: eb 58 jmp 10b6dd <_Heap_Walk+0x157>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10b685: 8b 4d 08 mov 0x8(%ebp),%ecx
10b688: 8b 49 10 mov 0x10(%ecx),%ecx
10b68b: 89 4d e4 mov %ecx,-0x1c(%ebp)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10b68e: 8b 45 08 mov 0x8(%ebp),%eax
10b691: 8b 48 08 mov 0x8(%eax),%ecx
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
10b694: 89 c6 mov %eax,%esi
10b696: eb 6d jmp 10b705 <_Heap_Walk+0x17f>
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;
10b698: 31 c0 xor %eax,%eax
10b69a: 8b 55 08 mov 0x8(%ebp),%edx
10b69d: 39 4a 20 cmp %ecx,0x20(%edx)
10b6a0: 77 08 ja 10b6aa <_Heap_Walk+0x124>
10b6a2: 31 c0 xor %eax,%eax
10b6a4: 39 4a 24 cmp %ecx,0x24(%edx)
10b6a7: 0f 93 c0 setae %al
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
10b6aa: 85 c0 test %eax,%eax
10b6ac: 75 08 jne 10b6b6 <_Heap_Walk+0x130>
(*printer)(
10b6ae: 51 push %ecx
10b6af: 68 89 f8 11 00 push $0x11f889
10b6b4: eb 27 jmp 10b6dd <_Heap_Walk+0x157>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10b6b6: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b6b9: 31 d2 xor %edx,%edx
10b6bb: f7 75 e4 divl -0x1c(%ebp)
);
return false;
}
if (
10b6be: 85 d2 test %edx,%edx
10b6c0: 74 08 je 10b6ca <_Heap_Walk+0x144>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10b6c2: 51 push %ecx
10b6c3: 68 a9 f8 11 00 push $0x11f8a9
10b6c8: eb 13 jmp 10b6dd <_Heap_Walk+0x157>
- 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;
10b6ca: 8b 41 04 mov 0x4(%ecx),%eax
10b6cd: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10b6d0: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10b6d5: 74 13 je 10b6ea <_Heap_Walk+0x164>
(*printer)(
10b6d7: 51 push %ecx
10b6d8: 68 d9 f8 11 00 push $0x11f8d9
10b6dd: 6a 01 push $0x1
10b6df: 57 push %edi
10b6e0: ff d3 call *%ebx
10b6e2: 83 c4 10 add $0x10,%esp
10b6e5: e9 c3 01 00 00 jmp 10b8ad <_Heap_Walk+0x327>
);
return false;
}
if ( free_block->prev != prev_block ) {
10b6ea: 8b 41 0c mov 0xc(%ecx),%eax
10b6ed: 39 f0 cmp %esi,%eax
10b6ef: 74 0f je 10b700 <_Heap_Walk+0x17a>
(*printer)(
10b6f1: 83 ec 0c sub $0xc,%esp
10b6f4: 50 push %eax
10b6f5: 51 push %ecx
10b6f6: 68 f5 f8 11 00 push $0x11f8f5
10b6fb: e9 42 01 00 00 jmp 10b842 <_Heap_Walk+0x2bc>
return false;
}
prev_block = free_block;
free_block = free_block->next;
10b700: 89 ce mov %ecx,%esi
10b702: 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 ) {
10b705: 3b 4d 08 cmp 0x8(%ebp),%ecx
10b708: 75 8e jne 10b698 <_Heap_Walk+0x112>
10b70a: 8b 75 d0 mov -0x30(%ebp),%esi
block = next_block;
} while ( block != first_block );
return true;
}
10b70d: 8b 46 04 mov 0x4(%esi),%eax
10b710: 89 c1 mov %eax,%ecx
10b712: 83 e1 fe and $0xfffffffe,%ecx
10b715: 89 4d e4 mov %ecx,-0x1c(%ebp)
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
10b718: 83 e0 01 and $0x1,%eax
10b71b: 89 45 c8 mov %eax,-0x38(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10b71e: 01 f1 add %esi,%ecx
10b720: 89 4d dc mov %ecx,-0x24(%ebp)
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;
10b723: 3b 75 d4 cmp -0x2c(%ebp),%esi
10b726: 0f 95 c1 setne %cl
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;
10b729: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
10b730: 8b 55 dc mov -0x24(%ebp),%edx
10b733: 8b 45 08 mov 0x8(%ebp),%eax
10b736: 39 50 20 cmp %edx,0x20(%eax)
10b739: 77 0c ja 10b747 <_Heap_Walk+0x1c1> <== NEVER TAKEN
10b73b: 39 50 24 cmp %edx,0x24(%eax)
10b73e: 0f 93 c0 setae %al
10b741: 0f b6 c0 movzbl %al,%eax
10b744: 89 45 cc mov %eax,-0x34(%ebp)
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10b747: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10b74b: 75 11 jne 10b75e <_Heap_Walk+0x1d8>
(*printer)(
10b74d: 83 ec 0c sub $0xc,%esp
10b750: ff 75 dc pushl -0x24(%ebp)
10b753: 56 push %esi
10b754: 68 27 f9 11 00 push $0x11f927
10b759: e9 e4 00 00 00 jmp 10b842 <_Heap_Walk+0x2bc>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b75e: 8b 45 e4 mov -0x1c(%ebp),%eax
10b761: 31 d2 xor %edx,%edx
10b763: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10b766: 85 d2 test %edx,%edx
10b768: 74 15 je 10b77f <_Heap_Walk+0x1f9>
10b76a: 84 c9 test %cl,%cl
10b76c: 74 11 je 10b77f <_Heap_Walk+0x1f9>
(*printer)(
10b76e: 83 ec 0c sub $0xc,%esp
10b771: ff 75 e4 pushl -0x1c(%ebp)
10b774: 56 push %esi
10b775: 68 54 f9 11 00 push $0x11f954
10b77a: e9 c3 00 00 00 jmp 10b842 <_Heap_Walk+0x2bc>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10b77f: 8b 45 d8 mov -0x28(%ebp),%eax
10b782: 39 45 e4 cmp %eax,-0x1c(%ebp)
10b785: 73 15 jae 10b79c <_Heap_Walk+0x216>
10b787: 84 c9 test %cl,%cl
10b789: 74 11 je 10b79c <_Heap_Walk+0x216> <== NEVER TAKEN
(*printer)(
10b78b: 51 push %ecx
10b78c: 51 push %ecx
10b78d: 50 push %eax
10b78e: ff 75 e4 pushl -0x1c(%ebp)
10b791: 56 push %esi
10b792: 68 82 f9 11 00 push $0x11f982
10b797: e9 a6 00 00 00 jmp 10b842 <_Heap_Walk+0x2bc>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10b79c: 3b 75 dc cmp -0x24(%ebp),%esi
10b79f: 72 15 jb 10b7b6 <_Heap_Walk+0x230>
10b7a1: 84 c9 test %cl,%cl
10b7a3: 74 11 je 10b7b6 <_Heap_Walk+0x230>
(*printer)(
10b7a5: 83 ec 0c sub $0xc,%esp
10b7a8: ff 75 dc pushl -0x24(%ebp)
10b7ab: 56 push %esi
10b7ac: 68 ad f9 11 00 push $0x11f9ad
10b7b1: e9 8c 00 00 00 jmp 10b842 <_Heap_Walk+0x2bc>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10b7b6: 8b 4d dc mov -0x24(%ebp),%ecx
10b7b9: f6 41 04 01 testb $0x1,0x4(%ecx)
10b7bd: 0f 85 b0 00 00 00 jne 10b873 <_Heap_Walk+0x2ed>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10b7c3: 8b 45 08 mov 0x8(%ebp),%eax
10b7c6: 8b 48 08 mov 0x8(%eax),%ecx
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
10b7c9: 8b 56 08 mov 0x8(%esi),%edx
10b7cc: 89 55 c4 mov %edx,-0x3c(%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)(
10b7cf: 3b 50 0c cmp 0xc(%eax),%edx
10b7d2: 74 14 je 10b7e8 <_Heap_Walk+0x262>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10b7d4: b8 a9 f5 11 00 mov $0x11f5a9,%eax
10b7d9: 8b 55 08 mov 0x8(%ebp),%edx
10b7dc: 39 55 c4 cmp %edx,-0x3c(%ebp)
10b7df: 75 0c jne 10b7ed <_Heap_Walk+0x267>
10b7e1: b8 dc f6 11 00 mov $0x11f6dc,%eax
10b7e6: eb 05 jmp 10b7ed <_Heap_Walk+0x267>
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)(
10b7e8: b8 cd f6 11 00 mov $0x11f6cd,%eax
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 ?
10b7ed: 8b 56 0c mov 0xc(%esi),%edx
10b7f0: 89 55 cc mov %edx,-0x34(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10b7f3: 39 ca cmp %ecx,%edx
10b7f5: 74 14 je 10b80b <_Heap_Walk+0x285>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10b7f7: ba a9 f5 11 00 mov $0x11f5a9,%edx
10b7fc: 8b 4d 08 mov 0x8(%ebp),%ecx
10b7ff: 39 4d cc cmp %ecx,-0x34(%ebp)
10b802: 75 0c jne 10b810 <_Heap_Walk+0x28a>
10b804: ba f6 f6 11 00 mov $0x11f6f6,%edx
10b809: eb 05 jmp 10b810 <_Heap_Walk+0x28a>
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)(
10b80b: ba e6 f6 11 00 mov $0x11f6e6,%edx
10b810: 83 ec 0c sub $0xc,%esp
10b813: 50 push %eax
10b814: ff 75 c4 pushl -0x3c(%ebp)
10b817: 52 push %edx
10b818: ff 75 cc pushl -0x34(%ebp)
10b81b: ff 75 e4 pushl -0x1c(%ebp)
10b81e: 56 push %esi
10b81f: 68 e1 f9 11 00 push $0x11f9e1
10b824: 6a 00 push $0x0
10b826: 57 push %edi
10b827: ff d3 call *%ebx
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10b829: 8b 4d dc mov -0x24(%ebp),%ecx
10b82c: 8b 01 mov (%ecx),%eax
10b82e: 83 c4 30 add $0x30,%esp
10b831: 39 45 e4 cmp %eax,-0x1c(%ebp)
10b834: 74 16 je 10b84c <_Heap_Walk+0x2c6>
(*printer)(
10b836: 52 push %edx
10b837: 51 push %ecx
10b838: 50 push %eax
10b839: ff 75 e4 pushl -0x1c(%ebp)
10b83c: 56 push %esi
10b83d: 68 16 fa 11 00 push $0x11fa16
10b842: 6a 01 push $0x1
10b844: 57 push %edi
10b845: ff d3 call *%ebx
10b847: 83 c4 20 add $0x20,%esp
10b84a: eb 61 jmp 10b8ad <_Heap_Walk+0x327>
);
return false;
}
if ( !prev_used ) {
10b84c: 83 7d c8 00 cmpl $0x0,-0x38(%ebp)
10b850: 75 0b jne 10b85d <_Heap_Walk+0x2d7>
(*printer)(
10b852: 56 push %esi
10b853: 68 4f fa 11 00 push $0x11fa4f
10b858: e9 80 fe ff ff jmp 10b6dd <_Heap_Walk+0x157>
10b85d: 8b 4d 08 mov 0x8(%ebp),%ecx
10b860: 8b 41 08 mov 0x8(%ecx),%eax
10b863: eb 07 jmp 10b86c <_Heap_Walk+0x2e6>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
10b865: 39 f0 cmp %esi,%eax
10b867: 74 33 je 10b89c <_Heap_Walk+0x316>
return true;
}
free_block = free_block->next;
10b869: 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 ) {
10b86c: 3b 45 08 cmp 0x8(%ebp),%eax
10b86f: 75 f4 jne 10b865 <_Heap_Walk+0x2df>
10b871: eb 3e jmp 10b8b1 <_Heap_Walk+0x32b>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10b873: 83 7d c8 00 cmpl $0x0,-0x38(%ebp)
10b877: 74 0e je 10b887 <_Heap_Walk+0x301>
(*printer)(
10b879: 83 ec 0c sub $0xc,%esp
10b87c: ff 75 e4 pushl -0x1c(%ebp)
10b87f: 56 push %esi
10b880: 68 7e fa 11 00 push $0x11fa7e
10b885: eb 0d jmp 10b894 <_Heap_Walk+0x30e>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10b887: 50 push %eax
10b888: 50 push %eax
10b889: ff 36 pushl (%esi)
10b88b: ff 75 e4 pushl -0x1c(%ebp)
10b88e: 56 push %esi
10b88f: 68 95 fa 11 00 push $0x11fa95
10b894: 6a 00 push $0x0
10b896: 57 push %edi
10b897: ff d3 call *%ebx
10b899: 83 c4 20 add $0x20,%esp
10b89c: 8b 75 dc mov -0x24(%ebp),%esi
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10b89f: 3b 75 d0 cmp -0x30(%ebp),%esi
10b8a2: 0f 85 65 fe ff ff jne 10b70d <_Heap_Walk+0x187>
10b8a8: e9 1c fd ff ff jmp 10b5c9 <_Heap_Walk+0x43>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
10b8ad: 31 c0 xor %eax,%eax
10b8af: eb 0b jmp 10b8bc <_Heap_Walk+0x336>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10b8b1: 56 push %esi
10b8b2: 68 ba fa 11 00 push $0x11faba
10b8b7: e9 21 fe ff ff jmp 10b6dd <_Heap_Walk+0x157>
block = next_block;
} while ( block != first_block );
return true;
}
10b8bc: 8d 65 f4 lea -0xc(%ebp),%esp
10b8bf: 5b pop %ebx
10b8c0: 5e pop %esi
10b8c1: 5f pop %edi
10b8c2: 5d pop %ebp
10b8c3: c3 ret
0010ad80 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10ad80: 55 push %ebp
10ad81: 89 e5 mov %esp,%ebp
10ad83: 53 push %ebx
10ad84: 83 ec 08 sub $0x8,%esp
10ad87: 8b 55 08 mov 0x8(%ebp),%edx
10ad8a: 8b 45 0c mov 0xc(%ebp),%eax
10ad8d: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10ad90: 89 15 ec c3 12 00 mov %edx,0x12c3ec
_Internal_errors_What_happened.is_internal = is_internal;
10ad96: a2 f0 c3 12 00 mov %al,0x12c3f0
_Internal_errors_What_happened.the_error = the_error;
10ad9b: 89 1d f4 c3 12 00 mov %ebx,0x12c3f4
_User_extensions_Fatal( the_source, is_internal, the_error );
10ada1: 53 push %ebx
10ada2: 0f b6 c0 movzbl %al,%eax
10ada5: 50 push %eax
10ada6: 52 push %edx
10ada7: e8 a9 19 00 00 call 10c755 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10adac: c7 05 a8 c4 12 00 05 movl $0x5,0x12c4a8 <== NOT EXECUTED
10adb3: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10adb6: fa cli <== NOT EXECUTED
10adb7: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10adb9: f4 hlt <== NOT EXECUTED
10adba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10adbd: eb fe jmp 10adbd <_Internal_error_Occurred+0x3d><== NOT EXECUTED
0010ae10 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10ae10: 55 push %ebp
10ae11: 89 e5 mov %esp,%ebp
10ae13: 56 push %esi
10ae14: 53 push %ebx
10ae15: 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 )
10ae18: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10ae1c: 75 04 jne 10ae22 <_Objects_Allocate+0x12><== ALWAYS TAKEN
return NULL;
10ae1e: 31 c9 xor %ecx,%ecx
10ae20: eb 51 jmp 10ae73 <_Objects_Allocate+0x63>
/*
* 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 );
10ae22: 8d 73 20 lea 0x20(%ebx),%esi
10ae25: 83 ec 0c sub $0xc,%esp
10ae28: 56 push %esi
10ae29: e8 06 f8 ff ff call 10a634 <_Chain_Get>
10ae2e: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10ae30: 83 c4 10 add $0x10,%esp
10ae33: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10ae37: 74 3a je 10ae73 <_Objects_Allocate+0x63>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10ae39: 85 c0 test %eax,%eax
10ae3b: 75 1a jne 10ae57 <_Objects_Allocate+0x47>
_Objects_Extend_information( information );
10ae3d: 83 ec 0c sub $0xc,%esp
10ae40: 53 push %ebx
10ae41: e8 56 00 00 00 call 10ae9c <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10ae46: 89 34 24 mov %esi,(%esp)
10ae49: e8 e6 f7 ff ff call 10a634 <_Chain_Get>
10ae4e: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10ae50: 83 c4 10 add $0x10,%esp
10ae53: 85 c0 test %eax,%eax
10ae55: 74 c7 je 10ae1e <_Objects_Allocate+0xe>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10ae57: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10ae5b: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10ae5f: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10ae61: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10ae65: 31 d2 xor %edx,%edx
10ae67: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10ae69: 8b 53 30 mov 0x30(%ebx),%edx
10ae6c: ff 0c 82 decl (%edx,%eax,4)
information->inactive--;
10ae6f: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10ae73: 89 c8 mov %ecx,%eax
10ae75: 8d 65 f8 lea -0x8(%ebp),%esp
10ae78: 5b pop %ebx
10ae79: 5e pop %esi
10ae7a: 5d pop %ebp
10ae7b: c3 ret
0010ae9c <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10ae9c: 55 push %ebp
10ae9d: 89 e5 mov %esp,%ebp
10ae9f: 57 push %edi
10aea0: 56 push %esi
10aea1: 53 push %ebx
10aea2: 83 ec 3c sub $0x3c,%esp
10aea5: 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 );
10aea8: 0f b7 43 08 movzwl 0x8(%ebx),%eax
10aeac: 89 45 c8 mov %eax,-0x38(%ebp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10aeaf: 8b 73 34 mov 0x34(%ebx),%esi
10aeb2: 85 f6 test %esi,%esi
10aeb4: 74 40 je 10aef6 <_Objects_Extend_information+0x5a>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10aeb6: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx
10aeba: 8b 43 10 mov 0x10(%ebx),%eax
10aebd: 31 d2 xor %edx,%edx
10aebf: 66 f7 f1 div %cx
10aec2: 0f b7 c0 movzwl %ax,%eax
10aec5: 89 45 d0 mov %eax,-0x30(%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;
minimum_index = _Objects_Get_index( information->minimum_id );
10aec8: 8b 55 c8 mov -0x38(%ebp),%edx
10aecb: 89 55 cc mov %edx,-0x34(%ebp)
index_base = minimum_index;
block = 0;
10aece: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10aed5: eb 10 jmp 10aee7 <_Objects_Extend_information+0x4b>
if ( information->object_blocks[ block ] == NULL ) {
10aed7: 8b 55 d4 mov -0x2c(%ebp),%edx
10aeda: 83 3c 96 00 cmpl $0x0,(%esi,%edx,4)
10aede: 74 31 je 10af11 <_Objects_Extend_information+0x75>
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10aee0: 01 4d cc add %ecx,-0x34(%ebp)
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10aee3: 42 inc %edx
10aee4: 89 55 d4 mov %edx,-0x2c(%ebp)
10aee7: 8b 55 d0 mov -0x30(%ebp),%edx
10aeea: 39 55 d4 cmp %edx,-0x2c(%ebp)
10aeed: 72 e8 jb 10aed7 <_Objects_Extend_information+0x3b>
/*
* 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;
10aeef: be 01 00 00 00 mov $0x1,%esi
10aef4: eb 1d jmp 10af13 <_Objects_Extend_information+0x77>
minimum_index = _Objects_Get_index( information->minimum_id );
10aef6: 8b 4d c8 mov -0x38(%ebp),%ecx
10aef9: 89 4d cc mov %ecx,-0x34(%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;
10aefc: be 01 00 00 00 mov $0x1,%esi
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10af01: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
10af08: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
10af0f: eb 02 jmp 10af13 <_Objects_Extend_information+0x77>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10af11: 31 f6 xor %esi,%esi
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10af13: 0f b7 43 14 movzwl 0x14(%ebx),%eax
10af17: 0f b7 53 10 movzwl 0x10(%ebx),%edx
10af1b: 01 c2 add %eax,%edx
10af1d: 89 55 bc mov %edx,-0x44(%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 ) {
10af20: 81 fa ff ff 00 00 cmp $0xffff,%edx
10af26: 0f 87 bb 01 00 00 ja 10b0e7 <_Objects_Extend_information+0x24b><== NEVER TAKEN
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
10af2c: 0f af 43 18 imul 0x18(%ebx),%eax
if ( information->auto_extend ) {
10af30: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10af34: 74 18 je 10af4e <_Objects_Extend_information+0xb2>
new_object_block = _Workspace_Allocate( block_size );
10af36: 83 ec 0c sub $0xc,%esp
10af39: 50 push %eax
10af3a: e8 61 1b 00 00 call 10caa0 <_Workspace_Allocate>
10af3f: 89 45 c0 mov %eax,-0x40(%ebp)
if ( !new_object_block )
10af42: 83 c4 10 add $0x10,%esp
10af45: 85 c0 test %eax,%eax
10af47: 75 14 jne 10af5d <_Objects_Extend_information+0xc1>
10af49: e9 99 01 00 00 jmp 10b0e7 <_Objects_Extend_information+0x24b>
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
10af4e: 83 ec 0c sub $0xc,%esp
10af51: 50 push %eax
10af52: e8 7a 1b 00 00 call 10cad1 <_Workspace_Allocate_or_fatal_error>
10af57: 89 45 c0 mov %eax,-0x40(%ebp)
10af5a: 83 c4 10 add $0x10,%esp
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
10af5d: 89 f0 mov %esi,%eax
10af5f: 84 c0 test %al,%al
10af61: 0f 84 fd 00 00 00 je 10b064 <_Objects_Extend_information+0x1c8>
*/
/*
* Up the block count and maximum
*/
block_count++;
10af67: 8b 75 d0 mov -0x30(%ebp),%esi
10af6a: 46 inc %esi
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10af6b: 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 *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
10af6e: 8b 55 bc mov -0x44(%ebp),%edx
10af71: 03 55 c8 add -0x38(%ebp),%edx
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10af74: 8d 04 76 lea (%esi,%esi,2),%eax
10af77: 01 d0 add %edx,%eax
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
10af79: 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 );
10af7c: 50 push %eax
10af7d: e8 1e 1b 00 00 call 10caa0 <_Workspace_Allocate>
10af82: 89 c2 mov %eax,%edx
if ( !object_blocks ) {
10af84: 83 c4 10 add $0x10,%esp
10af87: 85 c0 test %eax,%eax
10af89: 75 13 jne 10af9e <_Objects_Extend_information+0x102>
_Workspace_Free( new_object_block );
10af8b: 83 ec 0c sub $0xc,%esp
10af8e: ff 75 c0 pushl -0x40(%ebp)
10af91: e8 23 1b 00 00 call 10cab9 <_Workspace_Free>
10af96: 83 c4 10 add $0x10,%esp
10af99: e9 49 01 00 00 jmp 10b0e7 <_Objects_Extend_information+0x24b>
10af9e: 8d 0c b0 lea (%eax,%esi,4),%ecx
10afa1: 89 4d b8 mov %ecx,-0x48(%ebp)
10afa4: 8d 34 f0 lea (%eax,%esi,8),%esi
10afa7: 89 75 c4 mov %esi,-0x3c(%ebp)
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10afaa: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10afae: 31 c0 xor %eax,%eax
10afb0: 3b 4d c8 cmp -0x38(%ebp),%ecx
10afb3: 76 38 jbe 10afed <_Objects_Extend_information+0x151>
/*
* 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,
10afb5: 8b 45 d0 mov -0x30(%ebp),%eax
10afb8: c1 e0 02 shl $0x2,%eax
10afbb: 8b 73 34 mov 0x34(%ebx),%esi
10afbe: 89 d7 mov %edx,%edi
10afc0: 89 c1 mov %eax,%ecx
10afc2: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10afc4: 8b 73 30 mov 0x30(%ebx),%esi
10afc7: 8b 7d b8 mov -0x48(%ebp),%edi
10afca: 89 c1 mov %eax,%ecx
10afcc: 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 *) );
10afce: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10afd2: 03 4d c8 add -0x38(%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,
10afd5: c1 e1 02 shl $0x2,%ecx
10afd8: 8b 73 1c mov 0x1c(%ebx),%esi
10afdb: 8b 7d c4 mov -0x3c(%ebp),%edi
10afde: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10afe0: eb 10 jmp 10aff2 <_Objects_Extend_information+0x156>
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
10afe2: 8b 75 c4 mov -0x3c(%ebp),%esi
10afe5: c7 04 86 00 00 00 00 movl $0x0,(%esi,%eax,4)
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10afec: 40 inc %eax
10afed: 3b 45 c8 cmp -0x38(%ebp),%eax
10aff0: 75 f0 jne 10afe2 <_Objects_Extend_information+0x146>
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10aff2: 8b 45 d0 mov -0x30(%ebp),%eax
10aff5: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,4)
inactive_per_block[block_count] = 0;
10affc: 8b 4d b8 mov -0x48(%ebp),%ecx
10afff: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10b006: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx
10b00a: 03 4d cc add -0x34(%ebp),%ecx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10b00d: 8b 45 cc mov -0x34(%ebp),%eax
10b010: eb 0b jmp 10b01d <_Objects_Extend_information+0x181>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10b012: 8b 75 c4 mov -0x3c(%ebp),%esi
10b015: c7 04 86 00 00 00 00 movl $0x0,(%esi,%eax,4)
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
10b01c: 40 inc %eax
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10b01d: 39 c8 cmp %ecx,%eax
10b01f: 72 f1 jb 10b012 <_Objects_Extend_information+0x176>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10b021: 9c pushf
10b022: fa cli
10b023: 5e pop %esi
old_tables = information->object_blocks;
10b024: 8b 4b 34 mov 0x34(%ebx),%ecx
information->object_blocks = object_blocks;
10b027: 89 53 34 mov %edx,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10b02a: 8b 45 b8 mov -0x48(%ebp),%eax
10b02d: 89 43 30 mov %eax,0x30(%ebx)
information->local_table = local_table;
10b030: 8b 55 c4 mov -0x3c(%ebp),%edx
10b033: 89 53 1c mov %edx,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10b036: 8b 45 bc mov -0x44(%ebp),%eax
10b039: 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) |
10b03d: 8b 03 mov (%ebx),%eax
10b03f: c1 e0 18 shl $0x18,%eax
10b042: 0d 00 00 01 00 or $0x10000,%eax
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10b047: 0b 45 bc or -0x44(%ebp),%eax
information->maximum_id = _Objects_Build_id(
10b04a: 0f b7 53 04 movzwl 0x4(%ebx),%edx
10b04e: c1 e2 1b shl $0x1b,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10b051: 09 d0 or %edx,%eax
10b053: 89 43 0c mov %eax,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10b056: 56 push %esi
10b057: 9d popf
_Workspace_Free( old_tables );
10b058: 83 ec 0c sub $0xc,%esp
10b05b: 51 push %ecx
10b05c: e8 58 1a 00 00 call 10cab9 <_Workspace_Free>
10b061: 83 c4 10 add $0x10,%esp
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10b064: 8b 55 d4 mov -0x2c(%ebp),%edx
10b067: c1 e2 02 shl $0x2,%edx
10b06a: 89 55 d0 mov %edx,-0x30(%ebp)
10b06d: 8b 43 34 mov 0x34(%ebx),%eax
10b070: 8b 4d c0 mov -0x40(%ebp),%ecx
10b073: 8b 55 d4 mov -0x2c(%ebp),%edx
10b076: 89 0c 90 mov %ecx,(%eax,%edx,4)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10b079: ff 73 18 pushl 0x18(%ebx)
10b07c: 0f b7 43 14 movzwl 0x14(%ebx),%eax
10b080: 50 push %eax
10b081: 8b 43 34 mov 0x34(%ebx),%eax
10b084: ff 34 90 pushl (%eax,%edx,4)
10b087: 8d 7d dc lea -0x24(%ebp),%edi
10b08a: 57 push %edi
10b08b: e8 c8 f5 ff ff call 10a658 <_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 ) {
10b090: 83 c4 10 add $0x10,%esp
);
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
10b093: 8b 75 cc mov -0x34(%ebp),%esi
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10b096: 8d 7b 20 lea 0x20(%ebx),%edi
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10b099: eb 26 jmp 10b0c1 <_Objects_Extend_information+0x225>
10b09b: 8b 13 mov (%ebx),%edx
10b09d: c1 e2 18 shl $0x18,%edx
10b0a0: 81 ca 00 00 01 00 or $0x10000,%edx
the_object->id = _Objects_Build_id(
10b0a6: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10b0aa: c1 e1 1b shl $0x1b,%ecx
10b0ad: 09 ca or %ecx,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10b0af: 09 f2 or %esi,%edx
10b0b1: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10b0b4: 52 push %edx
10b0b5: 52 push %edx
10b0b6: 50 push %eax
10b0b7: 57 push %edi
10b0b8: e8 53 f5 ff ff call 10a610 <_Chain_Append>
index++;
10b0bd: 46 inc %esi
10b0be: 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 ) {
10b0c1: 83 ec 0c sub $0xc,%esp
10b0c4: 8d 45 dc lea -0x24(%ebp),%eax
10b0c7: 50 push %eax
10b0c8: e8 67 f5 ff ff call 10a634 <_Chain_Get>
10b0cd: 83 c4 10 add $0x10,%esp
10b0d0: 85 c0 test %eax,%eax
10b0d2: 75 c7 jne 10b09b <_Objects_Extend_information+0x1ff>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10b0d4: 8b 43 14 mov 0x14(%ebx),%eax
10b0d7: 8b 53 30 mov 0x30(%ebx),%edx
10b0da: 0f b7 c8 movzwl %ax,%ecx
10b0dd: 8b 75 d0 mov -0x30(%ebp),%esi
10b0e0: 89 0c 32 mov %ecx,(%edx,%esi,1)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
10b0e3: 66 01 43 2c add %ax,0x2c(%ebx)
}
10b0e7: 8d 65 f4 lea -0xc(%ebp),%esp
10b0ea: 5b pop %ebx
10b0eb: 5e pop %esi
10b0ec: 5f pop %edi
10b0ed: 5d pop %ebp
10b0ee: c3 ret
0010b180 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10b180: 55 push %ebp
10b181: 89 e5 mov %esp,%ebp
10b183: 56 push %esi
10b184: 53 push %ebx
10b185: 8b 5d 08 mov 0x8(%ebp),%ebx
10b188: 0f b7 75 0c movzwl 0xc(%ebp),%esi
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10b18c: 66 85 f6 test %si,%si
10b18f: 75 04 jne 10b195 <_Objects_Get_information+0x15>
return NULL;
10b191: 31 c0 xor %eax,%eax
10b193: eb 2d jmp 10b1c2 <_Objects_Get_information+0x42>
/*
* 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 );
10b195: 83 ec 0c sub $0xc,%esp
10b198: 53 push %ebx
10b199: e8 92 3b 00 00 call 10ed30 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10b19e: 83 c4 10 add $0x10,%esp
10b1a1: 85 c0 test %eax,%eax
10b1a3: 74 ec je 10b191 <_Objects_Get_information+0x11>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10b1a5: 39 c6 cmp %eax,%esi
10b1a7: 77 e8 ja 10b191 <_Objects_Get_information+0x11>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10b1a9: 8b 04 9d 44 c3 12 00 mov 0x12c344(,%ebx,4),%eax
10b1b0: 85 c0 test %eax,%eax
10b1b2: 74 dd je 10b191 <_Objects_Get_information+0x11><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10b1b4: 8b 04 b0 mov (%eax,%esi,4),%eax
if ( !info )
10b1b7: 85 c0 test %eax,%eax
10b1b9: 74 d6 je 10b191 <_Objects_Get_information+0x11><== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
10b1bb: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10b1c0: 74 cf je 10b191 <_Objects_Get_information+0x11>
return NULL;
#endif
return info;
}
10b1c2: 8d 65 f8 lea -0x8(%ebp),%esp
10b1c5: 5b pop %ebx
10b1c6: 5e pop %esi
10b1c7: 5d pop %ebp
10b1c8: c3 ret
001186b8 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
1186b8: 55 push %ebp
1186b9: 89 e5 mov %esp,%ebp
1186bb: 53 push %ebx
1186bc: 8b 55 08 mov 0x8(%ebp),%edx
1186bf: 8b 4d 10 mov 0x10(%ebp),%ecx
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
1186c2: b8 01 00 00 00 mov $0x1,%eax
1186c7: 2b 42 08 sub 0x8(%edx),%eax
1186ca: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
1186cd: 0f b7 5a 10 movzwl 0x10(%edx),%ebx
1186d1: 39 c3 cmp %eax,%ebx
1186d3: 72 12 jb 1186e7 <_Objects_Get_no_protection+0x2f>
if ( (the_object = information->local_table[ index ]) != NULL ) {
1186d5: 8b 52 1c mov 0x1c(%edx),%edx
1186d8: 8b 04 82 mov (%edx,%eax,4),%eax
1186db: 85 c0 test %eax,%eax
1186dd: 74 08 je 1186e7 <_Objects_Get_no_protection+0x2f><== NEVER TAKEN
*location = OBJECTS_LOCAL;
1186df: c7 01 00 00 00 00 movl $0x0,(%ecx)
return the_object;
1186e5: eb 08 jmp 1186ef <_Objects_Get_no_protection+0x37>
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
1186e7: c7 01 01 00 00 00 movl $0x1,(%ecx)
return NULL;
1186ed: 31 c0 xor %eax,%eax
}
1186ef: 5b pop %ebx
1186f0: 5d pop %ebp
1186f1: c3 ret
0010e2c4 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10e2c4: 55 push %ebp
10e2c5: 89 e5 mov %esp,%ebp
10e2c7: 83 ec 18 sub $0x18,%esp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10e2ca: 8b 45 08 mov 0x8(%ebp),%eax
10e2cd: 85 c0 test %eax,%eax
10e2cf: 75 08 jne 10e2d9 <_Objects_Id_to_name+0x15>
10e2d1: a1 40 95 13 00 mov 0x139540,%eax
10e2d6: 8b 40 08 mov 0x8(%eax),%eax
10e2d9: 89 c2 mov %eax,%edx
10e2db: c1 ea 18 shr $0x18,%edx
10e2de: 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 )
10e2e1: 8d 4a ff lea -0x1(%edx),%ecx
10e2e4: 83 f9 02 cmp $0x2,%ecx
10e2e7: 76 37 jbe 10e320 <_Objects_Id_to_name+0x5c>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
10e2e9: b8 03 00 00 00 mov $0x3,%eax
10e2ee: eb 3d jmp 10e32d <_Objects_Id_to_name+0x69>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10e2f0: 89 c1 mov %eax,%ecx
10e2f2: c1 e9 1b shr $0x1b,%ecx
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10e2f5: 8b 14 8a mov (%edx,%ecx,4),%edx
if ( !information )
10e2f8: 85 d2 test %edx,%edx
10e2fa: 74 ed je 10e2e9 <_Objects_Id_to_name+0x25><== 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 );
10e2fc: 51 push %ecx
10e2fd: 8d 4d f4 lea -0xc(%ebp),%ecx
10e300: 51 push %ecx
10e301: 50 push %eax
10e302: 52 push %edx
10e303: e8 5c ff ff ff call 10e264 <_Objects_Get>
if ( !the_object )
10e308: 83 c4 10 add $0x10,%esp
10e30b: 85 c0 test %eax,%eax
10e30d: 74 da je 10e2e9 <_Objects_Id_to_name+0x25>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10e30f: 8b 50 0c mov 0xc(%eax),%edx
10e312: 8b 45 0c mov 0xc(%ebp),%eax
10e315: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10e317: e8 34 0b 00 00 call 10ee50 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10e31c: 31 c0 xor %eax,%eax
10e31e: eb 0d jmp 10e32d <_Objects_Id_to_name+0x69>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
10e320: 8b 14 95 dc 92 13 00 mov 0x1392dc(,%edx,4),%edx
10e327: 85 d2 test %edx,%edx
10e329: 75 c5 jne 10e2f0 <_Objects_Id_to_name+0x2c>
10e32b: eb bc jmp 10e2e9 <_Objects_Id_to_name+0x25>
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
10e32d: c9 leave
10e32e: c3 ret
0010bf98 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
10bf98: 55 push %ebp
10bf99: 89 e5 mov %esp,%ebp
10bf9b: 57 push %edi
10bf9c: 56 push %esi
10bf9d: 53 push %ebx
10bf9e: 83 ec 1c sub $0x1c,%esp
10bfa1: 8b 7d 08 mov 0x8(%ebp),%edi
10bfa4: 8b 5d 0c mov 0xc(%ebp),%ebx
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
10bfa7: 85 db test %ebx,%ebx
10bfa9: 0f 84 0d 01 00 00 je 10c0bc <_RBTree_Extract_unprotected+0x124>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
10bfaf: 3b 5f 08 cmp 0x8(%edi),%ebx
10bfb2: 75 10 jne 10bfc4 <_RBTree_Extract_unprotected+0x2c>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_RIGHT );
10bfb4: 50 push %eax
10bfb5: 50 push %eax
10bfb6: 6a 01 push $0x1
10bfb8: 53 push %ebx
10bfb9: e8 5a 03 00 00 call 10c318 <_RBTree_Next_unprotected>
RBTree_Node *next;
next = _RBTree_Successor_unprotected(the_node);
the_rbtree->first[RBT_LEFT] = next;
10bfbe: 89 47 08 mov %eax,0x8(%edi)
10bfc1: 83 c4 10 add $0x10,%esp
}
/* Check if max needs to be updated. min=max for 1 element trees so
* do not use else if here. */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
10bfc4: 3b 5f 0c cmp 0xc(%edi),%ebx
10bfc7: 75 10 jne 10bfd9 <_RBTree_Extract_unprotected+0x41>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_LEFT );
10bfc9: 56 push %esi
10bfca: 56 push %esi
10bfcb: 6a 00 push $0x0
10bfcd: 53 push %ebx
10bfce: e8 45 03 00 00 call 10c318 <_RBTree_Next_unprotected>
RBTree_Node *previous;
previous = _RBTree_Predecessor_unprotected(the_node);
the_rbtree->first[RBT_RIGHT] = previous;
10bfd3: 89 47 0c mov %eax,0xc(%edi)
10bfd6: 83 c4 10 add $0x10,%esp
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
10bfd9: 8b 73 04 mov 0x4(%ebx),%esi
10bfdc: 85 f6 test %esi,%esi
10bfde: 74 77 je 10c057 <_RBTree_Extract_unprotected+0xbf>
10bfe0: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10bfe4: 75 04 jne 10bfea <_RBTree_Extract_unprotected+0x52>
10bfe6: eb 78 jmp 10c060 <_RBTree_Extract_unprotected+0xc8>
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
10bfe8: 89 c6 mov %eax,%esi
10bfea: 8b 46 08 mov 0x8(%esi),%eax
10bfed: 85 c0 test %eax,%eax
10bfef: 75 f7 jne 10bfe8 <_RBTree_Extract_unprotected+0x50>
* target's position (target is the right child of target->parent)
* when target vacates it. if there is no child, then target->parent
* should become NULL. This may cause the coloring to be violated.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = target->child[RBT_LEFT];
10bff1: 8b 56 04 mov 0x4(%esi),%edx
if(leaf) {
10bff4: 85 d2 test %edx,%edx
10bff6: 74 06 je 10bffe <_RBTree_Extract_unprotected+0x66>
leaf->parent = target->parent;
10bff8: 8b 06 mov (%esi),%eax
10bffa: 89 02 mov %eax,(%edx)
10bffc: eb 0d jmp 10c00b <_RBTree_Extract_unprotected+0x73>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
10bffe: 89 f0 mov %esi,%eax
10c000: 89 55 e0 mov %edx,-0x20(%ebp)
10c003: e8 53 fe ff ff call 10be5b <_RBTree_Extract_validate_unprotected>
10c008: 8b 55 e0 mov -0x20(%ebp),%edx
}
victim_color = target->color;
10c00b: 8b 46 0c mov 0xc(%esi),%eax
10c00e: 89 45 e4 mov %eax,-0x1c(%ebp)
dir = target != target->parent->child[0];
10c011: 8b 06 mov (%esi),%eax
10c013: 31 c9 xor %ecx,%ecx
10c015: 3b 70 04 cmp 0x4(%eax),%esi
10c018: 0f 95 c1 setne %cl
target->parent->child[dir] = leaf;
10c01b: 89 54 88 04 mov %edx,0x4(%eax,%ecx,4)
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
10c01f: 8b 03 mov (%ebx),%eax
10c021: 31 c9 xor %ecx,%ecx
10c023: 3b 58 04 cmp 0x4(%eax),%ebx
10c026: 0f 95 c1 setne %cl
the_node->parent->child[dir] = target;
10c029: 89 74 88 04 mov %esi,0x4(%eax,%ecx,4)
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
10c02d: 8b 43 08 mov 0x8(%ebx),%eax
10c030: 89 46 08 mov %eax,0x8(%esi)
if (the_node->child[RBT_RIGHT])
10c033: 8b 43 08 mov 0x8(%ebx),%eax
10c036: 85 c0 test %eax,%eax
10c038: 74 02 je 10c03c <_RBTree_Extract_unprotected+0xa4><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
10c03a: 89 30 mov %esi,(%eax)
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
10c03c: 8b 43 04 mov 0x4(%ebx),%eax
10c03f: 89 46 04 mov %eax,0x4(%esi)
if (the_node->child[RBT_LEFT])
10c042: 8b 43 04 mov 0x4(%ebx),%eax
10c045: 85 c0 test %eax,%eax
10c047: 74 02 je 10c04b <_RBTree_Extract_unprotected+0xb3>
the_node->child[RBT_LEFT]->parent = target;
10c049: 89 30 mov %esi,(%eax)
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
10c04b: 8b 03 mov (%ebx),%eax
10c04d: 89 06 mov %eax,(%esi)
target->color = the_node->color;
10c04f: 8b 43 0c mov 0xc(%ebx),%eax
10c052: 89 46 0c mov %eax,0xc(%esi)
10c055: eb 32 jmp 10c089 <_RBTree_Extract_unprotected+0xf1>
* the_node's location in the tree. This may cause the coloring to be
* violated. We will fix it later.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
10c057: 8b 53 08 mov 0x8(%ebx),%edx
if( leaf ) {
10c05a: 85 d2 test %edx,%edx
10c05c: 75 04 jne 10c062 <_RBTree_Extract_unprotected+0xca>
10c05e: eb 08 jmp 10c068 <_RBTree_Extract_unprotected+0xd0>
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
10c060: 89 f2 mov %esi,%edx
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
leaf->parent = the_node->parent;
10c062: 8b 03 mov (%ebx),%eax
10c064: 89 02 mov %eax,(%edx)
10c066: eb 0d jmp 10c075 <_RBTree_Extract_unprotected+0xdd>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
10c068: 89 d8 mov %ebx,%eax
10c06a: 89 55 e0 mov %edx,-0x20(%ebp)
10c06d: e8 e9 fd ff ff call 10be5b <_RBTree_Extract_validate_unprotected>
10c072: 8b 55 e0 mov -0x20(%ebp),%edx
}
victim_color = the_node->color;
10c075: 8b 43 0c mov 0xc(%ebx),%eax
10c078: 89 45 e4 mov %eax,-0x1c(%ebp)
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
10c07b: 8b 03 mov (%ebx),%eax
10c07d: 31 c9 xor %ecx,%ecx
10c07f: 3b 58 04 cmp 0x4(%eax),%ebx
10c082: 0f 95 c1 setne %cl
the_node->parent->child[dir] = leaf;
10c085: 89 54 88 04 mov %edx,0x4(%eax,%ecx,4)
/* fix coloring. leaf has moved up the tree. The color of the deleted
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
10c089: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10c08d: 75 0b jne 10c09a <_RBTree_Extract_unprotected+0x102>
if (leaf) {
10c08f: 85 d2 test %edx,%edx
10c091: 74 07 je 10c09a <_RBTree_Extract_unprotected+0x102>
leaf->color = RBT_BLACK; /* case 2 */
10c093: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
10c09a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10c0a1: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
10c0a8: c7 03 00 00 00 00 movl $0x0,(%ebx)
/* Wipe the_node */
_RBTree_Set_off_rbtree(the_node);
/* set root to black, if it exists */
if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK;
10c0ae: 8b 47 04 mov 0x4(%edi),%eax
10c0b1: 85 c0 test %eax,%eax
10c0b3: 74 07 je 10c0bc <_RBTree_Extract_unprotected+0x124>
10c0b5: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
}
10c0bc: 8d 65 f4 lea -0xc(%ebp),%esp
10c0bf: 5b pop %ebx
10c0c0: 5e pop %esi
10c0c1: 5f pop %edi
10c0c2: 5d pop %ebp
10c0c3: c3 ret
0010cab0 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
10cab0: 55 push %ebp
10cab1: 89 e5 mov %esp,%ebp
10cab3: 57 push %edi
10cab4: 56 push %esi
10cab5: 53 push %ebx
10cab6: 83 ec 0c sub $0xc,%esp
10cab9: 8b 5d 08 mov 0x8(%ebp),%ebx
10cabc: 8b 75 14 mov 0x14(%ebp),%esi
10cabf: 8b 45 1c mov 0x1c(%ebp),%eax
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
10cac2: 85 db test %ebx,%ebx
10cac4: 74 3d je 10cb03 <_RBTree_Initialize+0x53><== NEVER TAKEN
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
10cac6: c7 03 00 00 00 00 movl $0x0,(%ebx)
the_rbtree->root = NULL;
10cacc: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
the_rbtree->first[0] = NULL;
10cad3: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
the_rbtree->first[1] = NULL;
10cada: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_rbtree->compare_function = compare_function;
10cae1: 8b 55 0c mov 0xc(%ebp),%edx
10cae4: 89 53 10 mov %edx,0x10(%ebx)
the_rbtree->is_unique = is_unique;
10cae7: 88 43 14 mov %al,0x14(%ebx)
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
10caea: 8b 7d 10 mov 0x10(%ebp),%edi
while ( count-- ) {
10caed: eb 10 jmp 10caff <_RBTree_Initialize+0x4f>
_RBTree_Insert_unprotected(the_rbtree, next);
10caef: 50 push %eax
10caf0: 50 push %eax
10caf1: 57 push %edi
10caf2: 53 push %ebx
10caf3: e8 a8 fd ff ff call 10c8a0 <_RBTree_Insert_unprotected>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _RBTree_Initialize(
10caf8: 03 7d 18 add 0x18(%ebp),%edi
10cafb: 4e dec %esi
10cafc: 83 c4 10 add $0x10,%esp
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
10caff: 85 f6 test %esi,%esi
10cb01: 75 ec jne 10caef <_RBTree_Initialize+0x3f>
_RBTree_Insert_unprotected(the_rbtree, next);
next = (RBTree_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
}
10cb03: 8d 65 f4 lea -0xc(%ebp),%esp
10cb06: 5b pop %ebx
10cb07: 5e pop %esi
10cb08: 5f pop %edi
10cb09: 5d pop %ebp
10cb0a: c3 ret
0010c128 <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
10c128: 55 push %ebp
10c129: 89 e5 mov %esp,%ebp
10c12b: 57 push %edi
10c12c: 56 push %esi
10c12d: 53 push %ebx
10c12e: 83 ec 1c sub $0x1c,%esp
10c131: 8b 75 08 mov 0x8(%ebp),%esi
10c134: 8b 5d 0c mov 0xc(%ebp),%ebx
if(!the_node) return (RBTree_Node*)-1;
10c137: 85 db test %ebx,%ebx
10c139: 0f 84 55 01 00 00 je 10c294 <_RBTree_Insert_unprotected+0x16c>
RBTree_Node *iter_node = the_rbtree->root;
10c13f: 8b 7e 04 mov 0x4(%esi),%edi
int compare_result;
if (!iter_node) { /* special case: first node inserted */
10c142: 89 f9 mov %edi,%ecx
10c144: 85 ff test %edi,%edi
10c146: 75 27 jne 10c16f <_RBTree_Insert_unprotected+0x47>
the_node->color = RBT_BLACK;
10c148: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_rbtree->root = the_node;
10c14f: 89 5e 04 mov %ebx,0x4(%esi)
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
10c152: 89 5e 0c mov %ebx,0xc(%esi)
10c155: 89 5e 08 mov %ebx,0x8(%esi)
the_node->parent = (RBTree_Node *) the_rbtree;
10c158: 89 33 mov %esi,(%ebx)
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
10c15a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10c161: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
10c168: e9 37 01 00 00 jmp 10c2a4 <_RBTree_Insert_unprotected+0x17c>
(dir && _RBTree_Is_greater(compare_result)) ) {
the_rbtree->first[dir] = the_node;
}
break;
} else {
iter_node = iter_node->child[dir];
10c16d: 89 f9 mov %edi,%ecx
the_node->parent = (RBTree_Node *) the_rbtree;
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
10c16f: 52 push %edx
10c170: 52 push %edx
10c171: 57 push %edi
10c172: 53 push %ebx
10c173: 89 4d e4 mov %ecx,-0x1c(%ebp)
10c176: ff 56 10 call *0x10(%esi)
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
10c179: 83 c4 10 add $0x10,%esp
10c17c: 80 7e 14 00 cmpb $0x0,0x14(%esi)
10c180: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c183: 74 08 je 10c18d <_RBTree_Insert_unprotected+0x65>
10c185: 85 c0 test %eax,%eax
10c187: 0f 84 17 01 00 00 je 10c2a4 <_RBTree_Insert_unprotected+0x17c>
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
10c18d: 89 c2 mov %eax,%edx
10c18f: f7 d2 not %edx
10c191: c1 ea 1f shr $0x1f,%edx
if (!iter_node->child[dir]) {
10c194: 8b 7c 97 04 mov 0x4(%edi,%edx,4),%edi
10c198: 85 ff test %edi,%edi
10c19a: 75 d1 jne 10c16d <_RBTree_Insert_unprotected+0x45>
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
10c19c: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10c1a3: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
the_node->color = RBT_RED;
10c1aa: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx)
iter_node->child[dir] = the_node;
10c1b1: 89 5c 91 04 mov %ebx,0x4(%ecx,%edx,4)
the_node->parent = iter_node;
10c1b5: 89 0b mov %ecx,(%ebx)
/* update min/max */
compare_result = the_rbtree->compare_function(
10c1b7: 50 push %eax
10c1b8: 50 push %eax
10c1b9: ff 74 96 08 pushl 0x8(%esi,%edx,4)
10c1bd: 53 push %ebx
10c1be: 89 55 e4 mov %edx,-0x1c(%ebp)
10c1c1: ff 56 10 call *0x10(%esi)
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
10c1c4: 83 c4 10 add $0x10,%esp
10c1c7: 8b 55 e4 mov -0x1c(%ebp),%edx
10c1ca: 85 d2 test %edx,%edx
10c1cc: 75 0a jne 10c1d8 <_RBTree_Insert_unprotected+0xb0>
10c1ce: 85 c0 test %eax,%eax
10c1d0: 0f 89 9f 00 00 00 jns 10c275 <_RBTree_Insert_unprotected+0x14d>
10c1d6: eb 08 jmp 10c1e0 <_RBTree_Insert_unprotected+0xb8>
(dir && _RBTree_Is_greater(compare_result)) ) {
10c1d8: 85 c0 test %eax,%eax
10c1da: 0f 8e 95 00 00 00 jle 10c275 <_RBTree_Insert_unprotected+0x14d>
the_rbtree->first[dir] = the_node;
10c1e0: 89 5c 96 08 mov %ebx,0x8(%esi,%edx,4)
10c1e4: e9 8c 00 00 00 jmp 10c275 <_RBTree_Insert_unprotected+0x14d>
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
10c1e9: 85 f6 test %esi,%esi
10c1eb: 74 1b je 10c208 <_RBTree_Insert_unprotected+0xe0><== NEVER TAKEN
if(!(the_node->parent->parent->parent)) return NULL;
10c1ed: 83 3e 00 cmpl $0x0,(%esi)
10c1f0: 74 16 je 10c208 <_RBTree_Insert_unprotected+0xe0><== NEVER TAKEN
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
10c1f2: 8b 56 04 mov 0x4(%esi),%edx
10c1f5: 39 d0 cmp %edx,%eax
10c1f7: 75 03 jne 10c1fc <_RBTree_Insert_unprotected+0xd4>
return the_node->parent->child[RBT_RIGHT];
10c1f9: 8b 56 08 mov 0x8(%esi),%edx
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10c1fc: 85 d2 test %edx,%edx
10c1fe: 74 0a je 10c20a <_RBTree_Insert_unprotected+0xe2>
10c200: 83 7a 0c 01 cmpl $0x1,0xc(%edx)
10c204: 75 04 jne 10c20a <_RBTree_Insert_unprotected+0xe2>
10c206: eb 06 jmp 10c20e <_RBTree_Insert_unprotected+0xe6>
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(!(the_node->parent->parent->parent)) return NULL;
10c208: 31 d2 xor %edx,%edx <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10c20a: 31 c9 xor %ecx,%ecx
10c20c: eb 05 jmp 10c213 <_RBTree_Insert_unprotected+0xeb>
10c20e: b9 01 00 00 00 mov $0x1,%ecx
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
u = _RBTree_Parent_sibling(the_node);
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
10c213: 85 c9 test %ecx,%ecx
10c215: 74 17 je 10c22e <_RBTree_Insert_unprotected+0x106>
the_node->parent->color = RBT_BLACK;
10c217: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
u->color = RBT_BLACK;
10c21e: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
g->color = RBT_RED;
10c225: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi)
10c22c: eb 45 jmp 10c273 <_RBTree_Insert_unprotected+0x14b>
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
10c22e: 31 c9 xor %ecx,%ecx
10c230: 3b 46 04 cmp 0x4(%esi),%eax
10c233: 0f 95 c1 setne %cl
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
10c236: 31 d2 xor %edx,%edx
10c238: 3b 58 04 cmp 0x4(%eax),%ebx
10c23b: 0f 95 c2 setne %dl
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
10c23e: 39 ca cmp %ecx,%edx
10c240: 74 11 je 10c253 <_RBTree_Insert_unprotected+0x12b>
_RBTree_Rotate(the_node->parent, pdir);
10c242: 89 ca mov %ecx,%edx
10c244: 89 4d e4 mov %ecx,-0x1c(%ebp)
10c247: e8 98 fe ff ff call 10c0e4 <_RBTree_Rotate>
the_node = the_node->child[pdir];
10c24c: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c24f: 8b 5c 8b 04 mov 0x4(%ebx,%ecx,4),%ebx
}
the_node->parent->color = RBT_BLACK;
10c253: 8b 03 mov (%ebx),%eax
10c255: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
g->color = RBT_RED;
10c25c: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi)
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
10c263: ba 01 00 00 00 mov $0x1,%edx
10c268: 29 ca sub %ecx,%edx
10c26a: 89 f0 mov %esi,%eax
10c26c: e8 73 fe ff ff call 10c0e4 <_RBTree_Rotate>
10c271: 89 de mov %ebx,%esi
10c273: 89 f3 mov %esi,%ebx
_ISR_Disable( level );
return_node = _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
return return_node;
}
10c275: 8b 03 mov (%ebx),%eax
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
10c277: 8b 30 mov (%eax),%esi
10c279: 85 f6 test %esi,%esi
10c27b: 75 1c jne 10c299 <_RBTree_Insert_unprotected+0x171>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10c27d: 31 d2 xor %edx,%edx
RBTree_Node *u,*g;
/* note: the insert root case is handled already */
/* if the parent is black, nothing needs to be done
* otherwise may need to loop a few times */
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
10c27f: 85 d2 test %edx,%edx
10c281: 0f 85 62 ff ff ff jne 10c1e9 <_RBTree_Insert_unprotected+0xc1>
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
10c287: 85 f6 test %esi,%esi
10c289: 75 19 jne 10c2a4 <_RBTree_Insert_unprotected+0x17c>
10c28b: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
10c292: eb 10 jmp 10c2a4 <_RBTree_Insert_unprotected+0x17c>
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
if(!the_node) return (RBTree_Node*)-1;
10c294: 83 cf ff or $0xffffffff,%edi
10c297: eb 0b jmp 10c2a4 <_RBTree_Insert_unprotected+0x17c>
10c299: 31 d2 xor %edx,%edx
10c29b: 83 78 0c 01 cmpl $0x1,0xc(%eax)
10c29f: 0f 94 c2 sete %dl
10c2a2: eb db jmp 10c27f <_RBTree_Insert_unprotected+0x157>
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
10c2a4: 89 f8 mov %edi,%eax
10c2a6: 8d 65 f4 lea -0xc(%ebp),%esp
10c2a9: 5b pop %ebx
10c2aa: 5e pop %esi
10c2ab: 5f pop %edi
10c2ac: 5d pop %ebp
10c2ad: c3 ret
0010c2cc <_RBTree_Iterate_unprotected>:
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
10c2cc: 55 push %ebp
10c2cd: 89 e5 mov %esp,%ebp
10c2cf: 57 push %edi
10c2d0: 56 push %esi
10c2d1: 53 push %ebx
10c2d2: 83 ec 0c sub $0xc,%esp
10c2d5: 8b 5d 0c mov 0xc(%ebp),%ebx
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10c2d8: 31 d2 xor %edx,%edx
10c2da: 85 db test %ebx,%ebx
10c2dc: 0f 94 c2 sete %dl
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
10c2df: 8b 45 08 mov 0x8(%ebp),%eax
10c2e2: 8b 74 90 08 mov 0x8(%eax,%edx,4),%esi
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
10c2e6: 31 ff xor %edi,%edi
while ( !stop && current != NULL ) {
10c2e8: eb 1b jmp 10c305 <_RBTree_Iterate_unprotected+0x39>
stop = (*visitor)( current, dir, visitor_arg );
10c2ea: 50 push %eax
10c2eb: ff 75 14 pushl 0x14(%ebp)
10c2ee: 53 push %ebx
10c2ef: 56 push %esi
10c2f0: 8b 55 10 mov 0x10(%ebp),%edx
10c2f3: ff d2 call *%edx
10c2f5: 89 c7 mov %eax,%edi
current = _RBTree_Next_unprotected( current, dir );
10c2f7: 5a pop %edx
10c2f8: 59 pop %ecx
10c2f9: 53 push %ebx
10c2fa: 56 push %esi
10c2fb: e8 18 00 00 00 call 10c318 <_RBTree_Next_unprotected>
10c300: 89 c6 mov %eax,%esi
10c302: 83 c4 10 add $0x10,%esp
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
10c305: 85 f6 test %esi,%esi
10c307: 74 06 je 10c30f <_RBTree_Iterate_unprotected+0x43>
10c309: 89 f8 mov %edi,%eax
10c30b: fe c8 dec %al
10c30d: 75 db jne 10c2ea <_RBTree_Iterate_unprotected+0x1e><== ALWAYS TAKEN
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
}
}
10c30f: 8d 65 f4 lea -0xc(%ebp),%esp
10c312: 5b pop %ebx
10c313: 5e pop %esi
10c314: 5f pop %edi
10c315: 5d pop %ebp
10c316: c3 ret
0010be17 <_RBTree_Rotate>:
RBTree_Node *the_node,
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
10be17: 85 c0 test %eax,%eax
10be19: 74 3f je 10be5a <_RBTree_Rotate+0x43> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _RBTree_Rotate(
RBTree_Node *the_node,
RBTree_Direction dir
)
{
10be1b: 55 push %ebp
10be1c: 89 e5 mov %esp,%ebp
10be1e: 56 push %esi
10be1f: 53 push %ebx
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10be20: 31 db xor %ebx,%ebx
10be22: 85 d2 test %edx,%edx
10be24: 0f 94 c3 sete %bl
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10be27: 8b 4c 98 04 mov 0x4(%eax,%ebx,4),%ecx
10be2b: 85 c9 test %ecx,%ecx
10be2d: 74 28 je 10be57 <_RBTree_Rotate+0x40> <== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10be2f: 8b 74 91 04 mov 0x4(%ecx,%edx,4),%esi
10be33: 89 74 98 04 mov %esi,0x4(%eax,%ebx,4)
if (c->child[dir])
10be37: 8b 5c 91 04 mov 0x4(%ecx,%edx,4),%ebx
10be3b: 85 db test %ebx,%ebx
10be3d: 74 02 je 10be41 <_RBTree_Rotate+0x2a>
c->child[dir]->parent = the_node;
10be3f: 89 03 mov %eax,(%ebx)
c->child[dir] = the_node;
10be41: 89 44 91 04 mov %eax,0x4(%ecx,%edx,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10be45: 8b 10 mov (%eax),%edx
10be47: 31 db xor %ebx,%ebx
10be49: 3b 42 04 cmp 0x4(%edx),%eax
10be4c: 0f 95 c3 setne %bl
10be4f: 89 4c 9a 04 mov %ecx,0x4(%edx,%ebx,4)
c->parent = the_node->parent;
10be53: 89 11 mov %edx,(%ecx)
the_node->parent = c;
10be55: 89 08 mov %ecx,(%eax)
}
10be57: 5b pop %ebx
10be58: 5e pop %esi
10be59: 5d pop %ebp
10be5a: c3 ret
0010bdf3 <_RBTree_Sibling>:
* exists, and NULL if not.
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
10bdf3: 55 push %ebp
10bdf4: 89 e5 mov %esp,%ebp
if(!the_node) return NULL;
10bdf6: 85 c0 test %eax,%eax
10bdf8: 74 17 je 10be11 <_RBTree_Sibling+0x1e> <== NEVER TAKEN
if(!(the_node->parent)) return NULL;
10bdfa: 8b 08 mov (%eax),%ecx
10bdfc: 85 c9 test %ecx,%ecx
10bdfe: 74 11 je 10be11 <_RBTree_Sibling+0x1e> <== NEVER TAKEN
if(!(the_node->parent->parent)) return NULL;
10be00: 83 39 00 cmpl $0x0,(%ecx)
10be03: 74 0c je 10be11 <_RBTree_Sibling+0x1e>
if(the_node == the_node->parent->child[RBT_LEFT])
10be05: 8b 51 04 mov 0x4(%ecx),%edx
10be08: 39 d0 cmp %edx,%eax
10be0a: 75 07 jne 10be13 <_RBTree_Sibling+0x20>
return the_node->parent->child[RBT_RIGHT];
10be0c: 8b 51 08 mov 0x8(%ecx),%edx
10be0f: eb 02 jmp 10be13 <_RBTree_Sibling+0x20>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
10be11: 31 d2 xor %edx,%edx
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
else
return the_node->parent->child[RBT_LEFT];
}
10be13: 89 d0 mov %edx,%eax
10be15: 5d pop %ebp
10be16: c3 ret
0010e418 <_RTEMS_tasks_Post_switch_extension>:
*/
static void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
10e418: 55 push %ebp
10e419: 89 e5 mov %esp,%ebp
10e41b: 57 push %edi
10e41c: 56 push %esi
10e41d: 53 push %ebx
10e41e: 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 ];
10e421: 8b 45 08 mov 0x8(%ebp),%eax
10e424: 8b 98 e0 00 00 00 mov 0xe0(%eax),%ebx
if ( !api )
10e42a: 85 db test %ebx,%ebx
10e42c: 74 45 je 10e473 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
10e42e: 9c pushf
10e42f: fa cli
10e430: 58 pop %eax
signal_set = asr->signals_posted;
10e431: 8b 7b 14 mov 0x14(%ebx),%edi
asr->signals_posted = 0;
10e434: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_ISR_Enable( level );
10e43b: 50 push %eax
10e43c: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
10e43d: 85 ff test %edi,%edi
10e43f: 74 32 je 10e473 <_RTEMS_tasks_Post_switch_extension+0x5b>
return;
asr->nest_level += 1;
10e441: ff 43 1c incl 0x1c(%ebx)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
10e444: 51 push %ecx
10e445: 8d 75 e4 lea -0x1c(%ebp),%esi
10e448: 56 push %esi
10e449: 68 ff ff 00 00 push $0xffff
10e44e: ff 73 10 pushl 0x10(%ebx)
10e451: e8 de 19 00 00 call 10fe34 <rtems_task_mode>
(*asr->handler)( signal_set );
10e456: 89 3c 24 mov %edi,(%esp)
10e459: ff 53 0c call *0xc(%ebx)
asr->nest_level -= 1;
10e45c: ff 4b 1c decl 0x1c(%ebx)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
10e45f: 83 c4 0c add $0xc,%esp
10e462: 56 push %esi
10e463: 68 ff ff 00 00 push $0xffff
10e468: ff 75 e4 pushl -0x1c(%ebp)
10e46b: e8 c4 19 00 00 call 10fe34 <rtems_task_mode>
10e470: 83 c4 10 add $0x10,%esp
}
10e473: 8d 65 f4 lea -0xc(%ebp),%esp
10e476: 5b pop %ebx
10e477: 5e pop %esi
10e478: 5f pop %edi
10e479: 5d pop %ebp
10e47a: c3 ret
0012cf10 <_Rate_monotonic_Get_status>:
bool _Rate_monotonic_Get_status(
Rate_monotonic_Control *the_period,
Rate_monotonic_Period_time_t *wall_since_last_period,
Thread_CPU_usage_t *cpu_since_last_period
)
{
12cf10: 55 push %ebp
12cf11: 89 e5 mov %esp,%ebp
12cf13: 57 push %edi
12cf14: 56 push %esi
12cf15: 53 push %ebx
12cf16: 83 ec 28 sub $0x28,%esp
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
12cf19: 8b 45 08 mov 0x8(%ebp),%eax
12cf1c: 8b 78 40 mov 0x40(%eax),%edi
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
12cf1f: 8d 45 e0 lea -0x20(%ebp),%eax
12cf22: 50 push %eax
12cf23: e8 30 35 fe ff call 110458 <_TOD_Get_uptime>
_Timestamp_Subtract(
12cf28: 8b 45 e0 mov -0x20(%ebp),%eax
12cf2b: 8b 55 e4 mov -0x1c(%ebp),%edx
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
12cf2e: 89 c1 mov %eax,%ecx
12cf30: 89 d3 mov %edx,%ebx
12cf32: 8b 75 08 mov 0x8(%ebp),%esi
12cf35: 2b 4e 4c sub 0x4c(%esi),%ecx
12cf38: 1b 5e 50 sbb 0x50(%esi),%ebx
12cf3b: 8b 75 0c mov 0xc(%ebp),%esi
12cf3e: 89 0e mov %ecx,(%esi)
12cf40: 89 5e 04 mov %ebx,0x4(%esi)
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
12cf43: 8b 8f 80 00 00 00 mov 0x80(%edi),%ecx
12cf49: 8b 9f 84 00 00 00 mov 0x84(%edi),%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
12cf4f: 83 c4 10 add $0x10,%esp
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
12cf52: be 01 00 00 00 mov $0x1,%esi
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
12cf57: 3b 3d 78 cb 16 00 cmp 0x16cb78,%edi
12cf5d: 75 38 jne 12cf97 <_Rate_monotonic_Get_status+0x87>
12cf5f: 2b 05 88 cb 16 00 sub 0x16cb88,%eax
12cf65: 1b 15 8c cb 16 00 sbb 0x16cb8c,%edx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
12cf6b: 01 c8 add %ecx,%eax
12cf6d: 11 da adc %ebx,%edx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
12cf6f: 8b 75 08 mov 0x8(%ebp),%esi
12cf72: 8b 4e 44 mov 0x44(%esi),%ecx
12cf75: 8b 5e 48 mov 0x48(%esi),%ebx
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
12cf78: 39 da cmp %ebx,%edx
12cf7a: 7c 19 jl 12cf95 <_Rate_monotonic_Get_status+0x85><== NEVER TAKEN
12cf7c: 7f 04 jg 12cf82 <_Rate_monotonic_Get_status+0x72>
12cf7e: 39 c8 cmp %ecx,%eax
12cf80: 72 13 jb 12cf95 <_Rate_monotonic_Get_status+0x85>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
12cf82: 29 c8 sub %ecx,%eax
12cf84: 19 da sbb %ebx,%edx
12cf86: 8b 4d 10 mov 0x10(%ebp),%ecx
12cf89: 89 01 mov %eax,(%ecx)
12cf8b: 89 51 04 mov %edx,0x4(%ecx)
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
12cf8e: be 01 00 00 00 mov $0x1,%esi
12cf93: eb 02 jmp 12cf97 <_Rate_monotonic_Get_status+0x87>
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
return false;
12cf95: 31 f6 xor %esi,%esi
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
}
12cf97: 89 f0 mov %esi,%eax
12cf99: 8d 65 f4 lea -0xc(%ebp),%esp
12cf9c: 5b pop %ebx
12cf9d: 5e pop %esi
12cf9e: 5f pop %edi
12cf9f: 5d pop %ebp
12cfa0: c3 ret
0012d234 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
12d234: 55 push %ebp
12d235: 89 e5 mov %esp,%ebp
12d237: 53 push %ebx
12d238: 83 ec 18 sub $0x18,%esp
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
12d23b: 8d 45 f4 lea -0xc(%ebp),%eax
12d23e: 50 push %eax
12d23f: ff 75 08 pushl 0x8(%ebp)
12d242: 68 74 cd 16 00 push $0x16cd74
12d247: e8 a8 dd fd ff call 10aff4 <_Objects_Get>
switch ( location ) {
12d24c: 83 c4 10 add $0x10,%esp
12d24f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
12d253: 75 6b jne 12d2c0 <_Rate_monotonic_Timeout+0x8c><== NEVER TAKEN
12d255: 89 c3 mov %eax,%ebx
case OBJECTS_LOCAL:
the_thread = the_period->owner;
12d257: 8b 40 40 mov 0x40(%eax),%eax
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
12d25a: f6 40 11 40 testb $0x40,0x11(%eax)
12d25e: 74 18 je 12d278 <_Rate_monotonic_Timeout+0x44>
12d260: 8b 53 08 mov 0x8(%ebx),%edx
12d263: 39 50 20 cmp %edx,0x20(%eax)
12d266: 75 10 jne 12d278 <_Rate_monotonic_Timeout+0x44>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
12d268: 51 push %ecx
12d269: 51 push %ecx
12d26a: 68 f8 ff 03 10 push $0x1003fff8
12d26f: 50 push %eax
12d270: e8 5f e5 fd ff call 10b7d4 <_Thread_Clear_state>
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
12d275: 58 pop %eax
12d276: eb 10 jmp 12d288 <_Rate_monotonic_Timeout+0x54>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
12d278: 83 7b 38 01 cmpl $0x1,0x38(%ebx)
12d27c: 75 2b jne 12d2a9 <_Rate_monotonic_Timeout+0x75>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
12d27e: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
_Rate_monotonic_Initiate_statistics( the_period );
12d285: 83 ec 0c sub $0xc,%esp
12d288: 53 push %ebx
12d289: e8 b2 fd ff ff call 12d040 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12d28e: 8b 43 3c mov 0x3c(%ebx),%eax
12d291: 89 43 1c mov %eax,0x1c(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12d294: 58 pop %eax
12d295: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
12d296: 83 c3 10 add $0x10,%ebx
12d299: 53 push %ebx
12d29a: 68 20 ca 16 00 push $0x16ca20
12d29f: e8 24 f3 fd ff call 10c5c8 <_Watchdog_Insert>
12d2a4: 83 c4 10 add $0x10,%esp
12d2a7: eb 07 jmp 12d2b0 <_Rate_monotonic_Timeout+0x7c>
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
12d2a9: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx)
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
12d2b0: a1 7c c9 16 00 mov 0x16c97c,%eax
12d2b5: 48 dec %eax
12d2b6: a3 7c c9 16 00 mov %eax,0x16c97c
return _Thread_Dispatch_disable_level;
12d2bb: a1 7c c9 16 00 mov 0x16c97c,%eax
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
12d2c0: 8b 5d fc mov -0x4(%ebp),%ebx
12d2c3: c9 leave
12d2c4: c3 ret
0012cfa1 <_Rate_monotonic_Update_statistics>:
}
static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
12cfa1: 55 push %ebp
12cfa2: 89 e5 mov %esp,%ebp
12cfa4: 56 push %esi
12cfa5: 53 push %ebx
12cfa6: 83 ec 10 sub $0x10,%esp
12cfa9: 89 c6 mov %eax,%esi
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
12cfab: ff 40 54 incl 0x54(%eax)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
12cfae: 83 78 38 04 cmpl $0x4,0x38(%eax)
12cfb2: 75 03 jne 12cfb7 <_Rate_monotonic_Update_statistics+0x16>
stats->missed_count++;
12cfb4: ff 40 58 incl 0x58(%eax)
/*
* Grab status for time statistics.
*/
valid_status =
12cfb7: 50 push %eax
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
12cfb8: 8d 45 e8 lea -0x18(%ebp),%eax
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
12cfbb: 50 push %eax
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
12cfbc: 8d 45 f0 lea -0x10(%ebp),%eax
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
12cfbf: 50 push %eax
12cfc0: 56 push %esi
12cfc1: e8 4a ff ff ff call 12cf10 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
12cfc6: 83 c4 10 add $0x10,%esp
12cfc9: 84 c0 test %al,%al
12cfcb: 74 6c je 12d039 <_Rate_monotonic_Update_statistics+0x98>
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
12cfcd: 8b 4d e8 mov -0x18(%ebp),%ecx
12cfd0: 8b 5d ec mov -0x14(%ebp),%ebx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
12cfd3: 01 4e 6c add %ecx,0x6c(%esi)
12cfd6: 11 5e 70 adc %ebx,0x70(%esi)
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
12cfd9: 3b 5e 60 cmp 0x60(%esi),%ebx
12cfdc: 7f 0d jg 12cfeb <_Rate_monotonic_Update_statistics+0x4a><== NEVER TAKEN
12cfde: 7c 05 jl 12cfe5 <_Rate_monotonic_Update_statistics+0x44>
12cfe0: 3b 4e 5c cmp 0x5c(%esi),%ecx
12cfe3: 73 06 jae 12cfeb <_Rate_monotonic_Update_statistics+0x4a>
stats->min_cpu_time = executed;
12cfe5: 89 4e 5c mov %ecx,0x5c(%esi)
12cfe8: 89 5e 60 mov %ebx,0x60(%esi)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
12cfeb: 39 5e 68 cmp %ebx,0x68(%esi)
12cfee: 7f 0d jg 12cffd <_Rate_monotonic_Update_statistics+0x5c><== NEVER TAKEN
12cff0: 7c 05 jl 12cff7 <_Rate_monotonic_Update_statistics+0x56><== NEVER TAKEN
12cff2: 39 4e 64 cmp %ecx,0x64(%esi)
12cff5: 73 06 jae 12cffd <_Rate_monotonic_Update_statistics+0x5c>
stats->max_cpu_time = executed;
12cff7: 89 4e 64 mov %ecx,0x64(%esi)
12cffa: 89 5e 68 mov %ebx,0x68(%esi)
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
12cffd: 8b 4d f0 mov -0x10(%ebp),%ecx
12d000: 8b 5d f4 mov -0xc(%ebp),%ebx
12d003: 01 8e 84 00 00 00 add %ecx,0x84(%esi)
12d009: 11 9e 88 00 00 00 adc %ebx,0x88(%esi)
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
12d00f: 3b 5e 78 cmp 0x78(%esi),%ebx
12d012: 7f 0d jg 12d021 <_Rate_monotonic_Update_statistics+0x80><== NEVER TAKEN
12d014: 7c 05 jl 12d01b <_Rate_monotonic_Update_statistics+0x7a>
12d016: 3b 4e 74 cmp 0x74(%esi),%ecx
12d019: 73 06 jae 12d021 <_Rate_monotonic_Update_statistics+0x80>
stats->min_wall_time = since_last_period;
12d01b: 89 4e 74 mov %ecx,0x74(%esi)
12d01e: 89 5e 78 mov %ebx,0x78(%esi)
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
12d021: 39 9e 80 00 00 00 cmp %ebx,0x80(%esi)
12d027: 7f 10 jg 12d039 <_Rate_monotonic_Update_statistics+0x98>
12d029: 7c 05 jl 12d030 <_Rate_monotonic_Update_statistics+0x8f><== NEVER TAKEN
12d02b: 39 4e 7c cmp %ecx,0x7c(%esi)
12d02e: 73 09 jae 12d039 <_Rate_monotonic_Update_statistics+0x98>
stats->max_wall_time = since_last_period;
12d030: 89 4e 7c mov %ecx,0x7c(%esi)
12d033: 89 9e 80 00 00 00 mov %ebx,0x80(%esi)
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
12d039: 8d 65 f8 lea -0x8(%ebp),%esp
12d03c: 5b pop %ebx
12d03d: 5e pop %esi
12d03e: 5d pop %ebp
12d03f: c3 ret
0011b6d0 <_Region_Process_queue>:
*/
void _Region_Process_queue(
Region_Control *the_region
)
{
11b6d0: 55 push %ebp
11b6d1: 89 e5 mov %esp,%ebp
11b6d3: 57 push %edi
11b6d4: 56 push %esi
11b6d5: 53 push %ebx
11b6d6: 83 ec 28 sub $0x28,%esp
11b6d9: 8b 5d 08 mov 0x8(%ebp),%ebx
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
11b6dc: a1 1c 57 14 00 mov 0x14571c,%eax
11b6e1: 40 inc %eax
11b6e2: a3 1c 57 14 00 mov %eax,0x14571c
return _Thread_Dispatch_disable_level;
11b6e7: a1 1c 57 14 00 mov 0x14571c,%eax
* NOTE: Be sure to disable dispatching before unlocking the mutex
* since we do not want to open a window where a context
* switch could occur.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
11b6ec: ff 35 a8 57 14 00 pushl 0x1457a8
11b6f2: e8 1d b8 ff ff call 116f14 <_API_Mutex_Unlock>
11b6f7: 83 c4 10 add $0x10,%esp
/*
* NOTE: The following loop is O(n) where n is the number of
* threads whose memory request is satisfied.
*/
for ( ; ; ) {
the_thread = _Thread_queue_First( &the_region->Wait_queue );
11b6fa: 8d 73 10 lea 0x10(%ebx),%esi
RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
Region_Control *the_region,
uintptr_t size
)
{
return _Heap_Allocate( &the_region->Memory, size );
11b6fd: 8d 43 68 lea 0x68(%ebx),%eax
11b700: 89 45 e4 mov %eax,-0x1c(%ebp)
11b703: 83 ec 0c sub $0xc,%esp
11b706: 56 push %esi
11b707: e8 20 06 00 00 call 11bd2c <_Thread_queue_First>
11b70c: 89 c7 mov %eax,%edi
if ( the_thread == NULL )
11b70e: 83 c4 10 add $0x10,%esp
11b711: 85 c0 test %eax,%eax
11b713: 74 33 je 11b748 <_Region_Process_queue+0x78>
11b715: 6a 00 push $0x0
11b717: 6a 00 push $0x0
11b719: ff 70 24 pushl 0x24(%eax)
11b71c: ff 75 e4 pushl -0x1c(%ebp)
11b71f: e8 d0 c0 ff ff call 1177f4 <_Heap_Allocate_aligned_with_boundary>
the_segment = (void **) _Region_Allocate_segment(
the_region,
the_thread->Wait.count
);
if ( the_segment == NULL )
11b724: 83 c4 10 add $0x10,%esp
11b727: 85 c0 test %eax,%eax
11b729: 74 1d je 11b748 <_Region_Process_queue+0x78><== NEVER TAKEN
break;
*(void **)the_thread->Wait.return_argument = the_segment;
11b72b: 8b 4f 28 mov 0x28(%edi),%ecx
11b72e: 89 01 mov %eax,(%ecx)
the_region->number_of_used_blocks += 1;
11b730: ff 43 64 incl 0x64(%ebx)
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
11b733: 50 push %eax
11b734: 50 push %eax
11b735: 57 push %edi
11b736: 56 push %esi
11b737: e8 10 05 00 00 call 11bc4c <_Thread_queue_Extract>
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
11b73c: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi)
}
11b743: 83 c4 10 add $0x10,%esp
11b746: eb bb jmp 11b703 <_Region_Process_queue+0x33>
_Thread_Enable_dispatch();
}
11b748: 8d 65 f4 lea -0xc(%ebp),%esp
11b74b: 5b pop %ebx
11b74c: 5e pop %esi
11b74d: 5f pop %edi
11b74e: 5d pop %ebp
*(void **)the_thread->Wait.return_argument = the_segment;
the_region->number_of_used_blocks += 1;
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
11b74f: e9 20 db ff ff jmp 119274 <_Thread_Enable_dispatch>
0010bc6c <_Scheduler_CBS_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
10bc6c: 55 push %ebp
10bc6d: 89 e5 mov %esp,%ebp
10bc6f: 53 push %ebx
10bc70: 83 ec 10 sub $0x10,%esp
10bc73: 8b 5d 08 mov 0x8(%ebp),%ebx
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
10bc76: 6a 1c push $0x1c
10bc78: e8 6f 15 00 00 call 10d1ec <_Workspace_Allocate>
if ( sched ) {
10bc7d: 83 c4 10 add $0x10,%esp
10bc80: 85 c0 test %eax,%eax
10bc82: 74 16 je 10bc9a <_Scheduler_CBS_Allocate+0x2e><== NEVER TAKEN
the_thread->scheduler_info = sched;
10bc84: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
10bc8a: 89 18 mov %ebx,(%eax)
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
10bc8c: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax)
schinfo->cbs_server = NULL;
10bc93: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
}
return sched;
}
10bc9a: 8b 5d fc mov -0x4(%ebp),%ebx
10bc9d: c9 leave
10bc9e: c3 ret
0010d098 <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
10d098: 55 push %ebp
10d099: 89 e5 mov %esp,%ebp
10d09b: 53 push %ebx
10d09c: 83 ec 14 sub $0x14,%esp
10d09f: 8b 5d 08 mov 0x8(%ebp),%ebx
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server_id server_id;
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
10d0a2: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
if ( the_thread->real_priority != new_priority )
10d0a8: 39 43 18 cmp %eax,0x18(%ebx)
10d0ab: 74 03 je 10d0b0 <_Scheduler_CBS_Budget_callout+0x18><== NEVER TAKEN
the_thread->real_priority = new_priority;
10d0ad: 89 43 18 mov %eax,0x18(%ebx)
if ( the_thread->current_priority != new_priority )
10d0b0: 39 43 14 cmp %eax,0x14(%ebx)
10d0b3: 74 0d je 10d0c2 <_Scheduler_CBS_Budget_callout+0x2a><== NEVER TAKEN
_Thread_Change_priority(the_thread, new_priority, true);
10d0b5: 52 push %edx
10d0b6: 6a 01 push $0x1
10d0b8: 50 push %eax
10d0b9: 53 push %ebx
10d0ba: e8 b1 04 00 00 call 10d570 <_Thread_Change_priority>
10d0bf: 83 c4 10 add $0x10,%esp
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
10d0c2: 8b 9b 88 00 00 00 mov 0x88(%ebx),%ebx
if ( sched_info->cbs_server->cbs_budget_overrun ) {
10d0c8: 8b 43 18 mov 0x18(%ebx),%eax
10d0cb: 83 78 0c 00 cmpl $0x0,0xc(%eax)
10d0cf: 74 1a je 10d0eb <_Scheduler_CBS_Budget_callout+0x53>
_Scheduler_CBS_Get_server_id(
10d0d1: 52 push %edx
10d0d2: 52 push %edx
10d0d3: 8d 55 f4 lea -0xc(%ebp),%edx
10d0d6: 52 push %edx
10d0d7: ff 30 pushl (%eax)
10d0d9: e8 7e ff ff ff call 10d05c <_Scheduler_CBS_Get_server_id>
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
10d0de: 59 pop %ecx
10d0df: 8b 43 18 mov 0x18(%ebx),%eax
10d0e2: ff 75 f4 pushl -0xc(%ebp)
10d0e5: ff 50 0c call *0xc(%eax)
10d0e8: 83 c4 10 add $0x10,%esp
}
}
10d0eb: 8b 5d fc mov -0x4(%ebp),%ebx
10d0ee: c9 leave
10d0ef: c3 ret
0010cd60 <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
10cd60: 55 push %ebp
10cd61: 89 e5 mov %esp,%ebp
10cd63: 57 push %edi
10cd64: 56 push %esi
10cd65: 53 push %ebx
10cd66: 83 ec 0c sub $0xc,%esp
10cd69: 8b 5d 08 mov 0x8(%ebp),%ebx
10cd6c: 8b 75 10 mov 0x10(%ebp),%esi
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
10cd6f: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10cd73: 7e 42 jle 10cdb7 <_Scheduler_CBS_Create_server+0x57>
10cd75: 83 3b 00 cmpl $0x0,(%ebx)
10cd78: 7e 3d jle 10cdb7 <_Scheduler_CBS_Create_server+0x57>
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10cd7a: 8b 15 0c c5 12 00 mov 0x12c50c,%edx
if ( !_Scheduler_CBS_Server_list[i] )
10cd80: 8b 0d c8 08 13 00 mov 0x1308c8,%ecx
10cd86: 31 c0 xor %eax,%eax
10cd88: eb 07 jmp 10cd91 <_Scheduler_CBS_Create_server+0x31>
10cd8a: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4)
10cd8e: 74 35 je 10cdc5 <_Scheduler_CBS_Create_server+0x65>
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10cd90: 40 inc %eax
10cd91: 39 d0 cmp %edx,%eax
10cd93: 75 f5 jne 10cd8a <_Scheduler_CBS_Create_server+0x2a>
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
10cd95: b8 e6 ff ff ff mov $0xffffffe6,%eax
10cd9a: eb 53 jmp 10cdef <_Scheduler_CBS_Create_server+0x8f>
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
10cd9c: 8b 03 mov (%ebx),%eax
10cd9e: 8b 53 04 mov 0x4(%ebx),%edx
10cda1: 89 41 04 mov %eax,0x4(%ecx)
10cda4: 89 51 08 mov %edx,0x8(%ecx)
the_server->task_id = -1;
10cda7: c7 01 ff ff ff ff movl $0xffffffff,(%ecx)
the_server->cbs_budget_overrun = budget_overrun_callback;
10cdad: 8b 45 0c mov 0xc(%ebp),%eax
10cdb0: 89 41 0c mov %eax,0xc(%ecx)
return SCHEDULER_CBS_OK;
10cdb3: 31 c0 xor %eax,%eax
10cdb5: eb 38 jmp 10cdef <_Scheduler_CBS_Create_server+0x8f>
if ( params->budget <= 0 ||
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10cdb7: b8 ee ff ff ff mov $0xffffffee,%eax
10cdbc: eb 31 jmp 10cdef <_Scheduler_CBS_Create_server+0x8f>
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
10cdbe: b8 ef ff ff ff mov $0xffffffef,%eax <== NOT EXECUTED
10cdc3: eb 2a jmp 10cdef <_Scheduler_CBS_Create_server+0x8f><== NOT EXECUTED
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
10cdc5: 89 06 mov %eax,(%esi)
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
10cdc7: 8b 15 c8 08 13 00 mov 0x1308c8,%edx
10cdcd: 8d 3c 82 lea (%edx,%eax,4),%edi
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
10cdd0: 83 ec 0c sub $0xc,%esp
10cdd3: 6a 10 push $0x10
10cdd5: e8 8a 18 00 00 call 10e664 <_Workspace_Allocate>
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
10cdda: 89 07 mov %eax,(%edi)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
10cddc: 8b 16 mov (%esi),%edx
10cdde: a1 c8 08 13 00 mov 0x1308c8,%eax
10cde3: 8b 0c 90 mov (%eax,%edx,4),%ecx
if ( !the_server )
10cde6: 83 c4 10 add $0x10,%esp
10cde9: 85 c9 test %ecx,%ecx
10cdeb: 75 af jne 10cd9c <_Scheduler_CBS_Create_server+0x3c><== ALWAYS TAKEN
10cded: eb cf jmp 10cdbe <_Scheduler_CBS_Create_server+0x5e><== NOT EXECUTED
the_server->parameters = *params;
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
10cdef: 8d 65 f4 lea -0xc(%ebp),%esp
10cdf2: 5b pop %ebx
10cdf3: 5e pop %esi
10cdf4: 5f pop %edi
10cdf5: 5d pop %ebp
10cdf6: c3 ret
0010ce68 <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
10ce68: 55 push %ebp
10ce69: 89 e5 mov %esp,%ebp
10ce6b: 57 push %edi
10ce6c: 56 push %esi
10ce6d: 53 push %ebx
10ce6e: 83 ec 24 sub $0x24,%esp
10ce71: 8b 7d 08 mov 0x8(%ebp),%edi
10ce74: 8b 75 0c mov 0xc(%ebp),%esi
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
10ce77: 8d 45 e4 lea -0x1c(%ebp),%eax
10ce7a: 50 push %eax
10ce7b: 56 push %esi
10ce7c: e8 ff 0a 00 00 call 10d980 <_Thread_Get>
10ce81: 89 c3 mov %eax,%ebx
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
10ce83: 83 c4 10 add $0x10,%esp
10ce86: 85 c0 test %eax,%eax
10ce88: 74 05 je 10ce8f <_Scheduler_CBS_Detach_thread+0x27>
_Thread_Enable_dispatch();
10ce8a: e8 d1 0a 00 00 call 10d960 <_Thread_Enable_dispatch>
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
10ce8f: 3b 3d 0c c5 12 00 cmp 0x12c50c,%edi
10ce95: 73 4d jae 10cee4 <_Scheduler_CBS_Detach_thread+0x7c>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
10ce97: 85 db test %ebx,%ebx
10ce99: 74 49 je 10cee4 <_Scheduler_CBS_Detach_thread+0x7c>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
10ce9b: a1 c8 08 13 00 mov 0x1308c8,%eax
10cea0: 8b 04 b8 mov (%eax,%edi,4),%eax
10cea3: 85 c0 test %eax,%eax
10cea5: 74 36 je 10cedd <_Scheduler_CBS_Detach_thread+0x75>
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
10cea7: 39 30 cmp %esi,(%eax)
10cea9: 75 39 jne 10cee4 <_Scheduler_CBS_Detach_thread+0x7c><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
10ceab: c7 00 ff ff ff ff movl $0xffffffff,(%eax)
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
10ceb1: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10ceb7: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
10cebe: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
10cec4: 89 43 78 mov %eax,0x78(%ebx)
the_thread->budget_callout = the_thread->Start.budget_callout;
10cec7: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax
10cecd: 89 43 7c mov %eax,0x7c(%ebx)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
10ced0: 8a 83 9c 00 00 00 mov 0x9c(%ebx),%al
10ced6: 88 43 70 mov %al,0x70(%ebx)
return SCHEDULER_CBS_OK;
10ced9: 31 c0 xor %eax,%eax
10cedb: eb 0c jmp 10cee9 <_Scheduler_CBS_Detach_thread+0x81>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
10cedd: b8 e7 ff ff ff mov $0xffffffe7,%eax
10cee2: eb 05 jmp 10cee9 <_Scheduler_CBS_Detach_thread+0x81>
if ( the_thread ) {
_Thread_Enable_dispatch();
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10cee4: b8 ee ff ff ff mov $0xffffffee,%eax
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
}
10cee9: 8d 65 f4 lea -0xc(%ebp),%esp
10ceec: 5b pop %ebx
10ceed: 5e pop %esi
10ceee: 5f pop %edi
10ceef: 5d pop %ebp
10cef0: c3 ret
0010cf2c <_Scheduler_CBS_Get_execution_time>:
int _Scheduler_CBS_Get_execution_time (
Scheduler_CBS_Server_id server_id,
time_t *exec_time,
time_t *abs_time
)
{
10cf2c: 55 push %ebp
10cf2d: 89 e5 mov %esp,%ebp
10cf2f: 57 push %edi
10cf30: 56 push %esi
10cf31: 53 push %ebx
10cf32: 83 ec 1c sub $0x1c,%esp
10cf35: 8b 5d 08 mov 0x8(%ebp),%ebx
10cf38: 8b 75 0c mov 0xc(%ebp),%esi
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
10cf3b: 3b 1d 0c c5 12 00 cmp 0x12c50c,%ebx
10cf41: 73 58 jae 10cf9b <_Scheduler_CBS_Get_execution_time+0x6f>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
10cf43: a1 c8 08 13 00 mov 0x1308c8,%eax
10cf48: 8b 04 98 mov (%eax,%ebx,4),%eax
10cf4b: 85 c0 test %eax,%eax
10cf4d: 74 53 je 10cfa2 <_Scheduler_CBS_Get_execution_time+0x76>
return SCHEDULER_CBS_ERROR_NOSERVER;
if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) {
10cf4f: 8b 00 mov (%eax),%eax
10cf51: 83 f8 ff cmp $0xffffffff,%eax
10cf54: 75 08 jne 10cf5e <_Scheduler_CBS_Get_execution_time+0x32>
*exec_time = 0;
10cf56: c7 06 00 00 00 00 movl $0x0,(%esi)
10cf5c: eb 39 jmp 10cf97 <_Scheduler_CBS_Get_execution_time+0x6b>
return SCHEDULER_CBS_OK;
}
the_thread = _Thread_Get(
10cf5e: 52 push %edx
10cf5f: 52 push %edx
10cf60: 8d 55 e4 lea -0x1c(%ebp),%edx
10cf63: 52 push %edx
10cf64: 50 push %eax
10cf65: e8 16 0a 00 00 call 10d980 <_Thread_Get>
10cf6a: 89 c7 mov %eax,%edi
_Scheduler_CBS_Server_list[server_id]->task_id,
&location
);
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
10cf6c: 83 c4 10 add $0x10,%esp
10cf6f: 85 c0 test %eax,%eax
10cf71: 74 17 je 10cf8a <_Scheduler_CBS_Get_execution_time+0x5e><== NEVER TAKEN
_Thread_Enable_dispatch();
10cf73: e8 e8 09 00 00 call 10d960 <_Thread_Enable_dispatch>
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget -
10cf78: a1 c8 08 13 00 mov 0x1308c8,%eax
10cf7d: 8b 04 98 mov (%eax,%ebx,4),%eax
10cf80: 8b 50 08 mov 0x8(%eax),%edx
10cf83: 2b 57 74 sub 0x74(%edi),%edx
10cf86: 89 16 mov %edx,(%esi)
10cf88: eb 0d jmp 10cf97 <_Scheduler_CBS_Get_execution_time+0x6b>
the_thread->cpu_time_budget;
}
else {
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
10cf8a: a1 c8 08 13 00 mov 0x1308c8,%eax <== NOT EXECUTED
10cf8f: 8b 04 98 mov (%eax,%ebx,4),%eax <== NOT EXECUTED
10cf92: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
10cf95: 89 06 mov %eax,(%esi) <== NOT EXECUTED
}
return SCHEDULER_CBS_OK;
10cf97: 31 c0 xor %eax,%eax
10cf99: eb 0c jmp 10cfa7 <_Scheduler_CBS_Get_execution_time+0x7b>
{
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10cf9b: b8 ee ff ff ff mov $0xffffffee,%eax
10cfa0: eb 05 jmp 10cfa7 <_Scheduler_CBS_Get_execution_time+0x7b>
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
10cfa2: b8 e7 ff ff ff mov $0xffffffe7,%eax
}
else {
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
}
return SCHEDULER_CBS_OK;
}
10cfa7: 8d 65 f4 lea -0xc(%ebp),%esp
10cfaa: 5b pop %ebx
10cfab: 5e pop %esi
10cfac: 5f pop %edi
10cfad: 5d pop %ebp
10cfae: c3 ret
0010cfec <_Scheduler_CBS_Get_remaining_budget>:
int _Scheduler_CBS_Get_remaining_budget (
Scheduler_CBS_Server_id server_id,
time_t *remaining_budget
)
{
10cfec: 55 push %ebp
10cfed: 89 e5 mov %esp,%ebp
10cfef: 56 push %esi
10cff0: 53 push %ebx
10cff1: 83 ec 10 sub $0x10,%esp
10cff4: 8b 45 08 mov 0x8(%ebp),%eax
10cff7: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
10cffa: 3b 05 0c c5 12 00 cmp 0x12c50c,%eax
10d000: 73 44 jae 10d046 <_Scheduler_CBS_Get_remaining_budget+0x5a>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
10d002: 8b 15 c8 08 13 00 mov 0x1308c8,%edx
10d008: 8b 04 82 mov (%edx,%eax,4),%eax
10d00b: 85 c0 test %eax,%eax
10d00d: 74 3e je 10d04d <_Scheduler_CBS_Get_remaining_budget+0x61>
return SCHEDULER_CBS_ERROR_NOSERVER;
if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) {
10d00f: 8b 10 mov (%eax),%edx
10d011: 83 fa ff cmp $0xffffffff,%edx
10d014: 75 05 jne 10d01b <_Scheduler_CBS_Get_remaining_budget+0x2f>
*remaining_budget = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
10d016: 8b 40 08 mov 0x8(%eax),%eax
10d019: eb 1d jmp 10d038 <_Scheduler_CBS_Get_remaining_budget+0x4c>
return SCHEDULER_CBS_OK;
}
the_thread = _Thread_Get(
10d01b: 50 push %eax
10d01c: 50 push %eax
10d01d: 8d 45 f4 lea -0xc(%ebp),%eax
10d020: 50 push %eax
10d021: 52 push %edx
10d022: e8 59 09 00 00 call 10d980 <_Thread_Get>
10d027: 89 c6 mov %eax,%esi
_Scheduler_CBS_Server_list[server_id]->task_id,
&location
);
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
10d029: 83 c4 10 add $0x10,%esp
10d02c: 85 c0 test %eax,%eax
10d02e: 74 0c je 10d03c <_Scheduler_CBS_Get_remaining_budget+0x50><== NEVER TAKEN
_Thread_Enable_dispatch();
10d030: e8 2b 09 00 00 call 10d960 <_Thread_Enable_dispatch>
*remaining_budget = the_thread->cpu_time_budget;
10d035: 8b 46 74 mov 0x74(%esi),%eax
10d038: 89 03 mov %eax,(%ebx)
10d03a: eb 06 jmp 10d042 <_Scheduler_CBS_Get_remaining_budget+0x56>
}
else {
*remaining_budget = 0;
10d03c: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
}
return SCHEDULER_CBS_OK;
10d042: 31 c0 xor %eax,%eax
10d044: eb 0c jmp 10d052 <_Scheduler_CBS_Get_remaining_budget+0x66>
{
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10d046: b8 ee ff ff ff mov $0xffffffee,%eax
10d04b: eb 05 jmp 10d052 <_Scheduler_CBS_Get_remaining_budget+0x66>
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
10d04d: b8 e7 ff ff ff mov $0xffffffe7,%eax
else {
*remaining_budget = 0;
}
return SCHEDULER_CBS_OK;
}
10d052: 8d 65 f8 lea -0x8(%ebp),%esp
10d055: 5b pop %ebx
10d056: 5e pop %esi
10d057: 5d pop %ebp
10d058: c3 ret
0010d0f0 <_Scheduler_CBS_Initialize>:
int _Scheduler_CBS_Initialize(void)
{
10d0f0: 55 push %ebp
10d0f1: 89 e5 mov %esp,%ebp
10d0f3: 83 ec 14 sub $0x14,%esp
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
10d0f6: a1 0c c5 12 00 mov 0x12c50c,%eax
10d0fb: c1 e0 02 shl $0x2,%eax
10d0fe: 50 push %eax
10d0ff: e8 60 15 00 00 call 10e664 <_Workspace_Allocate>
10d104: a3 c8 08 13 00 mov %eax,0x1308c8
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
10d109: 83 c4 10 add $0x10,%esp
10d10c: 85 c0 test %eax,%eax
10d10e: 74 20 je 10d130 <_Scheduler_CBS_Initialize+0x40><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
10d110: 8b 15 0c c5 12 00 mov 0x12c50c,%edx
10d116: 31 c0 xor %eax,%eax
10d118: eb 0e jmp 10d128 <_Scheduler_CBS_Initialize+0x38>
_Scheduler_CBS_Server_list[i] = NULL;
10d11a: 8b 0d c8 08 13 00 mov 0x1308c8,%ecx
10d120: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
10d127: 40 inc %eax
10d128: 39 d0 cmp %edx,%eax
10d12a: 75 ee jne 10d11a <_Scheduler_CBS_Initialize+0x2a>
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
10d12c: 31 c0 xor %eax,%eax
10d12e: eb 05 jmp 10d135 <_Scheduler_CBS_Initialize+0x45>
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
10d130: b8 ef ff ff ff mov $0xffffffef,%eax <== NOT EXECUTED
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
}
10d135: c9 leave
10d136: c3 ret
0010bca0 <_Scheduler_CBS_Release_job>:
void _Scheduler_CBS_Release_job(
Thread_Control *the_thread,
uint32_t deadline
)
{
10bca0: 55 push %ebp
10bca1: 89 e5 mov %esp,%ebp
10bca3: 83 ec 08 sub $0x8,%esp
10bca6: 8b 55 08 mov 0x8(%ebp),%edx
10bca9: 8b 45 0c mov 0xc(%ebp),%eax
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
(Scheduler_CBS_Server *) sched_info->cbs_server;
10bcac: 8b 8a 88 00 00 00 mov 0x88(%edx),%ecx
)
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
10bcb2: 8b 49 18 mov 0x18(%ecx),%ecx
(Scheduler_CBS_Server *) sched_info->cbs_server;
if (deadline) {
10bcb5: 85 c0 test %eax,%eax
10bcb7: 74 22 je 10bcdb <_Scheduler_CBS_Release_job+0x3b>
/* Initializing or shifting deadline. */
if (serv_info)
10bcb9: 85 c9 test %ecx,%ecx
10bcbb: 74 0f je 10bccc <_Scheduler_CBS_Release_job+0x2c>
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
10bcbd: a1 28 ea 12 00 mov 0x12ea28,%eax
10bcc2: 03 41 04 add 0x4(%ecx),%eax
10bcc5: 25 ff ff ff 7f and $0x7fffffff,%eax
10bcca: eb 19 jmp 10bce5 <_Scheduler_CBS_Release_job+0x45>
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
10bccc: 8b 0d 28 ea 12 00 mov 0x12ea28,%ecx
10bcd2: 01 c8 add %ecx,%eax
10bcd4: 25 ff ff ff 7f and $0x7fffffff,%eax
10bcd9: eb 10 jmp 10bceb <_Scheduler_CBS_Release_job+0x4b>
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
10bcdb: 8b 82 ac 00 00 00 mov 0xac(%edx),%eax
}
/* Budget replenishment for the next job. */
if (serv_info)
10bce1: 85 c9 test %ecx,%ecx
10bce3: 74 06 je 10bceb <_Scheduler_CBS_Release_job+0x4b><== NEVER TAKEN
the_thread->cpu_time_budget = serv_info->parameters.budget;
10bce5: 8b 49 08 mov 0x8(%ecx),%ecx
10bce8: 89 4a 74 mov %ecx,0x74(%edx)
the_thread->real_priority = new_priority;
10bceb: 89 42 18 mov %eax,0x18(%edx)
_Thread_Change_priority(the_thread, new_priority, true);
10bcee: 51 push %ecx
10bcef: 6a 01 push $0x1
10bcf1: 50 push %eax
10bcf2: 52 push %edx
10bcf3: e8 98 03 00 00 call 10c090 <_Thread_Change_priority>
10bcf8: 83 c4 10 add $0x10,%esp
}
10bcfb: c9 leave
10bcfc: c3 ret
0010bd00 <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
10bd00: 55 push %ebp
10bd01: 89 e5 mov %esp,%ebp
10bd03: 56 push %esi
10bd04: 53 push %ebx
10bd05: 8b 5d 08 mov 0x8(%ebp),%ebx
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
10bd08: 83 ec 0c sub $0xc,%esp
10bd0b: 53 push %ebx
10bd0c: e8 cf 00 00 00 call 10bde0 <_Scheduler_EDF_Enqueue>
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
10bd11: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10bd17: 8b 40 18 mov 0x18(%eax),%eax
* Late unblock rule for deadline-driven tasks. The remaining time to
* deadline must be sufficient to serve the remaining computation time
* without increased utilization of this task. It might cause a deadline
* miss of another task.
*/
if (serv_info) {
10bd1a: 83 c4 10 add $0x10,%esp
10bd1d: 85 c0 test %eax,%eax
10bd1f: 74 3d je 10bd5e <_Scheduler_CBS_Unblock+0x5e>
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
10bd21: 8b 4b 18 mov 0x18(%ebx),%ecx
10bd24: 8b 15 28 ea 12 00 mov 0x12ea28,%edx
10bd2a: 89 ce mov %ecx,%esi
10bd2c: 29 d6 sub %edx,%esi
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
10bd2e: 8b 50 04 mov 0x4(%eax),%edx
10bd31: 0f af d6 imul %esi,%edx
10bd34: 8b 40 08 mov 0x8(%eax),%eax
10bd37: 0f af 43 74 imul 0x74(%ebx),%eax
10bd3b: 39 c2 cmp %eax,%edx
10bd3d: 7e 1f jle 10bd5e <_Scheduler_CBS_Unblock+0x5e>
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
10bd3f: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
if ( the_thread->real_priority != new_priority )
10bd45: 39 c1 cmp %eax,%ecx
10bd47: 74 03 je 10bd4c <_Scheduler_CBS_Unblock+0x4c>
the_thread->real_priority = new_priority;
10bd49: 89 43 18 mov %eax,0x18(%ebx)
if ( the_thread->current_priority != new_priority )
10bd4c: 39 43 14 cmp %eax,0x14(%ebx)
10bd4f: 74 0d je 10bd5e <_Scheduler_CBS_Unblock+0x5e>
_Thread_Change_priority(the_thread, new_priority, true);
10bd51: 52 push %edx
10bd52: 6a 01 push $0x1
10bd54: 50 push %eax
10bd55: 53 push %ebx
10bd56: e8 35 03 00 00 call 10c090 <_Thread_Change_priority>
10bd5b: 83 c4 10 add $0x10,%esp
10bd5e: 50 push %eax
10bd5f: 50 push %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 ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
10bd60: a1 34 eb 12 00 mov 0x12eb34,%eax
10bd65: ff 70 14 pushl 0x14(%eax)
10bd68: ff 73 14 pushl 0x14(%ebx)
10bd6b: ff 15 c0 a7 12 00 call *0x12a7c0
10bd71: 83 c4 10 add $0x10,%esp
10bd74: 85 c0 test %eax,%eax
10bd76: 7e 1e jle 10bd96 <_Scheduler_CBS_Unblock+0x96>
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
10bd78: 89 1d 34 eb 12 00 mov %ebx,0x12eb34
if ( _Thread_Executing->is_preemptible ||
10bd7e: a1 30 eb 12 00 mov 0x12eb30,%eax
10bd83: 80 78 70 00 cmpb $0x0,0x70(%eax)
10bd87: 75 06 jne 10bd8f <_Scheduler_CBS_Unblock+0x8f>
10bd89: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10bd8d: 75 07 jne 10bd96 <_Scheduler_CBS_Unblock+0x96><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10bd8f: c6 05 3c eb 12 00 01 movb $0x1,0x12eb3c
}
}
10bd96: 8d 65 f8 lea -0x8(%ebp),%esp
10bd99: 5b pop %ebx
10bd9a: 5e pop %esi
10bd9b: 5d pop %ebp
10bd9c: c3 ret
0010bc6c <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
10bc6c: 55 push %ebp
10bc6d: 89 e5 mov %esp,%ebp
10bc6f: 53 push %ebx
10bc70: 83 ec 10 sub $0x10,%esp
10bc73: 8b 5d 08 mov 0x8(%ebp),%ebx
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
10bc76: 6a 18 push $0x18
10bc78: e8 ef 14 00 00 call 10d16c <_Workspace_Allocate>
if ( sched ) {
10bc7d: 83 c4 10 add $0x10,%esp
10bc80: 85 c0 test %eax,%eax
10bc82: 74 0f je 10bc93 <_Scheduler_EDF_Allocate+0x27><== NEVER TAKEN
the_thread->scheduler_info = sched;
10bc84: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
10bc8a: 89 18 mov %ebx,(%eax)
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
10bc8c: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax)
}
return sched;
}
10bc93: 8b 5d fc mov -0x4(%ebp),%ebx
10bc96: c9 leave
10bc97: c3 ret
0010be34 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
10be34: 55 push %ebp
10be35: 89 e5 mov %esp,%ebp
10be37: 53 push %ebx
10be38: 83 ec 10 sub $0x10,%esp
10be3b: 8b 5d 08 mov 0x8(%ebp),%ebx
_Scheduler_EDF_Enqueue(the_thread);
10be3e: 53 push %ebx
10be3f: e8 94 fe ff ff call 10bcd8 <_Scheduler_EDF_Enqueue>
10be44: 58 pop %eax
10be45: 5a pop %edx
10be46: ff 73 14 pushl 0x14(%ebx)
* 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 ( _Scheduler_Is_priority_lower_than(
10be49: a1 94 ea 12 00 mov 0x12ea94,%eax
10be4e: ff 70 14 pushl 0x14(%eax)
10be51: ff 15 20 a7 12 00 call *0x12a720
10be57: 83 c4 10 add $0x10,%esp
10be5a: 85 c0 test %eax,%eax
10be5c: 79 1e jns 10be7c <_Scheduler_EDF_Unblock+0x48>
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
10be5e: 89 1d 94 ea 12 00 mov %ebx,0x12ea94
if ( _Thread_Executing->is_preemptible ||
10be64: a1 90 ea 12 00 mov 0x12ea90,%eax
10be69: 80 78 70 00 cmpb $0x0,0x70(%eax)
10be6d: 75 06 jne 10be75 <_Scheduler_EDF_Unblock+0x41>
10be6f: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10be73: 75 07 jne 10be7c <_Scheduler_EDF_Unblock+0x48><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10be75: c6 05 9c ea 12 00 01 movb $0x1,0x12ea9c
}
}
10be7c: 8b 5d fc mov -0x4(%ebp),%ebx
10be7f: c9 leave
10be80: c3 ret
0010a6c0 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10a6c0: 55 push %ebp
10a6c1: 89 e5 mov %esp,%ebp
10a6c3: 53 push %ebx
10a6c4: 8b 4d 08 mov 0x8(%ebp),%ecx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10a6c7: b8 40 42 0f 00 mov $0xf4240,%eax
10a6cc: 31 d2 xor %edx,%edx
10a6ce: f7 35 6c a1 12 00 divl 0x12a16c
(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;
10a6d4: 31 db xor %ebx,%ebx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10a6d6: 85 c9 test %ecx,%ecx
10a6d8: 74 4c je 10a726 <_TOD_Validate+0x66> <== NEVER TAKEN
10a6da: 39 41 18 cmp %eax,0x18(%ecx)
10a6dd: 73 47 jae 10a726 <_TOD_Validate+0x66>
(the_tod->ticks >= ticks_per_second) ||
10a6df: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10a6e3: 77 41 ja 10a726 <_TOD_Validate+0x66>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10a6e5: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10a6e9: 77 3b ja 10a726 <_TOD_Validate+0x66>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10a6eb: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10a6ef: 77 35 ja 10a726 <_TOD_Validate+0x66>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10a6f1: 8b 51 04 mov 0x4(%ecx),%edx
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) ||
10a6f4: 85 d2 test %edx,%edx
10a6f6: 74 2e je 10a726 <_TOD_Validate+0x66> <== NEVER TAKEN
(the_tod->month == 0) ||
10a6f8: 83 fa 0c cmp $0xc,%edx
10a6fb: 77 29 ja 10a726 <_TOD_Validate+0x66>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10a6fd: 8b 01 mov (%ecx),%eax
(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) ||
10a6ff: 3d c3 07 00 00 cmp $0x7c3,%eax
10a704: 76 20 jbe 10a726 <_TOD_Validate+0x66>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10a706: 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) ||
10a709: 85 c9 test %ecx,%ecx
10a70b: 74 19 je 10a726 <_TOD_Validate+0x66> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10a70d: a8 03 test $0x3,%al
10a70f: 75 09 jne 10a71a <_TOD_Validate+0x5a>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10a711: 8b 04 95 b8 07 12 00 mov 0x1207b8(,%edx,4),%eax
10a718: eb 07 jmp 10a721 <_TOD_Validate+0x61>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10a71a: 8b 04 95 84 07 12 00 mov 0x120784(,%edx,4),%eax
if ( the_tod->day > days_in_month )
10a721: 39 c1 cmp %eax,%ecx
10a723: 0f 96 c3 setbe %bl
return false;
return true;
}
10a726: 88 d8 mov %bl,%al
10a728: 5b pop %ebx
10a729: 5d pop %ebp
10a72a: c3 ret
0010b9ac <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10b9ac: 55 push %ebp
10b9ad: 89 e5 mov %esp,%ebp
10b9af: 57 push %edi
10b9b0: 56 push %esi
10b9b1: 53 push %ebx
10b9b2: 83 ec 28 sub $0x28,%esp
10b9b5: 8b 7d 08 mov 0x8(%ebp),%edi
10b9b8: 8b 5d 0c mov 0xc(%ebp),%ebx
10b9bb: 8a 45 10 mov 0x10(%ebp),%al
10b9be: 88 45 e7 mov %al,-0x19(%ebp)
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
10b9c1: 8b 77 10 mov 0x10(%edi),%esi
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
10b9c4: 57 push %edi
10b9c5: e8 4a 0b 00 00 call 10c514 <_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 )
10b9ca: 83 c4 10 add $0x10,%esp
10b9cd: 39 5f 14 cmp %ebx,0x14(%edi)
10b9d0: 74 0c je 10b9de <_Thread_Change_priority+0x32>
_Thread_Set_priority( the_thread, new_priority );
10b9d2: 50 push %eax
10b9d3: 50 push %eax
10b9d4: 53 push %ebx
10b9d5: 57 push %edi
10b9d6: e8 ed 0a 00 00 call 10c4c8 <_Thread_Set_priority>
10b9db: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10b9de: 9c pushf
10b9df: fa cli
10b9e0: 5b pop %ebx
/*
* 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;
10b9e1: 8b 47 10 mov 0x10(%edi),%eax
if ( state != STATES_TRANSIENT ) {
10b9e4: 83 f8 04 cmp $0x4,%eax
10b9e7: 74 2b je 10ba14 <_Thread_Change_priority+0x68>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10b9e9: 83 e6 04 and $0x4,%esi
10b9ec: 75 08 jne 10b9f6 <_Thread_Change_priority+0x4a><== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10b9ee: 89 c2 mov %eax,%edx
10b9f0: 83 e2 fb and $0xfffffffb,%edx
10b9f3: 89 57 10 mov %edx,0x10(%edi)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10b9f6: 53 push %ebx
10b9f7: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10b9f8: a9 e0 be 03 00 test $0x3bee0,%eax
10b9fd: 74 65 je 10ba64 <_Thread_Change_priority+0xb8>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10b9ff: 89 7d 0c mov %edi,0xc(%ebp)
10ba02: 8b 47 44 mov 0x44(%edi),%eax
10ba05: 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 );
}
10ba08: 8d 65 f4 lea -0xc(%ebp),%esp
10ba0b: 5b pop %ebx
10ba0c: 5e pop %esi
10ba0d: 5f pop %edi
10ba0e: 5d pop %ebp
/* 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 );
10ba0f: e9 24 0a 00 00 jmp 10c438 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10ba14: 83 e6 04 and $0x4,%esi
10ba17: 75 26 jne 10ba3f <_Thread_Change_priority+0x93><== NEVER TAKEN
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
10ba19: c7 47 10 00 00 00 00 movl $0x0,0x10(%edi)
if ( prepend_it )
10ba20: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10ba24: 74 0c je 10ba32 <_Thread_Change_priority+0x86>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
10ba26: 83 ec 0c sub $0xc,%esp
10ba29: 57 push %edi
10ba2a: ff 15 58 82 12 00 call *0x128258
10ba30: eb 0a jmp 10ba3c <_Thread_Change_priority+0x90>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
10ba32: 83 ec 0c sub $0xc,%esp
10ba35: 57 push %edi
10ba36: ff 15 54 82 12 00 call *0x128254
10ba3c: 83 c4 10 add $0x10,%esp
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
10ba3f: 53 push %ebx
10ba40: 9d popf
10ba41: fa cli
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
10ba42: ff 15 38 82 12 00 call *0x128238
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10ba48: a1 68 c5 12 00 mov 0x12c568,%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();
if ( !_Thread_Is_executing_also_the_heir() &&
10ba4d: 3b 05 6c c5 12 00 cmp 0x12c56c,%eax
10ba53: 74 0d je 10ba62 <_Thread_Change_priority+0xb6>
10ba55: 80 78 70 00 cmpb $0x0,0x70(%eax)
10ba59: 74 07 je 10ba62 <_Thread_Change_priority+0xb6>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10ba5b: c6 05 74 c5 12 00 01 movb $0x1,0x12c574
_ISR_Enable( level );
10ba62: 53 push %ebx
10ba63: 9d popf
}
10ba64: 8d 65 f4 lea -0xc(%ebp),%esp
10ba67: 5b pop %ebx
10ba68: 5e pop %esi
10ba69: 5f pop %edi
10ba6a: 5d pop %ebp
10ba6b: c3 ret
0010bc20 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10bc20: 55 push %ebp
10bc21: 89 e5 mov %esp,%ebp
10bc23: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10bc26: 8d 45 f4 lea -0xc(%ebp),%eax
10bc29: 50 push %eax
10bc2a: ff 75 08 pushl 0x8(%ebp)
10bc2d: e8 8a 01 00 00 call 10bdbc <_Thread_Get>
switch ( location ) {
10bc32: 83 c4 10 add $0x10,%esp
10bc35: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10bc39: 75 20 jne 10bc5b <_Thread_Delay_ended+0x3b><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10bc3b: 52 push %edx
10bc3c: 52 push %edx
10bc3d: 68 18 00 00 10 push $0x10000018
10bc42: 50 push %eax
10bc43: e8 24 fe ff ff call 10ba6c <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10bc48: a1 6c c3 12 00 mov 0x12c36c,%eax
10bc4d: 48 dec %eax
10bc4e: a3 6c c3 12 00 mov %eax,0x12c36c
return _Thread_Dispatch_disable_level;
10bc53: a1 6c c3 12 00 mov 0x12c36c,%eax
10bc58: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10bc5b: c9 leave
10bc5c: c3 ret
0010bc60 <_Thread_Dispatch>:
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10bc60: 55 push %ebp
10bc61: 89 e5 mov %esp,%ebp
10bc63: 57 push %edi
10bc64: 56 push %esi
10bc65: 53 push %ebx
10bc66: 83 ec 1c sub $0x1c,%esp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10bc69: a1 6c c3 12 00 mov 0x12c36c,%eax
10bc6e: 40 inc %eax
10bc6f: a3 6c c3 12 00 mov %eax,0x12c36c
return _Thread_Dispatch_disable_level;
10bc74: a1 6c c3 12 00 mov 0x12c36c,%eax
void _Thread_Disable_dispatch( void );
#else
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
_Thread_Dispatch_increment_disable_level();
RTEMS_COMPILER_MEMORY_BARRIER();
10bc79: e9 f9 00 00 00 jmp 10bd77 <_Thread_Dispatch+0x117>
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
10bc7e: 8b 35 6c c5 12 00 mov 0x12c56c,%esi
_Thread_Dispatch_necessary = false;
10bc84: c6 05 74 c5 12 00 00 movb $0x0,0x12c574
_Thread_Executing = heir;
10bc8b: 89 35 68 c5 12 00 mov %esi,0x12c568
/*
* 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 )
10bc91: 39 fe cmp %edi,%esi
10bc93: 75 1c jne 10bcb1 <_Thread_Dispatch+0x51>
_ISR_Disable( level );
}
post_switch:
_ISR_Enable( level );
10bc95: 50 push %eax
10bc96: 9d popf
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10bc97: a1 6c c3 12 00 mov 0x12c36c,%eax
10bc9c: 48 dec %eax
10bc9d: a3 6c c3 12 00 mov %eax,0x12c36c
return _Thread_Dispatch_disable_level;
10bca2: a1 6c c3 12 00 mov 0x12c36c,%eax
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
10bca7: e8 5d e8 ff ff call 10a509 <_API_extensions_Run_postswitch>
10bcac: e9 e2 00 00 00 jmp 10bd93 <_Thread_Dispatch+0x133>
*/
#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 )
10bcb1: 83 7e 78 01 cmpl $0x1,0x78(%esi)
10bcb5: 75 09 jne 10bcc0 <_Thread_Dispatch+0x60>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10bcb7: 8b 15 40 c3 12 00 mov 0x12c340,%edx
10bcbd: 89 56 74 mov %edx,0x74(%esi)
_ISR_Enable( level );
10bcc0: 50 push %eax
10bcc1: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10bcc2: 83 ec 0c sub $0xc,%esp
10bcc5: 8d 45 e0 lea -0x20(%ebp),%eax
10bcc8: 50 push %eax
10bcc9: e8 0a 2c 00 00 call 10e8d8 <_TOD_Get_uptime>
_Timestamp_Subtract(
10bcce: 8b 45 e0 mov -0x20(%ebp),%eax
10bcd1: 8b 55 e4 mov -0x1c(%ebp),%edx
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
10bcd4: 89 c1 mov %eax,%ecx
10bcd6: 89 d3 mov %edx,%ebx
10bcd8: 2b 0d 78 c5 12 00 sub 0x12c578,%ecx
10bcde: 1b 1d 7c c5 12 00 sbb 0x12c57c,%ebx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
10bce4: 01 8f 80 00 00 00 add %ecx,0x80(%edi)
10bcea: 11 9f 84 00 00 00 adc %ebx,0x84(%edi)
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
10bcf0: a3 78 c5 12 00 mov %eax,0x12c578
10bcf5: 89 15 7c c5 12 00 mov %edx,0x12c57c
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10bcfb: a1 e4 c3 12 00 mov 0x12c3e4,%eax
10bd00: 83 c4 10 add $0x10,%esp
10bd03: 85 c0 test %eax,%eax
10bd05: 74 10 je 10bd17 <_Thread_Dispatch+0xb7> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10bd07: 8b 10 mov (%eax),%edx
10bd09: 89 97 dc 00 00 00 mov %edx,0xdc(%edi)
*_Thread_libc_reent = heir->libc_reent;
10bd0f: 8b 96 dc 00 00 00 mov 0xdc(%esi),%edx
10bd15: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10bd17: 50 push %eax
10bd18: 50 push %eax
10bd19: 56 push %esi
10bd1a: 57 push %edi
10bd1b: e8 14 0b 00 00 call 10c834 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10bd20: 5a pop %edx
10bd21: 59 pop %ecx
10bd22: 8d 86 c0 00 00 00 lea 0xc0(%esi),%eax
10bd28: 50 push %eax
10bd29: 8d 87 c0 00 00 00 lea 0xc0(%edi),%eax
10bd2f: 50 push %eax
10bd30: e8 cb 0d 00 00 call 10cb00 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10bd35: 83 c4 10 add $0x10,%esp
10bd38: 83 bf d8 00 00 00 00 cmpl $0x0,0xd8(%edi)
10bd3f: 74 36 je 10bd77 <_Thread_Dispatch+0x117>
#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 );
10bd41: a1 e0 c3 12 00 mov 0x12c3e0,%eax
10bd46: 39 c7 cmp %eax,%edi
10bd48: 74 2d je 10bd77 <_Thread_Dispatch+0x117>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10bd4a: 85 c0 test %eax,%eax
10bd4c: 74 11 je 10bd5f <_Thread_Dispatch+0xff>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10bd4e: 83 ec 0c sub $0xc,%esp
10bd51: 05 d8 00 00 00 add $0xd8,%eax
10bd56: 50 push %eax
10bd57: e8 d8 0d 00 00 call 10cb34 <_CPU_Context_save_fp>
10bd5c: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10bd5f: 83 ec 0c sub $0xc,%esp
10bd62: 8d 87 d8 00 00 00 lea 0xd8(%edi),%eax
10bd68: 50 push %eax
10bd69: e8 d0 0d 00 00 call 10cb3e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10bd6e: 89 3d e0 c3 12 00 mov %edi,0x12c3e0
10bd74: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10bd77: 8b 3d 68 c5 12 00 mov 0x12c568,%edi
_ISR_Disable( level );
10bd7d: 9c pushf
10bd7e: fa cli
10bd7f: 58 pop %eax
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10bd80: 8a 15 74 c5 12 00 mov 0x12c574,%dl
10bd86: 84 d2 test %dl,%dl
10bd88: 0f 85 f0 fe ff ff jne 10bc7e <_Thread_Dispatch+0x1e>
10bd8e: e9 02 ff ff ff jmp 10bc95 <_Thread_Dispatch+0x35>
_ISR_Enable( level );
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
}
10bd93: 8d 65 f4 lea -0xc(%ebp),%esp
10bd96: 5b pop %ebx
10bd97: 5e pop %esi
10bd98: 5f pop %edi
10bd99: 5d pop %ebp
10bd9a: c3 ret
00110088 <_Thread_Handler>:
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
110088: 55 push %ebp
110089: 89 e5 mov %esp,%ebp
11008b: 53 push %ebx
11008c: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
11008f: 8b 1d 68 c5 12 00 mov 0x12c568,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
110095: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
_ISR_Set_level(level);
11009b: 85 c0 test %eax,%eax
11009d: 74 03 je 1100a2 <_Thread_Handler+0x1a>
11009f: fa cli
1100a0: eb 01 jmp 1100a3 <_Thread_Handler+0x1b>
1100a2: fb sti
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
1100a3: a0 58 c0 12 00 mov 0x12c058,%al
1100a8: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = true;
1100ab: c6 05 58 c0 12 00 01 movb $0x1,0x12c058
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
1100b2: 83 bb d8 00 00 00 00 cmpl $0x0,0xd8(%ebx)
1100b9: 74 24 je 1100df <_Thread_Handler+0x57>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
1100bb: a1 e0 c3 12 00 mov 0x12c3e0,%eax
1100c0: 39 c3 cmp %eax,%ebx
1100c2: 74 1b je 1100df <_Thread_Handler+0x57>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
1100c4: 85 c0 test %eax,%eax
1100c6: 74 11 je 1100d9 <_Thread_Handler+0x51>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
1100c8: 83 ec 0c sub $0xc,%esp
1100cb: 05 d8 00 00 00 add $0xd8,%eax
1100d0: 50 push %eax
1100d1: e8 5e ca ff ff call 10cb34 <_CPU_Context_save_fp>
1100d6: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
1100d9: 89 1d e0 c3 12 00 mov %ebx,0x12c3e0
/*
* 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 );
1100df: 83 ec 0c sub $0xc,%esp
1100e2: 53 push %ebx
1100e3: e8 10 c6 ff ff call 10c6f8 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
1100e8: e8 af bc ff ff call 10bd9c <_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 (doCons) /* && (volatile void *)_init) */ {
1100ed: 83 c4 10 add $0x10,%esp
1100f0: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
1100f4: 75 05 jne 1100fb <_Thread_Handler+0x73>
INIT_NAME ();
1100f6: e8 45 cc 00 00 call 11cd40 <__start_set_sysctl_set>
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
1100fb: 83 bb 90 00 00 00 00 cmpl $0x0,0x90(%ebx)
110102: 75 15 jne 110119 <_Thread_Handler+0x91> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
110104: 83 ec 0c sub $0xc,%esp
110107: ff b3 98 00 00 00 pushl 0x98(%ebx)
11010d: ff 93 8c 00 00 00 call *0x8c(%ebx)
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
110113: 89 43 28 mov %eax,0x28(%ebx)
110116: 83 c4 10 add $0x10,%esp
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
110119: 83 ec 0c sub $0xc,%esp
11011c: 53 push %ebx
11011d: e8 04 c6 ff ff call 10c726 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
110122: 83 c4 0c add $0xc,%esp
110125: 6a 05 push $0x5
110127: 6a 01 push $0x1
110129: 6a 00 push $0x0
11012b: e8 50 ac ff ff call 10ad80 <_Internal_error_Occurred>
0010c040 <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
10c040: 55 push %ebp
10c041: 89 e5 mov %esp,%ebp
10c043: 56 push %esi
10c044: 53 push %ebx
uint32_t ticks_per_timeslice =
10c045: 8b 1d 54 81 12 00 mov 0x128154,%ebx
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
10c04b: 8b 35 48 81 12 00 mov 0x128148,%esi
rtems_configuration_get_maximum_extensions();
rtems_stack_allocate_init_hook stack_allocate_init_hook =
10c051: a1 64 81 12 00 mov 0x128164,%eax
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
10c056: 83 3d 68 81 12 00 00 cmpl $0x0,0x128168
10c05d: 74 09 je 10c068 <_Thread_Handler_initialization+0x28>
10c05f: 83 3d 6c 81 12 00 00 cmpl $0x0,0x12816c
10c066: 75 0c jne 10c074 <_Thread_Handler_initialization+0x34><== ALWAYS TAKEN
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
10c068: 52 push %edx
10c069: 6a 0e push $0xe
10c06b: 6a 01 push $0x1
10c06d: 6a 00 push $0x0
10c06f: e8 0c ed ff ff call 10ad80 <_Internal_error_Occurred>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
10c074: 85 c0 test %eax,%eax
10c076: 74 0e je 10c086 <_Thread_Handler_initialization+0x46>
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
10c078: 83 ec 0c sub $0xc,%esp
10c07b: ff 35 44 81 12 00 pushl 0x128144
10c081: ff d0 call *%eax
10c083: 83 c4 10 add $0x10,%esp
_Thread_Dispatch_necessary = false;
10c086: c6 05 74 c5 12 00 00 movb $0x0,0x12c574
_Thread_Executing = NULL;
10c08d: c7 05 68 c5 12 00 00 movl $0x0,0x12c568
10c094: 00 00 00
_Thread_Heir = NULL;
10c097: c7 05 6c c5 12 00 00 movl $0x0,0x12c56c
10c09e: 00 00 00
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
10c0a1: c7 05 e0 c3 12 00 00 movl $0x0,0x12c3e0
10c0a8: 00 00 00
#endif
_Thread_Maximum_extensions = maximum_extensions;
10c0ab: 89 35 e8 c3 12 00 mov %esi,0x12c3e8
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
10c0b1: 89 1d 40 c3 12 00 mov %ebx,0x12c340
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
10c0b7: 50 push %eax
10c0b8: 6a 08 push $0x8
10c0ba: 6a 00 push $0x0
10c0bc: 68 f0 00 00 00 push $0xf0
10c0c1: 6a 01 push $0x1
10c0c3: 6a 01 push $0x1
10c0c5: 6a 01 push $0x1
10c0c7: 68 68 c4 12 00 push $0x12c468
10c0cc: e8 ab f1 ff ff call 10b27c <_Objects_Initialize_information>
10c0d1: 83 c4 20 add $0x20,%esp
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
10c0d4: 8d 65 f8 lea -0x8(%ebp),%esp
10c0d7: 5b pop %ebx
10c0d8: 5e pop %esi
10c0d9: 5d pop %ebp
10c0da: c3 ret
0010be3c <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10be3c: 55 push %ebp
10be3d: 89 e5 mov %esp,%ebp
10be3f: 57 push %edi
10be40: 56 push %esi
10be41: 53 push %ebx
10be42: 83 ec 24 sub $0x24,%esp
10be45: 8b 5d 0c mov 0xc(%ebp),%ebx
10be48: 8b 75 14 mov 0x14(%ebp),%esi
10be4b: 8a 55 18 mov 0x18(%ebp),%dl
10be4e: 8a 45 20 mov 0x20(%ebp),%al
10be51: 88 45 e7 mov %al,-0x19(%ebp)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10be54: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
10be5b: 00 00 00
10be5e: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10be65: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10be68: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx)
10be6f: 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 );
10be72: 56 push %esi
10be73: 53 push %ebx
10be74: 88 55 e0 mov %dl,-0x20(%ebp)
10be77: e8 c8 06 00 00 call 10c544 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10be7c: 83 c4 10 add $0x10,%esp
10be7f: 39 f0 cmp %esi,%eax
10be81: 8a 55 e0 mov -0x20(%ebp),%dl
10be84: 0f 82 a7 01 00 00 jb 10c031 <_Thread_Initialize+0x1f5>
10be8a: 85 c0 test %eax,%eax
10be8c: 0f 84 9f 01 00 00 je 10c031 <_Thread_Initialize+0x1f5><== NEVER TAKEN
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10be92: 8b 8b bc 00 00 00 mov 0xbc(%ebx),%ecx
10be98: 89 8b b4 00 00 00 mov %ecx,0xb4(%ebx)
the_stack->size = size;
10be9e: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10bea4: 31 f6 xor %esi,%esi
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10bea6: 84 d2 test %dl,%dl
10bea8: 74 17 je 10bec1 <_Thread_Initialize+0x85>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10beaa: 83 ec 0c sub $0xc,%esp
10bead: 6a 6c push $0x6c
10beaf: e8 ec 0b 00 00 call 10caa0 <_Workspace_Allocate>
10beb4: 89 c6 mov %eax,%esi
if ( !fp_area )
10beb6: 83 c4 10 add $0x10,%esp
10beb9: 85 c0 test %eax,%eax
10bebb: 0f 84 1d 01 00 00 je 10bfde <_Thread_Initialize+0x1a2><== NEVER TAKEN
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10bec1: 89 b3 d8 00 00 00 mov %esi,0xd8(%ebx)
the_thread->Start.fp_context = fp_area;
10bec7: 89 b3 b8 00 00 00 mov %esi,0xb8(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10becd: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10bed4: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10bedb: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10bee2: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10bee9: a1 e8 c3 12 00 mov 0x12c3e8,%eax
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10beee: 31 ff xor %edi,%edi
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10bef0: 85 c0 test %eax,%eax
10bef2: 74 1d je 10bf11 <_Thread_Initialize+0xd5>
extensions_area = _Workspace_Allocate(
10bef4: 83 ec 0c sub $0xc,%esp
10bef7: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10befe: 50 push %eax
10beff: e8 9c 0b 00 00 call 10caa0 <_Workspace_Allocate>
10bf04: 89 c7 mov %eax,%edi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10bf06: 83 c4 10 add $0x10,%esp
10bf09: 85 c0 test %eax,%eax
10bf0b: 0f 84 cf 00 00 00 je 10bfe0 <_Thread_Initialize+0x1a4><== NEVER TAKEN
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10bf11: 89 bb e8 00 00 00 mov %edi,0xe8(%ebx)
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
10bf17: 85 ff test %edi,%edi
10bf19: 75 5a jne 10bf75 <_Thread_Initialize+0x139>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10bf1b: 8a 45 e7 mov -0x19(%ebp),%al
10bf1e: 88 83 9c 00 00 00 mov %al,0x9c(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10bf24: 8b 45 24 mov 0x24(%ebp),%eax
10bf27: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10bf2d: 8b 45 28 mov 0x28(%ebp),%eax
10bf30: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10bf36: 8b 45 2c mov 0x2c(%ebp),%eax
10bf39: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
the_thread->current_state = STATES_DORMANT;
10bf3f: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10bf46: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10bf4d: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10bf54: 8b 45 1c mov 0x1c(%ebp),%eax
10bf57: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10bf5a: 89 83 ac 00 00 00 mov %eax,0xac(%ebx)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
10bf60: 83 ec 0c sub $0xc,%esp
10bf63: 53 push %ebx
10bf64: ff 15 48 82 12 00 call *0x128248
10bf6a: 89 c2 mov %eax,%edx
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
10bf6c: 83 c4 10 add $0x10,%esp
10bf6f: 85 c0 test %eax,%eax
10bf71: 75 20 jne 10bf93 <_Thread_Initialize+0x157>
10bf73: eb 6d jmp 10bfe2 <_Thread_Initialize+0x1a6>
* 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++ )
10bf75: 8b 0d e8 c3 12 00 mov 0x12c3e8,%ecx
10bf7b: 31 c0 xor %eax,%eax
10bf7d: eb 0e jmp 10bf8d <_Thread_Initialize+0x151>
the_thread->extensions[i] = NULL;
10bf7f: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx
10bf85: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10bf8c: 40 inc %eax
10bf8d: 39 c8 cmp %ecx,%eax
10bf8f: 76 ee jbe 10bf7f <_Thread_Initialize+0x143>
10bf91: eb 88 jmp 10bf1b <_Thread_Initialize+0xdf>
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
goto failed;
_Thread_Set_priority( the_thread, priority );
10bf93: 51 push %ecx
10bf94: 51 push %ecx
10bf95: ff 75 1c pushl 0x1c(%ebp)
10bf98: 53 push %ebx
10bf99: 89 45 e0 mov %eax,-0x20(%ebp)
10bf9c: e8 27 05 00 00 call 10c4c8 <_Thread_Set_priority>
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
10bfa1: c7 83 80 00 00 00 00 movl $0x0,0x80(%ebx)
10bfa8: 00 00 00
10bfab: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10bfb2: 00 00 00
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10bfb5: 0f b7 4b 08 movzwl 0x8(%ebx),%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bfb9: 8b 45 08 mov 0x8(%ebp),%eax
10bfbc: 8b 40 1c mov 0x1c(%eax),%eax
10bfbf: 89 1c 88 mov %ebx,(%eax,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10bfc2: 8b 45 30 mov 0x30(%ebp),%eax
10bfc5: 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 );
10bfc8: 89 1c 24 mov %ebx,(%esp)
10bfcb: e8 bc 07 00 00 call 10c78c <_User_extensions_Thread_create>
if ( extension_status )
10bfd0: 83 c4 10 add $0x10,%esp
return true;
10bfd3: b1 01 mov $0x1,%cl
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
10bfd5: 84 c0 test %al,%al
10bfd7: 8b 55 e0 mov -0x20(%ebp),%edx
10bfda: 74 06 je 10bfe2 <_Thread_Initialize+0x1a6>
10bfdc: eb 55 jmp 10c033 <_Thread_Initialize+0x1f7>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10bfde: 31 ff xor %edi,%edi
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;
10bfe0: 31 d2 xor %edx,%edx
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
10bfe2: 83 ec 0c sub $0xc,%esp
10bfe5: ff b3 dc 00 00 00 pushl 0xdc(%ebx)
10bfeb: 89 55 e0 mov %edx,-0x20(%ebp)
10bfee: e8 c6 0a 00 00 call 10cab9 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
10bff3: 58 pop %eax
10bff4: ff b3 e0 00 00 00 pushl 0xe0(%ebx)
10bffa: e8 ba 0a 00 00 call 10cab9 <_Workspace_Free>
10bfff: 5a pop %edx
10c000: ff b3 e4 00 00 00 pushl 0xe4(%ebx)
10c006: e8 ae 0a 00 00 call 10cab9 <_Workspace_Free>
_Workspace_Free( extensions_area );
10c00b: 89 3c 24 mov %edi,(%esp)
10c00e: e8 a6 0a 00 00 call 10cab9 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
10c013: 89 34 24 mov %esi,(%esp)
10c016: e8 9e 0a 00 00 call 10cab9 <_Workspace_Free>
#endif
_Workspace_Free( sched );
10c01b: 8b 55 e0 mov -0x20(%ebp),%edx
10c01e: 89 14 24 mov %edx,(%esp)
10c021: e8 93 0a 00 00 call 10cab9 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
10c026: 89 1c 24 mov %ebx,(%esp)
10c029: e8 52 05 00 00 call 10c580 <_Thread_Stack_Free>
return false;
10c02e: 83 c4 10 add $0x10,%esp
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
10c031: 31 c9 xor %ecx,%ecx
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10c033: 88 c8 mov %cl,%al
10c035: 8d 65 f4 lea -0xc(%ebp),%esp
10c038: 5b pop %ebx
10c039: 5e pop %esi
10c03a: 5f pop %edi
10c03b: 5d pop %ebp
10c03c: c3 ret
0010c438 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10c438: 55 push %ebp
10c439: 89 e5 mov %esp,%ebp
10c43b: 57 push %edi
10c43c: 56 push %esi
10c43d: 53 push %ebx
10c43e: 83 ec 1c sub $0x1c,%esp
10c441: 8b 5d 08 mov 0x8(%ebp),%ebx
10c444: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
10c447: 85 db test %ebx,%ebx
10c449: 74 36 je 10c481 <_Thread_queue_Requeue+0x49><== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10c44b: 83 7b 34 01 cmpl $0x1,0x34(%ebx)
10c44f: 75 30 jne 10c481 <_Thread_queue_Requeue+0x49><== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10c451: 9c pushf
10c452: fa cli
10c453: 5f pop %edi
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10c454: f7 46 10 e0 be 03 00 testl $0x3bee0,0x10(%esi)
10c45b: 74 22 je 10c47f <_Thread_queue_Requeue+0x47><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c45d: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
10c464: 50 push %eax
10c465: 6a 01 push $0x1
10c467: 56 push %esi
10c468: 53 push %ebx
10c469: e8 36 2a 00 00 call 10eea4 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10c46e: 83 c4 0c add $0xc,%esp
10c471: 8d 45 e4 lea -0x1c(%ebp),%eax
10c474: 50 push %eax
10c475: 56 push %esi
10c476: 53 push %ebx
10c477: e8 e4 fd ff ff call 10c260 <_Thread_queue_Enqueue_priority>
10c47c: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10c47f: 57 push %edi
10c480: 9d popf
}
}
10c481: 8d 65 f4 lea -0xc(%ebp),%esp
10c484: 5b pop %ebx
10c485: 5e pop %esi
10c486: 5f pop %edi
10c487: 5d pop %ebp
10c488: c3 ret
0010c48c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10c48c: 55 push %ebp
10c48d: 89 e5 mov %esp,%ebp
10c48f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10c492: 8d 45 f4 lea -0xc(%ebp),%eax
10c495: 50 push %eax
10c496: ff 75 08 pushl 0x8(%ebp)
10c499: e8 1e f9 ff ff call 10bdbc <_Thread_Get>
switch ( location ) {
10c49e: 83 c4 10 add $0x10,%esp
10c4a1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10c4a5: 75 1c jne 10c4c3 <_Thread_queue_Timeout+0x37><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10c4a7: 83 ec 0c sub $0xc,%esp
10c4aa: 50 push %eax
10c4ab: e8 a4 2a 00 00 call 10ef54 <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10c4b0: a1 6c c3 12 00 mov 0x12c36c,%eax
10c4b5: 48 dec %eax
10c4b6: a3 6c c3 12 00 mov %eax,0x12c36c
return _Thread_Dispatch_disable_level;
10c4bb: a1 6c c3 12 00 mov 0x12c36c,%eax
10c4c0: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10c4c3: c9 leave
10c4c4: c3 ret
00116732 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
116732: 55 push %ebp
116733: 89 e5 mov %esp,%ebp
116735: 57 push %edi
116736: 56 push %esi
116737: 53 push %ebx
116738: 83 ec 3c sub $0x3c,%esp
11673b: 8b 5d 08 mov 0x8(%ebp),%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
11673e: 8d 45 d0 lea -0x30(%ebp),%eax
116741: 8d 55 d4 lea -0x2c(%ebp),%edx
116744: 89 55 d0 mov %edx,-0x30(%ebp)
head->previous = NULL;
116747: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
tail->previous = head;
11674e: 89 45 d8 mov %eax,-0x28(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
116751: 8d 75 dc lea -0x24(%ebp),%esi
116754: 8d 55 e0 lea -0x20(%ebp),%edx
116757: 89 55 dc mov %edx,-0x24(%ebp)
head->previous = NULL;
11675a: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
tail->previous = head;
116761: 89 75 e4 mov %esi,-0x1c(%ebp)
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
116764: 8d 45 d0 lea -0x30(%ebp),%eax
116767: 89 43 78 mov %eax,0x78(%ebx)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11676a: 8d 7b 30 lea 0x30(%ebx),%edi
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
11676d: a1 10 58 14 00 mov 0x145810,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
116772: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
116775: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
116778: 51 push %ecx
116779: 56 push %esi
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
11677a: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11677c: 50 push %eax
11677d: 57 push %edi
11677e: e8 d1 36 00 00 call 119e54 <_Watchdog_Adjust_to_chain>
116783: 6a 00 push $0x0
116785: 68 00 ca 9a 3b push $0x3b9aca00
11678a: ff 35 dc 56 14 00 pushl 0x1456dc
116790: ff 35 d8 56 14 00 pushl 0x1456d8
116796: e8 99 31 01 00 call 129934 <__divdi3>
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
11679b: 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 ) {
11679e: 83 c4 20 add $0x20,%esp
1167a1: 39 d0 cmp %edx,%eax
1167a3: 76 15 jbe 1167ba <_Timer_server_Body+0x88>
/*
* 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 );
1167a5: 51 push %ecx
1167a6: 56 push %esi
if ( snapshot > last_snapshot ) {
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
1167a7: 89 c1 mov %eax,%ecx
1167a9: 29 d1 sub %edx,%ecx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1167ab: 51 push %ecx
1167ac: 8d 53 68 lea 0x68(%ebx),%edx
1167af: 52 push %edx
1167b0: 89 45 c0 mov %eax,-0x40(%ebp)
1167b3: e8 9c 36 00 00 call 119e54 <_Watchdog_Adjust_to_chain>
1167b8: eb 14 jmp 1167ce <_Timer_server_Body+0x9c>
} else if ( snapshot < last_snapshot ) {
1167ba: 73 18 jae 1167d4 <_Timer_server_Body+0xa2>
/*
* 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 );
1167bc: 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;
1167bd: 29 c2 sub %eax,%edx
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
1167bf: 52 push %edx
1167c0: 6a 01 push $0x1
1167c2: 8d 53 68 lea 0x68(%ebx),%edx
1167c5: 52 push %edx
1167c6: 89 45 c0 mov %eax,-0x40(%ebp)
1167c9: e8 1e 36 00 00 call 119dec <_Watchdog_Adjust>
1167ce: 83 c4 10 add $0x10,%esp
1167d1: 8b 45 c0 mov -0x40(%ebp),%eax
}
watchdogs->last_snapshot = snapshot;
1167d4: 89 43 74 mov %eax,0x74(%ebx)
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
1167d7: 8d 4b 68 lea 0x68(%ebx),%ecx
1167da: 89 4d c4 mov %ecx,-0x3c(%ebp)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
1167dd: 8b 43 78 mov 0x78(%ebx),%eax
1167e0: 83 ec 0c sub $0xc,%esp
1167e3: 50 push %eax
1167e4: e8 83 07 00 00 call 116f6c <_Chain_Get>
if ( timer == NULL ) {
1167e9: 83 c4 10 add $0x10,%esp
1167ec: 85 c0 test %eax,%eax
1167ee: 74 29 je 116819 <_Timer_server_Body+0xe7><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
1167f0: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
1167f3: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
1167f6: 75 09 jne 116801 <_Timer_server_Body+0xcf><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
1167f8: 52 push %edx <== NOT EXECUTED
1167f9: 52 push %edx <== NOT EXECUTED
1167fa: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
1167fd: 50 push %eax <== NOT EXECUTED
1167fe: 57 push %edi <== NOT EXECUTED
1167ff: eb 0e jmp 11680f <_Timer_server_Body+0xdd><== NOT EXECUTED
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116801: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
116804: 75 d7 jne 1167dd <_Timer_server_Body+0xab><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116806: 51 push %ecx <== NOT EXECUTED
116807: 51 push %ecx <== NOT EXECUTED
116808: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
11680b: 50 push %eax <== NOT EXECUTED
11680c: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
11680f: e8 c4 36 00 00 call 119ed8 <_Watchdog_Insert> <== NOT EXECUTED
116814: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
116817: eb c4 jmp 1167dd <_Timer_server_Body+0xab><== 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 );
116819: 9c pushf
11681a: fa cli
11681b: 58 pop %eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11681c: 8d 55 d4 lea -0x2c(%ebp),%edx
if ( _Chain_Is_empty( insert_chain ) ) {
11681f: 39 55 d0 cmp %edx,-0x30(%ebp)
116822: 75 13 jne 116837 <_Timer_server_Body+0x105><== NEVER TAKEN
ts->insert_chain = NULL;
116824: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
11682b: 50 push %eax
11682c: 9d popf
11682d: 8d 7d e0 lea -0x20(%ebp),%edi
_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 ) ) {
116830: 39 7d dc cmp %edi,-0x24(%ebp)
116833: 75 09 jne 11683e <_Timer_server_Body+0x10c>
116835: eb 39 jmp 116870 <_Timer_server_Body+0x13e>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
116837: 50 push %eax <== NOT EXECUTED
116838: 9d popf <== NOT EXECUTED
116839: e9 2f ff ff ff jmp 11676d <_Timer_server_Body+0x3b><== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
11683e: 9c pushf
11683f: fa cli
116840: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
116841: 8b 45 dc mov -0x24(%ebp),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
116844: 39 f8 cmp %edi,%eax
116846: 74 21 je 116869 <_Timer_server_Body+0x137>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
116848: 8b 08 mov (%eax),%ecx
head->next = new_first;
11684a: 89 4d dc mov %ecx,-0x24(%ebp)
new_first->previous = head;
11684d: 89 71 04 mov %esi,0x4(%ecx)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
116850: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
116857: 52 push %edx
116858: 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 );
116859: 52 push %edx
11685a: 52 push %edx
11685b: ff 70 24 pushl 0x24(%eax)
11685e: ff 70 20 pushl 0x20(%eax)
116861: ff 50 1c call *0x1c(%eax)
}
116864: 83 c4 10 add $0x10,%esp
116867: eb d5 jmp 11683e <_Timer_server_Body+0x10c>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
116869: 52 push %edx
11686a: 9d popf
11686b: e9 f4 fe ff ff jmp 116764 <_Timer_server_Body+0x32>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
116870: c6 43 7c 00 movb $0x0,0x7c(%ebx)
116874: e8 ef fc ff ff call 116568 <_Thread_Dispatch_increment_disable_level>
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
116879: 57 push %edi
11687a: 57 push %edi
11687b: 6a 08 push $0x8
11687d: ff 33 pushl (%ebx)
11687f: e8 b0 31 00 00 call 119a34 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
116884: 89 d8 mov %ebx,%eax
116886: e8 f2 fc ff ff call 11657d <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
11688b: 89 d8 mov %ebx,%eax
11688d: e8 31 fd ff ff call 1165c3 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
116892: e8 dd 29 00 00 call 119274 <_Thread_Enable_dispatch>
ts->active = true;
116897: 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 );
11689b: 8d 43 08 lea 0x8(%ebx),%eax
11689e: 89 04 24 mov %eax,(%esp)
1168a1: e8 46 37 00 00 call 119fec <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
1168a6: 8d 43 40 lea 0x40(%ebx),%eax
1168a9: 89 04 24 mov %eax,(%esp)
1168ac: e8 3b 37 00 00 call 119fec <_Watchdog_Remove>
1168b1: 83 c4 10 add $0x10,%esp
1168b4: e9 ab fe ff ff jmp 116764 <_Timer_server_Body+0x32>
00116609 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
116609: 55 push %ebp
11660a: 89 e5 mov %esp,%ebp
11660c: 57 push %edi
11660d: 56 push %esi
11660e: 53 push %ebx
11660f: 83 ec 1c sub $0x1c,%esp
116612: 8b 5d 08 mov 0x8(%ebp),%ebx
116615: 8b 7d 0c mov 0xc(%ebp),%edi
if ( ts->insert_chain == NULL ) {
116618: 8b 43 78 mov 0x78(%ebx),%eax
11661b: 85 c0 test %eax,%eax
11661d: 0f 85 fa 00 00 00 jne 11671d <_Timer_server_Schedule_operation_method+0x114><== NEVER TAKEN
#if defined ( __THREAD_DO_NOT_INLINE_DISABLE_DISPATCH__ )
void _Thread_Disable_dispatch( void );
#else
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
_Thread_Dispatch_increment_disable_level();
116623: e8 40 ff ff ff call 116568 <_Thread_Dispatch_increment_disable_level>
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116628: 8b 47 38 mov 0x38(%edi),%eax
11662b: 83 f8 01 cmp $0x1,%eax
11662e: 75 61 jne 116691 <_Timer_server_Schedule_operation_method+0x88>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
116630: 9c pushf
116631: fa cli
116632: 8f 45 e0 popl -0x20(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
116635: 8b 15 10 58 14 00 mov 0x145810,%edx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
11663b: 8b 4b 3c mov 0x3c(%ebx),%ecx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
11663e: 8b 43 30 mov 0x30(%ebx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
116641: 8d 73 34 lea 0x34(%ebx),%esi
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
116644: 39 f0 cmp %esi,%eax
116646: 74 19 je 116661 <_Timer_server_Schedule_operation_method+0x58>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
116648: 89 d6 mov %edx,%esi
11664a: 29 ce sub %ecx,%esi
11664c: 89 75 e4 mov %esi,-0x1c(%ebp)
delta_interval = first_watchdog->delta_interval;
11664f: 8b 70 10 mov 0x10(%eax),%esi
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
116652: 31 c9 xor %ecx,%ecx
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
116654: 3b 75 e4 cmp -0x1c(%ebp),%esi
116657: 76 05 jbe 11665e <_Timer_server_Schedule_operation_method+0x55>
delta_interval -= delta;
116659: 89 f1 mov %esi,%ecx
11665b: 2b 4d e4 sub -0x1c(%ebp),%ecx
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
11665e: 89 48 10 mov %ecx,0x10(%eax)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
116661: 89 53 3c mov %edx,0x3c(%ebx)
_ISR_Enable( level );
116664: ff 75 e0 pushl -0x20(%ebp)
116667: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116668: 56 push %esi
116669: 56 push %esi
11666a: 8d 47 10 lea 0x10(%edi),%eax
11666d: 50 push %eax
11666e: 8d 43 30 lea 0x30(%ebx),%eax
116671: 50 push %eax
116672: e8 61 38 00 00 call 119ed8 <_Watchdog_Insert>
if ( !ts->active ) {
116677: 8a 43 7c mov 0x7c(%ebx),%al
11667a: 83 c4 10 add $0x10,%esp
11667d: 84 c0 test %al,%al
11667f: 0f 85 8c 00 00 00 jne 116711 <_Timer_server_Schedule_operation_method+0x108>
_Timer_server_Reset_interval_system_watchdog( ts );
116685: 89 d8 mov %ebx,%eax
116687: e8 f1 fe ff ff call 11657d <_Timer_server_Reset_interval_system_watchdog>
11668c: e9 80 00 00 00 jmp 116711 <_Timer_server_Schedule_operation_method+0x108>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116691: 83 f8 03 cmp $0x3,%eax
116694: 75 7b jne 116711 <_Timer_server_Schedule_operation_method+0x108>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
116696: 9c pushf
116697: fa cli
116698: 8f 45 e0 popl -0x20(%ebp)
11669b: 6a 00 push $0x0
11669d: 68 00 ca 9a 3b push $0x3b9aca00
1166a2: ff 35 dc 56 14 00 pushl 0x1456dc
1166a8: ff 35 d8 56 14 00 pushl 0x1456d8
1166ae: e8 81 32 01 00 call 129934 <__divdi3>
1166b3: 83 c4 10 add $0x10,%esp
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
1166b6: 8b 53 74 mov 0x74(%ebx),%edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
1166b9: 8b 4b 68 mov 0x68(%ebx),%ecx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
1166bc: 8d 73 6c lea 0x6c(%ebx),%esi
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
1166bf: 39 f1 cmp %esi,%ecx
1166c1: 74 27 je 1166ea <_Timer_server_Schedule_operation_method+0xe1>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
1166c3: 8b 71 10 mov 0x10(%ecx),%esi
1166c6: 89 75 dc mov %esi,-0x24(%ebp)
if ( snapshot > last_snapshot ) {
1166c9: 39 d0 cmp %edx,%eax
1166cb: 76 15 jbe 1166e2 <_Timer_server_Schedule_operation_method+0xd9>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
1166cd: 89 c6 mov %eax,%esi
1166cf: 29 d6 sub %edx,%esi
1166d1: 89 75 e4 mov %esi,-0x1c(%ebp)
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
1166d4: 31 d2 xor %edx,%edx
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
1166d6: 39 75 dc cmp %esi,-0x24(%ebp)
1166d9: 76 0c jbe 1166e7 <_Timer_server_Schedule_operation_method+0xde><== NEVER TAKEN
delta_interval -= delta;
1166db: 8b 55 dc mov -0x24(%ebp),%edx
1166de: 29 f2 sub %esi,%edx
1166e0: eb 05 jmp 1166e7 <_Timer_server_Schedule_operation_method+0xde>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
1166e2: 03 55 dc add -0x24(%ebp),%edx
delta_interval += delta;
1166e5: 29 c2 sub %eax,%edx
}
first_watchdog->delta_interval = delta_interval;
1166e7: 89 51 10 mov %edx,0x10(%ecx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
1166ea: 89 43 74 mov %eax,0x74(%ebx)
_ISR_Enable( level );
1166ed: ff 75 e0 pushl -0x20(%ebp)
1166f0: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
1166f1: 51 push %ecx
1166f2: 51 push %ecx
1166f3: 8d 47 10 lea 0x10(%edi),%eax
1166f6: 50 push %eax
1166f7: 8d 43 68 lea 0x68(%ebx),%eax
1166fa: 50 push %eax
1166fb: e8 d8 37 00 00 call 119ed8 <_Watchdog_Insert>
if ( !ts->active ) {
116700: 8a 43 7c mov 0x7c(%ebx),%al
116703: 83 c4 10 add $0x10,%esp
116706: 84 c0 test %al,%al
116708: 75 07 jne 116711 <_Timer_server_Schedule_operation_method+0x108>
_Timer_server_Reset_tod_system_watchdog( ts );
11670a: 89 d8 mov %ebx,%eax
11670c: e8 b2 fe ff ff call 1165c3 <_Timer_server_Reset_tod_system_watchdog>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
116711: 8d 65 f4 lea -0xc(%ebp),%esp
116714: 5b pop %ebx
116715: 5e pop %esi
116716: 5f pop %edi
116717: 5d pop %ebp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
116718: e9 57 2b 00 00 jmp 119274 <_Thread_Enable_dispatch>
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
11671d: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
116720: 89 7d 0c mov %edi,0xc(%ebp) <== NOT EXECUTED
116723: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
}
116726: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
116729: 5b pop %ebx <== NOT EXECUTED
11672a: 5e pop %esi <== NOT EXECUTED
11672b: 5f pop %edi <== NOT EXECUTED
11672c: 5d pop %ebp <== 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 );
11672d: e9 16 08 00 00 jmp 116f48 <_Chain_Append> <== NOT EXECUTED
0010d8bc <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
10d8bc: 55 push %ebp
10d8bd: 89 e5 mov %esp,%ebp
10d8bf: 57 push %edi
10d8c0: 56 push %esi
10d8c1: 53 push %ebx
10d8c2: 83 ec 0c sub $0xc,%esp
10d8c5: 8b 55 08 mov 0x8(%ebp),%edx
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
10d8c8: 8b 45 0c mov 0xc(%ebp),%eax
10d8cb: 8b 08 mov (%eax),%ecx
10d8cd: 8b 58 04 mov 0x4(%eax),%ebx
10d8d0: 89 d8 mov %ebx,%eax
10d8d2: 09 c8 or %ecx,%eax
10d8d4: 75 14 jne 10d8ea <_Timestamp64_Divide+0x2e><== ALWAYS TAKEN
*_ival_percentage = 0;
10d8d6: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
10d8d9: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
*_fval_percentage = 0;
10d8df: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
10d8e2: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
return;
10d8e8: eb 4c jmp 10d936 <_Timestamp64_Divide+0x7a><== NOT EXECUTED
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
10d8ea: 69 72 04 a0 86 01 00 imul $0x186a0,0x4(%edx),%esi
10d8f1: b8 a0 86 01 00 mov $0x186a0,%eax
10d8f6: f7 22 mull (%edx)
10d8f8: 01 f2 add %esi,%edx
10d8fa: 53 push %ebx
10d8fb: 51 push %ecx
10d8fc: 52 push %edx
10d8fd: 50 push %eax
10d8fe: e8 35 04 01 00 call 11dd38 <__divdi3>
10d903: 83 c4 10 add $0x10,%esp
10d906: 89 c6 mov %eax,%esi
10d908: 89 d7 mov %edx,%edi
*_ival_percentage = answer / 1000;
10d90a: 6a 00 push $0x0
10d90c: 68 e8 03 00 00 push $0x3e8
10d911: 52 push %edx
10d912: 50 push %eax
10d913: e8 20 04 01 00 call 11dd38 <__divdi3>
10d918: 83 c4 10 add $0x10,%esp
10d91b: 8b 55 10 mov 0x10(%ebp),%edx
10d91e: 89 02 mov %eax,(%edx)
*_fval_percentage = answer % 1000;
10d920: 6a 00 push $0x0
10d922: 68 e8 03 00 00 push $0x3e8
10d927: 57 push %edi
10d928: 56 push %esi
10d929: e8 5e 05 01 00 call 11de8c <__moddi3>
10d92e: 83 c4 10 add $0x10,%esp
10d931: 8b 55 14 mov 0x14(%ebp),%edx
10d934: 89 02 mov %eax,(%edx)
}
10d936: 8d 65 f4 lea -0xc(%ebp),%esp
10d939: 5b pop %ebx
10d93a: 5e pop %esi
10d93b: 5f pop %edi
10d93c: 5d pop %ebp
10d93d: c3 ret
0010c648 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10c648: 55 push %ebp
10c649: 89 e5 mov %esp,%ebp
10c64b: 57 push %edi
10c64c: 56 push %esi
10c64d: 53 push %ebx
10c64e: 83 ec 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;
10c651: a1 80 81 12 00 mov 0x128180,%eax
10c656: 89 45 e4 mov %eax,-0x1c(%ebp)
initial_extensions = Configuration.User_extension_table;
10c659: 8b 1d 84 81 12 00 mov 0x128184,%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10c65f: c7 05 18 c5 12 00 1c movl $0x12c51c,0x12c518
10c666: c5 12 00
head->previous = NULL;
10c669: c7 05 1c c5 12 00 00 movl $0x0,0x12c51c
10c670: 00 00 00
tail->previous = head;
10c673: c7 05 20 c5 12 00 18 movl $0x12c518,0x12c520
10c67a: c5 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10c67d: c7 05 70 c3 12 00 74 movl $0x12c374,0x12c370
10c684: c3 12 00
head->previous = NULL;
10c687: c7 05 74 c3 12 00 00 movl $0x0,0x12c374
10c68e: 00 00 00
tail->previous = head;
10c691: c7 05 78 c3 12 00 70 movl $0x12c370,0x12c378
10c698: c3 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10c69b: 85 db test %ebx,%ebx
10c69d: 74 4f je 10c6ee <_User_extensions_Handler_initialization+0xa6><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10c69f: 6b f0 34 imul $0x34,%eax,%esi
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
10c6a2: 83 ec 0c sub $0xc,%esp
10c6a5: 56 push %esi
10c6a6: e8 26 04 00 00 call 10cad1 <_Workspace_Allocate_or_fatal_error>
10c6ab: 89 c2 mov %eax,%edx
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10c6ad: 31 c0 xor %eax,%eax
10c6af: 89 d7 mov %edx,%edi
10c6b1: 89 f1 mov %esi,%ecx
10c6b3: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10c6b5: 83 c4 10 add $0x10,%esp
10c6b8: 31 c0 xor %eax,%eax
10c6ba: eb 2d jmp 10c6e9 <_User_extensions_Handler_initialization+0xa1>
#include <rtems/config.h>
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
10c6bc: 89 c6 mov %eax,%esi
10c6be: c1 e6 05 shl $0x5,%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;
10c6c1: 8d 7a 14 lea 0x14(%edx),%edi
10c6c4: 01 de add %ebx,%esi
10c6c6: b9 08 00 00 00 mov $0x8,%ecx
10c6cb: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10c6cd: 83 ec 0c sub $0xc,%esp
10c6d0: 52 push %edx
10c6d1: 89 45 dc mov %eax,-0x24(%ebp)
10c6d4: 89 55 e0 mov %edx,-0x20(%ebp)
10c6d7: e8 e4 28 00 00 call 10efc0 <_User_extensions_Add_set>
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10c6dc: 8b 55 e0 mov -0x20(%ebp),%edx
10c6df: 83 c2 34 add $0x34,%edx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10c6e2: 8b 45 dc mov -0x24(%ebp),%eax
10c6e5: 40 inc %eax
10c6e6: 83 c4 10 add $0x10,%esp
10c6e9: 3b 45 e4 cmp -0x1c(%ebp),%eax
10c6ec: 75 ce jne 10c6bc <_User_extensions_Handler_initialization+0x74>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10c6ee: 8d 65 f4 lea -0xc(%ebp),%esp
10c6f1: 5b pop %ebx
10c6f2: 5e pop %esi
10c6f3: 5f pop %edi
10c6f4: 5d pop %ebp
10c6f5: c3 ret
0010db94 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10db94: 55 push %ebp
10db95: 89 e5 mov %esp,%ebp
10db97: 57 push %edi
10db98: 56 push %esi
10db99: 53 push %ebx
10db9a: 83 ec 0c sub $0xc,%esp
10db9d: 8b 75 08 mov 0x8(%ebp),%esi
10dba0: 8b 4d 0c mov 0xc(%ebp),%ecx
10dba3: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
10dba6: 9c pushf
10dba7: fa cli
10dba8: 58 pop %eax
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10dba9: 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 );
10dbab: 8d 7e 04 lea 0x4(%esi),%edi
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
10dbae: 39 fa cmp %edi,%edx
10dbb0: 74 3e je 10dbf0 <_Watchdog_Adjust+0x5c>
switch ( direction ) {
10dbb2: 85 c9 test %ecx,%ecx
10dbb4: 74 36 je 10dbec <_Watchdog_Adjust+0x58>
10dbb6: 49 dec %ecx
10dbb7: 75 37 jne 10dbf0 <_Watchdog_Adjust+0x5c> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
10dbb9: 01 5a 10 add %ebx,0x10(%edx)
break;
10dbbc: eb 32 jmp 10dbf0 <_Watchdog_Adjust+0x5c>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10dbbe: 8b 16 mov (%esi),%edx
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
10dbc0: 8b 4a 10 mov 0x10(%edx),%ecx
10dbc3: 39 cb cmp %ecx,%ebx
10dbc5: 73 07 jae 10dbce <_Watchdog_Adjust+0x3a>
_Watchdog_First( header )->delta_interval -= units;
10dbc7: 29 d9 sub %ebx,%ecx
10dbc9: 89 4a 10 mov %ecx,0x10(%edx)
break;
10dbcc: eb 22 jmp 10dbf0 <_Watchdog_Adjust+0x5c>
} else {
units -= _Watchdog_First( header )->delta_interval;
10dbce: 29 cb sub %ecx,%ebx
_Watchdog_First( header )->delta_interval = 1;
10dbd0: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
10dbd7: 50 push %eax
10dbd8: 9d popf
_Watchdog_Tickle( header );
10dbd9: 83 ec 0c sub $0xc,%esp
10dbdc: 56 push %esi
10dbdd: e8 96 01 00 00 call 10dd78 <_Watchdog_Tickle>
_ISR_Disable( level );
10dbe2: 9c pushf
10dbe3: fa cli
10dbe4: 58 pop %eax
if ( _Chain_Is_empty( header ) )
10dbe5: 83 c4 10 add $0x10,%esp
10dbe8: 39 3e cmp %edi,(%esi)
10dbea: 74 04 je 10dbf0 <_Watchdog_Adjust+0x5c>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10dbec: 85 db test %ebx,%ebx
10dbee: 75 ce jne 10dbbe <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
10dbf0: 50 push %eax
10dbf1: 9d popf
}
10dbf2: 8d 65 f4 lea -0xc(%ebp),%esp
10dbf5: 5b pop %ebx
10dbf6: 5e pop %esi
10dbf7: 5f pop %edi
10dbf8: 5d pop %ebp
10dbf9: c3 ret
0010c974 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10c974: 55 push %ebp
10c975: 89 e5 mov %esp,%ebp
10c977: 56 push %esi
10c978: 53 push %ebx
10c979: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10c97c: 9c pushf
10c97d: fa cli
10c97e: 5e pop %esi
previous_state = the_watchdog->state;
10c97f: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10c982: 83 f8 01 cmp $0x1,%eax
10c985: 74 09 je 10c990 <_Watchdog_Remove+0x1c>
10c987: 72 42 jb 10c9cb <_Watchdog_Remove+0x57>
10c989: 83 f8 03 cmp $0x3,%eax
10c98c: 77 3d ja 10c9cb <_Watchdog_Remove+0x57> <== NEVER TAKEN
10c98e: eb 09 jmp 10c999 <_Watchdog_Remove+0x25>
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
10c990: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10c997: eb 32 jmp 10c9cb <_Watchdog_Remove+0x57>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10c999: 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 );
}
10c9a0: 8b 0a mov (%edx),%ecx
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10c9a2: 83 39 00 cmpl $0x0,(%ecx)
10c9a5: 74 06 je 10c9ad <_Watchdog_Remove+0x39>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10c9a7: 8b 5a 10 mov 0x10(%edx),%ebx
10c9aa: 01 59 10 add %ebx,0x10(%ecx)
if ( _Watchdog_Sync_count )
10c9ad: 8b 1d 5c c4 12 00 mov 0x12c45c,%ebx
10c9b3: 85 db test %ebx,%ebx
10c9b5: 74 0c je 10c9c3 <_Watchdog_Remove+0x4f>
_Watchdog_Sync_level = _ISR_Nest_level;
10c9b7: 8b 1d 64 c5 12 00 mov 0x12c564,%ebx
10c9bd: 89 1d fc c3 12 00 mov %ebx,0x12c3fc
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10c9c3: 8b 5a 04 mov 0x4(%edx),%ebx
next->previous = previous;
10c9c6: 89 59 04 mov %ebx,0x4(%ecx)
previous->next = next;
10c9c9: 89 0b mov %ecx,(%ebx)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10c9cb: 8b 0d 60 c4 12 00 mov 0x12c460,%ecx
10c9d1: 89 4a 18 mov %ecx,0x18(%edx)
_ISR_Enable( level );
10c9d4: 56 push %esi
10c9d5: 9d popf
return( previous_state );
}
10c9d6: 5b pop %ebx
10c9d7: 5e pop %esi
10c9d8: 5d pop %ebp
10c9d9: c3 ret
0010c9dc <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
10c9dc: 55 push %ebp
10c9dd: 89 e5 mov %esp,%ebp
10c9df: 57 push %edi
10c9e0: 56 push %esi
10c9e1: 53 push %ebx
10c9e2: 83 ec 1c sub $0x1c,%esp
10c9e5: 8b 75 08 mov 0x8(%ebp),%esi
* 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 );
10c9e8: 9c pushf
10c9e9: fa cli
10c9ea: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10c9eb: 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 );
10c9ed: 8d 7e 04 lea 0x4(%esi),%edi
if ( _Chain_Is_empty( header ) )
10c9f0: 39 fb cmp %edi,%ebx
10c9f2: 74 45 je 10ca39 <_Watchdog_Tickle+0x5d>
* 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) {
10c9f4: 8b 43 10 mov 0x10(%ebx),%eax
10c9f7: 85 c0 test %eax,%eax
10c9f9: 74 08 je 10ca03 <_Watchdog_Tickle+0x27>
the_watchdog->delta_interval--;
10c9fb: 48 dec %eax
10c9fc: 89 43 10 mov %eax,0x10(%ebx)
if ( the_watchdog->delta_interval != 0 )
10c9ff: 85 c0 test %eax,%eax
10ca01: 75 36 jne 10ca39 <_Watchdog_Tickle+0x5d>
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
10ca03: 83 ec 0c sub $0xc,%esp
10ca06: 53 push %ebx
10ca07: 89 55 e4 mov %edx,-0x1c(%ebp)
10ca0a: e8 65 ff ff ff call 10c974 <_Watchdog_Remove>
_ISR_Enable( level );
10ca0f: 8b 55 e4 mov -0x1c(%ebp),%edx
10ca12: 52 push %edx
10ca13: 9d popf
switch( watchdog_state ) {
10ca14: 83 c4 10 add $0x10,%esp
10ca17: 83 f8 02 cmp $0x2,%eax
10ca1a: 75 0e jne 10ca2a <_Watchdog_Tickle+0x4e> <== NEVER TAKEN
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
10ca1c: 50 push %eax
10ca1d: 50 push %eax
10ca1e: ff 73 24 pushl 0x24(%ebx)
10ca21: ff 73 20 pushl 0x20(%ebx)
10ca24: ff 53 1c call *0x1c(%ebx)
the_watchdog->id,
the_watchdog->user_data
);
break;
10ca27: 83 c4 10 add $0x10,%esp
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
10ca2a: 9c pushf
10ca2b: fa cli
10ca2c: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10ca2d: 8b 1e mov (%esi),%ebx
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
10ca2f: 39 fb cmp %edi,%ebx
10ca31: 74 06 je 10ca39 <_Watchdog_Tickle+0x5d>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
10ca33: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10ca37: eb c8 jmp 10ca01 <_Watchdog_Tickle+0x25>
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
10ca39: 52 push %edx
10ca3a: 9d popf
}
10ca3b: 8d 65 f4 lea -0xc(%ebp),%esp
10ca3e: 5b pop %ebx
10ca3f: 5e pop %esi
10ca40: 5f pop %edi
10ca41: 5d pop %ebp
10ca42: c3 ret
0010cc60 <_Workspace_String_duplicate>:
char *_Workspace_String_duplicate(
const char *string,
size_t len
)
{
10cc60: 55 push %ebp
10cc61: 89 e5 mov %esp,%ebp
10cc63: 57 push %edi
10cc64: 56 push %esi
10cc65: 53 push %ebx
10cc66: 83 ec 18 sub $0x18,%esp
10cc69: 8b 75 08 mov 0x8(%ebp),%esi
10cc6c: 8b 5d 0c mov 0xc(%ebp),%ebx
char *dup = _Workspace_Allocate(len + 1);
10cc6f: 8d 43 01 lea 0x1(%ebx),%eax
10cc72: 50 push %eax
10cc73: e8 88 ff ff ff call 10cc00 <_Workspace_Allocate>
if (dup != NULL) {
10cc78: 83 c4 10 add $0x10,%esp
10cc7b: 85 c0 test %eax,%eax
10cc7d: 74 0a je 10cc89 <_Workspace_String_duplicate+0x29><== NEVER TAKEN
dup [len] = '\0';
10cc7f: c6 04 18 00 movb $0x0,(%eax,%ebx,1)
memcpy(dup, string, len);
10cc83: 89 c7 mov %eax,%edi
10cc85: 89 d9 mov %ebx,%ecx
10cc87: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
}
return dup;
}
10cc89: 8d 65 f4 lea -0xc(%ebp),%esp
10cc8c: 5b pop %ebx
10cc8d: 5e pop %esi
10cc8e: 5f pop %edi
10cc8f: 5d pop %ebp
10cc90: c3 ret
0011caf6 <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
11caf6: 55 push %ebp <== NOT EXECUTED
11caf7: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return 0;
}
11caf9: 31 c0 xor %eax,%eax <== NOT EXECUTED
11cafb: 5d pop %ebp <== NOT EXECUTED
11cafc: c3 ret <== NOT EXECUTED
00106835 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
106835: 55 push %ebp <== NOT EXECUTED
106836: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return gettimeofday( tp, tzp );
}
106838: 5d pop %ebp <== NOT EXECUTED
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
106839: e9 6e ff ff ff jmp 1067ac <gettimeofday> <== NOT EXECUTED
00104935 <_lstat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
104935: 55 push %ebp <== NOT EXECUTED
104936: 89 e5 mov %esp,%ebp <== NOT EXECUTED
104938: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
return _STAT_NAME( path, buf );
10493b: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
10493e: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
104941: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
104944: 5d pop %ebp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
104945: e9 a6 ff ff ff jmp 1048f0 <lstat> <== NOT EXECUTED
0010757d <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
10757d: 55 push %ebp <== NOT EXECUTED
10757e: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107580: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
return _STAT_NAME( path, buf );
107583: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
107586: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
107589: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
10758c: 5d pop %ebp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
10758d: e9 a6 ff ff ff jmp 107538 <stat> <== NOT EXECUTED
00104608 <chroot>:
#include <unistd.h>
#include <rtems/libio_.h>
int chroot( const char *path )
{
104608: 55 push %ebp
104609: 89 e5 mov %esp,%ebp
10460b: 53 push %ebx
10460c: 83 ec 70 sub $0x70,%esp
/*
* We use the global environment for path evaluation. This makes it possible
* to escape from a chroot environment referencing an unmounted file system.
*/
rtems_filesystem_eval_path_start_with_root_and_current(
10460f: 68 80 72 12 00 push $0x127280
104614: 68 84 72 12 00 push $0x127284
104619: 6a 19 push $0x19
10461b: ff 75 08 pushl 0x8(%ebp)
10461e: 8d 45 c0 lea -0x40(%ebp),%eax
104621: 50 push %eax
104622: e8 45 11 00 00 call 10576c <rtems_filesystem_eval_path_start_with_root_and_current>
104627: 83 c4 18 add $0x18,%esp
10462a: 8d 45 d8 lea -0x28(%ebp),%eax
10462d: 50 push %eax
eval_flags,
&rtems_global_user_env.root_directory,
&rtems_global_user_env.current_directory
);
rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc );
10462e: 8d 5d a8 lea -0x58(%ebp),%ebx
104631: 53 push %ebx
104632: e8 00 15 00 00 call 105b37 <rtems_filesystem_location_copy_and_detach>
new_current_loc = rtems_filesystem_location_transform_to_global( &loc );
104637: 89 1c 24 mov %ebx,(%esp)
10463a: e8 6b 16 00 00 call 105caa <rtems_filesystem_location_transform_to_global>
10463f: 89 45 a4 mov %eax,-0x5c(%ebp)
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
104642: 83 c4 10 add $0x10,%esp
104645: 81 78 10 c4 c6 11 00 cmpl $0x11c6c4,0x10(%eax)
10464c: 74 7a je 1046c8 <chroot+0xc0>
rtems_filesystem_global_location_t *new_root_loc =
10464e: 83 ec 0c sub $0xc,%esp
rtems_filesystem_global_location_obtain( &new_current_loc );
104651: 8d 45 a4 lea -0x5c(%ebp),%eax
);
rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc );
new_current_loc = rtems_filesystem_location_transform_to_global( &loc );
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
rtems_filesystem_global_location_t *new_root_loc =
104654: 50 push %eax
104655: e8 c9 15 00 00 call 105c23 <rtems_filesystem_global_location_obtain>
10465a: 89 c3 mov %eax,%ebx
rtems_filesystem_global_location_obtain( &new_current_loc );
rtems_filesystem_node_types_t type =
(*new_root_loc->location.mt_entry->ops->node_type_h)(
10465c: 8b 40 14 mov 0x14(%eax),%eax
10465f: 8b 40 0c mov 0xc(%eax),%eax
rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc );
new_current_loc = rtems_filesystem_location_transform_to_global( &loc );
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
rtems_filesystem_global_location_t *new_root_loc =
rtems_filesystem_global_location_obtain( &new_current_loc );
rtems_filesystem_node_types_t type =
104662: 89 1c 24 mov %ebx,(%esp)
104665: ff 50 14 call *0x14(%eax)
(*new_root_loc->location.mt_entry->ops->node_type_h)(
&new_root_loc->location
);
if ( type == RTEMS_FILESYSTEM_DIRECTORY ) {
104668: 83 c4 10 add $0x10,%esp
10466b: 85 c0 test %eax,%eax
10466d: 75 43 jne 1046b2 <chroot+0xaa>
sc = rtems_libio_set_private_env();
10466f: e8 93 0b 00 00 call 105207 <rtems_libio_set_private_env>
if (sc == RTEMS_SUCCESSFUL) {
104674: 85 c0 test %eax,%eax
104676: 75 28 jne 1046a0 <chroot+0x98>
rtems_filesystem_global_location_assign(
104678: 50 push %eax
104679: 50 push %eax
10467a: 53 push %ebx
10467b: a1 7c 72 12 00 mov 0x12727c,%eax
104680: 83 c0 04 add $0x4,%eax
104683: 50 push %eax
104684: e8 7d 15 00 00 call 105c06 <rtems_filesystem_global_location_assign>
&rtems_filesystem_root,
new_root_loc
);
rtems_filesystem_global_location_assign(
104689: 5a pop %edx
10468a: 59 pop %ecx
10468b: ff 75 a4 pushl -0x5c(%ebp)
10468e: ff 35 7c 72 12 00 pushl 0x12727c
104694: e8 6d 15 00 00 call 105c06 <rtems_filesystem_global_location_assign>
104699: 83 c4 10 add $0x10,%esp
10469c: 31 db xor %ebx,%ebx
10469e: eb 2b jmp 1046cb <chroot+0xc3>
&rtems_filesystem_current,
new_current_loc
);
} else {
if (sc != RTEMS_UNSATISFIED) {
1046a0: 83 f8 0d cmp $0xd,%eax
1046a3: 74 49 je 1046ee <chroot+0xe6> <== NEVER TAKEN
errno = ENOMEM;
1046a5: e8 ea 5f 00 00 call 10a694 <__errno>
1046aa: c7 00 0c 00 00 00 movl $0xc,(%eax)
1046b0: eb 3c jmp 1046ee <chroot+0xe6>
static inline void rtems_filesystem_location_error(
const rtems_filesystem_location_info_t *loc,
int eno
)
{
if ( !rtems_filesystem_location_is_null( loc ) ) {
1046b2: 81 7b 10 c4 c6 11 00 cmpl $0x11c6c4,0x10(%ebx)
1046b9: 74 33 je 1046ee <chroot+0xe6> <== NEVER TAKEN
errno = eno;
1046bb: e8 d4 5f 00 00 call 10a694 <__errno>
1046c0: c7 00 14 00 00 00 movl $0x14,(%eax)
1046c6: eb 26 jmp 1046ee <chroot+0xe6>
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_root_loc );
}
} else {
rv = -1;
1046c8: 83 cb ff or $0xffffffff,%ebx
}
rtems_filesystem_eval_path_cleanup( &ctx );
1046cb: 83 ec 0c sub $0xc,%esp
1046ce: 8d 45 c0 lea -0x40(%ebp),%eax
1046d1: 50 push %eax
1046d2: e8 86 11 00 00 call 10585d <rtems_filesystem_eval_path_cleanup>
if ( rv != 0 ) {
1046d7: 83 c4 10 add $0x10,%esp
1046da: 85 db test %ebx,%ebx
1046dc: 74 1e je 1046fc <chroot+0xf4>
rtems_filesystem_global_location_release( new_current_loc );
1046de: 83 ec 0c sub $0xc,%esp
1046e1: ff 75 a4 pushl -0x5c(%ebp)
1046e4: e8 d8 14 00 00 call 105bc1 <rtems_filesystem_global_location_release>
1046e9: 83 c4 10 add $0x10,%esp
1046ec: eb 0e jmp 1046fc <chroot+0xf4>
rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR );
rv = -1;
}
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_root_loc );
1046ee: 83 ec 0c sub $0xc,%esp
1046f1: 53 push %ebx
1046f2: e8 ca 14 00 00 call 105bc1 <rtems_filesystem_global_location_release>
1046f7: 83 c4 10 add $0x10,%esp
1046fa: eb cc jmp 1046c8 <chroot+0xc0>
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_current_loc );
}
return rv;
}
1046fc: 89 d8 mov %ebx,%eax
1046fe: 8b 5d fc mov -0x4(%ebp),%ebx
104701: c9 leave
104702: c3 ret
00107fa6 <drainOutput.part.0>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
107fa6: 55 push %ebp
107fa7: 89 e5 mov %esp,%ebp
107fa9: 53 push %ebx
107faa: 52 push %edx
107fab: 89 c3 mov %eax,%ebx
107fad: eb 2c jmp 107fdb <drainOutput.part.0+0x35>
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
107faf: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
107fb6: 00 00 00
rtems_interrupt_enable (level);
107fb9: 50 push %eax
107fba: 9d popf
sc = rtems_semaphore_obtain(
107fbb: 50 push %eax
107fbc: 6a 00 push $0x0
107fbe: 6a 00 push $0x0
107fc0: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
107fc6: e8 c5 1d 00 00 call 109d90 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
107fcb: 83 c4 10 add $0x10,%esp
107fce: 85 c0 test %eax,%eax
107fd0: 74 09 je 107fdb <drainOutput.part.0+0x35><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
107fd2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107fd5: 50 push %eax <== NOT EXECUTED
107fd6: e8 d5 23 00 00 call 10a3b0 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_interrupt_disable (level);
107fdb: 9c pushf
107fdc: fa cli
107fdd: 58 pop %eax
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
107fde: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
107fe4: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
107fea: 39 d1 cmp %edx,%ecx
107fec: 75 c1 jne 107faf <drainOutput.part.0+0x9>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
107fee: 50 push %eax
107fef: 9d popf
}
}
107ff0: 8b 5d fc mov -0x4(%ebp),%ebx
107ff3: c9 leave
107ff4: c3 ret
00106bac <dup2>:
int dup2(
int fildes,
int fildes2
)
{
106bac: 55 push %ebp
106bad: 89 e5 mov %esp,%ebp
106baf: 57 push %edi
106bb0: 56 push %esi
106bb1: 53 push %ebx
106bb2: 83 ec 64 sub $0x64,%esp
106bb5: 8b 5d 08 mov 0x8(%ebp),%ebx
106bb8: 8b 75 0c mov 0xc(%ebp),%esi
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
106bbb: 8d 7d a0 lea -0x60(%ebp),%edi
106bbe: 57 push %edi
106bbf: 53 push %ebx
106bc0: e8 eb 04 00 00 call 1070b0 <fstat>
if ( status == -1 )
106bc5: 83 c4 10 add $0x10,%esp
106bc8: 40 inc %eax
106bc9: 75 05 jne 106bd0 <dup2+0x24>
return -1;
106bcb: 83 c8 ff or $0xffffffff,%eax
106bce: eb 1c jmp 106bec <dup2+0x40>
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
106bd0: 52 push %edx
106bd1: 52 push %edx
106bd2: 57 push %edi
106bd3: 56 push %esi
106bd4: e8 d7 04 00 00 call 1070b0 <fstat>
if ( status == -1 )
106bd9: 83 c4 10 add $0x10,%esp
106bdc: 40 inc %eax
106bdd: 74 ec je 106bcb <dup2+0x1f> <== NEVER TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
106bdf: 50 push %eax
106be0: 56 push %esi
106be1: 6a 00 push $0x0
106be3: 53 push %ebx
106be4: e8 eb 01 00 00 call 106dd4 <fcntl>
106be9: 83 c4 10 add $0x10,%esp
}
106bec: 8d 65 f4 lea -0xc(%ebp),%esp
106bef: 5b pop %ebx
106bf0: 5e pop %esi
106bf1: 5f pop %edi
106bf2: 5d pop %ebp
106bf3: c3 ret
00108ae8 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
108ae8: 55 push %ebp
108ae9: 89 e5 mov %esp,%ebp
108aeb: 53 push %ebx
108aec: 83 ec 24 sub $0x24,%esp
if ((tty->termios.c_lflag & ECHOCTL) &&
108aef: f6 42 3d 02 testb $0x2,0x3d(%edx)
108af3: 74 3e je 108b33 <echo+0x4b> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
108af5: 0f b6 c8 movzbl %al,%ecx
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
108af8: 8b 1d 44 a2 12 00 mov 0x12a244,%ebx
108afe: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1)
108b03: 74 2e je 108b33 <echo+0x4b>
iscntrl(c) && (c != '\t') && (c != '\n')) {
108b05: 8d 48 f7 lea -0x9(%eax),%ecx
108b08: 80 f9 01 cmp $0x1,%cl
108b0b: 76 26 jbe 108b33 <echo+0x4b>
char echobuf[2];
echobuf[0] = '^';
108b0d: c6 45 f6 5e movb $0x5e,-0xa(%ebp)
echobuf[1] = c ^ 0x40;
108b11: 83 f0 40 xor $0x40,%eax
108b14: 88 45 f7 mov %al,-0x9(%ebp)
rtems_termios_puts (echobuf, 2, tty);
108b17: 53 push %ebx
108b18: 52 push %edx
108b19: 6a 02 push $0x2
108b1b: 8d 45 f6 lea -0xa(%ebp),%eax
108b1e: 50 push %eax
108b1f: 89 55 e4 mov %edx,-0x1c(%ebp)
108b22: e8 9e fd ff ff call 1088c5 <rtems_termios_puts>
tty->column += 2;
108b27: 8b 55 e4 mov -0x1c(%ebp),%edx
108b2a: 83 42 28 02 addl $0x2,0x28(%edx)
108b2e: 83 c4 10 add $0x10,%esp
108b31: eb 08 jmp 108b3b <echo+0x53>
} else {
oproc (c, tty);
108b33: 0f b6 c0 movzbl %al,%eax
108b36: e8 96 fe ff ff call 1089d1 <oproc>
}
}
108b3b: 8b 5d fc mov -0x4(%ebp),%ebx
108b3e: c9 leave
108b3f: c3 ret
00121da9 <endgrent>:
void endgrent(void)
{
if (group_fp != NULL)
121da9: a1 a8 c3 16 00 mov 0x16c3a8,%eax
121dae: 85 c0 test %eax,%eax
121db0: 74 10 je 121dc2 <endgrent+0x19> <== NEVER TAKEN
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
121db2: 55 push %ebp
121db3: 89 e5 mov %esp,%ebp
121db5: 83 ec 14 sub $0x14,%esp
if (group_fp != NULL)
fclose(group_fp);
121db8: 50 push %eax
121db9: e8 52 e5 00 00 call 130310 <fclose>
121dbe: 83 c4 10 add $0x10,%esp
}
121dc1: c9 leave
121dc2: c3 ret
00121c6b <endpwent>:
void endpwent(void)
{
if (passwd_fp != NULL)
121c6b: a1 cc c2 16 00 mov 0x16c2cc,%eax
121c70: 85 c0 test %eax,%eax
121c72: 74 10 je 121c84 <endpwent+0x19> <== NEVER TAKEN
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
121c74: 55 push %ebp
121c75: 89 e5 mov %esp,%ebp
121c77: 83 ec 14 sub $0x14,%esp
if (passwd_fp != NULL)
fclose(passwd_fp);
121c7a: 50 push %eax
121c7b: e8 90 e6 00 00 call 130310 <fclose>
121c80: 83 c4 10 add $0x10,%esp
}
121c83: c9 leave
121c84: c3 ret
00108b40 <erase.part.2>:
* Erase a character or line
* FIXME: Needs support for WERASE and ECHOPRT.
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
108b40: 55 push %ebp
108b41: 89 e5 mov %esp,%ebp
108b43: 57 push %edi
108b44: 56 push %esi
108b45: 53 push %ebx
108b46: 83 ec 2c sub $0x2c,%esp
108b49: 89 c3 mov %eax,%ebx
108b4b: 89 55 e4 mov %edx,-0x1c(%ebp)
108b4e: e9 09 01 00 00 jmp 108c5c <erase.part.2+0x11c>
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
108b53: 8b 53 1c mov 0x1c(%ebx),%edx
108b56: 89 55 d4 mov %edx,-0x2c(%ebp)
108b59: 8d 50 ff lea -0x1(%eax),%edx
108b5c: 89 53 20 mov %edx,0x20(%ebx)
108b5f: 8b 75 d4 mov -0x2c(%ebp),%esi
108b62: 8a 4c 06 ff mov -0x1(%esi,%eax,1),%cl
if (tty->termios.c_lflag & ECHO) {
108b66: 8b 53 3c mov 0x3c(%ebx),%edx
108b69: f6 c2 08 test $0x8,%dl
108b6c: 0f 84 e4 00 00 00 je 108c56 <erase.part.2+0x116> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
108b72: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
108b76: 75 17 jne 108b8f <erase.part.2+0x4f>
108b78: f6 c2 10 test $0x10,%dl
108b7b: 75 12 jne 108b8f <erase.part.2+0x4f> <== ALWAYS TAKEN
echo (tty->termios.c_cc[VERASE], tty);
108b7d: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED
108b81: 89 da mov %ebx,%edx <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
108b83: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108b86: 5b pop %ebx <== NOT EXECUTED
108b87: 5e pop %esi <== NOT EXECUTED
108b88: 5f pop %edi <== NOT EXECUTED
108b89: 5d pop %ebp <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
108b8a: e9 59 ff ff ff jmp 108ae8 <echo> <== NOT EXECUTED
} else if (c == '\t') {
108b8f: 80 f9 09 cmp $0x9,%cl
108b92: 8b 3d 44 a2 12 00 mov 0x12a244,%edi
108b98: 89 7d e0 mov %edi,-0x20(%ebp)
108b9b: 75 5d jne 108bfa <erase.part.2+0xba>
int col = tty->read_start_column;
108b9d: 8b 73 2c mov 0x2c(%ebx),%esi
* Erase a character or line
* FIXME: Needs support for WERASE and ECHOPRT.
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
108ba0: b9 01 00 00 00 mov $0x1,%ecx
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
108ba5: 81 e2 00 02 00 00 and $0x200,%edx
108bab: 89 55 dc mov %edx,-0x24(%ebp)
108bae: eb 29 jmp 108bd9 <erase.part.2+0x99>
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
108bb0: 8b 7d d4 mov -0x2c(%ebp),%edi
108bb3: 0f b6 54 0f ff movzbl -0x1(%edi,%ecx,1),%edx
if (c == '\t') {
108bb8: 80 fa 09 cmp $0x9,%dl
108bbb: 75 05 jne 108bc2 <erase.part.2+0x82>
col = (col | 7) + 1;
108bbd: 83 ce 07 or $0x7,%esi
108bc0: eb 15 jmp 108bd7 <erase.part.2+0x97>
} else if (iscntrl (c)) {
108bc2: 8b 7d e0 mov -0x20(%ebp),%edi
108bc5: f6 44 17 01 20 testb $0x20,0x1(%edi,%edx,1)
108bca: 74 0b je 108bd7 <erase.part.2+0x97> <== ALWAYS TAKEN
if (tty->termios.c_lflag & ECHOCTL)
108bcc: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) <== NOT EXECUTED
108bd0: 74 06 je 108bd8 <erase.part.2+0x98> <== NOT EXECUTED
col += 2;
108bd2: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
108bd5: eb 01 jmp 108bd8 <erase.part.2+0x98> <== NOT EXECUTED
} else {
col++;
108bd7: 46 inc %esi
108bd8: 41 inc %ecx
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
108bd9: 39 c1 cmp %eax,%ecx
108bdb: 75 d3 jne 108bb0 <erase.part.2+0x70>
108bdd: eb 14 jmp 108bf3 <erase.part.2+0xb3>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
108bdf: 50 push %eax
108be0: 53 push %ebx
108be1: 6a 01 push $0x1
108be3: 68 18 e9 11 00 push $0x11e918
108be8: e8 d8 fc ff ff call 1088c5 <rtems_termios_puts>
tty->column--;
108bed: ff 4b 28 decl 0x28(%ebx)
108bf0: 83 c4 10 add $0x10,%esp
}
/*
* Back up over the tab
*/
while (tty->column > col) {
108bf3: 39 73 28 cmp %esi,0x28(%ebx)
108bf6: 7f e7 jg 108bdf <erase.part.2+0x9f>
108bf8: eb 5c jmp 108c56 <erase.part.2+0x116>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
108bfa: 0f b6 f1 movzbl %cl,%esi
108bfd: 8b 45 e0 mov -0x20(%ebp),%eax
108c00: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1)
108c05: 74 21 je 108c28 <erase.part.2+0xe8> <== ALWAYS TAKEN
108c07: 80 e6 02 and $0x2,%dh <== NOT EXECUTED
108c0a: 74 1c je 108c28 <erase.part.2+0xe8> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
108c0c: 57 push %edi <== NOT EXECUTED
108c0d: 53 push %ebx <== NOT EXECUTED
108c0e: 6a 03 push $0x3 <== NOT EXECUTED
108c10: 68 16 e9 11 00 push $0x11e916 <== NOT EXECUTED
108c15: e8 ab fc ff ff call 1088c5 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
108c1a: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
108c1d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108c20: 85 c0 test %eax,%eax <== NOT EXECUTED
108c22: 74 04 je 108c28 <erase.part.2+0xe8> <== NOT EXECUTED
tty->column--;
108c24: 48 dec %eax <== NOT EXECUTED
108c25: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
108c28: a1 44 a2 12 00 mov 0x12a244,%eax
108c2d: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1)
108c32: 74 06 je 108c3a <erase.part.2+0xfa> <== ALWAYS TAKEN
108c34: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED
108c38: 74 1c je 108c56 <erase.part.2+0x116> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
108c3a: 56 push %esi
108c3b: 53 push %ebx
108c3c: 6a 03 push $0x3
108c3e: 68 16 e9 11 00 push $0x11e916
108c43: e8 7d fc ff ff call 1088c5 <rtems_termios_puts>
if (tty->column)
108c48: 8b 43 28 mov 0x28(%ebx),%eax
108c4b: 83 c4 10 add $0x10,%esp
108c4e: 85 c0 test %eax,%eax
108c50: 74 04 je 108c56 <erase.part.2+0x116> <== NEVER TAKEN
tty->column--;
108c52: 48 dec %eax
108c53: 89 43 28 mov %eax,0x28(%ebx)
}
}
}
if (!lineFlag)
108c56: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
108c5a: 74 0b je 108c67 <erase.part.2+0x127>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
108c5c: 8b 43 20 mov 0x20(%ebx),%eax
108c5f: 85 c0 test %eax,%eax
108c61: 0f 85 ec fe ff ff jne 108b53 <erase.part.2+0x13>
}
}
if (!lineFlag)
break;
}
}
108c67: 8d 65 f4 lea -0xc(%ebp),%esp
108c6a: 5b pop %ebx
108c6b: 5e pop %esi
108c6c: 5f pop %edi
108c6d: 5d pop %ebp
108c6e: c3 ret
001076e7 <eval_path_start>:
size_t pathlen,
int eval_flags,
rtems_filesystem_global_location_t *const *global_root_ptr,
rtems_filesystem_global_location_t *const *global_current_ptr
)
{
1076e7: 55 push %ebp
1076e8: 89 e5 mov %esp,%ebp
1076ea: 57 push %edi
1076eb: 56 push %esi
1076ec: 53 push %ebx
1076ed: 83 ec 2c sub $0x2c,%esp
1076f0: 89 c3 mov %eax,%ebx
1076f2: 89 ce mov %ecx,%esi
memset(ctx, 0, sizeof(*ctx));
1076f4: b9 0e 00 00 00 mov $0xe,%ecx
1076f9: 31 c0 xor %eax,%eax
1076fb: 89 df mov %ebx,%edi
1076fd: f3 ab rep stos %eax,%es:(%edi)
ctx->path = path;
1076ff: 89 13 mov %edx,(%ebx)
ctx->pathlen = pathlen;
107701: 89 73 04 mov %esi,0x4(%ebx)
ctx->flags = eval_flags;
107704: 8b 45 08 mov 0x8(%ebp),%eax
107707: 89 43 10 mov %eax,0x10(%ebx)
rtems_filesystem_eval_path_context_t *ctx,
rtems_filesystem_global_location_t *const *global_root_ptr,
rtems_filesystem_global_location_t *const *global_current_ptr
)
{
if (ctx->pathlen > 0) {
10770a: 85 f6 test %esi,%esi
10770c: 74 41 je 10774f <eval_path_start+0x68>
char c = ctx->path [0];
10770e: 8a 12 mov (%edx),%dl
ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr);
107710: 83 ec 0c sub $0xc,%esp
107713: ff 75 0c pushl 0xc(%ebp)
107716: 88 55 d4 mov %dl,-0x2c(%ebp)
107719: e8 0d 05 00 00 call 107c2b <rtems_filesystem_global_location_obtain>
10771e: 89 43 30 mov %eax,0x30(%ebx)
gid_t node_gid
);
static inline bool rtems_filesystem_is_delimiter(char c)
{
return c == '/' || c == '\\';
107721: 83 c4 10 add $0x10,%esp
if (rtems_filesystem_is_delimiter(c)) {
107724: 8a 55 d4 mov -0x2c(%ebp),%dl
107727: 80 fa 5c cmp $0x5c,%dl
10772a: 74 05 je 107731 <eval_path_start+0x4a> <== NEVER TAKEN
10772c: 80 fa 2f cmp $0x2f,%dl
10772f: 75 0e jne 10773f <eval_path_start+0x58>
++ctx->path;
107731: ff 03 incl (%ebx)
--ctx->pathlen;
107733: ff 4b 04 decl 0x4(%ebx)
ctx->startloc = rtems_filesystem_global_location_obtain(
107736: 83 ec 0c sub $0xc,%esp
&ctx->rootloc
107739: 8d 43 30 lea 0x30(%ebx),%eax
ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr);
if (rtems_filesystem_is_delimiter(c)) {
++ctx->path;
--ctx->pathlen;
ctx->startloc = rtems_filesystem_global_location_obtain(
10773c: 50 push %eax
10773d: eb 06 jmp 107745 <eval_path_start+0x5e>
&ctx->rootloc
);
} else {
ctx->startloc = rtems_filesystem_global_location_obtain(
10773f: 83 ec 0c sub $0xc,%esp
107742: ff 75 10 pushl 0x10(%ebp)
107745: e8 e1 04 00 00 call 107c2b <rtems_filesystem_global_location_obtain>
10774a: 89 43 34 mov %eax,0x34(%ebx)
10774d: eb 33 jmp 107782 <eval_path_start+0x9b>
);
static inline rtems_filesystem_global_location_t *
rtems_filesystem_global_location_obtain_null(void)
{
rtems_filesystem_global_location_t *global_loc = NULL;
10774f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
return rtems_filesystem_global_location_obtain( &global_loc );
107756: 83 ec 0c sub $0xc,%esp
107759: 8d 75 e4 lea -0x1c(%ebp),%esi
10775c: 56 push %esi
10775d: e8 c9 04 00 00 call 107c2b <rtems_filesystem_global_location_obtain>
global_current_ptr
);
}
} else {
ctx->rootloc = rtems_filesystem_global_location_obtain_null();
107762: 89 43 30 mov %eax,0x30(%ebx)
);
static inline rtems_filesystem_global_location_t *
rtems_filesystem_global_location_obtain_null(void)
{
rtems_filesystem_global_location_t *global_loc = NULL;
107765: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
return rtems_filesystem_global_location_obtain( &global_loc );
10776c: 89 34 24 mov %esi,(%esp)
10776f: e8 b7 04 00 00 call 107c2b <rtems_filesystem_global_location_obtain>
ctx->startloc = rtems_filesystem_global_location_obtain_null();
107774: 89 43 34 mov %eax,0x34(%ebx)
errno = ENOENT;
107777: e8 90 8a 00 00 call 11020c <__errno>
10777c: c7 00 02 00 00 00 movl $0x2,(%eax)
&ctx->startloc,
rtems_filesystem_global_location_obtain(newstartloc_ptr)
);
rtems_filesystem_instance_lock(&ctx->startloc->location);
rtems_filesystem_location_clone(&ctx->currentloc, &ctx->startloc->location);
}
107782: 8b 43 34 mov 0x34(%ebx),%eax
107785: 8b 40 14 mov 0x14(%eax),%eax
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
107788: 8b 50 0c mov 0xc(%eax),%edx
10778b: 89 04 24 mov %eax,(%esp)
10778e: ff 12 call *(%edx)
set_startloc(ctx, global_root_ptr, global_current_ptr);
rtems_filesystem_instance_lock(&ctx->startloc->location);
rtems_filesystem_location_clone(
107790: 8d 73 18 lea 0x18(%ebx),%esi
107793: 5f pop %edi
107794: 58 pop %eax
107795: ff 73 34 pushl 0x34(%ebx)
107798: 56 push %esi
107799: e8 9e 60 00 00 call 10d83c <rtems_filesystem_location_clone>
&ctx->currentloc,
&ctx->startloc->location
);
rtems_filesystem_eval_path_continue(ctx);
10779e: 89 1c 24 mov %ebx,(%esp)
1077a1: e8 e5 fe ff ff call 10768b <rtems_filesystem_eval_path_continue>
return &ctx->currentloc;
}
1077a6: 89 f0 mov %esi,%eax
1077a8: 8d 65 f4 lea -0xc(%ebp),%esp
1077ab: 5b pop %ebx
1077ac: 5e pop %esi
1077ad: 5f pop %edi
1077ae: 5d pop %ebp
1077af: c3 ret
0012c97c <fchdir>:
#include <unistd.h>
#include <rtems/libio_.h>
int fchdir( int fd )
{
12c97c: 55 push %ebp
12c97d: 89 e5 mov %esp,%ebp
12c97f: 57 push %edi
12c980: 56 push %esi
12c981: 53 push %ebx
12c982: 83 ec 6c sub $0x6c,%esp
12c985: 8b 5d 08 mov 0x8(%ebp),%ebx
int rv = 0;
rtems_libio_t *iop;
struct stat st;
rtems_filesystem_location_info_t loc;
st.st_mode = 0;
12c988: c7 45 ac 00 00 00 00 movl $0x0,-0x54(%ebp)
st.st_uid = 0;
12c98f: 66 c7 45 b2 00 00 movw $0x0,-0x4e(%ebp)
st.st_gid = 0;
12c995: 66 c7 45 b4 00 00 movw $0x0,-0x4c(%ebp)
rtems_libio_check_fd( fd );
12c99b: 3b 1d 1c 51 16 00 cmp 0x16511c,%ebx
12c9a1: 72 02 jb 12c9a5 <fchdir+0x29>
12c9a3: eb 0f jmp 12c9b4 <fchdir+0x38>
iop = rtems_libio_iop( fd );
12c9a5: 6b db 30 imul $0x30,%ebx,%ebx
12c9a8: 03 1d 68 c8 16 00 add 0x16c868,%ebx
rtems_libio_check_is_open( iop );
12c9ae: f6 43 0d 01 testb $0x1,0xd(%ebx)
12c9b2: 75 13 jne 12c9c7 <fchdir+0x4b>
12c9b4: e8 3b 38 00 00 call 1301f4 <__errno>
12c9b9: c7 00 09 00 00 00 movl $0x9,(%eax)
12c9bf: 83 ce ff or $0xffffffff,%esi
12c9c2: e9 84 00 00 00 jmp 12ca4b <fchdir+0xcf>
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
12c9c7: 8b 43 24 mov 0x24(%ebx),%eax
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
12c9ca: 83 ec 0c sub $0xc,%esp
12c9cd: 8b 50 0c mov 0xc(%eax),%edx
12c9d0: 50 push %eax
12c9d1: ff 12 call *(%edx)
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st );
12c9d3: 8d 7b 10 lea 0x10(%ebx),%edi
12c9d6: 5a pop %edx
12c9d7: 59 pop %ecx
12c9d8: 8b 43 20 mov 0x20(%ebx),%eax
12c9db: 8d 55 a0 lea -0x60(%ebp),%edx
12c9de: 52 push %edx
12c9df: 57 push %edi
12c9e0: ff 50 18 call *0x18(%eax)
12c9e3: 89 c6 mov %eax,%esi
if ( rv == 0 ) {
12c9e5: 83 c4 10 add $0x10,%esp
12c9e8: 85 c0 test %eax,%eax
12c9ea: 75 3a jne 12ca26 <fchdir+0xaa> <== NEVER TAKEN
bool access_ok = rtems_filesystem_check_access(
12c9ec: 0f b7 45 b4 movzwl -0x4c(%ebp),%eax
12c9f0: 50 push %eax
12c9f1: 0f b7 45 b2 movzwl -0x4e(%ebp),%eax
12c9f5: 50 push %eax
12c9f6: ff 75 ac pushl -0x54(%ebp)
12c9f9: 6a 01 push $0x1
12c9fb: e8 38 2e fe ff call 10f838 <rtems_filesystem_check_access>
st.st_mode,
st.st_uid,
st.st_gid
);
if ( access_ok ) {
12ca00: 83 c4 10 add $0x10,%esp
12ca03: 84 c0 test %al,%al
12ca05: 74 11 je 12ca18 <fchdir+0x9c> <== NEVER TAKEN
rtems_filesystem_location_clone( &loc, &iop->pathinfo );
12ca07: 50 push %eax
12ca08: 50 push %eax
12ca09: 57 push %edi
12ca0a: 8d 45 88 lea -0x78(%ebp),%eax
12ca0d: 50 push %eax
12ca0e: e8 9d 29 fe ff call 10f3b0 <rtems_filesystem_location_clone>
12ca13: 83 c4 10 add $0x10,%esp
12ca16: eb 0e jmp 12ca26 <fchdir+0xaa>
} else {
errno = EACCES;
12ca18: e8 d7 37 00 00 call 1301f4 <__errno>
12ca1d: c7 00 0d 00 00 00 movl $0xd,(%eax)
rv = -1;
12ca23: 83 ce ff or $0xffffffff,%esi
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
12ca26: 8b 43 24 mov 0x24(%ebx),%eax
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->unlock_h)( mt_entry );
12ca29: 83 ec 0c sub $0xc,%esp
12ca2c: 8b 50 0c mov 0xc(%eax),%edx
12ca2f: 50 push %eax
12ca30: ff 52 04 call *0x4(%edx)
rv = -1;
}
}
rtems_filesystem_instance_unlock( &iop->pathinfo );
if ( rv == 0 ) {
12ca33: 83 c4 10 add $0x10,%esp
12ca36: 85 f6 test %esi,%esi
12ca38: 75 11 jne 12ca4b <fchdir+0xcf>
rv = rtems_filesystem_chdir( &loc );
12ca3a: 83 ec 0c sub $0xc,%esp
12ca3d: 8d 45 88 lea -0x78(%ebp),%eax
12ca40: 50 push %eax
12ca41: e8 36 47 ff ff call 12117c <rtems_filesystem_chdir>
12ca46: 89 c6 mov %eax,%esi
12ca48: 83 c4 10 add $0x10,%esp
}
return rv;
}
12ca4b: 89 f0 mov %esi,%eax
12ca4d: 8d 65 f4 lea -0xc(%ebp),%esp
12ca50: 5b pop %ebx
12ca51: 5e pop %esi
12ca52: 5f pop %edi
12ca53: 5d pop %ebp
12ca54: c3 ret
00121418 <fchmod>:
#include <sys/stat.h>
#include <rtems/libio_.h>
int fchmod( int fd, mode_t mode )
{
121418: 55 push %ebp
121419: 89 e5 mov %esp,%ebp
12141b: 53 push %ebx
12141c: 83 ec 14 sub $0x14,%esp
12141f: 8b 5d 08 mov 0x8(%ebp),%ebx
int rv;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
121422: 3b 1d 1c 51 16 00 cmp 0x16511c,%ebx
121428: 72 02 jb 12142c <fchmod+0x14>
12142a: eb 0f jmp 12143b <fchmod+0x23>
iop = rtems_libio_iop( fd );
12142c: 6b db 30 imul $0x30,%ebx,%ebx
12142f: 03 1d 68 c8 16 00 add 0x16c868,%ebx
rtems_libio_check_is_open(iop);
121435: f6 43 0d 01 testb $0x1,0xd(%ebx)
121439: 75 0d jne 121448 <fchmod+0x30>
12143b: e8 b4 ed 00 00 call 1301f4 <__errno>
121440: c7 00 09 00 00 00 movl $0x9,(%eax)
121446: eb 46 jmp 12148e <fchmod+0x76>
if (iop->pathinfo.mt_entry->writeable) {
121448: 8b 43 24 mov 0x24(%ebx),%eax
12144b: 80 78 29 00 cmpb $0x0,0x29(%eax)
12144f: 74 32 je 121483 <fchmod+0x6b> <== NEVER TAKEN
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
121451: 83 ec 0c sub $0xc,%esp
121454: 8b 50 0c mov 0xc(%eax),%edx
121457: 50 push %eax
121458: ff 12 call *(%edx)
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode );
12145a: 58 pop %eax
12145b: 5a pop %edx
12145c: 8b 43 24 mov 0x24(%ebx),%eax
12145f: 8b 40 0c mov 0xc(%eax),%eax
121462: ff 75 0c pushl 0xc(%ebp)
121465: 8d 53 10 lea 0x10(%ebx),%edx
121468: 52 push %edx
121469: ff 50 20 call *0x20(%eax)
errno = EROFS;
rv = -1;
}
return rv;
}
12146c: 8b 53 24 mov 0x24(%ebx),%edx
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->unlock_h)( mt_entry );
12146f: 8b 4a 0c mov 0xc(%edx),%ecx
121472: 89 14 24 mov %edx,(%esp)
121475: 89 45 f4 mov %eax,-0xc(%ebp)
121478: ff 51 04 call *0x4(%ecx)
12147b: 83 c4 10 add $0x10,%esp
12147e: 8b 45 f4 mov -0xc(%ebp),%eax
121481: eb 0e jmp 121491 <fchmod+0x79>
if (iop->pathinfo.mt_entry->writeable) {
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode );
rtems_filesystem_instance_unlock( &iop->pathinfo );
} else {
errno = EROFS;
121483: e8 6c ed 00 00 call 1301f4 <__errno> <== NOT EXECUTED
121488: c7 00 1e 00 00 00 movl $0x1e,(%eax) <== NOT EXECUTED
rv = -1;
12148e: 83 c8 ff or $0xffffffff,%eax
}
return rv;
}
121491: 8b 5d fc mov -0x4(%ebp),%ebx
121494: c9 leave
121495: c3 ret
00121498 <fchown>:
#include <unistd.h>
#include <rtems/libio_.h>
int fchown( int fd, uid_t owner, gid_t group )
{
121498: 55 push %ebp
121499: 89 e5 mov %esp,%ebp
12149b: 57 push %edi
12149c: 56 push %esi
12149d: 53 push %ebx
12149e: 83 ec 1c sub $0x1c,%esp
1214a1: 8b 5d 08 mov 0x8(%ebp),%ebx
1214a4: 0f b7 75 0c movzwl 0xc(%ebp),%esi
1214a8: 0f b7 7d 10 movzwl 0x10(%ebp),%edi
int rv = 0;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1214ac: 3b 1d 1c 51 16 00 cmp 0x16511c,%ebx
1214b2: 72 02 jb 1214b6 <fchown+0x1e>
1214b4: eb 0f jmp 1214c5 <fchown+0x2d>
iop = rtems_libio_iop( fd );
1214b6: 6b db 30 imul $0x30,%ebx,%ebx
1214b9: 03 1d 68 c8 16 00 add 0x16c868,%ebx
rtems_libio_check_is_open(iop);
1214bf: f6 43 0d 01 testb $0x1,0xd(%ebx)
1214c3: 75 0d jne 1214d2 <fchown+0x3a>
1214c5: e8 2a ed 00 00 call 1301f4 <__errno>
1214ca: c7 00 09 00 00 00 movl $0x9,(%eax)
1214d0: eb 46 jmp 121518 <fchown+0x80>
if (iop->pathinfo.mt_entry->writeable) {
1214d2: 8b 43 24 mov 0x24(%ebx),%eax
1214d5: 80 78 29 00 cmpb $0x0,0x29(%eax)
1214d9: 74 32 je 12150d <fchown+0x75> <== NEVER TAKEN
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
1214db: 83 ec 0c sub $0xc,%esp
1214de: 8b 50 0c mov 0xc(%eax),%edx
1214e1: 50 push %eax
1214e2: ff 12 call *(%edx)
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->chown_h)(
1214e4: 83 c4 0c add $0xc,%esp
1214e7: 8b 43 24 mov 0x24(%ebx),%eax
1214ea: 8b 40 0c mov 0xc(%eax),%eax
1214ed: 57 push %edi
1214ee: 56 push %esi
&iop->pathinfo,
1214ef: 8d 53 10 lea 0x10(%ebx),%edx
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
if (iop->pathinfo.mt_entry->writeable) {
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->chown_h)(
1214f2: 52 push %edx
1214f3: ff 50 24 call *0x24(%eax)
errno = EROFS;
rv = -1;
}
return rv;
}
1214f6: 8b 53 24 mov 0x24(%ebx),%edx
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->unlock_h)( mt_entry );
1214f9: 8b 4a 0c mov 0xc(%edx),%ecx
1214fc: 89 14 24 mov %edx,(%esp)
1214ff: 89 45 e4 mov %eax,-0x1c(%ebp)
121502: ff 51 04 call *0x4(%ecx)
121505: 83 c4 10 add $0x10,%esp
121508: 8b 45 e4 mov -0x1c(%ebp),%eax
12150b: eb 0e jmp 12151b <fchown+0x83>
owner,
group
);
rtems_filesystem_instance_unlock( &iop->pathinfo );
} else {
errno = EROFS;
12150d: e8 e2 ec 00 00 call 1301f4 <__errno> <== NOT EXECUTED
121512: c7 00 1e 00 00 00 movl $0x1e,(%eax) <== NOT EXECUTED
rv = -1;
121518: 83 c8 ff or $0xffffffff,%eax
}
return rv;
}
12151b: 8d 65 f4 lea -0xc(%ebp),%esp
12151e: 5b pop %ebx
12151f: 5e pop %esi
121520: 5f pop %edi
121521: 5d pop %ebp
121522: c3 ret
0012b720 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
12b720: 55 push %ebp
12b721: 89 e5 mov %esp,%ebp
12b723: 57 push %edi
12b724: 56 push %esi
12b725: 53 push %ebx
12b726: 83 ec 1c sub $0x1c,%esp
12b729: 8b 55 08 mov 0x8(%ebp),%edx
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
12b72c: 3b 15 88 d2 13 00 cmp 0x13d288,%edx
12b732: 72 02 jb 12b736 <fcntl+0x16>
12b734: eb 11 jmp 12b747 <fcntl+0x27>
iop = rtems_libio_iop( fd );
12b736: 6b fa 30 imul $0x30,%edx,%edi
12b739: 03 3d d8 13 15 00 add 0x1513d8,%edi
rtems_libio_check_is_open(iop);
12b73f: 8b 5f 0c mov 0xc(%edi),%ebx
12b742: f6 c7 01 test $0x1,%bh
12b745: 75 10 jne 12b757 <fcntl+0x37>
12b747: e8 10 2d ff ff call 11e45c <__errno>
12b74c: c7 00 09 00 00 00 movl $0x9,(%eax)
12b752: e9 29 01 00 00 jmp 12b880 <fcntl+0x160>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
12b757: 83 7d 0c 09 cmpl $0x9,0xc(%ebp)
12b75b: 0f 87 f2 00 00 00 ja 12b853 <fcntl+0x133>
12b761: 8b 45 0c mov 0xc(%ebp),%eax
12b764: ff 24 85 e4 22 13 00 jmp *0x1322e4(,%eax,4)
/*
* FIXME: We ignore the start value fd2 for the file descriptor search. This
* is not POSIX conform.
*/
rtems_libio_t *diop = rtems_libio_allocate();
12b76b: e8 48 ea fd ff call 10a1b8 <rtems_libio_allocate>
12b770: 89 c6 mov %eax,%esi
if (diop != NULL) {
12b772: 85 c0 test %eax,%eax
12b774: 0f 84 06 01 00 00 je 12b880 <fcntl+0x160>
int oflag = rtems_libio_to_fcntl_flags( iop->flags );
12b77a: 83 ec 0c sub $0xc,%esp
12b77d: ff 77 0c pushl 0xc(%edi)
12b780: e8 f3 e9 fd ff call 10a178 <rtems_libio_to_fcntl_flags>
12b785: 89 c1 mov %eax,%ecx
oflag &= ~O_CREAT;
12b787: 80 e5 fd and $0xfd,%ch
diop->flags |= rtems_libio_fcntl_flags( oflag );
12b78a: 8b 5e 0c mov 0xc(%esi),%ebx
12b78d: 89 0c 24 mov %ecx,(%esp)
12b790: 89 4d e4 mov %ecx,-0x1c(%ebp)
12b793: e8 ac e9 fd ff call 10a144 <rtems_libio_fcntl_flags>
12b798: 09 d8 or %ebx,%eax
12b79a: 89 46 0c mov %eax,0xc(%esi)
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
}
12b79d: 8b 47 24 mov 0x24(%edi),%eax
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
12b7a0: 8b 58 0c mov 0xc(%eax),%ebx
12b7a3: 89 04 24 mov %eax,(%esp)
12b7a6: ff 13 call *(%ebx)
oflag &= ~O_CREAT;
diop->flags |= rtems_libio_fcntl_flags( oflag );
rtems_filesystem_instance_lock( &iop->pathinfo );
rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo );
12b7a8: 5a pop %edx
12b7a9: 59 pop %ecx
12b7aa: 8d 47 10 lea 0x10(%edi),%eax
12b7ad: 50 push %eax
12b7ae: 8d 46 10 lea 0x10(%esi),%eax
12b7b1: 50 push %eax
12b7b2: e8 4d aa fe ff call 116204 <rtems_filesystem_location_clone>
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
}
12b7b7: 8b 47 24 mov 0x24(%edi),%eax
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->unlock_h)( mt_entry );
12b7ba: 8b 58 0c mov 0xc(%eax),%ebx
12b7bd: 89 04 24 mov %eax,(%esp)
12b7c0: ff 53 04 call *0x4(%ebx)
/*
* XXX: We call the open handler here to have a proper open and close pair.
*
* FIXME: What to do with the path?
*/
rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 );
12b7c3: 8b 46 20 mov 0x20(%esi),%eax
12b7c6: 6a 00 push $0x0
12b7c8: 8b 4d e4 mov -0x1c(%ebp),%ecx
12b7cb: 51 push %ecx
12b7cc: 6a 00 push $0x0
12b7ce: 56 push %esi
12b7cf: ff 10 call *(%eax)
12b7d1: 89 c3 mov %eax,%ebx
if ( rv == 0 ) {
12b7d3: 83 c4 20 add $0x20,%esp
12b7d6: 85 c0 test %eax,%eax
12b7d8: 75 11 jne 12b7eb <fcntl+0xcb> <== NEVER TAKEN
rv = diop - rtems_libio_iops;
12b7da: 2b 35 d8 13 15 00 sub 0x1513d8,%esi
12b7e0: c1 fe 04 sar $0x4,%esi
12b7e3: 69 de ab aa aa aa imul $0xaaaaaaab,%esi,%ebx
12b7e9: eb 75 jmp 12b860 <fcntl+0x140>
} else {
rtems_libio_free( diop );
12b7eb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b7ee: 56 push %esi <== NOT EXECUTED
12b7ef: e8 17 ea fd ff call 10a20b <rtems_libio_free> <== NOT EXECUTED
12b7f4: eb 26 jmp 12b81c <fcntl+0xfc> <== NOT EXECUTED
fd2 = va_arg( ap, int );
ret = duplicate_iop( iop, fd2 );
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
12b7f6: c1 eb 0b shr $0xb,%ebx
12b7f9: 83 e3 01 and $0x1,%ebx
12b7fc: eb 66 jmp 12b864 <fcntl+0x144>
* if a new process is exec()'ed. Since RTEMS does not support
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
12b7fe: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
12b802: 74 05 je 12b809 <fcntl+0xe9>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
12b804: 80 cf 08 or $0x8,%bh
12b807: eb 03 jmp 12b80c <fcntl+0xec>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
12b809: 80 e7 f7 and $0xf7,%bh
12b80c: 89 5f 0c mov %ebx,0xc(%edi)
12b80f: eb 31 jmp 12b842 <fcntl+0x122>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
12b811: 83 ec 0c sub $0xc,%esp
12b814: 53 push %ebx
12b815: e8 5e e9 fd ff call 10a178 <rtems_libio_to_fcntl_flags>
12b81a: 89 c3 mov %eax,%ebx
12b81c: 83 c4 10 add $0x10,%esp
12b81f: eb 3f jmp 12b860 <fcntl+0x140>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
12b821: 83 ec 0c sub $0xc,%esp
12b824: ff 75 10 pushl 0x10(%ebp)
12b827: e8 18 e9 fd ff call 10a144 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
12b82c: 25 01 02 00 00 and $0x201,%eax
12b831: 8b 4f 0c mov 0xc(%edi),%ecx
12b834: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx
12b83a: 09 c8 or %ecx,%eax
12b83c: 89 47 0c mov %eax,0xc(%edi)
12b83f: 83 c4 10 add $0x10,%esp
{
rtems_libio_t *iop;
int fd2;
int flags;
int mask;
int ret = 0;
12b842: 31 db xor %ebx,%ebx
12b844: eb 1e jmp 12b864 <fcntl+0x144>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
12b846: e8 11 2c ff ff call 11e45c <__errno>
12b84b: c7 00 86 00 00 00 movl $0x86,(%eax)
12b851: eb 2d jmp 12b880 <fcntl+0x160>
ret = -1;
break;
default:
errno = EINVAL;
12b853: e8 04 2c ff ff call 11e45c <__errno>
12b858: c7 00 16 00 00 00 movl $0x16,(%eax)
12b85e: eb 20 jmp 12b880 <fcntl+0x160>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
12b860: 85 db test %ebx,%ebx
12b862: 78 1f js 12b883 <fcntl+0x163> <== NEVER TAKEN
int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd );
12b864: 50 push %eax
12b865: 50 push %eax
12b866: 8b 47 20 mov 0x20(%edi),%eax
12b869: ff 75 0c pushl 0xc(%ebp)
12b86c: 57 push %edi
12b86d: ff 50 28 call *0x28(%eax)
12b870: 89 c6 mov %eax,%esi
if (err) {
12b872: 83 c4 10 add $0x10,%esp
12b875: 85 c0 test %eax,%eax
12b877: 74 0a je 12b883 <fcntl+0x163> <== ALWAYS TAKEN
errno = err;
12b879: e8 de 2b ff ff call 11e45c <__errno> <== NOT EXECUTED
12b87e: 89 30 mov %esi,(%eax) <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
12b880: 83 cb ff or $0xffffffff,%ebx
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
12b883: 89 d8 mov %ebx,%eax
12b885: 8d 65 f4 lea -0xc(%ebp),%esp
12b888: 5b pop %ebx
12b889: 5e pop %esi
12b88a: 5f pop %edi
12b88b: 5d pop %ebp
12b88c: c3 ret
001093ec <fpathconf>:
long fpathconf(
int fd,
int name
)
{
1093ec: 55 push %ebp
1093ed: 89 e5 mov %esp,%ebp
1093ef: 83 ec 08 sub $0x8,%esp
1093f2: 8b 45 08 mov 0x8(%ebp),%eax
1093f5: 8b 55 0c mov 0xc(%ebp),%edx
long return_value;
rtems_libio_t *iop;
const rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
1093f8: 3b 05 74 69 12 00 cmp 0x126974,%eax
1093fe: 72 02 jb 109402 <fpathconf+0x16> <== NEVER TAKEN
109400: eb 0f jmp 109411 <fpathconf+0x25>
iop = rtems_libio_iop(fd);
109402: 6b c0 30 imul $0x30,%eax,%eax <== NOT EXECUTED
109405: 03 05 dc a8 12 00 add 0x12a8dc,%eax <== NOT EXECUTED
rtems_libio_check_is_open(iop);
10940b: f6 40 0d 01 testb $0x1,0xd(%eax) <== NOT EXECUTED
10940f: 75 0d jne 10941e <fpathconf+0x32> <== NOT EXECUTED
109411: e8 7e 12 00 00 call 10a694 <__errno>
109416: c7 00 09 00 00 00 movl $0x9,(%eax)
10941c: eb 58 jmp 109476 <fpathconf+0x8a>
/*
* Now process the information request.
*/
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
10941e: 8b 40 24 mov 0x24(%eax),%eax <== NOT EXECUTED
109421: 8b 40 2c mov 0x2c(%eax),%eax <== NOT EXECUTED
switch ( name ) {
109424: 83 fa 0b cmp $0xb,%edx <== NOT EXECUTED
109427: 77 42 ja 10946b <fpathconf+0x7f> <== NOT EXECUTED
109429: ff 24 95 f4 c9 11 00 jmp *0x11c9f4(,%edx,4) <== NOT EXECUTED
case _PC_LINK_MAX:
return_value = the_limits->link_max;
109430: 8b 00 mov (%eax),%eax <== NOT EXECUTED
break;
109432: eb 45 jmp 109479 <fpathconf+0x8d> <== NOT EXECUTED
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
109434: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED
break;
109437: eb 40 jmp 109479 <fpathconf+0x8d> <== NOT EXECUTED
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
109439: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
break;
10943c: eb 3b jmp 109479 <fpathconf+0x8d> <== NOT EXECUTED
case _PC_NAME_MAX:
return_value = the_limits->name_max;
10943e: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
break;
109441: eb 36 jmp 109479 <fpathconf+0x8d> <== NOT EXECUTED
case _PC_PATH_MAX:
return_value = the_limits->path_max;
109443: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED
break;
109446: eb 31 jmp 109479 <fpathconf+0x8d> <== NOT EXECUTED
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
109448: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
break;
10944b: eb 2c jmp 109479 <fpathconf+0x8d> <== NOT EXECUTED
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
10944d: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
break;
109450: eb 27 jmp 109479 <fpathconf+0x8d> <== NOT EXECUTED
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
109452: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
break;
109455: eb 22 jmp 109479 <fpathconf+0x8d> <== NOT EXECUTED
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
109457: 8b 40 2c mov 0x2c(%eax),%eax <== NOT EXECUTED
break;
10945a: eb 1d jmp 109479 <fpathconf+0x8d> <== NOT EXECUTED
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
10945c: 8b 40 18 mov 0x18(%eax),%eax <== NOT EXECUTED
break;
10945f: eb 18 jmp 109479 <fpathconf+0x8d> <== NOT EXECUTED
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
109461: 8b 40 24 mov 0x24(%eax),%eax <== NOT EXECUTED
break;
109464: eb 13 jmp 109479 <fpathconf+0x8d> <== NOT EXECUTED
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
109466: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
break;
109469: eb 0e jmp 109479 <fpathconf+0x8d> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10946b: e8 24 12 00 00 call 10a694 <__errno> <== NOT EXECUTED
109470: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
109476: 83 c8 ff or $0xffffffff,%eax
break;
}
return return_value;
}
109479: c9 leave
10947a: c3 ret
00106734 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
106734: 55 push %ebp
106735: 89 e5 mov %esp,%ebp
106737: 53 push %ebx
106738: 52 push %edx
106739: 8b 5d 08 mov 0x8(%ebp),%ebx
MSBUMP(free_calls, 1);
10673c: ff 05 7c c2 12 00 incl 0x12c27c
if ( !ptr )
106742: 85 db test %ebx,%ebx
106744: 74 5f je 1067a5 <free+0x71>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
106746: 83 3d a8 c4 12 00 03 cmpl $0x3,0x12c4a8
10674d: 75 15 jne 106764 <free+0x30> <== NEVER TAKEN
!malloc_is_system_state_OK() ) {
10674f: e8 78 01 00 00 call 1068cc <malloc_is_system_state_OK>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
106754: 84 c0 test %al,%al
106756: 75 0c jne 106764 <free+0x30>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
106758: 89 5d 08 mov %ebx,0x8(%ebp)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
10675b: 8b 5d fc mov -0x4(%ebp),%ebx
10675e: c9 leave
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
10675f: e9 d1 01 00 00 jmp 106935 <malloc_deferred_free>
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
106764: a1 88 a7 12 00 mov 0x12a788,%eax
106769: 85 c0 test %eax,%eax
10676b: 74 0a je 106777 <free+0x43>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
10676d: 83 ec 0c sub $0xc,%esp
106770: 53 push %ebx
106771: ff 50 08 call *0x8(%eax)
106774: 83 c4 10 add $0x10,%esp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
106777: 50 push %eax
106778: 50 push %eax
106779: 53 push %ebx
10677a: ff 35 2c 82 12 00 pushl 0x12822c
106780: e8 1b 4d 00 00 call 10b4a0 <_Protected_heap_Free>
106785: 83 c4 10 add $0x10,%esp
106788: 84 c0 test %al,%al
10678a: 75 19 jne 1067a5 <free+0x71>
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
10678c: a1 2c 82 12 00 mov 0x12822c,%eax
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
106791: ff 70 1c pushl 0x1c(%eax)
106794: ff 70 18 pushl 0x18(%eax)
106797: 53 push %ebx
106798: 68 28 e7 11 00 push $0x11e728
10679d: e8 9a 0c 00 00 call 10743c <printk>
1067a2: 83 c4 10 add $0x10,%esp
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
1067a5: 8b 5d fc mov -0x4(%ebp),%ebx
1067a8: c9 leave
1067a9: c3 ret
0011ca48 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
11ca48: 55 push %ebp
11ca49: 89 e5 mov %esp,%ebp
11ca4b: 57 push %edi
11ca4c: 53 push %ebx
11ca4d: 8b 55 08 mov 0x8(%ebp),%edx
11ca50: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
11ca53: 85 db test %ebx,%ebx
11ca55: 75 0d jne 11ca64 <fstat+0x1c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
11ca57: e8 b0 37 ff ff call 11020c <__errno> <== NOT EXECUTED
11ca5c: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
11ca62: eb 43 jmp 11caa7 <fstat+0x5f> <== NOT EXECUTED
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
11ca64: 3b 15 70 82 12 00 cmp 0x128270,%edx
11ca6a: 73 0f jae 11ca7b <fstat+0x33>
11ca6c: 6b d2 30 imul $0x30,%edx,%edx
11ca6f: 03 15 58 c2 12 00 add 0x12c258,%edx
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
11ca75: f6 42 0d 01 testb $0x1,0xd(%edx)
11ca79: 75 0d jne 11ca88 <fstat+0x40>
11ca7b: e8 8c 37 ff ff call 11020c <__errno>
11ca80: c7 00 09 00 00 00 movl $0x9,(%eax)
11ca86: eb 1f jmp 11caa7 <fstat+0x5f>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
11ca88: b9 12 00 00 00 mov $0x12,%ecx
11ca8d: 31 c0 xor %eax,%eax
11ca8f: 89 df mov %ebx,%edi
11ca91: f3 ab rep stos %eax,%es:(%edi)
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
11ca93: 8b 42 20 mov 0x20(%edx),%eax
11ca96: 89 5d 0c mov %ebx,0xc(%ebp)
11ca99: 83 c2 10 add $0x10,%edx
11ca9c: 89 55 08 mov %edx,0x8(%ebp)
11ca9f: 8b 40 18 mov 0x18(%eax),%eax
}
11caa2: 5b pop %ebx
11caa3: 5f pop %edi
11caa4: 5d pop %ebp
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
11caa5: ff e0 jmp *%eax
}
11caa7: 83 c8 ff or $0xffffffff,%eax
11caaa: 5b pop %ebx
11caab: 5f pop %edi
11caac: 5d pop %ebp
11caad: c3 ret
0012b8b8 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
12b8b8: 55 push %ebp
12b8b9: 89 e5 mov %esp,%ebp
12b8bb: 57 push %edi
12b8bc: 56 push %esi
12b8bd: 53 push %ebx
12b8be: 83 ec 0c sub $0xc,%esp
12b8c1: 8b 45 08 mov 0x8(%ebp),%eax
12b8c4: 8b 75 0c mov 0xc(%ebp),%esi
12b8c7: 8b 7d 10 mov 0x10(%ebp),%edi
rtems_filesystem_node_types_t type;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
12b8ca: 31 db xor %ebx,%ebx
12b8cc: 3b 05 88 d2 13 00 cmp 0x13d288,%eax
12b8d2: 73 09 jae 12b8dd <getdents+0x25> <== NEVER TAKEN
12b8d4: 6b d8 30 imul $0x30,%eax,%ebx
12b8d7: 03 1d d8 13 15 00 add 0x1513d8,%ebx
/*
* Make sure we are working on a directory
*/
type = rtems_filesystem_node_type( &iop->pathinfo );
12b8dd: 83 ec 0c sub $0xc,%esp
12b8e0: 8d 43 10 lea 0x10(%ebx),%eax
12b8e3: 50 push %eax
12b8e4: e8 43 01 fe ff call 10ba2c <rtems_filesystem_node_type>
if ( type != RTEMS_FILESYSTEM_DIRECTORY )
12b8e9: 83 c4 10 add $0x10,%esp
12b8ec: 85 c0 test %eax,%eax
12b8ee: 75 18 jne 12b908 <getdents+0x50>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
12b8f0: 8b 43 20 mov 0x20(%ebx),%eax
12b8f3: 89 7d 10 mov %edi,0x10(%ebp)
12b8f6: 89 75 0c mov %esi,0xc(%ebp)
12b8f9: 89 5d 08 mov %ebx,0x8(%ebp)
12b8fc: 8b 40 08 mov 0x8(%eax),%eax
}
12b8ff: 8d 65 f4 lea -0xc(%ebp),%esp
12b902: 5b pop %ebx
12b903: 5e pop %esi
12b904: 5f pop %edi
12b905: 5d pop %ebp
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
12b906: ff e0 jmp *%eax
/*
* Make sure we are working on a directory
*/
type = rtems_filesystem_node_type( &iop->pathinfo );
if ( type != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
12b908: e8 4f 2b ff ff call 11e45c <__errno>
12b90d: c7 00 14 00 00 00 movl $0x14,(%eax)
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
}
12b913: 83 c8 ff or $0xffffffff,%eax
12b916: 8d 65 f4 lea -0xc(%ebp),%esp
12b919: 5b pop %ebx
12b91a: 5e pop %esi
12b91b: 5f pop %edi
12b91c: 5d pop %ebp
12b91d: c3 ret
001067ac <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
1067ac: 55 push %ebp
1067ad: 89 e5 mov %esp,%ebp
1067af: 57 push %edi
1067b0: 56 push %esi
1067b1: 53 push %ebx
1067b2: 83 ec 2c sub $0x2c,%esp
1067b5: 8b 5d 08 mov 0x8(%ebp),%ebx
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
1067b8: 85 db test %ebx,%ebx
1067ba: 75 10 jne 1067cc <gettimeofday+0x20> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
1067bc: e8 4b 9a 00 00 call 11020c <__errno> <== NOT EXECUTED
1067c1: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
1067c7: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1067ca: eb 4c jmp 106818 <gettimeofday+0x6c> <== NOT EXECUTED
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
1067cc: 9c pushf
1067cd: fa cli
1067ce: 8f 45 d4 popl -0x2c(%ebp)
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
1067d1: 83 ec 0c sub $0xc,%esp
1067d4: 8d 45 e0 lea -0x20(%ebp),%eax
1067d7: 50 push %eax
1067d8: e8 b3 41 00 00 call 10a990 <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
1067dd: 8b 75 e0 mov -0x20(%ebp),%esi
1067e0: 8b 7d e4 mov -0x1c(%ebp),%edi
_TOD_Get( &now );
_ISR_Enable(level);
1067e3: ff 75 d4 pushl -0x2c(%ebp)
1067e6: 9d popf
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
1067e7: 6a 00 push $0x0
1067e9: 68 00 ca 9a 3b push $0x3b9aca00
1067ee: 57 push %edi
1067ef: 56 push %esi
1067f0: e8 c3 5c 01 00 call 11c4b8 <__divdi3>
1067f5: 83 c4 10 add $0x10,%esp
1067f8: 89 03 mov %eax,(%ebx)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
1067fa: 6a 00 push $0x0
1067fc: 68 00 ca 9a 3b push $0x3b9aca00
106801: 57 push %edi
106802: 56 push %esi
106803: e8 04 5e 01 00 call 11c60c <__moddi3>
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
106808: b9 e8 03 00 00 mov $0x3e8,%ecx
10680d: 99 cltd
10680e: f7 f9 idiv %ecx
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
106810: 89 43 04 mov %eax,0x4(%ebx)
106813: 83 c4 20 add $0x20,%esp
* Timezone information ignored by the OS proper. Per email
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
106816: 31 c0 xor %eax,%eax
}
106818: 8d 65 f4 lea -0xc(%ebp),%esp
10681b: 5b pop %ebx
10681c: 5e pop %esi
10681d: 5f pop %edi
10681e: 5d pop %ebp
10681f: c3 ret
00121914 <init_etc_passwd_group>:
void init_etc_passwd_group(void)
{
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
121914: 80 3d e4 c1 16 00 00 cmpb $0x0,0x16c1e4
12191b: 0f 85 c1 00 00 00 jne 1219e2 <init_etc_passwd_group+0xce>
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
121921: 55 push %ebp
121922: 89 e5 mov %esp,%ebp
121924: 53 push %ebx
121925: 83 ec 0c sub $0xc,%esp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
121928: c6 05 e4 c1 16 00 01 movb $0x1,0x16c1e4
mkdir("/etc", 0777);
12192f: 68 ff 01 00 00 push $0x1ff
121934: 68 f1 ef 14 00 push $0x14eff1
121939: e8 76 4f fe ff call 1068b4 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
12193e: 58 pop %eax
12193f: 5a pop %edx
121940: 68 2b b6 14 00 push $0x14b62b
121945: 68 f6 ef 14 00 push $0x14eff6
12194a: e8 39 f2 00 00 call 130b88 <fopen>
12194f: 83 c4 10 add $0x10,%esp
121952: 85 c0 test %eax,%eax
121954: 74 06 je 12195c <init_etc_passwd_group+0x48>
fclose(fp);
121956: 83 ec 0c sub $0xc,%esp
121959: 50 push %eax
12195a: eb 2a jmp 121986 <init_etc_passwd_group+0x72>
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
12195c: 50 push %eax
12195d: 50 push %eax
12195e: 68 28 b6 14 00 push $0x14b628
121963: 68 f6 ef 14 00 push $0x14eff6
121968: e8 1b f2 00 00 call 130b88 <fopen>
12196d: 89 c3 mov %eax,%ebx
12196f: 83 c4 10 add $0x10,%esp
121972: 85 c0 test %eax,%eax
121974: 74 18 je 12198e <init_etc_passwd_group+0x7a><== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
121976: 50 push %eax
121977: 50 push %eax
121978: 53 push %ebx
121979: 68 02 f0 14 00 push $0x14f002
12197e: e8 75 f3 00 00 call 130cf8 <fputs>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
121983: 89 1c 24 mov %ebx,(%esp)
121986: e8 85 e9 00 00 call 130310 <fclose>
12198b: 83 c4 10 add $0x10,%esp
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
12198e: 53 push %ebx
12198f: 53 push %ebx
121990: 68 2b b6 14 00 push $0x14b62b
121995: 68 69 f0 14 00 push $0x14f069
12199a: e8 e9 f1 00 00 call 130b88 <fopen>
12199f: 83 c4 10 add $0x10,%esp
1219a2: 85 c0 test %eax,%eax
1219a4: 74 06 je 1219ac <init_etc_passwd_group+0x98>
fclose(fp);
1219a6: 83 ec 0c sub $0xc,%esp
1219a9: 50 push %eax
1219aa: eb 2a jmp 1219d6 <init_etc_passwd_group+0xc2>
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
1219ac: 51 push %ecx
1219ad: 51 push %ecx
1219ae: 68 28 b6 14 00 push $0x14b628
1219b3: 68 69 f0 14 00 push $0x14f069
1219b8: e8 cb f1 00 00 call 130b88 <fopen>
1219bd: 89 c3 mov %eax,%ebx
1219bf: 83 c4 10 add $0x10,%esp
1219c2: 85 c0 test %eax,%eax
1219c4: 74 18 je 1219de <init_etc_passwd_group+0xca><== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
1219c6: 52 push %edx
1219c7: 52 push %edx
1219c8: 50 push %eax
1219c9: 68 74 f0 14 00 push $0x14f074
1219ce: e8 25 f3 00 00 call 130cf8 <fputs>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
1219d3: 89 1c 24 mov %ebx,(%esp)
1219d6: e8 35 e9 00 00 call 130310 <fclose>
1219db: 83 c4 10 add $0x10,%esp
}
}
1219de: 8b 5d fc mov -0x4(%ebp),%ebx
1219e1: c9 leave
1219e2: c3 ret
00108c6f <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
108c6f: 55 push %ebp
108c70: 89 e5 mov %esp,%ebp
108c72: 53 push %ebx
108c73: 83 ec 14 sub $0x14,%esp
108c76: 89 d3 mov %edx,%ebx
108c78: 88 c1 mov %al,%cl
if (tty->termios.c_iflag & ISTRIP)
108c7a: 8b 42 30 mov 0x30(%edx),%eax
108c7d: a8 20 test $0x20,%al
108c7f: 74 03 je 108c84 <iproc+0x15> <== ALWAYS TAKEN
c &= 0x7f;
108c81: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
108c84: f6 c4 02 test $0x2,%ah
108c87: 74 17 je 108ca0 <iproc+0x31>
c = tolower (c);
108c89: 0f b6 c9 movzbl %cl,%ecx
108c8c: 8b 15 44 a2 12 00 mov 0x12a244,%edx
108c92: 8a 54 0a 01 mov 0x1(%edx,%ecx,1),%dl
108c96: 83 e2 03 and $0x3,%edx
108c99: fe ca dec %dl
108c9b: 75 03 jne 108ca0 <iproc+0x31>
108c9d: 83 c1 20 add $0x20,%ecx
if (c == '\r') {
108ca0: 80 f9 0d cmp $0xd,%cl
108ca3: 75 12 jne 108cb7 <iproc+0x48>
if (tty->termios.c_iflag & IGNCR)
108ca5: a8 80 test $0x80,%al
108ca7: 74 05 je 108cae <iproc+0x3f> <== ALWAYS TAKEN
108ca9: e9 20 01 00 00 jmp 108dce <iproc+0x15f> <== NOT EXECUTED
return 0;
if (tty->termios.c_iflag & ICRNL)
108cae: f6 c4 01 test $0x1,%ah
108cb1: 74 19 je 108ccc <iproc+0x5d> <== NEVER TAKEN
c = '\n';
108cb3: b1 0a mov $0xa,%cl
108cb5: eb 15 jmp 108ccc <iproc+0x5d>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
108cb7: 80 f9 0a cmp $0xa,%cl
108cba: 75 08 jne 108cc4 <iproc+0x55>
108cbc: a8 40 test $0x40,%al
108cbe: 74 0c je 108ccc <iproc+0x5d> <== ALWAYS TAKEN
c = '\r';
108cc0: b1 0d mov $0xd,%cl <== NOT EXECUTED
108cc2: eb 08 jmp 108ccc <iproc+0x5d> <== NOT EXECUTED
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
108cc4: 84 c9 test %cl,%cl
108cc6: 0f 84 d4 00 00 00 je 108da0 <iproc+0x131> <== NEVER TAKEN
108ccc: 8b 43 3c mov 0x3c(%ebx),%eax
108ccf: a8 02 test $0x2,%al
108cd1: 0f 84 c9 00 00 00 je 108da0 <iproc+0x131>
if (c == tty->termios.c_cc[VERASE]) {
108cd7: 3a 4b 43 cmp 0x43(%ebx),%cl
108cda: 75 0d jne 108ce9 <iproc+0x7a>
108cdc: 31 d2 xor %edx,%edx
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
108cde: 83 7b 20 00 cmpl $0x0,0x20(%ebx)
108ce2: 75 59 jne 108d3d <iproc+0xce>
108ce4: e9 e5 00 00 00 jmp 108dce <iproc+0x15f>
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
108ce9: 3a 4b 44 cmp 0x44(%ebx),%cl
108cec: 75 5b jne 108d49 <iproc+0xda>
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
108cee: 83 7b 20 00 cmpl $0x0,0x20(%ebx)
108cf2: 0f 84 d6 00 00 00 je 108dce <iproc+0x15f> <== NEVER TAKEN
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
108cf8: a8 08 test $0x8,%al
108cfa: 75 0c jne 108d08 <iproc+0x99> <== ALWAYS TAKEN
tty->ccount = 0;
108cfc: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
108d03: e9 c6 00 00 00 jmp 108dce <iproc+0x15f> <== NOT EXECUTED
108d08: ba 01 00 00 00 mov $0x1,%edx
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
108d0d: a8 10 test $0x10,%al
108d0f: 75 2c jne 108d3d <iproc+0xce> <== ALWAYS TAKEN
tty->ccount = 0;
108d11: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
108d18: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
108d1b: 89 da mov %ebx,%edx <== NOT EXECUTED
108d1d: e8 c6 fd ff ff call 108ae8 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
108d22: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED
108d26: 0f 84 a2 00 00 00 je 108dce <iproc+0x15f> <== NOT EXECUTED
echo ('\n', tty);
108d2c: 89 da mov %ebx,%edx <== NOT EXECUTED
108d2e: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
108d33: e8 b0 fd ff ff call 108ae8 <echo> <== NOT EXECUTED
108d38: e9 91 00 00 00 jmp 108dce <iproc+0x15f> <== NOT EXECUTED
108d3d: 89 d8 mov %ebx,%eax
108d3f: e8 fc fd ff ff call 108b40 <erase.part.2>
108d44: e9 85 00 00 00 jmp 108dce <iproc+0x15f>
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
108d49: 3a 4b 45 cmp 0x45(%ebx),%cl
108d4c: 0f 84 80 00 00 00 je 108dd2 <iproc+0x163> <== NEVER TAKEN
return 1;
} else if (c == '\n') {
108d52: 80 f9 0a cmp $0xa,%cl
108d55: 75 1c jne 108d73 <iproc+0x104>
if (tty->termios.c_lflag & (ECHO | ECHONL))
108d57: a8 48 test $0x48,%al
108d59: 74 0c je 108d67 <iproc+0xf8> <== NEVER TAKEN
echo (c, tty);
108d5b: 89 da mov %ebx,%edx
108d5d: b8 0a 00 00 00 mov $0xa,%eax
108d62: e8 81 fd ff ff call 108ae8 <echo>
tty->cbuf[tty->ccount++] = c;
108d67: 8b 43 20 mov 0x20(%ebx),%eax
108d6a: 8b 53 1c mov 0x1c(%ebx),%edx
108d6d: c6 04 02 0a movb $0xa,(%edx,%eax,1)
108d71: eb 27 jmp 108d9a <iproc+0x12b>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
108d73: 3a 4b 4c cmp 0x4c(%ebx),%cl
108d76: 74 05 je 108d7d <iproc+0x10e> <== NEVER TAKEN
108d78: 3a 4b 51 cmp 0x51(%ebx),%cl
108d7b: 75 23 jne 108da0 <iproc+0x131> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
108d7d: a8 08 test $0x8,%al <== NOT EXECUTED
108d7f: 74 10 je 108d91 <iproc+0x122> <== NOT EXECUTED
echo (c, tty);
108d81: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
108d84: 89 da mov %ebx,%edx <== NOT EXECUTED
108d86: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED
108d89: e8 5a fd ff ff call 108ae8 <echo> <== NOT EXECUTED
108d8e: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
108d91: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
108d94: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
108d97: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED
108d9a: 40 inc %eax
108d9b: 89 43 20 mov %eax,0x20(%ebx)
108d9e: eb 32 jmp 108dd2 <iproc+0x163>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
108da0: a1 0c a1 12 00 mov 0x12a10c,%eax
108da5: 48 dec %eax
108da6: 39 43 20 cmp %eax,0x20(%ebx)
108da9: 73 23 jae 108dce <iproc+0x15f> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
108dab: f6 43 3c 08 testb $0x8,0x3c(%ebx)
108daf: 74 10 je 108dc1 <iproc+0x152> <== NEVER TAKEN
echo (c, tty);
108db1: 0f b6 c1 movzbl %cl,%eax
108db4: 89 da mov %ebx,%edx
108db6: 88 4d f4 mov %cl,-0xc(%ebp)
108db9: e8 2a fd ff ff call 108ae8 <echo>
108dbe: 8a 4d f4 mov -0xc(%ebp),%cl
tty->cbuf[tty->ccount++] = c;
108dc1: 8b 43 20 mov 0x20(%ebx),%eax
108dc4: 8b 53 1c mov 0x1c(%ebx),%edx
108dc7: 88 0c 02 mov %cl,(%edx,%eax,1)
108dca: 40 inc %eax
108dcb: 89 43 20 mov %eax,0x20(%ebx)
}
return 0;
108dce: 31 c0 xor %eax,%eax
108dd0: eb 05 jmp 108dd7 <iproc+0x168>
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
108dd2: b8 01 00 00 00 mov $0x1,%eax
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
108dd7: 83 c4 14 add $0x14,%esp
108dda: 5b pop %ebx
108ddb: 5d pop %ebp
108ddc: c3 ret
0011cae8 <kill>:
* These are directly supported (and completely correct) in the posix api.
*/
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
11cae8: 55 push %ebp <== NOT EXECUTED
11cae9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return 0;
}
11caeb: 31 c0 xor %eax,%eax <== NOT EXECUTED
11caed: 5d pop %ebp <== NOT EXECUTED
11caee: c3 ret <== NOT EXECUTED
00106e64 <libc_wrapup>:
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
106e64: 83 3d a8 c4 12 00 03 cmpl $0x3,0x12c4a8
106e6b: 75 58 jne 106ec5 <libc_wrapup+0x61> <== NEVER TAKEN
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
106e6d: 55 push %ebp
106e6e: 89 e5 mov %esp,%ebp
106e70: 53 push %ebx
106e71: 51 push %ecx
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
106e72: 8b 1d a0 f1 11 00 mov 0x11f1a0,%ebx
106e78: 39 1d 60 a2 12 00 cmp %ebx,0x12a260
106e7e: 74 12 je 106e92 <libc_wrapup+0x2e>
_wrapup_reent(_global_impure_ptr);
106e80: 83 ec 0c sub $0xc,%esp
106e83: 53 push %ebx
106e84: e8 d7 9d 00 00 call 110c60 <_wrapup_reent>
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
106e89: 89 1d 60 a2 12 00 mov %ebx,0x12a260
106e8f: 83 c4 10 add $0x10,%esp
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
106e92: 83 ec 0c sub $0xc,%esp
106e95: a1 60 a2 12 00 mov 0x12a260,%eax
106e9a: ff 70 04 pushl 0x4(%eax)
106e9d: e8 86 94 00 00 call 110328 <fclose>
fclose (stdout);
106ea2: 58 pop %eax
106ea3: a1 60 a2 12 00 mov 0x12a260,%eax
106ea8: ff 70 08 pushl 0x8(%eax)
106eab: e8 78 94 00 00 call 110328 <fclose>
fclose (stderr);
106eb0: 5a pop %edx
106eb1: a1 60 a2 12 00 mov 0x12a260,%eax
106eb6: ff 70 0c pushl 0xc(%eax)
106eb9: e8 6a 94 00 00 call 110328 <fclose>
106ebe: 83 c4 10 add $0x10,%esp
}
106ec1: 8b 5d fc mov -0x4(%ebp),%ebx
106ec4: c9 leave
106ec5: c3 ret
001069f4 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
1069f4: 55 push %ebp
1069f5: 89 e5 mov %esp,%ebp
1069f7: 56 push %esi
1069f8: 53 push %ebx
1069f9: 8b 75 08 mov 0x8(%ebp),%esi
void *return_this;
MSBUMP(malloc_calls, 1);
1069fc: ff 05 74 c2 12 00 incl 0x12c274
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
106a02: e8 04 ff ff ff call 10690b <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
106a07: 85 f6 test %esi,%esi
106a09: 75 02 jne 106a0d <malloc+0x19>
106a0b: eb 43 jmp 106a50 <malloc+0x5c>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
106a0d: 83 3d a8 c4 12 00 03 cmpl $0x3,0x12c4a8
106a14: 74 1b je 106a31 <malloc+0x3d>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
106a16: 6a 00 push $0x0
106a18: 6a 00 push $0x0
106a1a: 56 push %esi
106a1b: ff 35 2c 82 12 00 pushl 0x12822c
106a21: e8 42 4a 00 00 call 10b468 <_Protected_heap_Allocate_aligned_with_boundary>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
106a26: 83 c4 10 add $0x10,%esp
106a29: 85 c0 test %eax,%eax
106a2b: 74 0f je 106a3c <malloc+0x48>
106a2d: 89 c3 mov %eax,%ebx
106a2f: eb 33 jmp 106a64 <malloc+0x70>
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
106a31: e8 96 fe ff ff call 1068cc <malloc_is_system_state_OK>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
106a36: 84 c0 test %al,%al
106a38: 75 dc jne 106a16 <malloc+0x22> <== ALWAYS TAKEN
106a3a: eb 14 jmp 106a50 <malloc+0x5c> <== NOT EXECUTED
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
106a3c: a1 84 a7 12 00 mov 0x12a784,%eax
106a41: 85 c0 test %eax,%eax
106a43: 75 0f jne 106a54 <malloc+0x60>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
106a45: e8 c2 97 00 00 call 11020c <__errno>
106a4a: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
106a50: 31 db xor %ebx,%ebx
106a52: eb 35 jmp 106a89 <malloc+0x95>
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
106a54: 83 ec 0c sub $0xc,%esp
106a57: 56 push %esi
106a58: ff 50 04 call *0x4(%eax)
106a5b: 89 c3 mov %eax,%ebx
if ( !return_this ) {
106a5d: 83 c4 10 add $0x10,%esp
106a60: 85 c0 test %eax,%eax
106a62: 74 e1 je 106a45 <malloc+0x51>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
106a64: a1 80 a7 12 00 mov 0x12a780,%eax
106a69: 85 c0 test %eax,%eax
106a6b: 74 09 je 106a76 <malloc+0x82>
(*rtems_malloc_dirty_helper)( return_this, size );
106a6d: 52 push %edx
106a6e: 52 push %edx
106a6f: 56 push %esi
106a70: 53 push %ebx
106a71: ff d0 call *%eax
106a73: 83 c4 10 add $0x10,%esp
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
106a76: a1 88 a7 12 00 mov 0x12a788,%eax
106a7b: 85 c0 test %eax,%eax
106a7d: 74 0a je 106a89 <malloc+0x95>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
106a7f: 83 ec 0c sub $0xc,%esp
106a82: 53 push %ebx
106a83: ff 50 04 call *0x4(%eax)
106a86: 83 c4 10 add $0x10,%esp
return return_this;
}
106a89: 89 d8 mov %ebx,%eax
106a8b: 8d 65 f8 lea -0x8(%ebp),%esp
106a8e: 5b pop %ebx
106a8f: 5e pop %esi
106a90: 5d pop %ebp
106a91: c3 ret
00106a90 <malloc_sbrk_extend_and_allocate>:
}
static void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
106a90: 55 push %ebp
106a91: 89 e5 mov %esp,%ebp
106a93: 56 push %esi
106a94: 53 push %ebx
106a95: 8b 75 08 mov 0x8(%ebp),%esi
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
106a98: 8b 0d e4 c3 12 00 mov 0x12c3e4,%ecx
if ( sbrk_amount == 0 )
106a9e: 85 c9 test %ecx,%ecx
106aa0: 75 02 jne 106aa4 <malloc_sbrk_extend_and_allocate+0x14><== ALWAYS TAKEN
106aa2: eb 4b jmp 106aef <malloc_sbrk_extend_and_allocate+0x5f><== NOT EXECUTED
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
106aa4: 8d 04 0e lea (%esi,%ecx,1),%eax
106aa7: 31 d2 xor %edx,%edx
106aa9: f7 f1 div %ecx
106aab: 89 c3 mov %eax,%ebx
106aad: 0f af d9 imul %ecx,%ebx
starting_address = (void *) sbrk(the_size);
106ab0: 83 ec 0c sub $0xc,%esp
106ab3: 53 push %ebx
106ab4: e8 1c 99 ff ff call 1003d5 <sbrk>
if ( starting_address == (void*) -1 )
106ab9: 83 c4 10 add $0x10,%esp
106abc: 83 f8 ff cmp $0xffffffff,%eax
106abf: 74 2e je 106aef <malloc_sbrk_extend_and_allocate+0x5f>
return (void *) 0;
if ( !_Protected_heap_Extend(
106ac1: 52 push %edx
106ac2: 53 push %ebx
106ac3: 50 push %eax
106ac4: ff 35 2c 82 12 00 pushl 0x12822c
106aca: e8 e5 49 00 00 call 10b4b4 <_Protected_heap_Extend>
106acf: 83 c4 10 add $0x10,%esp
106ad2: 84 c0 test %al,%al
106ad4: 75 1d jne 106af3 <malloc_sbrk_extend_and_allocate+0x63>
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
106ad6: 83 ec 0c sub $0xc,%esp
106ad9: f7 db neg %ebx
106adb: 53 push %ebx
106adc: e8 f4 98 ff ff call 1003d5 <sbrk>
errno = ENOMEM;
106ae1: e8 aa 99 00 00 call 110490 <__errno>
106ae6: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
106aec: 83 c4 10 add $0x10,%esp
106aef: 31 c0 xor %eax,%eax
106af1: eb 19 jmp 106b0c <malloc_sbrk_extend_and_allocate+0x7c>
}
MSBUMP(space_available, the_size);
106af3: 01 1d b8 c3 12 00 add %ebx,0x12c3b8
106af9: 6a 00 push $0x0
106afb: 6a 00 push $0x0
106afd: 56 push %esi
106afe: ff 35 2c 82 12 00 pushl 0x12822c
106b04: e8 73 49 00 00 call 10b47c <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
106b09: 83 c4 10 add $0x10,%esp
}
106b0c: 8d 65 f8 lea -0x8(%ebp),%esp
106b0f: 5b pop %ebx
106b10: 5e pop %esi
106b11: 5d pop %ebp
106b12: c3 ret
00106b13 <malloc_sbrk_initialize>:
static void *malloc_sbrk_initialize(
void *starting_address,
size_t length
)
{
106b13: 55 push %ebp
106b14: 89 e5 mov %esp,%ebp
106b16: 83 ec 08 sub $0x8,%esp
106b19: 8b 45 08 mov 0x8(%ebp),%eax
106b1c: 8b 55 0c mov 0xc(%ebp),%edx
uintptr_t old_address;
uintptr_t uaddress;
RTEMS_Malloc_Sbrk_amount = length;
106b1f: 89 15 e4 c3 12 00 mov %edx,0x12c3e4
* If the starting address is 0 then we are to attempt to
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
106b25: 85 c0 test %eax,%eax
106b27: 75 25 jne 106b4e <malloc_sbrk_initialize+0x3b>
uaddress = (uintptr_t)sbrk(length);
106b29: 83 ec 0c sub $0xc,%esp
106b2c: 52 push %edx
106b2d: e8 a3 98 ff ff call 1003d5 <sbrk>
if (uaddress == (uintptr_t) -1) {
106b32: 83 c4 10 add $0x10,%esp
106b35: 83 f8 ff cmp $0xffffffff,%eax
106b38: 75 0a jne 106b44 <malloc_sbrk_initialize+0x31><== NEVER TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
106b3a: 83 ec 0c sub $0xc,%esp
106b3d: 6a 1a push $0x1a
106b3f: e8 f0 38 00 00 call 10a434 <rtems_fatal_error_occurred>
/* DOES NOT RETURN!!! */
}
if (uaddress & (CPU_HEAP_ALIGNMENT-1)) {
106b44: a8 03 test $0x3,%al <== NOT EXECUTED
106b46: 74 06 je 106b4e <malloc_sbrk_initialize+0x3b><== NOT EXECUTED
old_address = uaddress;
uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
106b48: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
106b4b: 83 e0 fc and $0xfffffffc,%eax <== NOT EXECUTED
}
starting_address = (void *)uaddress;
}
return starting_address;
}
106b4e: c9 leave
106b4f: c3 ret
00106bac <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
106bac: 55 push %ebp
106bad: 89 e5 mov %esp,%ebp
106baf: 57 push %edi
106bb0: 56 push %esi
106bb1: 53 push %ebx
106bb2: 83 ec 7c sub $0x7c,%esp
106bb5: 8b 75 10 mov 0x10(%ebp),%esi
int rv = 0;
if (
106bb8: 83 7d 14 01 cmpl $0x1,0x14(%ebp)
106bbc: 0f 87 6e 02 00 00 ja 106e30 <mount+0x284>
options == RTEMS_FILESYSTEM_READ_ONLY
|| options == RTEMS_FILESYSTEM_READ_WRITE
) {
rtems_filesystem_fsmount_me_t fsmount_me_h =
106bc2: 83 ec 0c sub $0xc,%esp
106bc5: 56 push %esi
106bc6: e8 98 6f 00 00 call 10db63 <rtems_filesystem_get_mount_handler>
106bcb: 89 45 84 mov %eax,-0x7c(%ebp)
rtems_filesystem_get_mount_handler( filesystemtype );
if ( fsmount_me_h != NULL ) {
106bce: 83 c4 10 add $0x10,%esp
106bd1: 85 c0 test %eax,%eax
106bd3: 0f 84 57 02 00 00 je 106e30 <mount+0x284>
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
106bd9: 8b 55 0c mov 0xc(%ebp),%edx
106bdc: 89 55 88 mov %edx,-0x78(%ebp)
106bdf: 85 d2 test %edx,%edx
106be1: 75 07 jne 106bea <mount+0x3e>
106be3: c7 45 88 60 e7 11 00 movl $0x11e760,-0x78(%ebp)
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
106bea: 83 cb ff or $0xffffffff,%ebx
106bed: 31 c0 xor %eax,%eax
106bef: 89 d9 mov %ebx,%ecx
106bf1: 89 f7 mov %esi,%edi
106bf3: f2 ae repnz scas %es:(%edi),%al
106bf5: f7 d1 not %ecx
106bf7: 89 4d 94 mov %ecx,-0x6c(%ebp)
106bfa: 89 ca mov %ecx,%edx
106bfc: 4a dec %edx
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
106bfd: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
106c01: 74 0e je 106c11 <mount+0x65>
106c03: 89 d9 mov %ebx,%ecx
106c05: 8b 7d 08 mov 0x8(%ebp),%edi
106c08: f2 ae repnz scas %es:(%edi),%al
106c0a: f7 d1 not %ecx
106c0c: 89 4d 90 mov %ecx,-0x70(%ebp)
106c0f: eb 07 jmp 106c18 <mount+0x6c>
106c11: c7 45 90 00 00 00 00 movl $0x0,-0x70(%ebp)
size_t target_size = strlen( target ) + 1;
106c18: 31 c0 xor %eax,%eax
106c1a: 83 c9 ff or $0xffffffff,%ecx
106c1d: 8b 7d 88 mov -0x78(%ebp),%edi
106c20: f2 ae repnz scas %es:(%edi),%al
106c22: f7 d1 not %ecx
106c24: 89 4d 8c mov %ecx,-0x74(%ebp)
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size
+ sizeof( rtems_filesystem_global_location_t );
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
106c27: 51 push %ecx
106c28: 51 push %ecx
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size
106c29: 8b 4d 90 mov -0x70(%ebp),%ecx
106c2c: 8d 44 0a 65 lea 0x65(%edx,%ecx,1),%eax
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
106c30: 03 45 8c add -0x74(%ebp),%eax
+ filesystemtype_size + source_size + target_size
+ sizeof( rtems_filesystem_global_location_t );
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
106c33: 50 push %eax
106c34: 6a 01 push $0x1
106c36: e8 f1 f8 ff ff call 10652c <calloc>
106c3b: 89 c3 mov %eax,%ebx
if ( mt_entry != NULL ) {
106c3d: 83 c4 10 add $0x10,%esp
106c40: 85 c0 test %eax,%eax
106c42: 0f 84 03 02 00 00 je 106e4b <mount+0x29f> <== NEVER TAKEN
rtems_filesystem_global_location_t *mt_fs_root =
106c48: 8d 50 40 lea 0x40(%eax),%edx
(rtems_filesystem_global_location_t *)
((char *) mt_entry + sizeof( *mt_entry ));
char *str = (char *) mt_fs_root + sizeof( *mt_fs_root );
106c4b: 8d 40 64 lea 0x64(%eax),%eax
memcpy( str, filesystemtype, filesystemtype_size );
106c4e: 89 c7 mov %eax,%edi
106c50: 8b 4d 94 mov -0x6c(%ebp),%ecx
106c53: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
106c55: 89 7d 94 mov %edi,-0x6c(%ebp)
mt_entry->type = str;
106c58: 89 43 34 mov %eax,0x34(%ebx)
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
106c5b: 8b 75 08 mov 0x8(%ebp),%esi
106c5e: 8b 4d 90 mov -0x70(%ebp),%ecx
106c61: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
106c63: 89 f8 mov %edi,%eax
mt_entry->dev = str;
106c65: 8b 7d 94 mov -0x6c(%ebp),%edi
106c68: 89 7b 38 mov %edi,0x38(%ebx)
str += source_size;
memcpy( str, target, target_size );
106c6b: 89 c7 mov %eax,%edi
106c6d: 8b 75 88 mov -0x78(%ebp),%esi
106c70: 8b 4d 8c mov -0x74(%ebp),%ecx
106c73: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
mt_entry->target = str;
106c75: 89 43 30 mov %eax,0x30(%ebx)
str += target_size;
mt_entry->mounted = true;
106c78: c6 43 28 01 movb $0x1,0x28(%ebx)
mt_entry->mt_fs_root = mt_fs_root;
106c7c: 89 53 24 mov %edx,0x24(%ebx)
mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf;
106c7f: c7 43 2c 64 e7 11 00 movl $0x11e764,0x2c(%ebx)
mt_fs_root->location.mt_entry = mt_entry;
106c86: 89 5b 54 mov %ebx,0x54(%ebx)
mt_fs_root->reference_count = 1;
106c89: c7 43 58 01 00 00 00 movl $0x1,0x58(%ebx)
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
_Chain_Initialize( the_chain, starting_address, number_nodes, node_size );
106c90: 6a 24 push $0x24
106c92: 6a 01 push $0x1
106c94: 52 push %edx
rtems_chain_initialize(
106c95: 8d 43 14 lea 0x14(%ebx),%eax
106c98: 50 push %eax
106c99: e8 ba 39 00 00 call 10a658 <_Chain_Initialize>
filesystemtype,
&target_length
);
if ( mt_entry != NULL ) {
mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE;
106c9e: 8a 45 14 mov 0x14(%ebp),%al
106ca1: 88 43 29 mov %al,0x29(%ebx)
106ca4: 80 63 29 01 andb $0x1,0x29(%ebx)
rv = (*fsmount_me_h)( mt_entry, data );
106ca8: 58 pop %eax
106ca9: 5a pop %edx
106caa: ff 75 18 pushl 0x18(%ebp)
106cad: 53 push %ebx
106cae: 8b 55 84 mov -0x7c(%ebp),%edx
106cb1: ff d2 call *%edx
106cb3: 89 c6 mov %eax,%esi
if ( rv == 0 ) {
106cb5: 83 c4 10 add $0x10,%esp
106cb8: 85 c0 test %eax,%eax
106cba: 0f 85 7d 01 00 00 jne 106e3d <mount+0x291>
if ( target != NULL ) {
106cc0: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
106cc4: 0f 84 c4 00 00 00 je 106d8e <mount+0x1e2>
{
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_PERMS_RWX
| RTEMS_FS_FOLLOW_LINK;
rtems_filesystem_location_info_t *currentloc =
106cca: 50 push %eax
106ccb: 6a 1f push $0x1f
106ccd: ff 75 0c pushl 0xc(%ebp)
rtems_filesystem_eval_path_start( &ctx, target, eval_flags );
106cd0: 8d 75 b0 lea -0x50(%ebp),%esi
{
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_PERMS_RWX
| RTEMS_FS_FOLLOW_LINK;
rtems_filesystem_location_info_t *currentloc =
106cd3: 56 push %esi
106cd4: e8 0c 0b 00 00 call 1077e5 <rtems_filesystem_eval_path_start>
static inline bool rtems_filesystem_location_is_root(
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
106cd9: 8b 50 14 mov 0x14(%eax),%edx
return (*mt_entry->ops->are_nodes_equal_h)(
106cdc: 59 pop %ecx
106cdd: 5f pop %edi
106cde: 8b 4a 0c mov 0xc(%edx),%ecx
106ce1: ff 72 24 pushl 0x24(%edx)
106ce4: 50 push %eax
106ce5: ff 51 10 call *0x10(%ecx)
rtems_filesystem_eval_path_start( &ctx, target, eval_flags );
if ( !rtems_filesystem_location_is_root( currentloc ) ) {
106ce8: 83 c4 10 add $0x10,%esp
106ceb: 84 c0 test %al,%al
106ced: 75 73 jne 106d62 <mount+0x1b6>
static inline void rtems_filesystem_eval_path_extract_currentloc(
rtems_filesystem_eval_path_context_t *ctx,
rtems_filesystem_location_info_t *get
)
{
rtems_filesystem_location_copy_and_detach(
106cef: 50 push %eax
106cf0: 50 push %eax
106cf1: 8d 45 c8 lea -0x38(%ebp),%eax
106cf4: 50 push %eax
rtems_filesystem_location_info_t targetloc;
rtems_filesystem_global_location_t *mt_point_node;
rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc );
106cf5: 8d 75 98 lea -0x68(%ebp),%esi
106cf8: 56 push %esi
106cf9: e8 41 0e 00 00 call 107b3f <rtems_filesystem_location_copy_and_detach>
mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc );
106cfe: 89 34 24 mov %esi,(%esp)
106d01: e8 ac 0f 00 00 call 107cb2 <rtems_filesystem_location_transform_to_global>
106d06: 89 c7 mov %eax,%edi
mt_entry->mt_point_node = mt_point_node;
106d08: 89 43 20 mov %eax,0x20(%ebx)
rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry );
106d0b: 8b 40 14 mov 0x14(%eax),%eax
106d0e: 8b 40 0c mov 0xc(%eax),%eax
106d11: 89 1c 24 mov %ebx,(%esp)
106d14: ff 50 30 call *0x30(%eax)
106d17: 89 c6 mov %eax,%esi
if ( rv == 0 ) {
106d19: 83 c4 10 add $0x10,%esp
106d1c: 85 c0 test %eax,%eax
106d1e: 75 34 jne 106d54 <mount+0x1a8>
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
106d20: 50 push %eax
106d21: 6a 00 push $0x0
106d23: 6a 00 push $0x0
106d25: ff 35 60 c2 12 00 pushl 0x12c260
106d2b: e8 60 30 00 00 call 109d90 <rtems_semaphore_obtain>
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
106d30: a1 fc a0 12 00 mov 0x12a0fc,%eax
the_node->next = tail;
106d35: c7 03 f8 a0 12 00 movl $0x12a0f8,(%ebx)
tail->previous = the_node;
106d3b: 89 1d fc a0 12 00 mov %ebx,0x12a0fc
old_last->next = the_node;
106d41: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
106d43: 89 43 04 mov %eax,0x4(%ebx)
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
106d46: 58 pop %eax
106d47: ff 35 60 c2 12 00 pushl 0x12c260
106d4d: e8 2e 31 00 00 call 109e80 <rtems_semaphore_release>
106d52: eb 09 jmp 106d5d <mount+0x1b1>
&rtems_filesystem_mount_table,
&mt_entry->mt_node
);
rtems_filesystem_mt_unlock();
} else {
rtems_filesystem_global_location_release( mt_point_node );
106d54: 83 ec 0c sub $0xc,%esp
106d57: 57 push %edi
106d58: e8 6c 0e 00 00 call 107bc9 <rtems_filesystem_global_location_release>
106d5d: 83 c4 10 add $0x10,%esp
106d60: eb 10 jmp 106d72 <mount+0x1c6>
}
} else {
rtems_filesystem_eval_path_error( &ctx, EBUSY );
106d62: 50 push %eax
106d63: 50 push %eax
106d64: 6a 10 push $0x10
106d66: 56 push %esi
106d67: e8 52 08 00 00 call 1075be <rtems_filesystem_eval_path_error>
106d6c: 83 c4 10 add $0x10,%esp
rv = -1;
106d6f: 83 ce ff or $0xffffffff,%esi
}
rtems_filesystem_eval_path_cleanup( &ctx );
106d72: 83 ec 0c sub $0xc,%esp
106d75: 8d 45 b0 lea -0x50(%ebp),%eax
106d78: 50 push %eax
106d79: e8 23 0b 00 00 call 1078a1 <rtems_filesystem_eval_path_cleanup>
106d7e: 83 c4 10 add $0x10,%esp
rv = register_subordinate_file_system( mt_entry, target );
} else {
rv = register_root_file_system( mt_entry );
}
if ( rv != 0 ) {
106d81: 85 f6 test %esi,%esi
106d83: 0f 84 d0 00 00 00 je 106e59 <mount+0x2ad>
106d89: e9 93 00 00 00 jmp 106e21 <mount+0x275>
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
106d8e: 50 push %eax
106d8f: 6a 00 push $0x0
106d91: 6a 00 push $0x0
106d93: ff 35 60 c2 12 00 pushl 0x12c260
106d99: e8 f2 2f 00 00 call 109d90 <rtems_semaphore_obtain>
)
{
int rv = 0;
rtems_filesystem_mt_lock();
if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) {
106d9e: 83 c4 10 add $0x10,%esp
106da1: 81 3d f4 a0 12 00 f8 cmpl $0x12a0f8,0x12a0f4
106da8: a0 12 00
106dab: 75 18 jne 106dc5 <mount+0x219> <== NEVER TAKEN
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
106dad: a1 fc a0 12 00 mov 0x12a0fc,%eax
the_node->next = tail;
106db2: c7 03 f8 a0 12 00 movl $0x12a0f8,(%ebx)
tail->previous = the_node;
106db8: 89 1d fc a0 12 00 mov %ebx,0x12a0fc
old_last->next = the_node;
106dbe: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
106dc0: 89 43 04 mov %eax,0x4(%ebx)
106dc3: eb 0e jmp 106dd3 <mount+0x227>
rtems_chain_append_unprotected(
&rtems_filesystem_mount_table,
&mt_entry->mt_node
);
} else {
errno = EINVAL;
106dc5: e8 42 94 00 00 call 11020c <__errno> <== NOT EXECUTED
106dca: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
rv = -1;
106dd0: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
106dd3: 83 ec 0c sub $0xc,%esp
106dd6: ff 35 60 c2 12 00 pushl 0x12c260
106ddc: e8 9f 30 00 00 call 109e80 <rtems_semaphore_release>
}
rtems_filesystem_mt_unlock();
if ( rv == 0 ) {
106de1: 83 c4 10 add $0x10,%esp
106de4: 85 f6 test %esi,%esi
106de6: 75 39 jne 106e21 <mount+0x275> <== NEVER TAKEN
rtems_filesystem_global_location_t *new_fs_root =
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
106de8: 83 c3 24 add $0x24,%ebx
rv = -1;
}
rtems_filesystem_mt_unlock();
if ( rv == 0 ) {
rtems_filesystem_global_location_t *new_fs_root =
106deb: 83 ec 0c sub $0xc,%esp
106dee: 53 push %ebx
106def: e8 37 0e 00 00 call 107c2b <rtems_filesystem_global_location_obtain>
106df4: 89 c7 mov %eax,%edi
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_t *new_fs_current =
106df6: 89 1c 24 mov %ebx,(%esp)
106df9: e8 2d 0e 00 00 call 107c2b <rtems_filesystem_global_location_obtain>
106dfe: 89 c3 mov %eax,%ebx
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_assign(
106e00: 58 pop %eax
106e01: 5a pop %edx
106e02: 57 push %edi
106e03: a1 14 a1 12 00 mov 0x12a114,%eax
106e08: 83 c0 04 add $0x4,%eax
106e0b: 50 push %eax
106e0c: e8 fd 0d 00 00 call 107c0e <rtems_filesystem_global_location_assign>
&rtems_filesystem_root,
new_fs_root
);
rtems_filesystem_global_location_assign(
106e11: 59 pop %ecx
106e12: 5f pop %edi
106e13: 53 push %ebx
106e14: ff 35 14 a1 12 00 pushl 0x12a114
106e1a: e8 ef 0d 00 00 call 107c0e <rtems_filesystem_global_location_assign>
106e1f: eb 25 jmp 106e46 <mount+0x29a>
} else {
rv = register_root_file_system( mt_entry );
}
if ( rv != 0 ) {
(*mt_entry->ops->fsunmount_me_h)( mt_entry );
106e21: 83 ec 0c sub $0xc,%esp
106e24: 8b 43 0c mov 0xc(%ebx),%eax
106e27: 53 push %ebx
106e28: ff 50 3c call *0x3c(%eax)
106e2b: 83 c4 10 add $0x10,%esp
106e2e: eb 0d jmp 106e3d <mount+0x291>
} else {
errno = EINVAL;
rv = -1;
}
} else {
errno = EINVAL;
106e30: e8 d7 93 00 00 call 11020c <__errno>
106e35: c7 00 16 00 00 00 movl $0x16,(%eax)
106e3b: eb 19 jmp 106e56 <mount+0x2aa>
(*mt_entry->ops->fsunmount_me_h)( mt_entry );
}
}
if ( rv != 0 ) {
free( mt_entry );
106e3d: 83 ec 0c sub $0xc,%esp
106e40: 53 push %ebx
106e41: e8 ee f8 ff ff call 106734 <free>
106e46: 83 c4 10 add $0x10,%esp
106e49: eb 0e jmp 106e59 <mount+0x2ad>
}
} else {
errno = ENOMEM;
106e4b: e8 bc 93 00 00 call 11020c <__errno> <== NOT EXECUTED
106e50: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
rv = -1;
106e56: 83 ce ff or $0xffffffff,%esi
errno = EINVAL;
rv = -1;
}
return rv;
}
106e59: 89 f0 mov %esi,%eax
106e5b: 8d 65 f4 lea -0xc(%ebp),%esp
106e5e: 5b pop %ebx
106e5f: 5e pop %esi
106e60: 5f pop %edi
106e61: 5d pop %ebp
106e62: c3 ret
0010a5b8 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
10a5b8: 55 push %ebp
10a5b9: 89 e5 mov %esp,%ebp
10a5bb: 57 push %edi
10a5bc: 56 push %esi
10a5bd: 53 push %ebx
10a5be: 83 ec 1c sub $0x1c,%esp
10a5c1: 8b 75 08 mov 0x8(%ebp),%esi
10a5c4: 8b 5d 0c mov 0xc(%ebp),%ebx
10a5c7: 8b 7d 10 mov 0x10(%ebp),%edi
10a5ca: 8b 55 14 mov 0x14(%ebp),%edx
10a5cd: 8b 4d 18 mov 0x18(%ebp),%ecx
int rv = -1;
if (target != NULL) {
10a5d0: 85 db test %ebx,%ebx
10a5d2: 74 3b je 10a60f <mount_and_make_target_path+0x57><== NEVER TAKEN
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
10a5d4: 50 push %eax
10a5d5: 50 push %eax
10a5d6: 68 ff 01 00 00 push $0x1ff
10a5db: 53 push %ebx
10a5dc: 89 55 e4 mov %edx,-0x1c(%ebp)
10a5df: 89 4d e0 mov %ecx,-0x20(%ebp)
10a5e2: e8 d1 0a 00 00 call 10b0b8 <rtems_mkdir>
if (rv == 0) {
10a5e7: 83 c4 10 add $0x10,%esp
10a5ea: 85 c0 test %eax,%eax
10a5ec: 8b 55 e4 mov -0x1c(%ebp),%edx
10a5ef: 8b 4d e0 mov -0x20(%ebp),%ecx
10a5f2: 75 29 jne 10a61d <mount_and_make_target_path+0x65><== NEVER TAKEN
rv = mount(
10a5f4: 89 4d 18 mov %ecx,0x18(%ebp)
10a5f7: 89 55 14 mov %edx,0x14(%ebp)
10a5fa: 89 7d 10 mov %edi,0x10(%ebp)
10a5fd: 89 5d 0c mov %ebx,0xc(%ebp)
10a600: 89 75 08 mov %esi,0x8(%ebp)
} else {
errno = EINVAL;
}
return rv;
}
10a603: 8d 65 f4 lea -0xc(%ebp),%esp
10a606: 5b pop %ebx
10a607: 5e pop %esi
10a608: 5f pop %edi
10a609: 5d pop %ebp
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
10a60a: e9 19 00 00 00 jmp 10a628 <mount>
options,
data
);
}
} else {
errno = EINVAL;
10a60f: e8 48 3e 01 00 call 11e45c <__errno>
10a614: c7 00 16 00 00 00 movl $0x16,(%eax)
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
10a61a: 83 c8 ff or $0xffffffff,%eax
} else {
errno = EINVAL;
}
return rv;
}
10a61d: 8d 65 f4 lea -0xc(%ebp),%esp
10a620: 5b pop %ebx
10a621: 5e pop %esi
10a622: 5f pop %edi
10a623: 5d pop %ebp
10a624: c3 ret
00106f3d <newlib_create_hook>:
*/
bool newlib_create_hook(
rtems_tcb *current_task __attribute__((unused)),
rtems_tcb *creating_task
)
{
106f3d: 55 push %ebp
106f3e: 89 e5 mov %esp,%ebp
106f40: 57 push %edi
106f41: 56 push %esi
106f42: 53 push %ebx
106f43: 83 ec 1c sub $0x1c,%esp
struct _reent *ptr;
if (_Thread_libc_reent == 0)
106f46: 83 3d e4 c3 12 00 00 cmpl $0x0,0x12c3e4
106f4d: 75 14 jne 106f63 <newlib_create_hook+0x26>
{
_REENT = _global_impure_ptr;
106f4f: a1 a0 f1 11 00 mov 0x11f1a0,%eax
106f54: a3 60 a2 12 00 mov %eax,0x12a260
RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent (
struct _reent **libc_reent
)
{
_Thread_libc_reent = libc_reent;
106f59: c7 05 e4 c3 12 00 60 movl $0x12a260,0x12c3e4
106f60: a2 12 00
ptr = (struct _reent *) calloc(1, sizeof(struct _reent));
#else
/* It is OK to allocate from the workspace because these
* hooks run with thread dispatching disabled.
*/
ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent));
106f63: 83 ec 0c sub $0xc,%esp
106f66: 68 24 04 00 00 push $0x424
106f6b: e8 30 5b 00 00 call 10caa0 <_Workspace_Allocate>
106f70: 89 c2 mov %eax,%edx
#endif
if (ptr) {
106f72: 83 c4 10 add $0x10,%esp
106f75: 85 c0 test %eax,%eax
106f77: 0f 84 28 02 00 00 je 1071a5 <newlib_create_hook+0x268><== NEVER TAKEN
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
106f7d: c7 00 00 00 00 00 movl $0x0,(%eax)
106f83: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx
106f89: 89 58 04 mov %ebx,0x4(%eax)
106f8c: 8d 80 54 03 00 00 lea 0x354(%eax),%eax
106f92: 89 42 08 mov %eax,0x8(%edx)
106f95: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax
106f9b: 89 42 0c mov %eax,0xc(%edx)
106f9e: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
106fa5: 8d 72 14 lea 0x14(%edx),%esi
106fa8: 31 c0 xor %eax,%eax
106faa: 89 f7 mov %esi,%edi
106fac: b9 19 00 00 00 mov $0x19,%ecx
106fb1: f3 aa rep stos %al,%es:(%edi)
106fb3: 89 4d e4 mov %ecx,-0x1c(%ebp)
106fb6: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
106fbd: c7 42 34 df de 11 00 movl $0x11dedf,0x34(%edx)
106fc4: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx)
106fcb: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx)
106fd2: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx)
106fd9: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx)
106fe0: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx)
106fe7: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx)
106fee: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
106ff5: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx)
106ffc: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx)
107003: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx)
10700a: c6 42 60 00 movb $0x0,0x60(%edx)
10700e: 8d 72 7c lea 0x7c(%edx),%esi
107011: b1 09 mov $0x9,%cl
107013: 89 f7 mov %esi,%edi
107015: 31 c0 xor %eax,%eax
107017: f3 ab rep stos %eax,%es:(%edi)
107019: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx)
107020: 00 00 00
107023: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx)
10702a: 00 00 00
10702d: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx)
107034: 00 00 00
107037: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx)
10703e: 0e 33
107040: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx)
107047: cd ab
107049: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx)
107050: 34 12
107052: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx)
107059: 6d e6
10705b: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx)
107062: ec de
107064: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx)
10706b: 05 00
10706d: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx)
107074: 0b 00
107076: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx)
10707d: 00 00 00
107080: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx)
107087: 00 00 00
10708a: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx)
107091: 00 00 00
107094: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx)
10709b: 00 00 00
10709e: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx)
1070a5: 00 00 00
1070a8: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx)
1070af: 00 00 00
1070b2: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx)
1070b9: 00 00 00
1070bc: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx)
1070c3: 00 00 00
1070c6: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx)
1070cd: 00 00 00
1070d0: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx)
1070d7: 00 00 00
1070da: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx)
1070e1: 00 00 00
1070e4: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx)
1070eb: 00 00 00
1070ee: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx)
1070f5: 00 00 00
1070f8: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx)
1070ff: 00 00 00
107102: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx)
107109: 00 00 00
10710c: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx)
107113: 00 00 00
107116: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx)
10711d: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx)
107124: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx)
10712b: 00 00 00
10712e: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx)
107135: 00 00 00
107138: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx)
10713f: 00 00 00
107142: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx)
107149: 00 00 00
10714c: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx)
107153: 00 00 00
107156: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx)
10715d: 00 00 00
107160: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx)
107167: 00 00 00
10716a: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx)
107171: 00 00 00
107174: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx)
10717b: 00 00 00
10717e: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx)
107185: 00 00 00
107188: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx)
10718f: 00 00 00
107192: b1 4e mov $0x4e,%cl
107194: 89 df mov %ebx,%edi
107196: f3 ab rep stos %eax,%es:(%edi)
creating_task->libc_reent = ptr;
107198: 8b 45 0c mov 0xc(%ebp),%eax
10719b: 89 90 dc 00 00 00 mov %edx,0xdc(%eax)
return TRUE;
1071a1: b0 01 mov $0x1,%al
1071a3: eb 02 jmp 1071a7 <newlib_create_hook+0x26a>
}
return FALSE;
1071a5: 31 c0 xor %eax,%eax
}
1071a7: 8d 65 f4 lea -0xc(%ebp),%esp
1071aa: 5b pop %ebx
1071ab: 5e pop %esi
1071ac: 5f pop %edi
1071ad: 5d pop %ebp
1071ae: c3 ret
001071af <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
1071af: 55 push %ebp
1071b0: 89 e5 mov %esp,%ebp
1071b2: 56 push %esi
1071b3: 53 push %ebx
1071b4: 8b 75 0c mov 0xc(%ebp),%esi
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
1071b7: 8b 1d 60 a2 12 00 mov 0x12a260,%ebx
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
1071bd: 39 75 08 cmp %esi,0x8(%ebp)
1071c0: 74 06 je 1071c8 <newlib_delete_hook+0x19>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
1071c2: 8b 9e dc 00 00 00 mov 0xdc(%esi),%ebx
}
if (ptr && ptr != _global_impure_ptr) {
1071c8: 85 db test %ebx,%ebx
1071ca: 74 20 je 1071ec <newlib_delete_hook+0x3d><== NEVER TAKEN
1071cc: 3b 1d a0 f1 11 00 cmp 0x11f1a0,%ebx
1071d2: 74 18 je 1071ec <newlib_delete_hook+0x3d>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
1071d4: 50 push %eax
1071d5: 50 push %eax
1071d6: 68 ec 6e 10 00 push $0x106eec
1071db: 53 push %ebx
1071dc: e8 7f 97 00 00 call 110960 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
1071e1: 89 1c 24 mov %ebx,(%esp)
1071e4: e8 d0 58 00 00 call 10cab9 <_Workspace_Free>
1071e9: 83 c4 10 add $0x10,%esp
#endif
}
deleted_task->libc_reent = NULL;
1071ec: c7 86 dc 00 00 00 00 movl $0x0,0xdc(%esi)
1071f3: 00 00 00
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
1071f6: 39 75 08 cmp %esi,0x8(%ebp)
1071f9: 75 0a jne 107205 <newlib_delete_hook+0x56>
_REENT = 0;
1071fb: c7 05 60 a2 12 00 00 movl $0x0,0x12a260
107202: 00 00 00
}
}
107205: 8d 65 f8 lea -0x8(%ebp),%esp
107208: 5b pop %ebx
107209: 5e pop %esi
10720a: 5d pop %ebp
10720b: c3 ret
00106eec <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
106eec: 55 push %ebp
106eed: 89 e5 mov %esp,%ebp
106eef: 53 push %ebx
106ef0: 83 ec 10 sub $0x10,%esp
106ef3: 8b 5d 08 mov 0x8(%ebp),%ebx
switch ( fileno(fp) ) {
106ef6: 53 push %ebx
106ef7: e8 b4 96 00 00 call 1105b0 <fileno>
106efc: 83 c4 10 add $0x10,%esp
106eff: 83 f8 02 cmp $0x2,%eax
106f02: 77 26 ja 106f2a <newlib_free_buffers+0x3e><== NEVER TAKEN
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
106f04: f6 43 0c 80 testb $0x80,0xc(%ebx)
106f08: 74 2c je 106f36 <newlib_free_buffers+0x4a><== ALWAYS TAKEN
free( fp->_bf._base );
106f0a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106f0d: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
106f10: e8 1f f8 ff ff call 106734 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
106f15: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
106f1b: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
106f21: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
106f28: eb 09 jmp 106f33 <newlib_free_buffers+0x47><== NOT EXECUTED
}
break;
default:
fclose(fp);
106f2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106f2d: 53 push %ebx <== NOT EXECUTED
106f2e: e8 f5 93 00 00 call 110328 <fclose> <== NOT EXECUTED
106f33: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
106f36: 31 c0 xor %eax,%eax
106f38: 8b 5d fc mov -0x4(%ebp),%ebx
106f3b: c9 leave
106f3c: c3 ret
00109579 <null_op_fsmount_me>:
static int null_op_fsmount_me(
rtems_filesystem_mount_table_entry_t *mt_entry,
const void *data
)
{
109579: 55 push %ebp <== NOT EXECUTED
10957a: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return -1;
}
10957c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10957f: 5d pop %ebp <== NOT EXECUTED
109580: c3 ret <== NOT EXECUTED
00109589 <null_op_fsunmount_me>:
static void null_op_fsunmount_me(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
109589: 55 push %ebp <== NOT EXECUTED
10958a: 89 e5 mov %esp,%ebp <== NOT EXECUTED
/* Do nothing */
}
10958c: 5d pop %ebp <== NOT EXECUTED
10958d: c3 ret <== NOT EXECUTED
00109551 <null_op_link>:
const rtems_filesystem_location_info_t *parentloc,
const rtems_filesystem_location_info_t *targetloc,
const char *name,
size_t namelen
)
{
109551: 55 push %ebp <== NOT EXECUTED
109552: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return -1;
}
109554: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
109557: 5d pop %ebp <== NOT EXECUTED
109558: c3 ret <== NOT EXECUTED
00109571 <null_op_mount>:
static int null_op_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
109571: 55 push %ebp <== NOT EXECUTED
109572: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return -1;
}
109574: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
109577: 5d pop %ebp <== NOT EXECUTED
109578: c3 ret <== NOT EXECUTED
0010959e <null_op_readlink>:
static ssize_t null_op_readlink(
const rtems_filesystem_location_info_t *loc,
char *buf,
size_t bufsize
)
{
10959e: 55 push %ebp <== NOT EXECUTED
10959f: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return -1;
}
1095a1: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1095a4: 5d pop %ebp <== NOT EXECUTED
1095a5: c3 ret <== NOT EXECUTED
001095a6 <null_op_rename>:
const rtems_filesystem_location_info_t *oldloc,
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
1095a6: 55 push %ebp <== NOT EXECUTED
1095a7: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return -1;
}
1095a9: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1095ac: 5d pop %ebp <== NOT EXECUTED
1095ad: c3 ret <== NOT EXECUTED
001089d1 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
1089d1: 55 push %ebp
1089d2: 89 e5 mov %esp,%ebp
1089d4: 56 push %esi
1089d5: 53 push %ebx
1089d6: 83 ec 10 sub $0x10,%esp
1089d9: 89 d3 mov %edx,%ebx
1089db: 88 45 f4 mov %al,-0xc(%ebp)
int i;
if (tty->termios.c_oflag & OPOST) {
1089de: 8b 52 34 mov 0x34(%edx),%edx
1089e1: f6 c2 01 test $0x1,%dl
1089e4: 0f 84 e7 00 00 00 je 108ad1 <oproc+0x100> <== NEVER TAKEN
switch (c) {
1089ea: 3c 09 cmp $0x9,%al
1089ec: 74 75 je 108a63 <oproc+0x92>
1089ee: 77 0d ja 1089fd <oproc+0x2c> <== ALWAYS TAKEN
1089f0: 3c 08 cmp $0x8,%al <== NOT EXECUTED
1089f2: 0f 85 a5 00 00 00 jne 108a9d <oproc+0xcc> <== NOT EXECUTED
1089f8: e9 93 00 00 00 jmp 108a90 <oproc+0xbf> <== NOT EXECUTED
1089fd: 3c 0a cmp $0xa,%al
1089ff: 74 0a je 108a0b <oproc+0x3a>
108a01: 3c 0d cmp $0xd,%al
108a03: 0f 85 94 00 00 00 jne 108a9d <oproc+0xcc> <== ALWAYS TAKEN
108a09: eb 32 jmp 108a3d <oproc+0x6c> <== NOT EXECUTED
case '\n':
if (tty->termios.c_oflag & ONLRET)
108a0b: f6 c2 20 test $0x20,%dl
108a0e: 74 07 je 108a17 <oproc+0x46> <== ALWAYS TAKEN
tty->column = 0;
108a10: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
108a17: 80 e2 04 and $0x4,%dl
108a1a: 0f 84 b1 00 00 00 je 108ad1 <oproc+0x100> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
108a20: 51 push %ecx
108a21: 53 push %ebx
108a22: 6a 01 push $0x1
108a24: 68 14 e9 11 00 push $0x11e914
108a29: e8 97 fe ff ff call 1088c5 <rtems_termios_puts>
tty->column = 0;
108a2e: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx)
108a35: 83 c4 10 add $0x10,%esp
108a38: e9 94 00 00 00 jmp 108ad1 <oproc+0x100>
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
108a3d: f6 c2 10 test $0x10,%dl <== NOT EXECUTED
108a40: 74 0a je 108a4c <oproc+0x7b> <== NOT EXECUTED
108a42: 83 7b 28 00 cmpl $0x0,0x28(%ebx) <== NOT EXECUTED
108a46: 0f 84 95 00 00 00 je 108ae1 <oproc+0x110> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
108a4c: f6 c2 08 test $0x8,%dl <== NOT EXECUTED
108a4f: 74 09 je 108a5a <oproc+0x89> <== NOT EXECUTED
c = '\n';
108a51: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
108a55: 80 e2 20 and $0x20,%dl <== NOT EXECUTED
108a58: 74 77 je 108ad1 <oproc+0x100> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
108a5a: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
break;
108a61: eb 6e jmp 108ad1 <oproc+0x100> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
108a63: 8b 4b 28 mov 0x28(%ebx),%ecx
108a66: 89 ce mov %ecx,%esi
108a68: 83 e6 07 and $0x7,%esi
108a6b: b8 08 00 00 00 mov $0x8,%eax
108a70: 29 f0 sub %esi,%eax
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
108a72: 81 e2 00 18 00 00 and $0x1800,%edx
108a78: 81 fa 00 18 00 00 cmp $0x1800,%edx
108a7e: 8d 14 01 lea (%ecx,%eax,1),%edx
tty->column += i;
108a81: 89 53 28 mov %edx,0x28(%ebx)
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
108a84: 75 4b jne 108ad1 <oproc+0x100> <== NEVER TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
108a86: 52 push %edx
108a87: 53 push %ebx
108a88: 50 push %eax
108a89: 68 74 dd 11 00 push $0x11dd74
108a8e: eb 49 jmp 108ad9 <oproc+0x108>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
108a90: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
108a93: 85 c0 test %eax,%eax <== NOT EXECUTED
108a95: 7e 3a jle 108ad1 <oproc+0x100> <== NOT EXECUTED
tty->column--;
108a97: 48 dec %eax <== NOT EXECUTED
108a98: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
108a9b: eb 34 jmp 108ad1 <oproc+0x100> <== NOT EXECUTED
break;
default:
if (tty->termios.c_oflag & OLCUC)
108a9d: 80 e2 02 and $0x2,%dl
108aa0: 74 1b je 108abd <oproc+0xec> <== ALWAYS TAKEN
c = toupper(c);
108aa2: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
108aa5: 8b 15 44 a2 12 00 mov 0x12a244,%edx <== NOT EXECUTED
108aab: 8a 54 02 01 mov 0x1(%edx,%eax,1),%dl <== NOT EXECUTED
108aaf: 83 e2 03 and $0x3,%edx <== NOT EXECUTED
108ab2: 80 fa 02 cmp $0x2,%dl <== NOT EXECUTED
108ab5: 75 03 jne 108aba <oproc+0xe9> <== NOT EXECUTED
108ab7: 83 e8 20 sub $0x20,%eax <== NOT EXECUTED
108aba: 88 45 f4 mov %al,-0xc(%ebp) <== NOT EXECUTED
if (!iscntrl(c))
108abd: 0f b6 45 f4 movzbl -0xc(%ebp),%eax
108ac1: 8b 15 44 a2 12 00 mov 0x12a244,%edx
108ac7: f6 44 02 01 20 testb $0x20,0x1(%edx,%eax,1)
108acc: 75 03 jne 108ad1 <oproc+0x100> <== NEVER TAKEN
tty->column++;
108ace: ff 43 28 incl 0x28(%ebx)
break;
}
}
rtems_termios_puts (&c, 1, tty);
108ad1: 56 push %esi
108ad2: 53 push %ebx
108ad3: 6a 01 push $0x1
108ad5: 8d 45 f4 lea -0xc(%ebp),%eax
108ad8: 50 push %eax
108ad9: e8 e7 fd ff ff call 1088c5 <rtems_termios_puts>
108ade: 83 c4 10 add $0x10,%esp
}
108ae1: 8d 65 f8 lea -0x8(%ebp),%esp
108ae4: 5b pop %ebx
108ae5: 5e pop %esi
108ae6: 5d pop %ebp
108ae7: c3 ret
00105140 <pathconf>:
long pathconf(
const char *path,
int name
)
{
105140: 55 push %ebp
105141: 89 e5 mov %esp,%ebp
105143: 56 push %esi
105144: 53 push %ebx
int status;
int fd;
fd = open( path, O_RDONLY );
105145: 52 push %edx
105146: 52 push %edx
105147: 6a 00 push $0x0
105149: ff 75 08 pushl 0x8(%ebp)
10514c: e8 1f fe ff ff call 104f70 <open>
105151: 89 c3 mov %eax,%ebx
if ( fd == -1 )
105153: 83 c4 10 add $0x10,%esp
105156: 83 f8 ff cmp $0xffffffff,%eax
105159: 74 1a je 105175 <pathconf+0x35> <== ALWAYS TAKEN
return -1;
status = fpathconf( fd, name );
10515b: 50 push %eax <== NOT EXECUTED
10515c: 50 push %eax <== NOT EXECUTED
10515d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
105160: 53 push %ebx <== NOT EXECUTED
105161: e8 86 42 00 00 call 1093ec <fpathconf> <== NOT EXECUTED
105166: 89 c6 mov %eax,%esi <== NOT EXECUTED
(void) close( fd );
105168: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10516b: e8 18 42 00 00 call 109388 <close> <== NOT EXECUTED
return status;
105170: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
105173: eb 03 jmp 105178 <pathconf+0x38> <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_RDONLY );
if ( fd == -1 )
return -1;
105175: 83 ce ff or $0xffffffff,%esi
status = fpathconf( fd, name );
(void) close( fd );
return status;
}
105178: 89 f0 mov %esi,%eax
10517a: 8d 65 f8 lea -0x8(%ebp),%esp
10517d: 5b pop %ebx
10517e: 5e pop %esi
10517f: 5d pop %ebp
105180: c3 ret
0010997c <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
10997c: 55 push %ebp
10997d: 89 e5 mov %esp,%ebp
10997f: 53 push %ebx
109980: 8b 45 0c mov 0xc(%ebp),%eax
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
109983: ff 05 e0 2e 13 00 incl 0x132ee0
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
109989: 8d 58 ff lea -0x1(%eax),%ebx
10998c: 85 c3 test %eax,%ebx
10998e: 75 0c jne 10999c <posix_memalign+0x20> <== NEVER TAKEN
109990: 83 f8 03 cmp $0x3,%eax
109993: 76 07 jbe 10999c <posix_memalign+0x20>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
109995: 5b pop %ebx
109996: 5d pop %ebp
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
109997: e9 70 01 00 00 jmp 109b0c <rtems_memalign>
}
10999c: b8 16 00 00 00 mov $0x16,%eax
1099a1: 5b pop %ebx
1099a2: 5d pop %ebp
1099a3: c3 ret
0011cb8c <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
11cb8c: 55 push %ebp
11cb8d: 89 e5 mov %esp,%ebp
11cb8f: 53 push %ebx
11cb90: 53 push %ebx
11cb91: 8b 45 08 mov 0x8(%ebp),%eax
11cb94: 8b 55 0c mov 0xc(%ebp),%edx
11cb97: 8b 4d 10 mov 0x10(%ebp),%ecx
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11cb9a: 3b 05 70 82 12 00 cmp 0x128270,%eax
11cba0: 72 02 jb 11cba4 <read+0x18>
11cba2: eb 2d jmp 11cbd1 <read+0x45>
iop = rtems_libio_iop( fd );
11cba4: 6b c0 30 imul $0x30,%eax,%eax
11cba7: 03 05 58 c2 12 00 add 0x12c258,%eax
rtems_libio_check_is_open( iop );
11cbad: 8b 58 0c mov 0xc(%eax),%ebx
11cbb0: f6 c7 01 test $0x1,%bh
11cbb3: 75 02 jne 11cbb7 <read+0x2b>
11cbb5: eb 1a jmp 11cbd1 <read+0x45>
rtems_libio_check_buffer( buffer );
11cbb7: 85 d2 test %edx,%edx
11cbb9: 75 0d jne 11cbc8 <read+0x3c> <== ALWAYS TAKEN
11cbbb: e8 4c 36 ff ff call 11020c <__errno> <== NOT EXECUTED
11cbc0: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11cbc6: eb 14 jmp 11cbdc <read+0x50> <== NOT EXECUTED
rtems_libio_check_count( count );
11cbc8: 85 c9 test %ecx,%ecx
11cbca: 74 29 je 11cbf5 <read+0x69>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
11cbcc: 80 e3 02 and $0x2,%bl
11cbcf: 75 10 jne 11cbe1 <read+0x55>
11cbd1: e8 36 36 ff ff call 11020c <__errno>
11cbd6: c7 00 09 00 00 00 movl $0x9,(%eax)
11cbdc: 83 c8 ff or $0xffffffff,%eax
11cbdf: eb 16 jmp 11cbf7 <read+0x6b>
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
11cbe1: 8b 58 20 mov 0x20(%eax),%ebx
11cbe4: 89 4d 10 mov %ecx,0x10(%ebp)
11cbe7: 89 55 0c mov %edx,0xc(%ebp)
11cbea: 89 45 08 mov %eax,0x8(%ebp)
11cbed: 8b 43 08 mov 0x8(%ebx),%eax
}
11cbf0: 59 pop %ecx
11cbf1: 5b pop %ebx
11cbf2: 5d pop %ebp
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
11cbf3: ff e0 jmp *%eax
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
11cbf5: 31 c0 xor %eax,%eax
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
}
11cbf7: 5a pop %edx
11cbf8: 5b pop %ebx
11cbf9: 5d pop %ebp
11cbfa: c3 ret
00107d9c <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
107d9c: 55 push %ebp
107d9d: 89 e5 mov %esp,%ebp
107d9f: 57 push %edi
107da0: 56 push %esi
107da1: 53 push %ebx
107da2: 83 ec 1c sub $0x1c,%esp
107da5: 8b 75 08 mov 0x8(%ebp),%esi
107da8: 8b 5d 0c mov 0xc(%ebp),%ebx
107dab: 8b 45 10 mov 0x10(%ebp),%eax
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
107dae: 3b 35 70 96 12 00 cmp 0x129670,%esi
107db4: 72 02 jb 107db8 <readv+0x1c>
107db6: eb 18 jmp 107dd0 <readv+0x34>
iop = rtems_libio_iop( fd );
107db8: 6b f6 30 imul $0x30,%esi,%esi
107dbb: 03 35 58 d6 12 00 add 0x12d658,%esi
rtems_libio_check_is_open( iop );
107dc1: 8b 56 0c mov 0xc(%esi),%edx
107dc4: f6 c6 01 test $0x1,%dh
107dc7: 75 02 jne 107dcb <readv+0x2f>
107dc9: eb 05 jmp 107dd0 <readv+0x34>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
107dcb: 80 e2 02 and $0x2,%dl
107dce: 75 10 jne 107de0 <readv+0x44> <== ALWAYS TAKEN
107dd0: e8 3f 8d 00 00 call 110b14 <__errno>
107dd5: c7 00 09 00 00 00 movl $0x9,(%eax)
107ddb: e9 8b 00 00 00 jmp 107e6b <readv+0xcf>
/*
* Argument validation on IO vector
*/
if ( !iov )
107de0: 85 db test %ebx,%ebx
107de2: 75 02 jne 107de6 <readv+0x4a>
107de4: eb 36 jmp 107e1c <readv+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
107de6: 85 c0 test %eax,%eax
107de8: 7f 02 jg 107dec <readv+0x50>
107dea: eb 30 jmp 107e1c <readv+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
107dec: 3d 00 04 00 00 cmp $0x400,%eax
107df1: 7e 02 jle 107df5 <readv+0x59> <== ALWAYS TAKEN
107df3: eb 27 jmp 107e1c <readv+0x80> <== NOT EXECUTED
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
107df5: 8d 04 c3 lea (%ebx,%eax,8),%eax
107df8: 89 45 e0 mov %eax,-0x20(%ebp)
107dfb: 89 d8 mov %ebx,%eax
107dfd: c6 45 df 01 movb $0x1,-0x21(%ebp)
107e01: 31 d2 xor %edx,%edx
107e03: eb 03 jmp 107e08 <readv+0x6c>
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
107e05: 8b 55 e4 mov -0x1c(%ebp),%edx
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
107e08: 83 38 00 cmpl $0x0,(%eax)
107e0b: 75 02 jne 107e0f <readv+0x73>
107e0d: eb 0d jmp 107e1c <readv+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
107e0f: 8b 78 04 mov 0x4(%eax),%edi
107e12: 8d 0c 17 lea (%edi,%edx,1),%ecx
107e15: 89 4d e4 mov %ecx,-0x1c(%ebp)
if ( total < old )
107e18: 39 d1 cmp %edx,%ecx
107e1a: 7d 0d jge 107e29 <readv+0x8d>
rtems_set_errno_and_return_minus_one( EINVAL );
107e1c: e8 f3 8c 00 00 call 110b14 <__errno>
107e21: c7 00 16 00 00 00 movl $0x16,(%eax)
107e27: eb 42 jmp 107e6b <readv+0xcf>
if ( iov[v].iov_len )
all_zeros = false;
107e29: 85 ff test %edi,%edi
107e2b: 0f 94 c2 sete %dl
107e2e: f7 da neg %edx
107e30: 20 55 df and %dl,-0x21(%ebp)
107e33: 83 c0 08 add $0x8,%eax
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
107e36: 3b 45 e0 cmp -0x20(%ebp),%eax
107e39: 75 ca jne 107e05 <readv+0x69>
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
return 0;
107e3b: 31 ff xor %edi,%edi
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
107e3d: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
107e41: 75 2b jne 107e6e <readv+0xd2>
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
107e43: 50 push %eax
107e44: 8b 46 20 mov 0x20(%esi),%eax
107e47: ff 73 04 pushl 0x4(%ebx)
107e4a: ff 33 pushl (%ebx)
107e4c: 56 push %esi
107e4d: ff 50 08 call *0x8(%eax)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
107e50: 83 c4 10 add $0x10,%esp
107e53: 83 f8 00 cmp $0x0,%eax
107e56: 7c 13 jl 107e6b <readv+0xcf> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
107e58: 74 02 je 107e5c <readv+0xc0> <== NEVER TAKEN
total += bytes;
107e5a: 01 c7 add %eax,%edi
}
if (bytes != iov[ v ].iov_len)
107e5c: 3b 43 04 cmp 0x4(%ebx),%eax
107e5f: 75 0d jne 107e6e <readv+0xd2> <== NEVER TAKEN
107e61: 83 c3 08 add $0x8,%ebx
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
107e64: 3b 5d e0 cmp -0x20(%ebp),%ebx
107e67: 75 da jne 107e43 <readv+0xa7>
107e69: eb 03 jmp 107e6e <readv+0xd2>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
107e6b: 83 cf ff or $0xffffffff,%edi
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
107e6e: 89 f8 mov %edi,%eax
107e70: 8d 65 f4 lea -0xc(%ebp),%esp
107e73: 5b pop %ebx
107e74: 5e pop %esi
107e75: 5f pop %edi
107e76: 5d pop %ebp
107e77: c3 ret
00107454 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
107454: 55 push %ebp
107455: 89 e5 mov %esp,%ebp
107457: 57 push %edi
107458: 56 push %esi
107459: 53 push %ebx
10745a: 83 ec 2c sub $0x2c,%esp
10745d: 8b 5d 08 mov 0x8(%ebp),%ebx
107460: 8b 75 0c mov 0xc(%ebp),%esi
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
107463: ff 05 80 c2 12 00 incl 0x12c280
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
107469: 83 3d a8 c4 12 00 03 cmpl $0x3,0x12c4a8
107470: 75 0f jne 107481 <realloc+0x2d>
* This routine returns true if thread dispatch indicates
* that we are in a critical section.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void)
{
if ( _Thread_Dispatch_disable_level == 0 )
107472: a1 6c c3 12 00 mov 0x12c36c,%eax
107477: 85 c0 test %eax,%eax
107479: 0f 84 a0 00 00 00 je 10751f <realloc+0xcb> <== ALWAYS TAKEN
10747f: eb 48 jmp 1074c9 <realloc+0x75> <== NOT EXECUTED
}
/*
* Continue with realloc().
*/
if ( !ptr )
107481: 85 db test %ebx,%ebx
107483: 75 0f jne 107494 <realloc+0x40>
return malloc( size );
107485: 89 75 08 mov %esi,0x8(%ebp)
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
107488: 8d 65 f4 lea -0xc(%ebp),%esp
10748b: 5b pop %ebx
10748c: 5e pop %esi
10748d: 5f pop %edi
10748e: 5d pop %ebp
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
10748f: e9 60 f5 ff ff jmp 1069f4 <malloc>
if ( !size ) {
107494: 85 f6 test %esi,%esi
107496: 75 0e jne 1074a6 <realloc+0x52> <== ALWAYS TAKEN
free( ptr );
107498: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10749b: 53 push %ebx <== NOT EXECUTED
10749c: e8 93 f2 ff ff call 106734 <free> <== NOT EXECUTED
1074a1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1074a4: eb 23 jmp 1074c9 <realloc+0x75> <== NOT EXECUTED
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
1074a6: 52 push %edx
1074a7: 8d 45 e4 lea -0x1c(%ebp),%eax
1074aa: 50 push %eax
1074ab: 53 push %ebx
1074ac: ff 35 2c 82 12 00 pushl 0x12822c
1074b2: e8 1d 40 00 00 call 10b4d4 <_Protected_heap_Get_block_size>
1074b7: 83 c4 10 add $0x10,%esp
1074ba: 84 c0 test %al,%al
1074bc: 75 0f jne 1074cd <realloc+0x79>
errno = EINVAL;
1074be: e8 49 8d 00 00 call 11020c <__errno>
1074c3: c7 00 16 00 00 00 movl $0x16,(%eax)
return (void *) 0;
1074c9: 31 db xor %ebx,%ebx
1074cb: eb 61 jmp 10752e <realloc+0xda>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
1074cd: 50 push %eax
1074ce: 56 push %esi
1074cf: 53 push %ebx
1074d0: ff 35 2c 82 12 00 pushl 0x12822c
1074d6: e8 3d 40 00 00 call 10b518 <_Protected_heap_Resize_block>
1074db: 83 c4 10 add $0x10,%esp
1074de: 84 c0 test %al,%al
1074e0: 75 4c jne 10752e <realloc+0xda>
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
1074e2: 83 ec 0c sub $0xc,%esp
1074e5: 56 push %esi
1074e6: e8 09 f5 ff ff call 1069f4 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
1074eb: ff 0d 74 c2 12 00 decl 0x12c274
if ( !new_area ) {
1074f1: 83 c4 10 add $0x10,%esp
1074f4: 85 c0 test %eax,%eax
1074f6: 74 d1 je 1074c9 <realloc+0x75>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
1074f8: 8b 55 e4 mov -0x1c(%ebp),%edx
1074fb: 89 f1 mov %esi,%ecx
1074fd: 39 d6 cmp %edx,%esi
1074ff: 76 02 jbe 107503 <realloc+0xaf> <== NEVER TAKEN
107501: 89 d1 mov %edx,%ecx
107503: 89 c7 mov %eax,%edi
107505: 89 de mov %ebx,%esi
107507: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
free( ptr );
107509: 83 ec 0c sub $0xc,%esp
10750c: 53 push %ebx
10750d: 89 45 d4 mov %eax,-0x2c(%ebp)
107510: e8 1f f2 ff ff call 106734 <free>
107515: 83 c4 10 add $0x10,%esp
107518: 8b 45 d4 mov -0x2c(%ebp),%eax
10751b: 89 c3 mov %eax,%ebx
10751d: eb 0f jmp 10752e <realloc+0xda>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_in_critical_section())
return (void *) 0;
if (_ISR_Nest_level > 0)
10751f: 83 3d 64 c5 12 00 00 cmpl $0x0,0x12c564
107526: 0f 84 55 ff ff ff je 107481 <realloc+0x2d> <== ALWAYS TAKEN
10752c: eb 9b jmp 1074c9 <realloc+0x75> <== NOT EXECUTED
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
10752e: 89 d8 mov %ebx,%eax
107530: 8d 65 f4 lea -0xc(%ebp),%esp
107533: 5b pop %ebx
107534: 5e pop %esi
107535: 5f pop %edi
107536: 5d pop %ebp
107537: c3 ret
0010a718 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10a718: 55 push %ebp
10a719: 89 e5 mov %esp,%ebp
10a71b: 56 push %esi
10a71c: 53 push %ebx
10a71d: 83 ec 10 sub $0x10,%esp
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
10a720: 8d 5d f4 lea -0xc(%ebp),%ebx
10a723: eb 15 jmp 10a73a <rtems_chain_get_with_wait+0x22>
10a725: 53 push %ebx
10a726: ff 75 10 pushl 0x10(%ebp)
10a729: 6a 00 push $0x0
10a72b: ff 75 0c pushl 0xc(%ebp)
10a72e: e8 99 f5 ff ff call 109ccc <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10a733: 83 c4 10 add $0x10,%esp
10a736: 85 c0 test %eax,%eax
10a738: 75 16 jne 10a750 <rtems_chain_get_with_wait+0x38><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10a73a: 83 ec 0c sub $0xc,%esp
10a73d: ff 75 08 pushl 0x8(%ebp)
10a740: e8 83 04 00 00 call 10abc8 <_Chain_Get>
10a745: 89 c6 mov %eax,%esi
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10a747: 83 c4 10 add $0x10,%esp
10a74a: 85 c0 test %eax,%eax
10a74c: 74 d7 je 10a725 <rtems_chain_get_with_wait+0xd>
10a74e: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10a750: 8b 55 14 mov 0x14(%ebp),%edx
10a753: 89 32 mov %esi,(%edx)
return sc;
}
10a755: 8d 65 f8 lea -0x8(%ebp),%esp
10a758: 5b pop %ebx
10a759: 5e pop %esi
10a75a: 5d pop %ebp
10a75b: c3 ret
0010694c <rtems_cpu_usage_report_with_plugin>:
*/
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10694c: 55 push %ebp
10694d: 89 e5 mov %esp,%ebp
10694f: 57 push %edi
106950: 56 push %esi
106951: 53 push %ebx
106952: 83 ec 4c sub $0x4c,%esp
uint32_t seconds, nanoseconds;
#else
uint32_t total_units = 0;
#endif
if ( !print )
106955: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
106959: 0f 84 d0 01 00 00 je 106b2f <rtems_cpu_usage_report_with_plugin+0x1e3><== NEVER TAKEN
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
10695f: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
106966: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &total );
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
10696d: a1 c8 e9 12 00 mov 0x12e9c8,%eax
106972: 8b 15 cc e9 12 00 mov 0x12e9cc,%edx
106978: 89 45 a8 mov %eax,-0x58(%ebp)
10697b: 89 55 ac mov %edx,-0x54(%ebp)
}
}
}
#endif
(*print)(
10697e: 53 push %ebx
10697f: 53 push %ebx
106980: 68 35 fd 11 00 push $0x11fd35
106985: ff 75 08 pushl 0x8(%ebp)
106988: 8b 55 0c mov 0xc(%ebp),%edx
10698b: ff d2 call *%edx
10698d: 83 c4 10 add $0x10,%esp
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
106990: c7 45 b0 01 00 00 00 movl $0x1,-0x50(%ebp)
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
106997: 8b 55 b0 mov -0x50(%ebp),%edx
10699a: 8b 04 95 24 e7 12 00 mov 0x12e724(,%edx,4),%eax
1069a1: 85 c0 test %eax,%eax
1069a3: 75 0e jne 1069b3 <rtems_cpu_usage_report_with_plugin+0x67>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
1069a5: ff 45 b0 incl -0x50(%ebp)
1069a8: 83 7d b0 04 cmpl $0x4,-0x50(%ebp)
1069ac: 75 e9 jne 106997 <rtems_cpu_usage_report_with_plugin+0x4b>
1069ae: e9 23 01 00 00 jmp 106ad6 <rtems_cpu_usage_report_with_plugin+0x18a>
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
1069b3: 8b 58 04 mov 0x4(%eax),%ebx
if ( information ) {
1069b6: c7 45 b4 01 00 00 00 movl $0x1,-0x4c(%ebp)
1069bd: 85 db test %ebx,%ebx
1069bf: 0f 85 ff 00 00 00 jne 106ac4 <rtems_cpu_usage_report_with_plugin+0x178><== ALWAYS TAKEN
1069c5: eb de jmp 1069a5 <rtems_cpu_usage_report_with_plugin+0x59><== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
1069c7: 8b 43 1c mov 0x1c(%ebx),%eax
1069ca: 8b 55 b4 mov -0x4c(%ebp),%edx
1069cd: 8b 34 90 mov (%eax,%edx,4),%esi
if ( !the_thread )
1069d0: 85 f6 test %esi,%esi
1069d2: 0f 84 e9 00 00 00 je 106ac1 <rtems_cpu_usage_report_with_plugin+0x175><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
1069d8: 51 push %ecx
1069d9: 8d 45 db lea -0x25(%ebp),%eax
1069dc: 50 push %eax
1069dd: 6a 0d push $0xd
1069df: ff 76 08 pushl 0x8(%esi)
1069e2: e8 49 40 00 00 call 10aa30 <rtems_object_get_name>
(*print)(
1069e7: 8d 55 db lea -0x25(%ebp),%edx
1069ea: 52 push %edx
1069eb: ff 76 08 pushl 0x8(%esi)
1069ee: 68 a7 fe 11 00 push $0x11fea7
1069f3: ff 75 08 pushl 0x8(%ebp)
1069f6: 8b 55 0c mov 0xc(%ebp),%edx
1069f9: ff d2 call *%edx
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
1069fb: 8b 86 80 00 00 00 mov 0x80(%esi),%eax
106a01: 8b 96 84 00 00 00 mov 0x84(%esi),%edx
106a07: 89 45 d0 mov %eax,-0x30(%ebp)
106a0a: 89 55 d4 mov %edx,-0x2c(%ebp)
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
106a0d: 83 c4 20 add $0x20,%esp
106a10: a1 88 e9 12 00 mov 0x12e988,%eax
106a15: 8b 56 08 mov 0x8(%esi),%edx
106a18: 39 50 08 cmp %edx,0x8(%eax)
106a1b: 0f 85 fd 00 00 00 jne 106b1e <rtems_cpu_usage_report_with_plugin+0x1d2>
*time_of_context_switch = _Thread_Time_of_last_context_switch;
106a21: 8b 35 98 e9 12 00 mov 0x12e998,%esi
106a27: 8b 3d 9c e9 12 00 mov 0x12e99c,%edi
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( is_executing_on_a_core( the_thread, &last ) ) {
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
106a2d: 83 ec 0c sub $0xc,%esp
106a30: 8d 45 c0 lea -0x40(%ebp),%eax
106a33: 50 push %eax
106a34: e8 73 50 00 00 call 10baac <_TOD_Get_uptime>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
106a39: 8b 45 c0 mov -0x40(%ebp),%eax
106a3c: 8b 55 c4 mov -0x3c(%ebp),%edx
106a3f: 29 f0 sub %esi,%eax
106a41: 19 fa sbb %edi,%edx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
106a43: 01 45 d0 add %eax,-0x30(%ebp)
106a46: 11 55 d4 adc %edx,-0x2c(%ebp)
106a49: 83 c4 10 add $0x10,%esp
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
106a4c: 8b 45 c0 mov -0x40(%ebp),%eax
106a4f: 8b 55 c4 mov -0x3c(%ebp),%edx
106a52: 2b 45 a8 sub -0x58(%ebp),%eax
106a55: 1b 55 ac sbb -0x54(%ebp),%edx
106a58: 89 45 c8 mov %eax,-0x38(%ebp)
106a5b: 89 55 cc mov %edx,-0x34(%ebp)
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
_Timestamp_Divide( &ran, &total, &ival, &fval );
106a5e: 8d 45 bc lea -0x44(%ebp),%eax
106a61: 50 push %eax
106a62: 8d 45 b8 lea -0x48(%ebp),%eax
106a65: 50 push %eax
106a66: 8d 45 c8 lea -0x38(%ebp),%eax
106a69: 50 push %eax
106a6a: 8d 45 d0 lea -0x30(%ebp),%eax
106a6d: 50 push %eax
106a6e: e8 49 6e 00 00 call 10d8bc <_Timestamp64_Divide>
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
106a73: 8b 75 d0 mov -0x30(%ebp),%esi
106a76: 8b 7d d4 mov -0x2c(%ebp),%edi
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
106a79: 58 pop %eax
106a7a: 5a pop %edx
106a7b: ff 75 bc pushl -0x44(%ebp)
106a7e: ff 75 b8 pushl -0x48(%ebp)
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
106a81: 6a 00 push $0x0
106a83: 68 00 ca 9a 3b push $0x3b9aca00
106a88: 57 push %edi
106a89: 56 push %esi
106a8a: e8 fd 73 01 00 call 11de8c <__moddi3>
106a8f: 83 c4 10 add $0x10,%esp
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
106a92: b9 e8 03 00 00 mov $0x3e8,%ecx
106a97: 31 d2 xor %edx,%edx
106a99: f7 f1 div %ecx
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
106a9b: 50 push %eax
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
106a9c: 83 ec 0c sub $0xc,%esp
106a9f: 6a 00 push $0x0
106aa1: 68 00 ca 9a 3b push $0x3b9aca00
106aa6: 57 push %edi
106aa7: 56 push %esi
106aa8: e8 8b 72 01 00 call 11dd38 <__divdi3>
106aad: 83 c4 1c add $0x1c,%esp
106ab0: 50 push %eax
106ab1: 68 ba fe 11 00 push $0x11feba
106ab6: ff 75 08 pushl 0x8(%ebp)
106ab9: 8b 55 0c mov 0xc(%ebp),%edx
106abc: ff d2 call *%edx
106abe: 83 c4 20 add $0x20,%esp
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
106ac1: ff 45 b4 incl -0x4c(%ebp)
106ac4: 0f b7 43 10 movzwl 0x10(%ebx),%eax
106ac8: 39 45 b4 cmp %eax,-0x4c(%ebp)
106acb: 0f 86 f6 fe ff ff jbe 1069c7 <rtems_cpu_usage_report_with_plugin+0x7b>
106ad1: e9 cf fe ff ff jmp 1069a5 <rtems_cpu_usage_report_with_plugin+0x59>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
106ad6: 8b 75 c8 mov -0x38(%ebp),%esi
106ad9: 8b 7d cc mov -0x34(%ebp),%edi
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
106adc: 6a 00 push $0x0
106ade: 68 00 ca 9a 3b push $0x3b9aca00
106ae3: 57 push %edi
106ae4: 56 push %esi
106ae5: e8 a2 73 01 00 call 11de8c <__moddi3>
106aea: 83 c4 10 add $0x10,%esp
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
106aed: b9 e8 03 00 00 mov $0x3e8,%ecx
106af2: 31 d2 xor %edx,%edx
106af4: f7 f1 div %ecx
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
106af6: 50 push %eax
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
106af7: 83 ec 0c sub $0xc,%esp
106afa: 6a 00 push $0x0
106afc: 68 00 ca 9a 3b push $0x3b9aca00
106b01: 57 push %edi
106b02: 56 push %esi
106b03: e8 30 72 01 00 call 11dd38 <__divdi3>
106b08: 83 c4 1c add $0x1c,%esp
106b0b: 50 push %eax
106b0c: 68 d2 fe 11 00 push $0x11fed2
106b11: ff 75 08 pushl 0x8(%ebp)
106b14: 8b 55 0c mov 0xc(%ebp),%edx
106b17: ff d2 call *%edx
106b19: 83 c4 10 add $0x10,%esp
106b1c: eb 11 jmp 106b2f <rtems_cpu_usage_report_with_plugin+0x1e3>
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
106b1e: 83 ec 0c sub $0xc,%esp
106b21: 8d 45 c0 lea -0x40(%ebp),%eax
106b24: 50 push %eax
106b25: e8 82 4f 00 00 call 10baac <_TOD_Get_uptime>
106b2a: e9 1a ff ff ff jmp 106a49 <rtems_cpu_usage_report_with_plugin+0xfd>
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
106b2f: 8d 65 f4 lea -0xc(%ebp),%esp
106b32: 5b pop %ebx
106b33: 5e pop %esi
106b34: 5f pop %edi
106b35: 5d pop %ebp
106b36: c3 ret
00110194 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
110194: 55 push %ebp
110195: 89 e5 mov %esp,%ebp
110197: 53 push %ebx
110198: 51 push %ecx
110199: 8b 55 08 mov 0x8(%ebp),%edx
if (sc == RTEMS_SUCCESSFUL) {
return 0;
11019c: 31 c0 xor %eax,%eax
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
11019e: 85 d2 test %edx,%edx
1101a0: 74 1b je 1101bd <rtems_deviceio_errno+0x29>
return 0;
} else {
int eno = EINVAL;
1101a2: bb 16 00 00 00 mov $0x16,%ebx
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
1101a7: 83 fa 1c cmp $0x1c,%edx
1101aa: 77 07 ja 1101b3 <rtems_deviceio_errno+0x1f><== NEVER TAKEN
eno = status_code_to_errno [sc];
1101ac: 8b 1c 95 88 ee 11 00 mov 0x11ee88(,%edx,4),%ebx
}
errno = eno;
1101b3: e8 54 00 00 00 call 11020c <__errno>
1101b8: 89 18 mov %ebx,(%eax)
return -1;
1101ba: 83 c8 ff or $0xffffffff,%eax
}
}
1101bd: 5a pop %edx
1101be: 5b pop %ebx
1101bf: 5d pop %ebp
1101c0: c3 ret
0010dcc4 <rtems_filesystem_check_access>:
int eval_flags,
mode_t node_mode,
uid_t node_uid,
gid_t node_gid
)
{
10dcc4: 55 push %ebp
10dcc5: 89 e5 mov %esp,%ebp
10dcc7: 57 push %edi
10dcc8: 56 push %esi
10dcc9: 53 push %ebx
10dcca: 83 ec 0c sub $0xc,%esp
10dccd: 8b 5d 08 mov 0x8(%ebp),%ebx
10dcd0: 8b 7d 10 mov 0x10(%ebp),%edi
10dcd3: 8b 75 14 mov 0x14(%ebp),%esi
mode_t perm_flags = eval_flags & RTEMS_FS_PERMS_RWX;
10dcd6: 83 e3 07 and $0x7,%ebx
uid_t task_uid = geteuid();
10dcd9: e8 ba 1f 00 00 call 10fc98 <geteuid>
if (task_uid == 0 || task_uid == node_uid) {
10dcde: 66 39 f8 cmp %di,%ax
10dce1: 74 05 je 10dce8 <rtems_filesystem_check_access+0x24>
10dce3: 66 85 c0 test %ax,%ax
10dce6: 75 05 jne 10dced <rtems_filesystem_check_access+0x29>
perm_flags <<= RTEMS_FS_USR_SHIFT;
10dce8: c1 e3 06 shl $0x6,%ebx
10dceb: eb 12 jmp 10dcff <rtems_filesystem_check_access+0x3b>
} else {
gid_t task_gid = getegid();
10dced: e8 96 1f 00 00 call 10fc88 <getegid>
if (task_gid == 0 || task_gid == node_gid) {
10dcf2: 66 39 f0 cmp %si,%ax
10dcf5: 74 05 je 10dcfc <rtems_filesystem_check_access+0x38>
10dcf7: 66 85 c0 test %ax,%ax
10dcfa: 75 03 jne 10dcff <rtems_filesystem_check_access+0x3b><== ALWAYS TAKEN
perm_flags <<= RTEMS_FS_GRP_SHIFT;
10dcfc: c1 e3 03 shl $0x3,%ebx
} else {
perm_flags <<= RTEMS_FS_OTH_SHIFT;
}
}
return (perm_flags & node_mode) == perm_flags;
10dcff: 8b 45 0c mov 0xc(%ebp),%eax
10dd02: 21 d8 and %ebx,%eax
10dd04: 39 d8 cmp %ebx,%eax
10dd06: 0f 94 c0 sete %al
}
10dd09: 83 c4 0c add $0xc,%esp
10dd0c: 5b pop %ebx
10dd0d: 5e pop %esi
10dd0e: 5f pop %edi
10dd0f: 5d pop %ebp
10dd10: c3 ret
00107a95 <rtems_filesystem_do_unmount>:
}
void rtems_filesystem_do_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
107a95: 55 push %ebp
107a96: 89 e5 mov %esp,%ebp
107a98: 53 push %ebx
107a99: 83 ec 08 sub $0x8,%esp
107a9c: 8b 5d 08 mov 0x8(%ebp),%ebx
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
107a9f: 6a 00 push $0x0
107aa1: 6a 00 push $0x0
107aa3: ff 35 60 c2 12 00 pushl 0x12c260
107aa9: e8 e2 22 00 00 call 109d90 <rtems_semaphore_obtain>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
107aae: 8b 13 mov (%ebx),%edx
previous = the_node->previous;
107ab0: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
107ab3: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
107ab6: 89 10 mov %edx,(%eax)
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
107ab8: 58 pop %eax
107ab9: ff 35 60 c2 12 00 pushl 0x12c260
107abf: e8 bc 23 00 00 call 109e80 <rtems_semaphore_release>
rtems_filesystem_mt_lock();
rtems_chain_extract_unprotected(&mt_entry->mt_node);
rtems_filesystem_mt_unlock();
rtems_filesystem_global_location_release(mt_entry->mt_point_node);
107ac4: 58 pop %eax
107ac5: ff 73 20 pushl 0x20(%ebx)
107ac8: e8 fc 00 00 00 call 107bc9 <rtems_filesystem_global_location_release>
(*mt_entry->ops->fsunmount_me_h)(mt_entry);
107acd: 8b 43 0c mov 0xc(%ebx),%eax
107ad0: 89 1c 24 mov %ebx,(%esp)
107ad3: ff 50 3c call *0x3c(%eax)
if (mt_entry->unmount_task != 0) {
107ad6: 8b 43 3c mov 0x3c(%ebx),%eax
107ad9: 83 c4 10 add $0x10,%esp
107adc: 85 c0 test %eax,%eax
107ade: 74 1e je 107afe <rtems_filesystem_do_unmount+0x69><== NEVER TAKEN
rtems_status_code sc =
107ae0: 51 push %ecx
107ae1: 51 push %ecx
107ae2: 6a 02 push $0x2
107ae4: 50 push %eax
107ae5: e8 da 1e 00 00 call 1099c4 <rtems_event_send>
rtems_event_send(mt_entry->unmount_task, RTEMS_FILESYSTEM_UNMOUNT_EVENT);
if (sc != RTEMS_SUCCESSFUL) {
107aea: 83 c4 10 add $0x10,%esp
107aed: 85 c0 test %eax,%eax
107aef: 74 0d je 107afe <rtems_filesystem_do_unmount+0x69><== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
107af1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107af4: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
107af9: e8 b2 28 00 00 call 10a3b0 <rtems_fatal_error_occurred><== NOT EXECUTED
}
}
free(mt_entry);
107afe: 89 5d 08 mov %ebx,0x8(%ebp)
}
107b01: 8b 5d fc mov -0x4(%ebp),%ebx
107b04: c9 leave
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(0xdeadbeef);
}
}
free(mt_entry);
107b05: e9 2a ec ff ff jmp 106734 <free>
0010dd4c <rtems_filesystem_eval_path_generic>:
void rtems_filesystem_eval_path_generic(
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const rtems_filesystem_eval_path_generic_config *config
)
{
10dd4c: 55 push %ebp
10dd4d: 89 e5 mov %esp,%ebp
10dd4f: 57 push %edi
10dd50: 56 push %esi
10dd51: 53 push %ebx
10dd52: 83 ec 1c sub $0x1c,%esp
10dd55: 8b 5d 08 mov 0x8(%ebp),%ebx
10dd58: 8b 75 0c mov 0xc(%ebp),%esi
10dd5b: 8b 7d 10 mov 0x10(%ebp),%edi
rtems_filesystem_eval_path_error(ctx, EINVAL);
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
} else if (rtems_filesystem_is_parent_directory(token, tokenlen)) {
rtems_filesystem_location_info_t *currentloc =
10dd5e: 8d 43 18 lea 0x18(%ebx),%eax
10dd61: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_filesystem_eval_path_context_t *ctx,
const char **token,
size_t *tokenlen
)
{
rtems_filesystem_eval_path_next_token(ctx);
10dd64: 83 ec 0c sub $0xc,%esp
10dd67: 53 push %ebx
10dd68: e8 72 01 00 00 call 10dedf <rtems_filesystem_eval_path_next_token>
*token = ctx->token;
10dd6d: 8b 53 08 mov 0x8(%ebx),%edx
*tokenlen = ctx->tokenlen;
10dd70: 8b 4b 0c mov 0xc(%ebx),%ecx
const char *token;
size_t tokenlen;
rtems_filesystem_eval_path_get_next_token(ctx, &token, &tokenlen);
if (tokenlen > 0) {
10dd73: 83 c4 10 add $0x10,%esp
10dd76: 85 c9 test %ecx,%ecx
10dd78: 0f 84 27 01 00 00 je 10dea5 <rtems_filesystem_eval_path_generic+0x159>
if ((*config->is_directory)(ctx, arg)) {
10dd7e: 50 push %eax
10dd7f: 50 push %eax
10dd80: 56 push %esi
10dd81: 53 push %ebx
10dd82: 89 55 e0 mov %edx,-0x20(%ebp)
10dd85: 89 4d dc mov %ecx,-0x24(%ebp)
10dd88: ff 17 call *(%edi)
10dd8a: 83 c4 10 add $0x10,%esp
10dd8d: 84 c0 test %al,%al
10dd8f: 8b 55 e0 mov -0x20(%ebp),%edx
10dd92: 8b 4d dc mov -0x24(%ebp),%ecx
10dd95: 0f 84 f6 00 00 00 je 10de91 <rtems_filesystem_eval_path_generic+0x145>
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
10dd9b: 31 c0 xor %eax,%eax
10dd9d: 83 f9 01 cmp $0x1,%ecx
10dda0: 75 08 jne 10ddaa <rtems_filesystem_eval_path_generic+0x5e>
10dda2: 31 c0 xor %eax,%eax
10dda4: 80 3a 2e cmpb $0x2e,(%edx)
10dda7: 0f 94 c0 sete %al
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
10ddaa: 85 c0 test %eax,%eax
10ddac: 74 1f je 10ddcd <rtems_filesystem_eval_path_generic+0x81>
if (rtems_filesystem_eval_path_has_path(ctx)) {
10ddae: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10ddb2: 74 05 je 10ddb9 <rtems_filesystem_eval_path_generic+0x6d>
10ddb4: e9 93 00 00 00 jmp 10de4c <rtems_filesystem_eval_path_generic+0x100>
status = (*config->eval_token)(ctx, arg, ".", 1);
} else {
int eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if ((eval_flags & RTEMS_FS_REJECT_TERMINAL_DOT) == 0) {
10ddb9: f6 43 11 01 testb $0x1,0x11(%ebx)
10ddbd: 75 05 jne 10ddc4 <rtems_filesystem_eval_path_generic+0x78>
10ddbf: e9 88 00 00 00 jmp 10de4c <rtems_filesystem_eval_path_generic+0x100>
status = (*config->eval_token)(ctx, arg, ".", 1);
} else {
rtems_filesystem_eval_path_error(ctx, EINVAL);
10ddc4: 50 push %eax
10ddc5: 50 push %eax
10ddc6: 6a 16 push $0x16
10ddc8: e9 c8 00 00 00 jmp 10de95 <rtems_filesystem_eval_path_generic+0x149>
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
10ddcd: 31 c0 xor %eax,%eax
10ddcf: 83 f9 02 cmp $0x2,%ecx
10ddd2: 75 0e jne 10dde2 <rtems_filesystem_eval_path_generic+0x96>
10ddd4: 80 3a 2e cmpb $0x2e,(%edx)
10ddd7: 75 09 jne 10dde2 <rtems_filesystem_eval_path_generic+0x96>
10ddd9: 31 c0 xor %eax,%eax
10dddb: 80 7a 01 2e cmpb $0x2e,0x1(%edx)
10dddf: 0f 94 c0 sete %al
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
} else if (rtems_filesystem_is_parent_directory(token, tokenlen)) {
10dde2: 85 c0 test %eax,%eax
10dde4: 74 78 je 10de5e <rtems_filesystem_eval_path_generic+0x112>
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
10dde6: 8b 53 30 mov 0x30(%ebx),%edx
static bool is_eval_path_root(
const rtems_filesystem_eval_path_context_t *ctx,
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
10dde9: 8b 4b 2c mov 0x2c(%ebx),%ecx
const rtems_filesystem_location_info_t *rootloc = &ctx->rootloc->location;
return mt_entry == rootloc->mt_entry
&& (*mt_entry->ops->are_nodes_equal_h)( loc, rootloc );
10ddec: 31 c0 xor %eax,%eax
10ddee: 3b 4a 14 cmp 0x14(%edx),%ecx
10ddf1: 75 12 jne 10de05 <rtems_filesystem_eval_path_generic+0xb9>
10ddf3: 50 push %eax
10ddf4: 50 push %eax
10ddf5: 8b 41 0c mov 0xc(%ecx),%eax
10ddf8: 52 push %edx
10ddf9: ff 75 e4 pushl -0x1c(%ebp)
10ddfc: ff 50 10 call *0x10(%eax)
10ddff: 0f b6 c0 movzbl %al,%eax
10de02: 83 c4 10 add $0x10,%esp
}
} else if (rtems_filesystem_is_parent_directory(token, tokenlen)) {
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc( ctx );
if (is_eval_path_root(ctx, currentloc)) {
10de05: a8 01 test $0x1,%al
10de07: 74 02 je 10de0b <rtems_filesystem_eval_path_generic+0xbf>
10de09: eb 41 jmp 10de4c <rtems_filesystem_eval_path_generic+0x100>
#include <rtems/libio_.h>
static bool is_fs_root( const rtems_filesystem_location_info_t *loc )
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
10de0b: 8b 43 2c mov 0x2c(%ebx),%eax
const rtems_filesystem_location_info_t *mt_fs_root =
&mt_entry->mt_fs_root->location;
return (*mt_entry->ops->are_nodes_equal_h)( loc, mt_fs_root );
10de0e: 52 push %edx
10de0f: 52 push %edx
10de10: 8b 50 0c mov 0xc(%eax),%edx
10de13: ff 70 24 pushl 0x24(%eax)
10de16: ff 75 e4 pushl -0x1c(%ebp)
10de19: ff 52 10 call *0x10(%edx)
rtems_filesystem_eval_path_get_currentloc( ctx );
if (is_eval_path_root(ctx, currentloc)) {
/* This prevents the escape from a chroot() environment */
status = (*config->eval_token)(ctx, arg, ".", 1);
} else if (is_fs_root(currentloc)) {
10de1c: 83 c4 10 add $0x10,%esp
10de1f: 84 c0 test %al,%al
10de21: 74 32 je 10de55 <rtems_filesystem_eval_path_generic+0x109>
if (currentloc->mt_entry->mt_point_node != NULL) {
10de23: 8b 43 2c mov 0x2c(%ebx),%eax
10de26: 83 78 20 00 cmpl $0x0,0x20(%eax)
10de2a: 74 20 je 10de4c <rtems_filesystem_eval_path_generic+0x100><== NEVER TAKEN
static inline void rtems_filesystem_eval_path_put_back_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
size_t tokenlen = ctx->tokenlen;
10de2c: 8b 53 0c mov 0xc(%ebx),%edx
ctx->path -= tokenlen;
10de2f: 29 13 sub %edx,(%ebx)
ctx->pathlen += tokenlen;
10de31: 01 53 04 add %edx,0x4(%ebx)
ctx->tokenlen = 0;
10de34: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
rtems_filesystem_eval_path_put_back_token(ctx);
rtems_filesystem_eval_path_restart(
10de3b: 51 push %ecx
10de3c: 51 push %ecx
10de3d: 83 c0 20 add $0x20,%eax
10de40: 50 push %eax
10de41: 53 push %ebx
10de42: e8 b0 9a ff ff call 1078f7 <rtems_filesystem_eval_path_restart>
10de47: 83 c4 10 add $0x10,%esp
10de4a: eb 59 jmp 10dea5 <rtems_filesystem_eval_path_generic+0x159>
¤tloc->mt_entry->mt_point_node
);
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
} else {
/* This is the root file system */
status = (*config->eval_token)(ctx, arg, ".", 1);
10de4c: 6a 01 push $0x1
10de4e: 68 6d ee 11 00 push $0x11ee6d
10de53: eb 0b jmp 10de60 <rtems_filesystem_eval_path_generic+0x114>
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
10de55: 6a 02 push $0x2
10de57: 68 6c ee 11 00 push $0x11ee6c
10de5c: eb 02 jmp 10de60 <rtems_filesystem_eval_path_generic+0x114>
}
} else {
status = (*config->eval_token)(ctx, arg, token, tokenlen);
10de5e: 51 push %ecx
10de5f: 52 push %edx
10de60: 56 push %esi
10de61: 53 push %ebx
10de62: ff 57 04 call *0x4(%edi)
10de65: 83 c4 10 add $0x10,%esp
}
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
10de68: 83 f8 02 cmp $0x2,%eax
10de6b: 75 30 jne 10de9d <rtems_filesystem_eval_path_generic+0x151>
if (rtems_filesystem_eval_path_has_path(ctx)) {
10de6d: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10de71: 74 32 je 10dea5 <rtems_filesystem_eval_path_generic+0x159>
int eval_flags;
rtems_filesystem_eval_path_eat_delimiter(ctx);
10de73: 83 ec 0c sub $0xc,%esp
10de76: 53 push %ebx
10de77: e8 34 00 00 00 call 10deb0 <rtems_filesystem_eval_path_eat_delimiter>
eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (
10de7c: 83 c4 10 add $0x10,%esp
10de7f: f6 43 10 80 testb $0x80,0x10(%ebx)
10de83: 74 06 je 10de8b <rtems_filesystem_eval_path_generic+0x13f>
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
|| rtems_filesystem_eval_path_has_path(ctx)
10de85: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10de89: 74 1a je 10dea5 <rtems_filesystem_eval_path_generic+0x159>
) {
rtems_filesystem_eval_path_error(ctx, ENOENT);
10de8b: 52 push %edx
10de8c: 52 push %edx
10de8d: 6a 02 push $0x2
10de8f: eb 04 jmp 10de95 <rtems_filesystem_eval_path_generic+0x149>
}
}
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
10de91: 50 push %eax
10de92: 50 push %eax
10de93: 6a 14 push $0x14
10de95: 53 push %ebx
10de96: e8 23 97 ff ff call 1075be <rtems_filesystem_eval_path_error>
10de9b: eb aa jmp 10de47 <rtems_filesystem_eval_path_generic+0xfb>
)
{
rtems_filesystem_eval_path_generic_status status =
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
while (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE) {
10de9d: 85 c0 test %eax,%eax
10de9f: 0f 84 bf fe ff ff je 10dd64 <rtems_filesystem_eval_path_generic+0x18>
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
10dea5: 8d 65 f4 lea -0xc(%ebp),%esp
10dea8: 5b pop %ebx
10dea9: 5e pop %esi
10deaa: 5f pop %edi
10deab: 5d pop %ebp
10deac: c3 ret
0010795a <rtems_filesystem_eval_path_recursive>:
void rtems_filesystem_eval_path_recursive(
rtems_filesystem_eval_path_context_t *ctx,
const char *path,
size_t pathlen
)
{
10795a: 55 push %ebp
10795b: 89 e5 mov %esp,%ebp
10795d: 57 push %edi
10795e: 56 push %esi
10795f: 53 push %ebx
107960: 83 ec 1c sub $0x1c,%esp
107963: 8b 5d 08 mov 0x8(%ebp),%ebx
107966: 8b 4d 0c mov 0xc(%ebp),%ecx
107969: 8b 55 10 mov 0x10(%ebp),%edx
if (pathlen > 0) {
10796c: 85 d2 test %edx,%edx
10796e: 74 63 je 1079d3 <rtems_filesystem_eval_path_recursive+0x79><== NEVER TAKEN
if (ctx->recursionlevel < RTEMS_FILESYSTEM_SYMLOOP_MAX) {
107970: 83 7b 14 1f cmpl $0x1f,0x14(%ebx)
107974: 7f 54 jg 1079ca <rtems_filesystem_eval_path_recursive+0x70>
const char *saved_path = ctx->path;
107976: 8b 3b mov (%ebx),%edi
size_t saved_pathlen = ctx->pathlen;
107978: 8b 73 04 mov 0x4(%ebx),%esi
if (rtems_filesystem_is_delimiter(path [0])) {
10797b: 8a 01 mov (%ecx),%al
10797d: 3c 5c cmp $0x5c,%al
10797f: 74 04 je 107985 <rtems_filesystem_eval_path_recursive+0x2b><== NEVER TAKEN
107981: 3c 2f cmp $0x2f,%al
107983: 75 1b jne 1079a0 <rtems_filesystem_eval_path_recursive+0x46>
rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc);
107985: 50 push %eax
107986: 50 push %eax
107987: 8d 43 30 lea 0x30(%ebx),%eax
10798a: 50 push %eax
10798b: 53 push %ebx
10798c: 89 55 e0 mov %edx,-0x20(%ebp)
10798f: 89 4d e4 mov %ecx,-0x1c(%ebp)
107992: e8 60 ff ff ff call 1078f7 <rtems_filesystem_eval_path_restart>
107997: 83 c4 10 add $0x10,%esp
10799a: 8b 4d e4 mov -0x1c(%ebp),%ecx
10799d: 8b 55 e0 mov -0x20(%ebp),%edx
}
ctx->path = path;
1079a0: 89 0b mov %ecx,(%ebx)
ctx->pathlen = pathlen;
1079a2: 89 53 04 mov %edx,0x4(%ebx)
++ctx->recursionlevel;
1079a5: ff 43 14 incl 0x14(%ebx)
while (ctx->pathlen > 0) {
1079a8: eb 10 jmp 1079ba <rtems_filesystem_eval_path_recursive+0x60>
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
1079aa: 83 ec 0c sub $0xc,%esp
1079ad: 8b 43 2c mov 0x2c(%ebx),%eax
1079b0: 8b 40 0c mov 0xc(%eax),%eax
1079b3: 53 push %ebx
1079b4: ff 50 08 call *0x8(%eax)
1079b7: 83 c4 10 add $0x10,%esp
ctx->path = path;
ctx->pathlen = pathlen;
++ctx->recursionlevel;
while (ctx->pathlen > 0) {
1079ba: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
1079be: 75 ea jne 1079aa <rtems_filesystem_eval_path_recursive+0x50>
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
}
--ctx->recursionlevel;
1079c0: ff 4b 14 decl 0x14(%ebx)
ctx->path = saved_path;
1079c3: 89 3b mov %edi,(%ebx)
ctx->pathlen = saved_pathlen;
1079c5: 89 73 04 mov %esi,0x4(%ebx)
1079c8: eb 1f jmp 1079e9 <rtems_filesystem_eval_path_recursive+0x8f>
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
1079ca: c7 45 0c 5c 00 00 00 movl $0x5c,0xc(%ebp)
1079d1: eb 07 jmp 1079da <rtems_filesystem_eval_path_recursive+0x80>
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
1079d3: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) <== NOT EXECUTED
1079da: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
1079dd: 8d 65 f4 lea -0xc(%ebp),%esp
1079e0: 5b pop %ebx
1079e1: 5e pop %esi
1079e2: 5f pop %edi
1079e3: 5d pop %ebp
ctx->pathlen = saved_pathlen;
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
1079e4: e9 d5 fb ff ff jmp 1075be <rtems_filesystem_eval_path_error>
}
}
1079e9: 8d 65 f4 lea -0xc(%ebp),%esp
1079ec: 5b pop %ebx
1079ed: 5e pop %esi
1079ee: 5f pop %edi
1079ef: 5d pop %ebp
1079f0: c3 ret
00107805 <rtems_filesystem_eval_path_start_with_parent>:
const char *path,
int eval_flags,
rtems_filesystem_location_info_t *parentloc,
int parent_eval_flags
)
{
107805: 55 push %ebp
107806: 89 e5 mov %esp,%ebp
107808: 57 push %edi
107809: 56 push %esi
10780a: 53 push %ebx
10780b: 83 ec 0c sub $0xc,%esp
10780e: 8b 5d 08 mov 0x8(%ebp),%ebx
107811: 8b 55 0c mov 0xc(%ebp),%edx
size_t pathlen = strlen(path);
107814: 31 c0 xor %eax,%eax
107816: 83 c9 ff or $0xffffffff,%ecx
107819: 89 d7 mov %edx,%edi
10781b: f2 ae repnz scas %es:(%edi),%al
10781d: f7 d1 not %ecx
10781f: 8d 79 ff lea -0x1(%ecx),%edi
107822: 89 f9 mov %edi,%ecx
107824: eb 11 jmp 107837 <rtems_filesystem_eval_path_start_with_parent+0x32>
#include <rtems/libio_.h>
static size_t get_parentpathlen(const char *path, size_t pathlen)
{
while (pathlen > 0) {
size_t i = pathlen - 1;
107826: 8d 71 ff lea -0x1(%ecx),%esi
if (rtems_filesystem_is_delimiter(path [i])) {
107829: 8a 44 0a ff mov -0x1(%edx,%ecx,1),%al
10782d: 3c 5c cmp $0x5c,%al
10782f: 74 60 je 107891 <rtems_filesystem_eval_path_start_with_parent+0x8c><== NEVER TAKEN
107831: 3c 2f cmp $0x2f,%al
107833: 74 5c je 107891 <rtems_filesystem_eval_path_start_with_parent+0x8c>
return pathlen;
}
pathlen = i;
107835: 89 f1 mov %esi,%ecx
#include <rtems/libio_.h>
static size_t get_parentpathlen(const char *path, size_t pathlen)
{
while (pathlen > 0) {
107837: 85 c9 test %ecx,%ecx
107839: 75 eb jne 107826 <rtems_filesystem_eval_path_start_with_parent+0x21>
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
10783b: 85 ff test %edi,%edi
10783d: 74 12 je 107851 <rtems_filesystem_eval_path_start_with_parent+0x4c>
if (parentpathlen == 0) {
parentpath = ".";
parentpathlen = 1;
name = path;
10783f: 89 d6 mov %edx,%esi
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
if (parentpathlen == 0) {
parentpath = ".";
parentpathlen = 1;
107841: b1 01 mov $0x1,%cl
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
if (parentpathlen == 0) {
parentpath = ".";
107843: ba 6d ee 11 00 mov $0x11ee6d,%edx
107848: eb 0d jmp 107857 <rtems_filesystem_eval_path_start_with_parent+0x52>
parentpathlen = 1;
name = path;
namelen = pathlen;
} else {
name = path + parentpathlen;
10784a: 8d 34 0a lea (%edx,%ecx,1),%esi
namelen = pathlen - parentpathlen;
10784d: 29 cf sub %ecx,%edi
10784f: eb 06 jmp 107857 <rtems_filesystem_eval_path_start_with_parent+0x52>
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
size_t namelen = 0;
107851: 31 ff xor %edi,%edi
)
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
107853: 31 f6 xor %esi,%esi
}
pathlen = i;
}
return 0;
107855: 31 c9 xor %ecx,%ecx
ctx,
parentpath,
parentpathlen,
parent_eval_flags,
&rtems_filesystem_root,
&rtems_filesystem_current
107857: a1 14 a1 12 00 mov 0x12a114,%eax
name = path + parentpathlen;
namelen = pathlen - parentpathlen;
}
}
currentloc = eval_path_start(
10785c: 83 ec 04 sub $0x4,%esp
10785f: 50 push %eax
ctx,
parentpath,
parentpathlen,
parent_eval_flags,
&rtems_filesystem_root,
107860: 83 c0 04 add $0x4,%eax
name = path + parentpathlen;
namelen = pathlen - parentpathlen;
}
}
currentloc = eval_path_start(
107863: 50 push %eax
107864: ff 75 18 pushl 0x18(%ebp)
107867: 89 d8 mov %ebx,%eax
107869: e8 79 fe ff ff call 1076e7 <eval_path_start>
parent_eval_flags,
&rtems_filesystem_root,
&rtems_filesystem_current
);
rtems_filesystem_location_clone(parentloc, currentloc);
10786e: 5a pop %edx
10786f: 59 pop %ecx
107870: 50 push %eax
107871: ff 75 14 pushl 0x14(%ebp)
107874: e8 c3 5f 00 00 call 10d83c <rtems_filesystem_location_clone>
ctx->path = name;
107879: 89 33 mov %esi,(%ebx)
ctx->pathlen = namelen;
10787b: 89 7b 04 mov %edi,0x4(%ebx)
ctx->flags = eval_flags;
10787e: 8b 45 10 mov 0x10(%ebp),%eax
107881: 89 43 10 mov %eax,0x10(%ebx)
rtems_filesystem_eval_path_continue(ctx);
107884: 89 1c 24 mov %ebx,(%esp)
107887: e8 ff fd ff ff call 10768b <rtems_filesystem_eval_path_continue>
return &ctx->currentloc;
10788c: 8d 43 18 lea 0x18(%ebx),%eax
10788f: eb 08 jmp 107899 <rtems_filesystem_eval_path_start_with_parent+0x94>
)
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
107891: 31 f6 xor %esi,%esi
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
107893: 85 ff test %edi,%edi
107895: 74 c0 je 107857 <rtems_filesystem_eval_path_start_with_parent+0x52><== NEVER TAKEN
107897: eb b1 jmp 10784a <rtems_filesystem_eval_path_start_with_parent+0x45>
ctx->flags = eval_flags;
rtems_filesystem_eval_path_continue(ctx);
return &ctx->currentloc;
}
107899: 8d 65 f4 lea -0xc(%ebp),%esp
10789c: 5b pop %ebx
10789d: 5e pop %esi
10789e: 5f pop %edi
10789f: 5d pop %ebp
1078a0: c3 ret
0010db63 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
10db63: 55 push %ebp
10db64: 89 e5 mov %esp,%ebp
10db66: 83 ec 18 sub $0x18,%esp
10db69: 8b 45 08 mov 0x8(%ebp),%eax
find_arg fa = {
10db6c: 89 45 f0 mov %eax,-0x10(%ebp)
10db6f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
10db76: 85 c0 test %eax,%eax
10db78: 74 13 je 10db8d <rtems_filesystem_get_mount_handler+0x2a><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
10db7a: 50 push %eax
10db7b: 50 push %eax
10db7c: 8d 45 f0 lea -0x10(%ebp),%eax
10db7f: 50 push %eax
10db80: 68 8c da 10 00 push $0x10da8c
10db85: e8 62 ff ff ff call 10daec <rtems_filesystem_iterate>
10db8a: 83 c4 10 add $0x10,%esp
}
return fa.mount_h;
}
10db8d: 8b 45 f4 mov -0xc(%ebp),%eax
10db90: c9 leave
10db91: c3 ret
001064c8 <rtems_filesystem_initialize>:
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
1064c8: 55 push %ebp
1064c9: 89 e5 mov %esp,%ebp
1064cb: 83 ec 14 sub $0x14,%esp
int rv = 0;
const rtems_filesystem_mount_configuration *root_config =
&rtems_filesystem_root_configuration;
rv = mount(
1064ce: ff 35 94 ce 11 00 pushl 0x11ce94
1064d4: ff 35 90 ce 11 00 pushl 0x11ce90
1064da: ff 35 8c ce 11 00 pushl 0x11ce8c
1064e0: ff 35 88 ce 11 00 pushl 0x11ce88
1064e6: ff 35 84 ce 11 00 pushl 0x11ce84
1064ec: e8 bb 06 00 00 call 106bac <mount>
root_config->target,
root_config->filesystemtype,
root_config->options,
root_config->data
);
if ( rv != 0 )
1064f1: 83 c4 20 add $0x20,%esp
1064f4: 85 c0 test %eax,%eax
1064f6: 74 0a je 106502 <rtems_filesystem_initialize+0x3a><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
1064f8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1064fb: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED
106500: eb 20 jmp 106522 <rtems_filesystem_initialize+0x5a><== NOT EXECUTED
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
rv = mkdir( "/dev", 0777);
106502: 50 push %eax
106503: 50 push %eax
106504: 68 ff 01 00 00 push $0x1ff
106509: 68 ac e2 11 00 push $0x11e2ac
10650e: e8 81 05 00 00 call 106a94 <mkdir>
if ( rv != 0 )
106513: 83 c4 10 add $0x10,%esp
106516: 85 c0 test %eax,%eax
106518: 74 0d je 106527 <rtems_filesystem_initialize+0x5f><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0003 );
10651a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10651d: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED
106522: e8 89 3e 00 00 call 10a3b0 <rtems_fatal_error_occurred><== NOT EXECUTED
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
106527: c9 leave
106528: c3 ret
0010daec <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
10daec: 55 push %ebp
10daed: 89 e5 mov %esp,%ebp
10daef: 57 push %edi
10daf0: 56 push %esi
10daf1: 53 push %ebx
10daf2: 83 ec 1c sub $0x1c,%esp
10daf5: 8b 5d 08 mov 0x8(%ebp),%ebx
10daf8: 8b 75 0c mov 0xc(%ebp),%esi
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
10dafb: 31 c0 xor %eax,%eax
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
10dafd: bf 98 ce 11 00 mov $0x11ce98,%edi
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10db02: eb 0c jmp 10db10 <rtems_filesystem_iterate+0x24>
stop = (*routine)( table_entry, routine_arg );
10db04: 51 push %ecx
10db05: 51 push %ecx
10db06: 56 push %esi
10db07: 57 push %edi
10db08: ff d3 call *%ebx
++table_entry;
10db0a: 83 c7 08 add $0x8,%edi
10db0d: 83 c4 10 add $0x10,%esp
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10db10: 83 3f 00 cmpl $0x0,(%edi)
10db13: 74 06 je 10db1b <rtems_filesystem_iterate+0x2f>
10db15: 84 c0 test %al,%al
10db17: 74 eb je 10db04 <rtems_filesystem_iterate+0x18>
10db19: eb 40 jmp 10db5b <rtems_filesystem_iterate+0x6f>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
10db1b: 84 c0 test %al,%al
10db1d: 75 3c jne 10db5b <rtems_filesystem_iterate+0x6f>
rtems_libio_lock();
10db1f: 88 45 e4 mov %al,-0x1c(%ebp)
10db22: e8 95 ff ff ff call 10dabc <rtems_libio_lock>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10db27: 8b 3d b0 a1 12 00 mov 0x12a1b0,%edi
for (
10db2d: 8a 45 e4 mov -0x1c(%ebp),%al
10db30: eb 0e jmp 10db40 <rtems_filesystem_iterate+0x54>
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
10db32: 52 push %edx
10db33: 52 push %edx
10db34: 56 push %esi
10db35: 8d 47 08 lea 0x8(%edi),%eax
10db38: 50 push %eax
10db39: ff d3 call *%ebx
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
10db3b: 8b 3f mov (%edi),%edi
10db3d: 83 c4 10 add $0x10,%esp
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
10db40: 81 ff b4 a1 12 00 cmp $0x12a1b4,%edi
10db46: 75 0d jne 10db55 <rtems_filesystem_iterate+0x69>
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
}
rtems_libio_unlock();
10db48: 88 45 e4 mov %al,-0x1c(%ebp)
10db4b: e8 86 ff ff ff call 10dad6 <rtems_libio_unlock>
10db50: 8a 45 e4 mov -0x1c(%ebp),%al
10db53: eb 06 jmp 10db5b <rtems_filesystem_iterate+0x6f>
if ( !stop ) {
rtems_libio_lock();
for (
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
10db55: 84 c0 test %al,%al
10db57: 74 d9 je 10db32 <rtems_filesystem_iterate+0x46><== ALWAYS TAKEN
10db59: eb ed jmp 10db48 <rtems_filesystem_iterate+0x5c><== NOT EXECUTED
}
rtems_libio_unlock();
}
return stop;
}
10db5b: 8d 65 f4 lea -0xc(%ebp),%esp
10db5e: 5b pop %ebx
10db5f: 5e pop %esi
10db60: 5f pop %edi
10db61: 5d pop %ebp
10db62: c3 ret
00107b0a <rtems_filesystem_location_remove_from_mt_entry>:
}
void rtems_filesystem_location_remove_from_mt_entry(
rtems_filesystem_location_info_t *loc
)
{
107b0a: 55 push %ebp
107b0b: 89 e5 mov %esp,%ebp
107b0d: 56 push %esi
107b0e: 53 push %ebx
107b0f: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_filesystem_mt_entry_declare_lock_context(lock_context);
bool do_unmount;
rtems_filesystem_mt_entry_lock(lock_context);
107b12: 9c pushf
107b13: fa cli
107b14: 5e pop %esi
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
107b15: 8b 13 mov (%ebx),%edx
previous = the_node->previous;
107b17: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
107b1a: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
107b1d: 89 10 mov %edx,(%eax)
rtems_chain_extract_unprotected(&loc->mt_entry_node);
do_unmount = rtems_filesystem_is_ready_for_unmount(loc->mt_entry);
107b1f: 8b 43 14 mov 0x14(%ebx),%eax
107b22: e8 cd fe ff ff call 1079f4 <rtems_filesystem_is_ready_for_unmount>
rtems_filesystem_mt_entry_unlock(lock_context);
107b27: 56 push %esi
107b28: 9d popf
if (do_unmount) {
107b29: 84 c0 test %al,%al
107b2b: 74 0e je 107b3b <rtems_filesystem_location_remove_from_mt_entry+0x31><== ALWAYS TAKEN
rtems_filesystem_do_unmount(loc->mt_entry);
107b2d: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
107b30: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
}
107b33: 5b pop %ebx <== NOT EXECUTED
107b34: 5e pop %esi <== NOT EXECUTED
107b35: 5d pop %ebp <== NOT EXECUTED
rtems_chain_extract_unprotected(&loc->mt_entry_node);
do_unmount = rtems_filesystem_is_ready_for_unmount(loc->mt_entry);
rtems_filesystem_mt_entry_unlock(lock_context);
if (do_unmount) {
rtems_filesystem_do_unmount(loc->mt_entry);
107b36: e9 5a ff ff ff jmp 107a95 <rtems_filesystem_do_unmount><== NOT EXECUTED
}
}
107b3b: 5b pop %ebx
107b3c: 5e pop %esi
107b3d: 5d pop %ebp
107b3e: c3 ret
00107cb2 <rtems_filesystem_location_transform_to_global>:
}
rtems_filesystem_global_location_t *rtems_filesystem_location_transform_to_global(
rtems_filesystem_location_info_t *loc
)
{
107cb2: 55 push %ebp
107cb3: 89 e5 mov %esp,%ebp
107cb5: 56 push %esi
107cb6: 53 push %ebx
107cb7: 83 ec 1c sub $0x1c,%esp
107cba: 8b 75 08 mov 0x8(%ebp),%esi
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
107cbd: 6a 24 push $0x24
107cbf: e8 30 ed ff ff call 1069f4 <malloc>
107cc4: 89 c3 mov %eax,%ebx
if (global_loc != NULL) {
107cc6: 83 c4 10 add $0x10,%esp
107cc9: 85 c0 test %eax,%eax
107ccb: 74 28 je 107cf5 <rtems_filesystem_location_transform_to_global+0x43><== NEVER TAKEN
global_loc->reference_count = 1;
107ccd: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax)
global_loc->deferred_released_next = NULL;
107cd4: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
global_loc->deferred_released_count = 0;
107cdb: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
rtems_filesystem_location_copy(&global_loc->location, loc);
107ce2: 50 push %eax
107ce3: 50 push %eax
107ce4: 56 push %esi
107ce5: 53 push %ebx
107ce6: e8 46 fd ff ff call 107a31 <rtems_filesystem_location_copy>
rtems_filesystem_location_remove_from_mt_entry(loc);
107ceb: 89 34 24 mov %esi,(%esp)
107cee: e8 17 fe ff ff call 107b0a <rtems_filesystem_location_remove_from_mt_entry>
107cf3: eb 28 jmp 107d1d <rtems_filesystem_location_transform_to_global+0x6b>
} else {
rtems_filesystem_location_free(loc);
107cf5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107cf8: 56 push %esi <== NOT EXECUTED
107cf9: e8 8a 5b 00 00 call 10d888 <rtems_filesystem_location_free><== NOT EXECUTED
);
static inline rtems_filesystem_global_location_t *
rtems_filesystem_global_location_obtain_null(void)
{
rtems_filesystem_global_location_t *global_loc = NULL;
107cfe: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED
return rtems_filesystem_global_location_obtain( &global_loc );
107d05: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
107d08: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
107d0b: e8 1b ff ff ff call 107c2b <rtems_filesystem_global_location_obtain><== NOT EXECUTED
107d10: 89 c3 mov %eax,%ebx <== NOT EXECUTED
global_loc = rtems_filesystem_global_location_obtain_null();
errno = ENOMEM;
107d12: e8 f5 84 00 00 call 11020c <__errno> <== NOT EXECUTED
107d17: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107d1d: 83 c4 10 add $0x10,%esp
}
return global_loc;
}
107d20: 89 d8 mov %ebx,%eax
107d22: 8d 65 f8 lea -0x8(%ebp),%esp
107d25: 5b pop %ebx
107d26: 5e pop %esi
107d27: 5d pop %ebp
107d28: c3 ret
00106db8 <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
106db8: 55 push %ebp
106db9: 89 e5 mov %esp,%ebp
106dbb: 56 push %esi
106dbc: 53 push %ebx
106dbd: 8b 75 0c mov 0xc(%ebp),%esi
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
106dc0: 83 ec 0c sub $0xc,%esp
106dc3: 6a 08 push $0x8
106dc5: e8 82 03 00 00 call 10714c <malloc>
106dca: 89 c3 mov %eax,%ebx
*key = new_key;
106dcc: 8b 45 08 mov 0x8(%ebp),%eax
106dcf: 89 18 mov %ebx,(%eax)
new_key->val = NULL;
106dd1: c7 03 00 00 00 00 movl $0x0,(%ebx)
new_key->dtor = dtor;
106dd7: 89 73 04 mov %esi,0x4(%ebx)
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
106dda: 83 c4 0c add $0xc,%esp
106ddd: 56 push %esi
106dde: 53 push %ebx
106ddf: 6a 00 push $0x0
106de1: e8 3a 3c 00 00 call 10aa20 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
106de6: 83 c4 10 add $0x10,%esp
return 0;
106de9: 31 d2 xor %edx,%edx
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
if ( status == RTEMS_SUCCESSFUL )
106deb: 85 c0 test %eax,%eax
106ded: 74 0f je 106dfe <rtems_gxx_key_create+0x46><== ALWAYS TAKEN
return 0;
free( new_key );
106def: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106df2: 53 push %ebx <== NOT EXECUTED
106df3: e8 5c fe ff ff call 106c54 <free> <== NOT EXECUTED
return -1;
106df8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106dfb: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
}
106dfe: 89 d0 mov %edx,%eax
106e00: 8d 65 f8 lea -0x8(%ebp),%esp
106e03: 5b pop %ebx
106e04: 5e pop %esi
106e05: 5d pop %ebp
106e06: c3 ret
00106e17 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
106e17: 55 push %ebp
106e18: 89 e5 mov %esp,%ebp
106e1a: 53 push %ebx
106e1b: 83 ec 0c sub $0xc,%esp
106e1e: 8b 5d 08 mov 0x8(%ebp),%ebx
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: delete key=%x\n", key );
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
106e21: 53 push %ebx
106e22: 6a 00 push $0x0
106e24: e8 8f 3c 00 00 call 10aab8 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
106e29: 83 c4 10 add $0x10,%esp
106e2c: 85 c0 test %eax,%eax
106e2e: 75 11 jne 106e41 <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
106e30: 85 db test %ebx,%ebx
106e32: 74 0d je 106e41 <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
106e34: 83 ec 0c sub $0xc,%esp
106e37: ff 33 pushl (%ebx)
106e39: e8 16 fe ff ff call 106c54 <free>
106e3e: 83 c4 10 add $0x10,%esp
return 0;
}
key = NULL;
return 0;
}
106e41: 31 c0 xor %eax,%eax
106e43: 8b 5d fc mov -0x4(%ebp),%ebx
106e46: c9 leave
106e47: c3 ret
00106d60 <rtems_gxx_once>:
/* uncomment this if you need to debug this interface */
/*#define DEBUG_GXX_WRAPPERS 1*/
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
106d60: 55 push %ebp
106d61: 89 e5 mov %esp,%ebp
106d63: 57 push %edi
106d64: 56 push %esi
106d65: 53 push %ebx
106d66: 83 ec 1c sub $0x1c,%esp
106d69: 8b 5d 08 mov 0x8(%ebp),%ebx
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
106d6c: 8b 03 mov (%ebx),%eax
106d6e: 85 c0 test %eax,%eax
106d70: 75 3c jne 106dae <rtems_gxx_once+0x4e>
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
106d72: 52 push %edx
106d73: 8d 7d e4 lea -0x1c(%ebp),%edi
106d76: 57 push %edi
106d77: 68 00 01 00 00 push $0x100
106d7c: 68 00 01 00 00 push $0x100
106d81: e8 16 3b 00 00 call 10a89c <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
106d86: 8b 33 mov (%ebx),%esi
106d88: 83 c4 10 add $0x10,%esp
106d8b: 85 f6 test %esi,%esi
106d8d: 75 06 jne 106d95 <rtems_gxx_once+0x35> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
106d8f: c7 03 01 00 00 00 movl $0x1,(%ebx)
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
106d95: 50 push %eax
106d96: 57 push %edi
106d97: 68 00 01 00 00 push $0x100
106d9c: ff 75 e4 pushl -0x1c(%ebp)
106d9f: e8 f8 3a 00 00 call 10a89c <rtems_task_mode>
if ( o == 0 )
106da4: 83 c4 10 add $0x10,%esp
106da7: 85 f6 test %esi,%esi
106da9: 75 03 jne 106dae <rtems_gxx_once+0x4e> <== NEVER TAKEN
(*func)();
106dab: ff 55 0c call *0xc(%ebp)
}
return 0;
}
106dae: 31 c0 xor %eax,%eax
106db0: 8d 65 f4 lea -0xc(%ebp),%esp
106db3: 5b pop %ebx
106db4: 5e pop %esi
106db5: 5f pop %edi
106db6: 5d pop %ebp
106db7: c3 ret
00106ea0 <rtems_gxx_setspecific>:
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
106ea0: 55 push %ebp
106ea1: 89 e5 mov %esp,%ebp
106ea3: 53 push %ebx
106ea4: 83 ec 08 sub $0x8,%esp
106ea7: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
106eaa: ff 73 04 pushl 0x4(%ebx)
106ead: 53 push %ebx
106eae: 6a 00 push $0x0
106eb0: e8 6b 3b 00 00 call 10aa20 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
106eb5: 83 c4 10 add $0x10,%esp
106eb8: 85 c0 test %eax,%eax
106eba: 75 09 jne 106ec5 <rtems_gxx_setspecific+0x25><== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
106ebc: 8b 45 0c mov 0xc(%ebp),%eax
106ebf: 89 03 mov %eax,(%ebx)
return 0;
106ec1: 31 c0 xor %eax,%eax
106ec3: eb 03 jmp 106ec8 <rtems_gxx_setspecific+0x28>
}
return -1;
106ec5: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
106ec8: 8b 5d fc mov -0x4(%ebp),%ebx
106ecb: c9 leave
106ecc: c3 ret
00109ad0 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
109ad0: 55 push %ebp
109ad1: 89 e5 mov %esp,%ebp
109ad3: 83 ec 08 sub $0x8,%esp
if (
109ad6: 83 3d 10 31 13 00 03 cmpl $0x3,0x133110
109add: 74 1e je 109afd <rtems_heap_allocate_aligned_with_boundary+0x2d><== ALWAYS TAKEN
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
109adf: e8 97 f1 ff ff call 108c7b <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
109ae4: ff 75 10 pushl 0x10(%ebp)
109ae7: ff 75 0c pushl 0xc(%ebp)
109aea: ff 75 08 pushl 0x8(%ebp)
109aed: ff 35 d0 e5 12 00 pushl 0x12e5d0
109af3: e8 c8 49 00 00 call 10e4c0 <_Protected_heap_Allocate_aligned_with_boundary>
109af8: 83 c4 10 add $0x10,%esp
109afb: eb 0b jmp 109b08 <rtems_heap_allocate_aligned_with_boundary+0x38>
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
109afd: e8 3a f1 ff ff call 108c3c <malloc_is_system_state_OK>
109b02: 84 c0 test %al,%al
109b04: 75 d9 jne 109adf <rtems_heap_allocate_aligned_with_boundary+0xf>
) {
return NULL;
109b06: 31 c0 xor %eax,%eax
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
109b08: c9 leave
109b09: c3 ret
0010bfdc <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)
{
10bfdc: 55 push %ebp
10bfdd: 89 e5 mov %esp,%ebp
10bfdf: 57 push %edi
10bfe0: 56 push %esi
10bfe1: 53 push %ebx
10bfe2: 83 ec 0c sub $0xc,%esp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10bfe5: bb 01 00 00 00 mov $0x1,%ebx
10bfea: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
10bfee: 74 40 je 10c030 <rtems_iterate_over_all_threads+0x54>
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 ] )
10bff0: 8b 04 9d 24 e7 12 00 mov 0x12e724(,%ebx,4),%eax
10bff7: 85 c0 test %eax,%eax
10bff9: 75 06 jne 10c001 <rtems_iterate_over_all_threads+0x25>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10bffb: 43 inc %ebx
10bffc: 83 fb 04 cmp $0x4,%ebx
10bfff: eb ed jmp 10bfee <rtems_iterate_over_all_threads+0x12>
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10c001: 8b 78 04 mov 0x4(%eax),%edi
if ( !information )
10c004: 85 ff test %edi,%edi
10c006: 74 f3 je 10bffb <rtems_iterate_over_all_threads+0x1f>
10c008: be 01 00 00 00 mov $0x1,%esi
10c00d: eb 17 jmp 10c026 <rtems_iterate_over_all_threads+0x4a>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
10c00f: 8b 57 1c mov 0x1c(%edi),%edx
10c012: 8b 14 b2 mov (%edx,%esi,4),%edx
if ( !the_thread )
10c015: 85 d2 test %edx,%edx
10c017: 74 0c je 10c025 <rtems_iterate_over_all_threads+0x49><== NEVER TAKEN
continue;
(*routine)(the_thread);
10c019: 83 ec 0c sub $0xc,%esp
10c01c: 52 push %edx
10c01d: 8b 45 08 mov 0x8(%ebp),%eax
10c020: ff d0 call *%eax
10c022: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10c025: 46 inc %esi
10c026: 0f b7 57 10 movzwl 0x10(%edi),%edx
10c02a: 39 d6 cmp %edx,%esi
10c02c: 76 e1 jbe 10c00f <rtems_iterate_over_all_threads+0x33>
10c02e: eb cb jmp 10bffb <rtems_iterate_over_all_threads+0x1f>
(*routine)(the_thread);
}
}
}
10c030: 8d 65 f4 lea -0xc(%ebp),%esp
10c033: 5b pop %ebx
10c034: 5e pop %esi
10c035: 5f pop %edi
10c036: 5d pop %ebp
10c037: c3 ret
00106840 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
106840: 55 push %ebp
106841: 89 e5 mov %esp,%ebp
106843: 53 push %ebx
106844: 52 push %edx
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
106845: 8b 1d 70 82 12 00 mov 0x128270,%ebx
10684b: 85 db test %ebx,%ebx
10684d: 74 3e je 10688d <rtems_libio_init+0x4d> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
10684f: 50 push %eax
106850: 50 push %eax
106851: 6a 30 push $0x30
106853: 53 push %ebx
106854: e8 d3 fc ff ff call 10652c <calloc>
106859: a3 58 c2 12 00 mov %eax,0x12c258
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
10685e: 83 c4 10 add $0x10,%esp
106861: 85 c0 test %eax,%eax
106863: 75 07 jne 10686c <rtems_libio_init+0x2c>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
106865: 83 ec 0c sub $0xc,%esp
106868: 6a 1a push $0x1a
10686a: eb 44 jmp 1068b0 <rtems_libio_init+0x70>
iop = rtems_libio_iop_freelist = rtems_libio_iops;
10686c: a3 5c c2 12 00 mov %eax,0x12c25c
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
106871: 89 c1 mov %eax,%ecx
106873: 31 d2 xor %edx,%edx
106875: eb 06 jmp 10687d <rtems_libio_init+0x3d>
iop->data1 = iop + 1;
106877: 83 c1 30 add $0x30,%ecx
10687a: 89 49 fc mov %ecx,-0x4(%ecx)
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
10687d: 42 inc %edx
10687e: 39 da cmp %ebx,%edx
106880: 75 f5 jne 106877 <rtems_libio_init+0x37>
iop->data1 = iop + 1;
iop->data1 = NULL;
106882: 6b d2 30 imul $0x30,%edx,%edx
106885: c7 44 10 fc 00 00 00 movl $0x0,-0x4(%eax,%edx,1)
10688c: 00
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
10688d: 83 ec 0c sub $0xc,%esp
106890: 68 60 c2 12 00 push $0x12c260
106895: 6a 00 push $0x0
106897: 6a 54 push $0x54
106899: 6a 01 push $0x1
10689b: 68 4f 49 42 4c push $0x4c42494f
1068a0: e8 bb 32 00 00 call 109b60 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
1068a5: 83 c4 20 add $0x20,%esp
1068a8: 85 c0 test %eax,%eax
1068aa: 74 09 je 1068b5 <rtems_libio_init+0x75> <== ALWAYS TAKEN
rtems_fatal_error_occurred( rc );
1068ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1068af: 50 push %eax <== NOT EXECUTED
1068b0: e8 fb 3a 00 00 call 10a3b0 <rtems_fatal_error_occurred>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
1068b5: a1 74 82 12 00 mov 0x128274,%eax
1068ba: 85 c0 test %eax,%eax
1068bc: 74 06 je 1068c4 <rtems_libio_init+0x84>
(* rtems_fs_init_helper)();
}
1068be: 8b 5d fc mov -0x4(%ebp),%ebx
1068c1: c9 leave
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
1068c2: ff e0 jmp *%eax
}
1068c4: 8b 5d fc mov -0x4(%ebp),%ebx
1068c7: c9 leave
1068c8: c3 ret
00105207 <rtems_libio_set_private_env>:
}
rtems_status_code rtems_libio_set_private_env(void)
{
105207: 55 push %ebp
105208: 89 e5 mov %esp,%ebp
10520a: 57 push %edi
10520b: 56 push %esi
10520c: 53 push %ebx
10520d: 83 ec 1c sub $0x1c,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
105210: e8 fb 14 00 00 call 106710 <rtems_task_self>
105215: 89 c2 mov %eax,%edx
rtems_user_env_t *old_env = rtems_current_user_env;
105217: a1 7c 72 12 00 mov 0x12727c,%eax
10521c: 89 45 e4 mov %eax,-0x1c(%ebp)
bool uses_global_env = old_env == &rtems_global_user_env;
bool uses_shared_env = old_env->task_id != self_task_id;
if (uses_global_env || uses_shared_env) {
10521f: 39 50 24 cmp %edx,0x24(%eax)
105222: 75 0d jne 105231 <rtems_libio_set_private_env+0x2a>
_Thread_Enable_dispatch();
}
rtems_status_code rtems_libio_set_private_env(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
105224: 31 f6 xor %esi,%esi
rtems_id self_task_id = rtems_task_self();
rtems_user_env_t *old_env = rtems_current_user_env;
bool uses_global_env = old_env == &rtems_global_user_env;
bool uses_shared_env = old_env->task_id != self_task_id;
if (uses_global_env || uses_shared_env) {
105226: 3d 80 72 12 00 cmp $0x127280,%eax
10522b: 0f 85 b1 00 00 00 jne 1052e2 <rtems_libio_set_private_env+0xdb><== ALWAYS TAKEN
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
105231: 57 push %edi
105232: 57 push %edi
105233: 6a 2c push $0x2c
105235: 6a 01 push $0x1
105237: 89 55 e0 mov %edx,-0x20(%ebp)
10523a: e8 c1 40 00 00 call 109300 <calloc>
10523f: 89 c3 mov %eax,%ebx
if (new_env != NULL) {
105241: 83 c4 10 add $0x10,%esp
if (sc != RTEMS_SUCCESSFUL) {
free_user_env(new_env);
}
} else {
sc = RTEMS_NO_MEMORY;
105244: be 1a 00 00 00 mov $0x1a,%esi
bool uses_shared_env = old_env->task_id != self_task_id;
if (uses_global_env || uses_shared_env) {
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
if (new_env != NULL) {
105249: 85 c0 test %eax,%eax
10524b: 8b 55 e0 mov -0x20(%ebp),%edx
10524e: 0f 84 8e 00 00 00 je 1052e2 <rtems_libio_set_private_env+0xdb>
*new_env = *old_env;
105254: b9 0b 00 00 00 mov $0xb,%ecx
105259: 89 c7 mov %eax,%edi
10525b: 8b 75 e4 mov -0x1c(%ebp),%esi
10525e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
new_env->reference_count = 1;
105260: c7 40 28 01 00 00 00 movl $0x1,0x28(%eax)
new_env->task_id = self_task_id;
105267: 89 50 24 mov %edx,0x24(%eax)
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
10526a: 83 ec 0c sub $0xc,%esp
10526d: 8b 45 e4 mov -0x1c(%ebp),%eax
105270: 83 c0 04 add $0x4,%eax
105273: 50 push %eax
105274: e8 aa 09 00 00 call 105c23 <rtems_filesystem_global_location_obtain>
if (new_env != NULL) {
*new_env = *old_env;
new_env->reference_count = 1;
new_env->task_id = self_task_id;
new_env->root_directory =
105279: 89 43 04 mov %eax,0x4(%ebx)
rtems_filesystem_global_location_obtain(&old_env->root_directory);
new_env->current_directory =
rtems_filesystem_global_location_obtain(&old_env->current_directory);
10527c: 5e pop %esi
10527d: ff 75 e4 pushl -0x1c(%ebp)
105280: e8 9e 09 00 00 call 105c23 <rtems_filesystem_global_location_obtain>
*new_env = *old_env;
new_env->reference_count = 1;
new_env->task_id = self_task_id;
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
new_env->current_directory =
105285: 89 03 mov %eax,(%ebx)
rtems_fatal_error_occurred(0xdeadbeef);
}
rtems_current_user_env = &rtems_global_user_env;
}
}
105287: 8b 53 04 mov 0x4(%ebx),%edx
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
new_env->current_directory =
rtems_filesystem_global_location_obtain(&old_env->current_directory);
if (
10528a: 83 c4 10 add $0x10,%esp
10528d: 81 7a 10 c4 c6 11 00 cmpl $0x11c6c4,0x10(%edx)
105294: 74 34 je 1052ca <rtems_libio_set_private_env+0xc3>
!rtems_filesystem_global_location_is_null(new_env->root_directory)
&& !rtems_filesystem_global_location_is_null(new_env->current_directory)
105296: 81 78 10 c4 c6 11 00 cmpl $0x11c6c4,0x10(%eax)
10529d: 74 2b je 1052ca <rtems_libio_set_private_env+0xc3><== NEVER TAKEN
) {
sc = rtems_task_variable_add(
10529f: 51 push %ecx
1052a0: 68 9c 51 10 00 push $0x10519c
1052a5: 68 7c 72 12 00 push $0x12727c
1052aa: 6a 00 push $0x0
1052ac: e8 d3 14 00 00 call 106784 <rtems_task_variable_add>
1052b1: 89 c6 mov %eax,%esi
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
1052b3: 83 c4 10 add $0x10,%esp
1052b6: 85 c0 test %eax,%eax
1052b8: 75 17 jne 1052d1 <rtems_libio_set_private_env+0xca>
free_user_env_protected(old_env);
1052ba: 8b 45 e4 mov -0x1c(%ebp),%eax
1052bd: e8 1d ff ff ff call 1051df <free_user_env_protected>
rtems_current_user_env = new_env;
1052c2: 89 1d 7c 72 12 00 mov %ebx,0x12727c
1052c8: eb 18 jmp 1052e2 <rtems_libio_set_private_env+0xdb>
} else {
sc = RTEMS_TOO_MANY;
}
} else {
sc = RTEMS_UNSATISFIED;
1052ca: be 0d 00 00 00 mov $0xd,%esi
1052cf: eb 05 jmp 1052d6 <rtems_libio_set_private_env+0xcf>
);
if (sc == RTEMS_SUCCESSFUL) {
free_user_env_protected(old_env);
rtems_current_user_env = new_env;
} else {
sc = RTEMS_TOO_MANY;
1052d1: be 05 00 00 00 mov $0x5,%esi
} else {
sc = RTEMS_UNSATISFIED;
}
if (sc != RTEMS_SUCCESSFUL) {
free_user_env(new_env);
1052d6: 83 ec 0c sub $0xc,%esp
1052d9: 53 push %ebx
1052da: e8 bd fe ff ff call 10519c <free_user_env>
1052df: 83 c4 10 add $0x10,%esp
sc = RTEMS_NO_MEMORY;
}
}
return sc;
}
1052e2: 89 f0 mov %esi,%eax
1052e4: 8d 65 f4 lea -0xc(%ebp),%esp
1052e7: 5b pop %ebx
1052e8: 5e pop %esi
1052e9: 5f pop %edi
1052ea: 5d pop %ebp
1052eb: c3 ret
001052ec <rtems_libio_share_private_env>:
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
1052ec: 55 push %ebp
1052ed: 89 e5 mov %esp,%ebp
1052ef: 53 push %ebx
1052f0: 83 ec 14 sub $0x14,%esp
1052f3: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
1052f6: e8 15 14 00 00 call 106710 <rtems_task_self>
if (task_id != RTEMS_SELF && self_task_id != task_id) {
1052fb: 39 d8 cmp %ebx,%eax
1052fd: 0f 84 81 00 00 00 je 105384 <rtems_libio_share_private_env+0x98>
105303: 85 db test %ebx,%ebx
105305: 74 7d je 105384 <rtems_libio_share_private_env+0x98>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
105307: a1 a4 a9 12 00 mov 0x12a9a4,%eax
10530c: 40 inc %eax
10530d: a3 a4 a9 12 00 mov %eax,0x12a9a4
return _Thread_Dispatch_disable_level;
105312: a1 a4 a9 12 00 mov 0x12a9a4,%eax
/*
* We have to disable the thread dispatching to prevent deletion of the
* environment in the meantime.
*/
_Thread_Disable_dispatch();
sc = rtems_task_variable_get(
105317: 50 push %eax
task_id,
(void *) &rtems_current_user_env,
(void *) &env
105318: 8d 45 f4 lea -0xc(%ebp),%eax
/*
* We have to disable the thread dispatching to prevent deletion of the
* environment in the meantime.
*/
_Thread_Disable_dispatch();
sc = rtems_task_variable_get(
10531b: 50 push %eax
10531c: 68 7c 72 12 00 push $0x12727c
105321: 53 push %ebx
105322: e8 71 15 00 00 call 106898 <rtems_task_variable_get>
105327: 89 c3 mov %eax,%ebx
task_id,
(void *) &rtems_current_user_env,
(void *) &env
);
if (sc == RTEMS_SUCCESSFUL) {
105329: 83 c4 10 add $0x10,%esp
10532c: 85 c0 test %eax,%eax
10532e: 75 08 jne 105338 <rtems_libio_share_private_env+0x4c>
++env->reference_count;
105330: 8b 45 f4 mov -0xc(%ebp),%eax
105333: ff 40 28 incl 0x28(%eax)
105336: eb 05 jmp 10533d <rtems_libio_share_private_env+0x51>
} else {
sc = RTEMS_UNSATISFIED;
105338: bb 0d 00 00 00 mov $0xd,%ebx
}
_Thread_Enable_dispatch();
10533d: e8 1a 2e 00 00 call 10815c <_Thread_Enable_dispatch>
if (sc == RTEMS_SUCCESSFUL) {
105342: 85 db test %ebx,%ebx
105344: 75 40 jne 105386 <rtems_libio_share_private_env+0x9a>
sc = rtems_task_variable_add(
105346: 50 push %eax
105347: 68 9c 51 10 00 push $0x10519c
10534c: 68 7c 72 12 00 push $0x12727c
105351: 6a 00 push $0x0
105353: e8 2c 14 00 00 call 106784 <rtems_task_variable_add>
105358: 89 c3 mov %eax,%ebx
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
10535a: 83 c4 10 add $0x10,%esp
10535d: 85 c0 test %eax,%eax
10535f: 75 14 jne 105375 <rtems_libio_share_private_env+0x89><== NEVER TAKEN
free_user_env_protected(rtems_current_user_env);
105361: a1 7c 72 12 00 mov 0x12727c,%eax
105366: e8 74 fe ff ff call 1051df <free_user_env_protected>
rtems_current_user_env = env;
10536b: 8b 45 f4 mov -0xc(%ebp),%eax
10536e: a3 7c 72 12 00 mov %eax,0x12727c
105373: eb 11 jmp 105386 <rtems_libio_share_private_env+0x9a>
} else {
free_user_env_protected(env);
105375: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
105378: e8 62 fe ff ff call 1051df <free_user_env_protected><== NOT EXECUTED
sc = RTEMS_TOO_MANY;
10537d: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
105382: eb 02 jmp 105386 <rtems_libio_share_private_env+0x9a><== NOT EXECUTED
return sc;
}
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
105384: 31 db xor %ebx,%ebx
}
}
}
return sc;
}
105386: 89 d8 mov %ebx,%eax
105388: 8b 5d fc mov -0x4(%ebp),%ebx
10538b: c9 leave
10538c: c3 ret
0010d9a8 <rtems_libio_to_fcntl_flags>:
*
* Convert RTEMS internal flags to UNIX fnctl(2) flags
*/
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
10d9a8: 55 push %ebp
10d9a9: 89 e5 mov %esp,%ebp
10d9ab: 8b 55 08 mov 0x8(%ebp),%edx
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10d9ae: 89 d0 mov %edx,%eax
10d9b0: 83 e0 06 and $0x6,%eax
10d9b3: 83 f8 06 cmp $0x6,%eax
10d9b6: 74 11 je 10d9c9 <rtems_libio_to_fcntl_flags+0x21><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
fcntl_flags |= O_RDONLY;
10d9b8: 31 c0 xor %eax,%eax
{
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
10d9ba: f6 c2 02 test $0x2,%dl
10d9bd: 75 0f jne 10d9ce <rtems_libio_to_fcntl_flags+0x26><== ALWAYS TAKEN
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
10d9bf: 89 d0 mov %edx,%eax <== NOT EXECUTED
10d9c1: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
10d9c4: 83 e0 01 and $0x1,%eax <== NOT EXECUTED
10d9c7: eb 05 jmp 10d9ce <rtems_libio_to_fcntl_flags+0x26><== NOT EXECUTED
10d9c9: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
10d9ce: f6 c2 01 test $0x1,%dl
10d9d1: 74 03 je 10d9d6 <rtems_libio_to_fcntl_flags+0x2e>
fcntl_flags |= O_NONBLOCK;
10d9d3: 80 cc 40 or $0x40,%ah
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
10d9d6: f6 c6 02 test $0x2,%dh
10d9d9: 74 03 je 10d9de <rtems_libio_to_fcntl_flags+0x36>
fcntl_flags |= O_APPEND;
10d9db: 83 c8 08 or $0x8,%eax
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
10d9de: 80 e6 04 and $0x4,%dh
10d9e1: 74 03 je 10d9e6 <rtems_libio_to_fcntl_flags+0x3e>
fcntl_flags |= O_CREAT;
10d9e3: 80 cc 02 or $0x2,%ah
}
return fcntl_flags;
}
10d9e6: 5d pop %ebp
10d9e7: c3 ret
0010538d <rtems_libio_use_global_env>:
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_user_env_t *env = rtems_current_user_env;
bool uses_private_env = env != &rtems_global_user_env;
if (uses_private_env) {
10538d: 81 3d 7c 72 12 00 80 cmpl $0x127280,0x12727c
105394: 72 12 00
105397: 74 31 je 1053ca <rtems_libio_use_global_env+0x3d>
return sc;
}
void rtems_libio_use_global_env(void)
{
105399: 55 push %ebp
10539a: 89 e5 mov %esp,%ebp
10539c: 83 ec 10 sub $0x10,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_user_env_t *env = rtems_current_user_env;
bool uses_private_env = env != &rtems_global_user_env;
if (uses_private_env) {
sc = rtems_task_variable_delete(
10539f: 68 7c 72 12 00 push $0x12727c
1053a4: 6a 00 push $0x0
1053a6: e8 71 14 00 00 call 10681c <rtems_task_variable_delete>
RTEMS_SELF,
(void **) &rtems_current_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
1053ab: 83 c4 10 add $0x10,%esp
1053ae: 85 c0 test %eax,%eax
1053b0: 74 0d je 1053bf <rtems_libio_use_global_env+0x32><== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
1053b2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1053b5: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
1053ba: e8 05 17 00 00 call 106ac4 <rtems_fatal_error_occurred><== NOT EXECUTED
}
rtems_current_user_env = &rtems_global_user_env;
1053bf: c7 05 7c 72 12 00 80 movl $0x127280,0x12727c
1053c6: 72 12 00
}
}
1053c9: c9 leave
1053ca: c3 ret
00108f14 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
108f14: 55 push %ebp
108f15: 89 e5 mov %esp,%ebp
108f17: 83 ec 1c sub $0x1c,%esp
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
108f1a: 8d 45 f4 lea -0xc(%ebp),%eax
108f1d: 50 push %eax
108f1e: ff 75 08 pushl 0x8(%ebp)
108f21: ff 35 d0 e5 12 00 pushl 0x12e5d0
108f27: e8 3c 56 00 00 call 10e568 <_Protected_heap_Get_block_size>
108f2c: 83 c4 10 add $0x10,%esp
108f2f: 84 c0 test %al,%al
108f31: 74 11 je 108f44 <rtems_malloc_statistics_at_free+0x30><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
108f33: 8b 45 f4 mov -0xc(%ebp),%eax
108f36: 31 d2 xor %edx,%edx
108f38: 01 05 fc 2e 13 00 add %eax,0x132efc
108f3e: 11 15 00 2f 13 00 adc %edx,0x132f00
}
}
108f44: c9 leave
108f45: c3 ret
00108f46 <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
108f46: 55 push %ebp
108f47: 89 e5 mov %esp,%ebp
108f49: 83 ec 18 sub $0x18,%esp
108f4c: 8b 45 08 mov 0x8(%ebp),%eax
uintptr_t actual_size = 0;
108f4f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
108f56: 85 c0 test %eax,%eax
108f58: 74 43 je 108f9d <rtems_malloc_statistics_at_malloc+0x57><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
108f5a: 52 push %edx
108f5b: 8d 55 f4 lea -0xc(%ebp),%edx
108f5e: 52 push %edx
108f5f: 50 push %eax
108f60: ff 35 d0 e5 12 00 pushl 0x12e5d0
108f66: e8 fd 55 00 00 call 10e568 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
108f6b: 8b 45 f4 mov -0xc(%ebp),%eax
108f6e: 31 d2 xor %edx,%edx
108f70: 03 05 f4 2e 13 00 add 0x132ef4,%eax
108f76: 13 15 f8 2e 13 00 adc 0x132ef8,%edx
108f7c: a3 f4 2e 13 00 mov %eax,0x132ef4
108f81: 89 15 f8 2e 13 00 mov %edx,0x132ef8
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
108f87: 2b 05 fc 2e 13 00 sub 0x132efc,%eax
if (current_depth > s->max_depth)
108f8d: 83 c4 10 add $0x10,%esp
108f90: 3b 05 f0 2e 13 00 cmp 0x132ef0,%eax
108f96: 76 05 jbe 108f9d <rtems_malloc_statistics_at_malloc+0x57>
s->max_depth = current_depth;
108f98: a3 f0 2e 13 00 mov %eax,0x132ef0
}
108f9d: c9 leave
108f9e: c3 ret
00111060 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
111060: 55 push %ebp
111061: 89 e5 mov %esp,%ebp
111063: 56 push %esi
111064: 53 push %ebx
111065: 8b 5d 08 mov 0x8(%ebp),%ebx
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
111068: 85 db test %ebx,%ebx
11106a: 75 07 jne 111073 <rtems_memalign+0x13>
return EINVAL;
11106c: b8 16 00 00 00 mov $0x16,%eax
111071: eb 5b jmp 1110ce <rtems_memalign+0x6e>
*pointer = NULL;
111073: c7 03 00 00 00 00 movl $0x0,(%ebx)
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
111079: 83 3d 30 05 13 00 03 cmpl $0x3,0x130530
111080: 74 23 je 1110a5 <rtems_memalign+0x45>
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
111082: e8 d4 67 ff ff call 10785b <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
111087: 6a 00 push $0x0
111089: ff 75 0c pushl 0xc(%ebp)
11108c: ff 75 10 pushl 0x10(%ebp)
11108f: ff 35 14 c2 12 00 pushl 0x12c214
111095: e8 22 b4 ff ff call 10c4bc <_Protected_heap_Allocate_aligned_with_boundary>
11109a: 89 c6 mov %eax,%esi
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
11109c: 83 c4 10 add $0x10,%esp
11109f: 85 c0 test %eax,%eax
1110a1: 75 0d jne 1110b0 <rtems_memalign+0x50>
1110a3: eb 24 jmp 1110c9 <rtems_memalign+0x69>
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
1110a5: e8 72 67 ff ff call 10781c <malloc_is_system_state_OK>
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
1110aa: 84 c0 test %al,%al
1110ac: 74 be je 11106c <rtems_memalign+0xc> <== NEVER TAKEN
1110ae: eb d2 jmp 111082 <rtems_memalign+0x22>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
1110b0: a1 68 e7 12 00 mov 0x12e768,%eax
1110b5: 85 c0 test %eax,%eax
1110b7: 74 0a je 1110c3 <rtems_memalign+0x63>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
1110b9: 83 ec 0c sub $0xc,%esp
1110bc: 53 push %ebx
1110bd: ff 50 04 call *0x4(%eax)
1110c0: 83 c4 10 add $0x10,%esp
*pointer = return_this;
1110c3: 89 33 mov %esi,(%ebx)
return 0;
1110c5: 31 c0 xor %eax,%eax
1110c7: eb 05 jmp 1110ce <rtems_memalign+0x6e>
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
1110c9: b8 0c 00 00 00 mov $0xc,%eax
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
1110ce: 8d 65 f8 lea -0x8(%ebp),%esp
1110d1: 5b pop %ebx
1110d2: 5e pop %esi
1110d3: 5d pop %ebp
1110d4: c3 ret
0010e09c <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
rtems_id id
)
{
10e09c: 55 push %ebp
10e09d: 89 e5 mov %esp,%ebp
10e09f: 53 push %ebx
10e0a0: 83 ec 18 sub $0x18,%esp
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
10e0a3: 8d 45 f4 lea -0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
10e0a6: 50 push %eax
10e0a7: ff 75 08 pushl 0x8(%ebp)
10e0aa: 68 70 c6 12 00 push $0x12c670
10e0af: e8 68 d1 ff ff call 10b21c <_Objects_Get>
switch ( location ) {
10e0b4: 83 c4 10 add $0x10,%esp
10e0b7: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10e0bb: 75 38 jne 10e0f5 <rtems_message_queue_delete+0x59><== NEVER TAKEN
10e0bd: 89 c3 mov %eax,%ebx
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
10e0bf: 50 push %eax
10e0c0: 50 push %eax
10e0c1: 53 push %ebx
10e0c2: 68 70 c6 12 00 push $0x12c670
10e0c7: e8 b0 cd ff ff call 10ae7c <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
10e0cc: 83 c4 0c add $0xc,%esp
10e0cf: 6a 05 push $0x5
10e0d1: 6a 00 push $0x0
10e0d3: 8d 43 14 lea 0x14(%ebx),%eax
10e0d6: 50 push %eax
10e0d7: e8 a0 04 00 00 call 10e57c <_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 );
10e0dc: 5a pop %edx
10e0dd: 59 pop %ecx
10e0de: 53 push %ebx
10e0df: 68 70 c6 12 00 push $0x12c670
10e0e4: e8 07 d0 ff ff call 10b0f0 <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
10e0e9: e8 ae dc ff ff call 10bd9c <_Thread_Enable_dispatch>
10e0ee: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
10e0f1: 31 c0 xor %eax,%eax
10e0f3: eb 05 jmp 10e0fa <rtems_message_queue_delete+0x5e>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10e0f5: b8 04 00 00 00 mov $0x4,%eax
}
10e0fa: 8b 5d fc mov -0x4(%ebp),%ebx
10e0fd: c9 leave
10e0fe: c3 ret
0010b0b8 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
10b0b8: 55 push %ebp
10b0b9: 89 e5 mov %esp,%ebp
10b0bb: 57 push %edi
10b0bc: 56 push %esi
10b0bd: 53 push %ebx
10b0be: 83 ec 78 sub $0x78,%esp
int success = 0;
char *dup_path = strdup(path);
10b0c1: ff 75 08 pushl 0x8(%ebp)
10b0c4: e8 17 4f 01 00 call 11ffe0 <strdup>
10b0c9: 89 c7 mov %eax,%edi
if (dup_path != NULL) {
10b0cb: 83 c4 10 add $0x10,%esp
10b0ce: 85 c0 test %eax,%eax
10b0d0: 75 08 jne 10b0da <rtems_mkdir+0x22>
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
10b0d2: 83 c8 ff or $0xffffffff,%eax
10b0d5: e9 56 01 00 00 jmp 10b230 <rtems_mkdir+0x178>
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
10b0da: 31 c0 xor %eax,%eax
10b0dc: 80 3f 2f cmpb $0x2f,(%edi)
10b0df: 0f 94 c0 sete %al
10b0e2: 01 f8 add %edi,%eax
10b0e4: 89 45 94 mov %eax,-0x6c(%ebp)
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
10b0e7: be 01 00 00 00 mov $0x1,%esi
10b0ec: c7 45 90 00 00 00 00 movl $0x0,-0x70(%ebp)
10b0f3: b8 01 00 00 00 mov $0x1,%eax
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
10b0f8: 8b 55 94 mov -0x6c(%ebp),%edx
10b0fb: 8a 0a mov (%edx),%cl
10b0fd: 84 c9 test %cl,%cl
10b0ff: 74 0d je 10b10e <rtems_mkdir+0x56>
last = 1;
else if (p[0] != '/')
10b101: 31 d2 xor %edx,%edx
10b103: 80 f9 2f cmp $0x2f,%cl
10b106: 0f 85 e6 00 00 00 jne 10b1f2 <rtems_mkdir+0x13a>
10b10c: eb 05 jmp 10b113 <rtems_mkdir+0x5b>
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
10b10e: ba 01 00 00 00 mov $0x1,%edx
else if (p[0] != '/')
continue;
*p = '\0';
10b113: 8b 4d 94 mov -0x6c(%ebp),%ecx
10b116: c6 01 00 movb $0x0,(%ecx)
if (!last && p[1] == '\0')
10b119: bb 01 00 00 00 mov $0x1,%ebx
10b11e: 85 d2 test %edx,%edx
10b120: 75 09 jne 10b12b <rtems_mkdir+0x73>
10b122: 31 db xor %ebx,%ebx
10b124: 80 79 01 00 cmpb $0x0,0x1(%ecx)
10b128: 0f 94 c3 sete %bl
last = 1;
if (first) {
10b12b: 85 c0 test %eax,%eax
10b12d: 74 1a je 10b149 <rtems_mkdir+0x91>
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
10b12f: 83 ec 0c sub $0xc,%esp
10b132: 6a 00 push $0x0
10b134: e8 2b 21 00 00 call 10d264 <umask>
10b139: 89 45 90 mov %eax,-0x70(%ebp)
numask = oumask & ~(S_IWUSR | S_IXUSR);
10b13c: 24 3f and $0x3f,%al
(void)umask(numask);
10b13e: 89 04 24 mov %eax,(%esp)
10b141: e8 1e 21 00 00 call 10d264 <umask>
10b146: 83 c4 10 add $0x10,%esp
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
10b149: b8 ff 01 00 00 mov $0x1ff,%eax
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
10b14e: 85 db test %ebx,%ebx
10b150: 74 11 je 10b163 <rtems_mkdir+0xab>
(void)umask(oumask);
10b152: 83 ec 0c sub $0xc,%esp
10b155: ff 75 90 pushl -0x70(%ebp)
10b158: e8 07 21 00 00 call 10d264 <umask>
10b15d: 83 c4 10 add $0x10,%esp
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
10b160: 8b 45 0c mov 0xc(%ebp),%eax
10b163: 52 push %edx
10b164: 52 push %edx
10b165: 50 push %eax
10b166: 57 push %edi
10b167: e8 34 f3 ff ff call 10a4a0 <mkdir>
10b16c: 83 c4 10 add $0x10,%esp
10b16f: 85 c0 test %eax,%eax
10b171: 79 6d jns 10b1e0 <rtems_mkdir+0x128>
if (errno == EEXIST || errno == EISDIR) {
10b173: e8 e4 32 01 00 call 11e45c <__errno>
10b178: 83 38 11 cmpl $0x11,(%eax)
10b17b: 75 15 jne 10b192 <rtems_mkdir+0xda>
if (stat(path, &sb) < 0) {
10b17d: 50 push %eax
10b17e: 50 push %eax
10b17f: 8d 45 a0 lea -0x60(%ebp),%eax
10b182: 50 push %eax
10b183: 57 push %edi
10b184: e8 af 00 00 00 call 10b238 <stat>
10b189: 83 c4 10 add $0x10,%esp
10b18c: 85 c0 test %eax,%eax
10b18e: 79 0e jns 10b19e <rtems_mkdir+0xe6> <== ALWAYS TAKEN
10b190: eb 72 jmp 10b204 <rtems_mkdir+0x14c> <== NOT EXECUTED
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
10b192: e8 c5 32 01 00 call 11e45c <__errno>
10b197: 83 38 15 cmpl $0x15,(%eax)
10b19a: 74 e1 je 10b17d <rtems_mkdir+0xc5> <== NEVER TAKEN
10b19c: eb 66 jmp 10b204 <rtems_mkdir+0x14c>
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
10b19e: 8b 45 ac mov -0x54(%ebp),%eax
10b1a1: 25 00 f0 00 00 and $0xf000,%eax
10b1a6: 3d 00 40 00 00 cmp $0x4000,%eax
10b1ab: 74 25 je 10b1d2 <rtems_mkdir+0x11a>
if (last)
10b1ad: 85 db test %ebx,%ebx
10b1af: 74 14 je 10b1c5 <rtems_mkdir+0x10d>
errno = EEXIST;
10b1b1: e8 a6 32 01 00 call 11e45c <__errno>
10b1b6: c7 00 11 00 00 00 movl $0x11,(%eax)
else
errno = ENOTDIR;
retval = 0;
10b1bc: 31 f6 xor %esi,%esi
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
10b1be: bb 01 00 00 00 mov $0x1,%ebx
10b1c3: eb 41 jmp 10b206 <rtems_mkdir+0x14e>
else
errno = ENOTDIR;
10b1c5: e8 92 32 01 00 call 11e45c <__errno>
10b1ca: c7 00 14 00 00 00 movl $0x14,(%eax)
10b1d0: eb 32 jmp 10b204 <rtems_mkdir+0x14c>
retval = 0;
break;
}
if (last)
10b1d2: 85 db test %ebx,%ebx
10b1d4: 75 10 jne 10b1e6 <rtems_mkdir+0x12e>
retval = 0;
break;
}
}
if (!last)
*p = '/';
10b1d6: 8b 55 94 mov -0x6c(%ebp),%edx
10b1d9: c6 02 2f movb $0x2f,(%edx)
10b1dc: 31 d2 xor %edx,%edx
10b1de: eb 10 jmp 10b1f0 <rtems_mkdir+0x138>
} else {
retval = 0;
break;
}
}
if (!last)
10b1e0: 85 db test %ebx,%ebx
10b1e2: 74 f2 je 10b1d6 <rtems_mkdir+0x11e>
10b1e4: eb 05 jmp 10b1eb <rtems_mkdir+0x133>
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
retval = 2;
10b1e6: be 02 00 00 00 mov $0x2,%esi
else
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
10b1eb: ba 01 00 00 00 mov $0x1,%edx
10b1f0: 31 c0 xor %eax,%eax
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
10b1f2: ff 45 94 incl -0x6c(%ebp)
10b1f5: 85 d2 test %edx,%edx
10b1f7: 0f 84 fb fe ff ff je 10b0f8 <rtems_mkdir+0x40>
10b1fd: bb 01 00 00 00 mov $0x1,%ebx
10b202: eb 04 jmp 10b208 <rtems_mkdir+0x150>
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
10b204: 31 f6 xor %esi,%esi
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
10b206: 31 c0 xor %eax,%eax
}
}
if (!last)
*p = '/';
}
if (!first && !last)
10b208: 09 c3 or %eax,%ebx
10b20a: 75 0e jne 10b21a <rtems_mkdir+0x162>
(void)umask(oumask);
10b20c: 83 ec 0c sub $0xc,%esp
10b20f: ff 75 90 pushl -0x70(%ebp)
10b212: e8 4d 20 00 00 call 10d264 <umask>
10b217: 83 c4 10 add $0x10,%esp
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
10b21a: 83 ec 0c sub $0xc,%esp
10b21d: 57 push %edi
10b21e: e8 c5 ec ff ff call 109ee8 <free>
}
return success != 0 ? 0 : -1;
10b223: 83 c4 10 add $0x10,%esp
10b226: 85 f6 test %esi,%esi
10b228: 0f 84 a4 fe ff ff je 10b0d2 <rtems_mkdir+0x1a>
10b22e: 31 c0 xor %eax,%eax
}
10b230: 8d 65 f4 lea -0xc(%ebp),%esp
10b233: 5b pop %ebx
10b234: 5e pop %esi
10b235: 5f pop %edi
10b236: 5d pop %ebp
10b237: c3 ret
00114260 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
114260: 55 push %ebp
114261: 89 e5 mov %esp,%ebp
114263: 57 push %edi
114264: 56 push %esi
114265: 53 push %ebx
114266: 83 ec 0c sub $0xc,%esp
114269: 8b 7d 0c mov 0xc(%ebp),%edi
11426c: 8b 75 14 mov 0x14(%ebp),%esi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
11426f: b8 03 00 00 00 mov $0x3,%eax
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
114274: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
114278: 0f 84 d9 00 00 00 je 114357 <rtems_partition_create+0xf7>
return RTEMS_INVALID_NAME;
if ( !starting_address )
11427e: 85 ff test %edi,%edi
114280: 0f 84 c5 00 00 00 je 11434b <rtems_partition_create+0xeb>
return RTEMS_INVALID_ADDRESS;
if ( !id )
114286: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp)
11428a: 0f 84 bb 00 00 00 je 11434b <rtems_partition_create+0xeb><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
114290: 85 f6 test %esi,%esi
114292: 0f 84 ba 00 00 00 je 114352 <rtems_partition_create+0xf2>
114298: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
11429c: 0f 84 b0 00 00 00 je 114352 <rtems_partition_create+0xf2>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
1142a2: b0 08 mov $0x8,%al
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
1142a4: 39 75 10 cmp %esi,0x10(%ebp)
1142a7: 0f 82 aa 00 00 00 jb 114357 <rtems_partition_create+0xf7>
1142ad: f7 c6 03 00 00 00 test $0x3,%esi
1142b3: 0f 85 9e 00 00 00 jne 114357 <rtems_partition_create+0xf7>
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
1142b9: b0 09 mov $0x9,%al
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
1142bb: f7 c7 03 00 00 00 test $0x3,%edi
1142c1: 0f 85 90 00 00 00 jne 114357 <rtems_partition_create+0xf7>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
1142c7: a1 1c 57 14 00 mov 0x14571c,%eax
1142cc: 40 inc %eax
1142cd: a3 1c 57 14 00 mov %eax,0x14571c
return _Thread_Dispatch_disable_level;
1142d2: a1 1c 57 14 00 mov 0x14571c,%eax
* 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 );
1142d7: 83 ec 0c sub $0xc,%esp
1142da: 68 98 55 14 00 push $0x145598
1142df: e8 c8 3f 00 00 call 1182ac <_Objects_Allocate>
1142e4: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
1142e6: 83 c4 10 add $0x10,%esp
1142e9: 85 c0 test %eax,%eax
1142eb: 75 0c jne 1142f9 <rtems_partition_create+0x99>
_Thread_Enable_dispatch();
1142ed: e8 82 4f 00 00 call 119274 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
1142f2: b8 05 00 00 00 mov $0x5,%eax
1142f7: eb 5e jmp 114357 <rtems_partition_create+0xf7>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
1142f9: 89 78 10 mov %edi,0x10(%eax)
the_partition->length = length;
1142fc: 8b 45 10 mov 0x10(%ebp),%eax
1142ff: 89 43 14 mov %eax,0x14(%ebx)
the_partition->buffer_size = buffer_size;
114302: 89 73 18 mov %esi,0x18(%ebx)
the_partition->attribute_set = attribute_set;
114305: 8b 45 18 mov 0x18(%ebp),%eax
114308: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
11430b: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
114312: 56 push %esi
114313: 8b 45 10 mov 0x10(%ebp),%eax
114316: 31 d2 xor %edx,%edx
114318: f7 f6 div %esi
11431a: 50 push %eax
11431b: 57 push %edi
11431c: 8d 43 24 lea 0x24(%ebx),%eax
11431f: 50 push %eax
114320: e8 6b 2c 00 00 call 116f90 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
114325: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
114328: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
11432b: 8b 15 b4 55 14 00 mov 0x1455b4,%edx
114331: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
114334: 8b 55 08 mov 0x8(%ebp),%edx
114337: 89 53 0c mov %edx,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
11433a: 8b 55 1c mov 0x1c(%ebp),%edx
11433d: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
11433f: e8 30 4f 00 00 call 119274 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
114344: 83 c4 10 add $0x10,%esp
114347: 31 c0 xor %eax,%eax
114349: eb 0c jmp 114357 <rtems_partition_create+0xf7>
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
11434b: b8 09 00 00 00 mov $0x9,%eax
114350: eb 05 jmp 114357 <rtems_partition_create+0xf7>
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;
114352: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
114357: 8d 65 f4 lea -0xc(%ebp),%esp
11435a: 5b pop %ebx
11435b: 5e pop %esi
11435c: 5f pop %edi
11435d: 5d pop %ebp
11435e: c3 ret
0011445c <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
11445c: 55 push %ebp
11445d: 89 e5 mov %esp,%ebp
11445f: 56 push %esi
114460: 53 push %ebx
114461: 83 ec 14 sub $0x14,%esp
114464: 8b 75 0c mov 0xc(%ebp),%esi
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
114467: 8d 45 f4 lea -0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
11446a: 50 push %eax
11446b: ff 75 08 pushl 0x8(%ebp)
11446e: 68 98 55 14 00 push $0x145598
114473: e8 7c 42 00 00 call 1186f4 <_Objects_Get>
switch ( location ) {
114478: 83 c4 10 add $0x10,%esp
11447b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
11447f: 75 53 jne 1144d4 <rtems_partition_return_buffer+0x78>
114481: 89 c3 mov %eax,%ebx
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
114483: 8b 40 10 mov 0x10(%eax),%eax
114486: 8b 53 14 mov 0x14(%ebx),%edx
114489: 01 c2 add %eax,%edx
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
11448b: 39 d6 cmp %edx,%esi
11448d: 77 18 ja 1144a7 <rtems_partition_return_buffer+0x4b><== NEVER TAKEN
11448f: 39 c6 cmp %eax,%esi
114491: 72 14 jb 1144a7 <rtems_partition_return_buffer+0x4b>
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
114493: 89 f2 mov %esi,%edx
114495: 29 c2 sub %eax,%edx
114497: 89 d0 mov %edx,%eax
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
114499: 31 d2 xor %edx,%edx
11449b: 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 ) &&
11449e: 31 c0 xor %eax,%eax
1144a0: 85 d2 test %edx,%edx
1144a2: 0f 94 c0 sete %al
1144a5: eb 02 jmp 1144a9 <rtems_partition_return_buffer+0x4d>
1144a7: 31 c0 xor %eax,%eax
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
1144a9: 85 c0 test %eax,%eax
1144ab: 74 1b je 1144c8 <rtems_partition_return_buffer+0x6c>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
1144ad: 50 push %eax
1144ae: 50 push %eax
1144af: 56 push %esi
1144b0: 8d 43 24 lea 0x24(%ebx),%eax
1144b3: 50 push %eax
1144b4: e8 8f 2a 00 00 call 116f48 <_Chain_Append>
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
1144b9: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
1144bc: e8 b3 4d 00 00 call 119274 <_Thread_Enable_dispatch>
1144c1: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
1144c4: 31 c0 xor %eax,%eax
1144c6: eb 11 jmp 1144d9 <rtems_partition_return_buffer+0x7d>
}
_Thread_Enable_dispatch();
1144c8: e8 a7 4d 00 00 call 119274 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
1144cd: b8 09 00 00 00 mov $0x9,%eax
1144d2: eb 05 jmp 1144d9 <rtems_partition_return_buffer+0x7d>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1144d4: b8 04 00 00 00 mov $0x4,%eax
}
1144d9: 8d 65 f8 lea -0x8(%ebp),%esp
1144dc: 5b pop %ebx
1144dd: 5e pop %esi
1144de: 5d pop %ebp
1144df: c3 ret
0012d0b0 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
12d0b0: 55 push %ebp
12d0b1: 89 e5 mov %esp,%ebp
12d0b3: 57 push %edi
12d0b4: 56 push %esi
12d0b5: 53 push %ebx
12d0b6: 83 ec 30 sub $0x30,%esp
12d0b9: 8b 7d 08 mov 0x8(%ebp),%edi
12d0bc: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_value;
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
12d0bf: 8d 45 e4 lea -0x1c(%ebp),%eax
12d0c2: 50 push %eax
12d0c3: 57 push %edi
12d0c4: 68 74 cd 16 00 push $0x16cd74
12d0c9: e8 26 df fd ff call 10aff4 <_Objects_Get>
switch ( location ) {
12d0ce: 83 c4 10 add $0x10,%esp
12d0d1: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
12d0d5: 0f 85 47 01 00 00 jne 12d222 <rtems_rate_monotonic_period+0x172>
12d0db: 89 c6 mov %eax,%esi
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
12d0dd: a1 78 cb 16 00 mov 0x16cb78,%eax
12d0e2: 39 46 40 cmp %eax,0x40(%esi)
12d0e5: 74 0f je 12d0f6 <rtems_rate_monotonic_period+0x46>
_Thread_Enable_dispatch();
12d0e7: e8 18 ea fd ff call 10bb04 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
12d0ec: bf 17 00 00 00 mov $0x17,%edi
12d0f1: e9 31 01 00 00 jmp 12d227 <rtems_rate_monotonic_period+0x177>
}
if ( length == RTEMS_PERIOD_STATUS ) {
12d0f6: 85 db test %ebx,%ebx
12d0f8: 75 1b jne 12d115 <rtems_rate_monotonic_period+0x65>
switch ( the_period->state ) {
12d0fa: 8b 46 38 mov 0x38(%esi),%eax
12d0fd: 31 ff xor %edi,%edi
12d0ff: 83 f8 04 cmp $0x4,%eax
12d102: 77 07 ja 12d10b <rtems_rate_monotonic_period+0x5b><== NEVER TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
12d104: 0f b6 b8 b8 1d 15 00 movzbl 0x151db8(%eax),%edi
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
12d10b: e8 f4 e9 fd ff call 10bb04 <_Thread_Enable_dispatch>
12d110: e9 12 01 00 00 jmp 12d227 <rtems_rate_monotonic_period+0x177>
return( return_value );
}
_ISR_Disable( level );
12d115: 9c pushf
12d116: fa cli
12d117: 8f 45 d4 popl -0x2c(%ebp)
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
12d11a: 8b 46 38 mov 0x38(%esi),%eax
12d11d: 85 c0 test %eax,%eax
12d11f: 75 4c jne 12d16d <rtems_rate_monotonic_period+0xbd>
_ISR_Enable( level );
12d121: ff 75 d4 pushl -0x2c(%ebp)
12d124: 9d popf
the_period->next_length = length;
12d125: 89 5e 3c mov %ebx,0x3c(%esi)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
12d128: 83 ec 0c sub $0xc,%esp
12d12b: 56 push %esi
12d12c: e8 0f ff ff ff call 12d040 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
12d131: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12d138: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
the_watchdog->routine = routine;
12d13f: c7 46 2c 34 d2 12 00 movl $0x12d234,0x2c(%esi)
the_watchdog->id = id;
12d146: 89 7e 30 mov %edi,0x30(%esi)
the_watchdog->user_data = user_data;
12d149: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12d150: 89 5e 1c mov %ebx,0x1c(%esi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12d153: 59 pop %ecx
12d154: 5b pop %ebx
_Rate_monotonic_Timeout,
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
12d155: 8d 56 10 lea 0x10(%esi),%edx
12d158: 52 push %edx
12d159: 68 20 ca 16 00 push $0x16ca20
12d15e: e8 65 f4 fd ff call 10c5c8 <_Watchdog_Insert>
_Thread_Enable_dispatch();
12d163: e8 9c e9 fd ff call 10bb04 <_Thread_Enable_dispatch>
12d168: 83 c4 10 add $0x10,%esp
12d16b: eb 63 jmp 12d1d0 <rtems_rate_monotonic_period+0x120>
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
12d16d: 83 f8 02 cmp $0x2,%eax
12d170: 75 62 jne 12d1d4 <rtems_rate_monotonic_period+0x124>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
12d172: 89 f0 mov %esi,%eax
12d174: e8 28 fe ff ff call 12cfa1 <_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;
12d179: c7 46 38 01 00 00 00 movl $0x1,0x38(%esi)
the_period->next_length = length;
12d180: 89 5e 3c mov %ebx,0x3c(%esi)
_ISR_Enable( level );
12d183: ff 75 d4 pushl -0x2c(%ebp)
12d186: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
12d187: a1 78 cb 16 00 mov 0x16cb78,%eax
12d18c: 8b 4e 08 mov 0x8(%esi),%ecx
12d18f: 89 48 20 mov %ecx,0x20(%eax)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
12d192: 52 push %edx
12d193: 52 push %edx
12d194: 68 00 40 00 00 push $0x4000
12d199: 50 push %eax
12d19a: e8 a5 f0 fd ff call 10c244 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
12d19f: 9c pushf
12d1a0: fa cli
12d1a1: 59 pop %ecx
local_state = the_period->state;
12d1a2: 8b 46 38 mov 0x38(%esi),%eax
the_period->state = RATE_MONOTONIC_ACTIVE;
12d1a5: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
_ISR_Enable( level );
12d1ac: 51 push %ecx
12d1ad: 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 )
12d1ae: 83 c4 10 add $0x10,%esp
12d1b1: 83 f8 03 cmp $0x3,%eax
12d1b4: 75 15 jne 12d1cb <rtems_rate_monotonic_period+0x11b>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
12d1b6: 50 push %eax
12d1b7: 50 push %eax
12d1b8: 68 00 40 00 00 push $0x4000
12d1bd: ff 35 78 cb 16 00 pushl 0x16cb78
12d1c3: e8 0c e6 fd ff call 10b7d4 <_Thread_Clear_state>
12d1c8: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
12d1cb: e8 34 e9 fd ff call 10bb04 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
12d1d0: 31 ff xor %edi,%edi
12d1d2: eb 53 jmp 12d227 <rtems_rate_monotonic_period+0x177>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
12d1d4: bf 04 00 00 00 mov $0x4,%edi
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
12d1d9: 83 f8 04 cmp $0x4,%eax
12d1dc: 75 49 jne 12d227 <rtems_rate_monotonic_period+0x177><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
12d1de: 89 f0 mov %esi,%eax
12d1e0: e8 bc fd ff ff call 12cfa1 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
12d1e5: ff 75 d4 pushl -0x2c(%ebp)
12d1e8: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
12d1e9: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
the_period->next_length = length;
12d1f0: 89 5e 3c mov %ebx,0x3c(%esi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12d1f3: 89 5e 1c mov %ebx,0x1c(%esi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12d1f6: 51 push %ecx
12d1f7: 51 push %ecx
_Watchdog_Insert_ticks( &the_period->Timer, length );
12d1f8: 8d 46 10 lea 0x10(%esi),%eax
12d1fb: 50 push %eax
12d1fc: 68 20 ca 16 00 push $0x16ca20
12d201: e8 c2 f3 fd ff call 10c5c8 <_Watchdog_Insert>
12d206: 5b pop %ebx
12d207: 58 pop %eax
12d208: ff 76 3c pushl 0x3c(%esi)
12d20b: ff 76 40 pushl 0x40(%esi)
12d20e: ff 15 10 51 16 00 call *0x165110
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
12d214: e8 eb e8 fd ff call 10bb04 <_Thread_Enable_dispatch>
12d219: 83 c4 10 add $0x10,%esp
return RTEMS_TIMEOUT;
12d21c: 66 bf 06 00 mov $0x6,%di
12d220: eb 05 jmp 12d227 <rtems_rate_monotonic_period+0x177>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
12d222: bf 04 00 00 00 mov $0x4,%edi
}
12d227: 89 f8 mov %edi,%eax
12d229: 8d 65 f4 lea -0xc(%ebp),%esp
12d22c: 5b pop %ebx
12d22d: 5e pop %esi
12d22e: 5f pop %edi
12d22f: 5d pop %ebp
12d230: c3 ret
00122f08 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
122f08: 55 push %ebp
122f09: 89 e5 mov %esp,%ebp
122f0b: 57 push %edi
122f0c: 56 push %esi
122f0d: 53 push %ebx
122f0e: 83 ec 7c sub $0x7c,%esp
122f11: 8b 75 08 mov 0x8(%ebp),%esi
122f14: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
122f17: 85 db test %ebx,%ebx
122f19: 0f 84 2e 01 00 00 je 12304d <rtems_rate_monotonic_report_statistics_with_plugin+0x145><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
122f1f: 57 push %edi
122f20: 57 push %edi
122f21: 68 fc f1 14 00 push $0x14f1fc
122f26: 56 push %esi
122f27: ff d3 call *%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
122f29: 58 pop %eax
122f2a: 5a pop %edx
122f2b: 68 1a f2 14 00 push $0x14f21a
122f30: 56 push %esi
122f31: ff d3 call *%ebx
(*print)( context, "--- Wall times are in seconds ---\n" );
122f33: 59 pop %ecx
122f34: 5f pop %edi
122f35: 68 3c f2 14 00 push $0x14f23c
122f3a: 56 push %esi
122f3b: ff d3 call *%ebx
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
122f3d: 58 pop %eax
122f3e: 5a pop %edx
122f3f: 68 5f f2 14 00 push $0x14f25f
122f44: 56 push %esi
122f45: ff d3 call *%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
122f47: 59 pop %ecx
122f48: 5f pop %edi
122f49: 68 aa f2 14 00 push $0x14f2aa
122f4e: 56 push %esi
122f4f: ff d3 call *%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 ;
122f51: 8b 3d 7c cd 16 00 mov 0x16cd7c,%edi
122f57: 83 c4 10 add $0x10,%esp
122f5a: e9 e2 00 00 00 jmp 123041 <rtems_rate_monotonic_report_statistics_with_plugin+0x139>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
122f5f: 51 push %ecx
122f60: 51 push %ecx
122f61: 8d 45 b0 lea -0x50(%ebp),%eax
122f64: 50 push %eax
122f65: 57 push %edi
122f66: e8 1d 9d 00 00 call 12cc88 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
122f6b: 83 c4 10 add $0x10,%esp
122f6e: 85 c0 test %eax,%eax
122f70: 0f 85 ca 00 00 00 jne 123040 <rtems_rate_monotonic_report_statistics_with_plugin+0x138>
#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 );
122f76: 50 push %eax
122f77: 50 push %eax
122f78: 8d 55 98 lea -0x68(%ebp),%edx
122f7b: 52 push %edx
122f7c: 57 push %edi
122f7d: e8 92 9e 00 00 call 12ce14 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
122f82: 83 c4 0c add $0xc,%esp
122f85: 8d 55 8b lea -0x75(%ebp),%edx
122f88: 52 push %edx
122f89: 6a 05 push $0x5
122f8b: ff 75 98 pushl -0x68(%ebp)
122f8e: 89 55 84 mov %edx,-0x7c(%ebp)
122f91: e8 52 ce fe ff call 10fde8 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
122f96: 58 pop %eax
122f97: 5a pop %edx
122f98: ff 75 b4 pushl -0x4c(%ebp)
122f9b: ff 75 b0 pushl -0x50(%ebp)
122f9e: 8b 55 84 mov -0x7c(%ebp),%edx
122fa1: 52 push %edx
122fa2: 57 push %edi
122fa3: 68 f6 f2 14 00 push $0x14f2f6
122fa8: 56 push %esi
122fa9: ff d3 call *%ebx
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
122fab: 8b 45 b0 mov -0x50(%ebp),%eax
122fae: 83 c4 20 add $0x20,%esp
122fb1: 85 c0 test %eax,%eax
122fb3: 75 0f jne 122fc4 <rtems_rate_monotonic_report_statistics_with_plugin+0xbc>
(*print)( context, "\n" );
122fb5: 51 push %ecx
122fb6: 51 push %ecx
122fb7: 68 65 a0 14 00 push $0x14a065
122fbc: 56 push %esi
122fbd: ff d3 call *%ebx
continue;
122fbf: 83 c4 10 add $0x10,%esp
122fc2: eb 7c jmp 123040 <rtems_rate_monotonic_report_statistics_with_plugin+0x138>
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 );
122fc4: 52 push %edx
122fc5: 8d 55 90 lea -0x70(%ebp),%edx
122fc8: 52 push %edx
122fc9: 50 push %eax
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
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;
122fca: 8d 45 c8 lea -0x38(%ebp),%eax
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
122fcd: 50 push %eax
122fce: e8 e5 08 00 00 call 1238b8 <_Timespec_Divide_by_integer>
(*print)( context,
122fd3: 8b 45 94 mov -0x6c(%ebp),%eax
122fd6: b9 e8 03 00 00 mov $0x3e8,%ecx
122fdb: 99 cltd
122fdc: f7 f9 idiv %ecx
122fde: 50 push %eax
122fdf: ff 75 90 pushl -0x70(%ebp)
122fe2: 8b 45 c4 mov -0x3c(%ebp),%eax
122fe5: 99 cltd
122fe6: f7 f9 idiv %ecx
122fe8: 50 push %eax
122fe9: ff 75 c0 pushl -0x40(%ebp)
122fec: 8b 45 bc mov -0x44(%ebp),%eax
122fef: 99 cltd
122ff0: f7 f9 idiv %ecx
122ff2: 50 push %eax
122ff3: ff 75 b8 pushl -0x48(%ebp)
122ff6: 68 0d f3 14 00 push $0x14f30d
122ffb: 56 push %esi
122ffc: 89 4d 84 mov %ecx,-0x7c(%ebp)
122fff: ff d3 call *%ebx
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);
123001: 83 c4 2c add $0x2c,%esp
123004: 8d 45 90 lea -0x70(%ebp),%eax
123007: 50 push %eax
123008: ff 75 b0 pushl -0x50(%ebp)
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
12300b: 8d 45 e0 lea -0x20(%ebp),%eax
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
12300e: 50 push %eax
12300f: e8 a4 08 00 00 call 1238b8 <_Timespec_Divide_by_integer>
(*print)( context,
123014: 8b 45 94 mov -0x6c(%ebp),%eax
123017: 8b 4d 84 mov -0x7c(%ebp),%ecx
12301a: 99 cltd
12301b: f7 f9 idiv %ecx
12301d: 50 push %eax
12301e: ff 75 90 pushl -0x70(%ebp)
123021: 8b 45 dc mov -0x24(%ebp),%eax
123024: 99 cltd
123025: f7 f9 idiv %ecx
123027: 50 push %eax
123028: ff 75 d8 pushl -0x28(%ebp)
12302b: 8b 45 d4 mov -0x2c(%ebp),%eax
12302e: 99 cltd
12302f: f7 f9 idiv %ecx
123031: 50 push %eax
123032: ff 75 d0 pushl -0x30(%ebp)
123035: 68 2c f3 14 00 push $0x14f32c
12303a: 56 push %esi
12303b: ff d3 call *%ebx
12303d: 83 c4 30 add $0x30,%esp
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
123040: 47 inc %edi
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
123041: 3b 3d 80 cd 16 00 cmp 0x16cd80,%edi
123047: 0f 86 12 ff ff ff jbe 122f5f <rtems_rate_monotonic_report_statistics_with_plugin+0x57>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
12304d: 8d 65 f4 lea -0xc(%ebp),%esp
123050: 5b pop %ebx
123051: 5e pop %esi
123052: 5f pop %edi
123053: 5d pop %ebp
123054: c3 ret
0010ab69 <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
10ab69: 55 push %ebp
10ab6a: 89 e5 mov %esp,%ebp
10ab6c: 57 push %edi
10ab6d: 56 push %esi
10ab6e: 53 push %ebx
10ab6f: 83 ec 1c sub $0x1c,%esp
10ab72: 8b 4d 08 mov 0x8(%ebp),%ecx
10ab75: 8b 5d 0c mov 0xc(%ebp),%ebx
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
10ab78: 8b 79 30 mov 0x30(%ecx),%edi
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10ab7b: 89 d8 mov %ebx,%eax
10ab7d: 31 d2 xor %edx,%edx
10ab7f: f7 f7 div %edi
if (excess > 0) {
10ab81: 89 de mov %ebx,%esi
10ab83: 85 d2 test %edx,%edx
10ab85: 74 05 je 10ab8c <rtems_rbheap_allocate+0x23><== ALWAYS TAKEN
value += alignment - excess;
10ab87: 8d 34 3b lea (%ebx,%edi,1),%esi <== NOT EXECUTED
10ab8a: 29 d6 sub %edx,%esi <== NOT EXECUTED
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
10ab8c: 39 f3 cmp %esi,%ebx
10ab8e: 77 04 ja 10ab94 <rtems_rbheap_allocate+0x2b><== NEVER TAKEN
10ab90: 85 db test %ebx,%ebx
10ab92: 75 07 jne 10ab9b <rtems_rbheap_allocate+0x32>
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
10ab94: 31 c0 xor %eax,%eax
10ab96: e9 8f 00 00 00 jmp 10ac2a <rtems_rbheap_allocate+0xc1>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10ab9b: 8b 01 mov (%ecx),%eax
rtems_chain_control *free_chain,
size_t size
)
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
10ab9d: 8d 51 04 lea 0x4(%ecx),%edx
rtems_rbheap_chunk *big_enough = NULL;
10aba0: 31 db xor %ebx,%ebx
10aba2: eb 0e jmp 10abb2 <rtems_rbheap_allocate+0x49>
while (current != tail && big_enough == NULL) {
rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
if (free_chunk->size >= size) {
10aba4: 31 db xor %ebx,%ebx
10aba6: 39 70 1c cmp %esi,0x1c(%eax)
10aba9: 0f 93 c3 setae %bl
10abac: f7 db neg %ebx
10abae: 21 c3 and %eax,%ebx
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
if (chunk != NULL) {
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
10abb0: 8b 00 mov (%eax),%eax
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
10abb2: 85 db test %ebx,%ebx
10abb4: 75 04 jne 10abba <rtems_rbheap_allocate+0x51>
10abb6: 39 d0 cmp %edx,%eax
10abb8: 75 ea jne 10aba4 <rtems_rbheap_allocate+0x3b>
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
10abba: 85 db test %ebx,%ebx
10abbc: 74 d6 je 10ab94 <rtems_rbheap_allocate+0x2b>
uintptr_t free_size = free_chunk->size;
10abbe: 8b 53 1c mov 0x1c(%ebx),%edx
if (free_size > aligned_size) {
10abc1: 39 f2 cmp %esi,%edx
10abc3: 76 4b jbe 10ac10 <rtems_rbheap_allocate+0xa7>
rtems_rbheap_chunk *new_chunk = get_chunk(control);
10abc5: 89 c8 mov %ecx,%eax
10abc7: 89 55 e4 mov %edx,-0x1c(%ebp)
10abca: 89 4d e0 mov %ecx,-0x20(%ebp)
10abcd: e8 49 fe ff ff call 10aa1b <get_chunk>
10abd2: 89 c7 mov %eax,%edi
if (new_chunk != NULL) {
10abd4: 85 c0 test %eax,%eax
10abd6: 8b 55 e4 mov -0x1c(%ebp),%edx
10abd9: 8b 4d e0 mov -0x20(%ebp),%ecx
10abdc: 74 b6 je 10ab94 <rtems_rbheap_allocate+0x2b><== NEVER TAKEN
uintptr_t new_free_size = free_size - aligned_size;
10abde: 29 f2 sub %esi,%edx
free_chunk->size = new_free_size;
10abe0: 89 53 1c mov %edx,0x1c(%ebx)
new_chunk->begin = free_chunk->begin + new_free_size;
10abe3: 03 53 18 add 0x18(%ebx),%edx
10abe6: 89 50 18 mov %edx,0x18(%eax)
new_chunk->size = aligned_size;
10abe9: 89 70 1c mov %esi,0x1c(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
10abec: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
10abf3: c7 00 00 00 00 00 movl $0x0,(%eax)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10abf9: 53 push %ebx
10abfa: 53 push %ebx
10abfb: 8d 40 08 lea 0x8(%eax),%eax
10abfe: 50 push %eax
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
10abff: 83 c1 18 add $0x18,%ecx
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10ac02: 51 push %ecx
10ac03: e8 20 15 00 00 call 10c128 <_RBTree_Insert_unprotected>
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
rtems_chain_set_off_chain(&new_chunk->chain_node);
insert_into_tree(chunk_tree, new_chunk);
ptr = (void *) new_chunk->begin;
10ac08: 8b 47 18 mov 0x18(%edi),%eax
10ac0b: 83 c4 10 add $0x10,%esp
10ac0e: eb 1a jmp 10ac2a <rtems_rbheap_allocate+0xc1>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10ac10: 8b 13 mov (%ebx),%edx
previous = the_node->previous;
10ac12: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
10ac15: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
10ac18: 89 10 mov %edx,(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
10ac1a: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
10ac21: c7 03 00 00 00 00 movl $0x0,(%ebx)
}
} else {
rtems_chain_extract_unprotected(&free_chunk->chain_node);
rtems_chain_set_off_chain(&free_chunk->chain_node);
ptr = (void *) free_chunk->begin;
10ac27: 8b 43 18 mov 0x18(%ebx),%eax
}
}
}
return ptr;
}
10ac2a: 8d 65 f4 lea -0xc(%ebp),%esp
10ac2d: 5b pop %ebx
10ac2e: 5e pop %esi
10ac2f: 5f pop %edi
10ac30: 5d pop %ebp
10ac31: c3 ret
0010ad25 <rtems_rbheap_extend_descriptors_with_malloc>:
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
10ad25: 55 push %ebp <== NOT EXECUTED
10ad26: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10ad28: 53 push %ebx <== NOT EXECUTED
10ad29: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
10ad2c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
10ad2f: 6a 20 push $0x20 <== NOT EXECUTED
10ad31: e8 3e c2 ff ff call 106f74 <malloc> <== NOT EXECUTED
if (chunk != NULL) {
10ad36: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ad39: 85 c0 test %eax,%eax <== NOT EXECUTED
10ad3b: 74 11 je 10ad4e <rtems_rbheap_extend_descriptors_with_malloc+0x29><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
10ad3d: 8d 53 0c lea 0xc(%ebx),%edx <== NOT EXECUTED
10ad40: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
10ad43: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
after_node->next = the_node;
10ad46: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
the_node->next = before_node;
10ad49: 89 10 mov %edx,(%eax) <== NOT EXECUTED
before_node->previous = the_node;
10ad4b: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
10ad4e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10ad51: c9 leave <== NOT EXECUTED
10ad52: c3 ret <== NOT EXECUTED
0010ac32 <rtems_rbheap_free>:
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
10ac32: 55 push %ebp
10ac33: 89 e5 mov %esp,%ebp
10ac35: 57 push %edi
10ac36: 56 push %esi
10ac37: 53 push %ebx
10ac38: 83 ec 3c sub $0x3c,%esp
10ac3b: 8b 5d 08 mov 0x8(%ebp),%ebx
10ac3e: 8b 55 0c mov 0xc(%ebp),%edx
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
10ac41: 85 d2 test %edx,%edx
10ac43: 0f 84 c6 00 00 00 je 10ad0f <rtems_rbheap_free+0xdd>
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
10ac49: 8d 73 18 lea 0x18(%ebx),%esi
#define NULL_PAGE rtems_rbheap_chunk_of_node(NULL)
static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key)
{
rtems_rbheap_chunk chunk = { .begin = key };
10ac4c: 8d 7d c8 lea -0x38(%ebp),%edi
10ac4f: b9 08 00 00 00 mov $0x8,%ecx
10ac54: 31 c0 xor %eax,%eax
10ac56: f3 ab rep stos %eax,%es:(%edi)
10ac58: 89 55 e0 mov %edx,-0x20(%ebp)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
10ac5b: 8b 53 1c mov 0x1c(%ebx),%edx
RBTree_Node* found = NULL;
10ac5e: 31 ff xor %edi,%edi
return rtems_rbheap_chunk_of_node(
10ac60: 8d 4d d0 lea -0x30(%ebp),%ecx
10ac63: eb 2e jmp 10ac93 <rtems_rbheap_free+0x61>
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
10ac65: 50 push %eax
10ac66: 50 push %eax
10ac67: 52 push %edx
10ac68: 51 push %ecx
10ac69: 89 55 c0 mov %edx,-0x40(%ebp)
10ac6c: 89 4d bc mov %ecx,-0x44(%ebp)
10ac6f: ff 56 10 call *0x10(%esi)
if ( _RBTree_Is_equal( compare_result ) ) {
10ac72: 83 c4 10 add $0x10,%esp
10ac75: 85 c0 test %eax,%eax
10ac77: 8b 55 c0 mov -0x40(%ebp),%edx
10ac7a: 8b 4d bc mov -0x44(%ebp),%ecx
10ac7d: 75 08 jne 10ac87 <rtems_rbheap_free+0x55>
found = iter_node;
if ( the_rbtree->is_unique )
10ac7f: 80 7e 14 00 cmpb $0x0,0x14(%esi)
10ac83: 75 14 jne 10ac99 <rtems_rbheap_free+0x67><== ALWAYS TAKEN
10ac85: 89 d7 mov %edx,%edi <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
10ac87: 85 c0 test %eax,%eax
10ac89: 0f 9f c0 setg %al
10ac8c: 0f b6 c0 movzbl %al,%eax
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
10ac8f: 8b 54 82 04 mov 0x4(%edx,%eax,4),%edx
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10ac93: 85 d2 test %edx,%edx
10ac95: 75 ce jne 10ac65 <rtems_rbheap_free+0x33>
10ac97: 89 fa mov %edi,%edx
10ac99: 8d 7a f8 lea -0x8(%edx),%edi
if (ptr != NULL) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr);
if (chunk != NULL_PAGE) {
10ac9c: 83 ff f8 cmp $0xfffffff8,%edi
10ac9f: 74 72 je 10ad13 <rtems_rbheap_free+0xe1>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10aca1: 31 c9 xor %ecx,%ecx
10aca3: 83 7a f8 00 cmpl $0x0,-0x8(%edx)
10aca7: 75 09 jne 10acb2 <rtems_rbheap_free+0x80>
10aca9: 31 c9 xor %ecx,%ecx
10acab: 83 7f 04 00 cmpl $0x0,0x4(%edi)
10acaf: 0f 94 c1 sete %cl
check_and_merge(free_chain, chunk_tree, chunk, succ);
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
10acb2: b8 0e 00 00 00 mov $0xe,%eax
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr);
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
10acb7: 85 c9 test %ecx,%ecx
10acb9: 74 5d je 10ad18 <rtems_rbheap_free+0xe6>
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
10acbb: 8d 57 08 lea 0x8(%edi),%edx
10acbe: 50 push %eax
10acbf: 50 push %eax
10acc0: 6a 00 push $0x0
10acc2: 52 push %edx
10acc3: 89 55 c0 mov %edx,-0x40(%ebp)
10acc6: e8 4d 16 00 00 call 10c318 <_RBTree_Next_unprotected>
10accb: 89 45 c4 mov %eax,-0x3c(%ebp)
10acce: 58 pop %eax
10accf: 5a pop %edx
10acd0: 6a 01 push $0x1
10acd2: 8b 55 c0 mov -0x40(%ebp),%edx
10acd5: 52 push %edx
10acd6: e8 3d 16 00 00 call 10c318 <_RBTree_Next_unprotected>
10acdb: 83 e8 08 sub $0x8,%eax
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
10acde: 89 04 24 mov %eax,(%esp)
10ace1: 89 f9 mov %edi,%ecx
10ace3: 89 f2 mov %esi,%edx
10ace5: 89 d8 mov %ebx,%eax
10ace7: e8 c5 fc ff ff call 10a9b1 <check_and_merge>
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10acec: 89 5f 04 mov %ebx,0x4(%edi)
before_node = after_node->next;
10acef: 8b 03 mov (%ebx),%eax
after_node->next = the_node;
10acf1: 89 3b mov %edi,(%ebx)
the_node->next = before_node;
10acf3: 89 07 mov %eax,(%edi)
before_node->previous = the_node;
10acf5: 89 78 04 mov %edi,0x4(%eax)
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
10acf8: 8b 45 c4 mov -0x3c(%ebp),%eax
10acfb: 83 e8 08 sub $0x8,%eax
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
10acfe: 89 04 24 mov %eax,(%esp)
10ad01: 89 f9 mov %edi,%ecx
10ad03: 89 f2 mov %esi,%edx
10ad05: 89 d8 mov %ebx,%eax
10ad07: e8 a5 fc ff ff call 10a9b1 <check_and_merge>
10ad0c: 83 c4 10 add $0x10,%esp
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
10ad0f: 31 c0 xor %eax,%eax
10ad11: eb 05 jmp 10ad18 <rtems_rbheap_free+0xe6>
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
}
} else {
sc = RTEMS_INVALID_ID;
10ad13: b8 04 00 00 00 mov $0x4,%eax
}
}
return sc;
}
10ad18: 8d 65 f4 lea -0xc(%ebp),%esp
10ad1b: 5b pop %ebx
10ad1c: 5e pop %esi
10ad1d: 5f pop %edi
10ad1e: 5d pop %ebp
10ad1f: c3 ret
00114e78 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
114e78: 55 push %ebp
114e79: 89 e5 mov %esp,%ebp
114e7b: 57 push %edi
114e7c: 56 push %esi
114e7d: 53 push %ebx
114e7e: 83 ec 1c sub $0x1c,%esp
114e81: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
114e84: be 09 00 00 00 mov $0x9,%esi
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
114e89: 85 ff test %edi,%edi
114e8b: 74 69 je 114ef6 <rtems_region_extend+0x7e>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
114e8d: 83 ec 0c sub $0xc,%esp
114e90: ff 35 a8 57 14 00 pushl 0x1457a8
114e96: e8 31 20 00 00 call 116ecc <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
114e9b: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
114e9e: 8d 45 e4 lea -0x1c(%ebp),%eax
114ea1: 50 push %eax
114ea2: ff 75 08 pushl 0x8(%ebp)
114ea5: 68 18 56 14 00 push $0x145618
114eaa: e8 09 38 00 00 call 1186b8 <_Objects_Get_no_protection>
114eaf: 89 c3 mov %eax,%ebx
switch ( location ) {
114eb1: 83 c4 10 add $0x10,%esp
114eb4: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
114eb8: 75 26 jne 114ee0 <rtems_region_extend+0x68>
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
114eba: 8d 45 e0 lea -0x20(%ebp),%eax
114ebd: 50 push %eax
114ebe: ff 75 10 pushl 0x10(%ebp)
114ec1: 57 push %edi
114ec2: 8d 43 68 lea 0x68(%ebx),%eax
114ec5: 50 push %eax
114ec6: e8 9c 2a 00 00 call 117967 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
114ecb: 83 c4 10 add $0x10,%esp
114ece: 84 c0 test %al,%al
114ed0: 74 13 je 114ee5 <rtems_region_extend+0x6d><== ALWAYS TAKEN
the_region->length += amount_extended;
114ed2: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
114ed5: 01 43 54 add %eax,0x54(%ebx) <== NOT EXECUTED
the_region->maximum_segment_size += amount_extended;
114ed8: 01 43 5c add %eax,0x5c(%ebx) <== NOT EXECUTED
return_status = RTEMS_SUCCESSFUL;
114edb: 66 31 f6 xor %si,%si <== NOT EXECUTED
114ede: eb 05 jmp 114ee5 <rtems_region_extend+0x6d><== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
114ee0: be 04 00 00 00 mov $0x4,%esi
break;
}
_RTEMS_Unlock_allocator();
114ee5: 83 ec 0c sub $0xc,%esp
114ee8: ff 35 a8 57 14 00 pushl 0x1457a8
114eee: e8 21 20 00 00 call 116f14 <_API_Mutex_Unlock>
114ef3: 83 c4 10 add $0x10,%esp
return return_status;
}
114ef6: 89 f0 mov %esi,%eax
114ef8: 8d 65 f4 lea -0xc(%ebp),%esp
114efb: 5b pop %ebx
114efc: 5e pop %esi
114efd: 5f pop %edi
114efe: 5d pop %ebp
114eff: c3 ret
00115724 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
115724: 55 push %ebp
115725: 89 e5 mov %esp,%ebp
115727: 53 push %ebx
115728: 83 ec 14 sub $0x14,%esp
11572b: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
11572e: b8 0a 00 00 00 mov $0xa,%eax
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
115733: 85 db test %ebx,%ebx
115735: 74 6d je 1157a4 <rtems_signal_send+0x80>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
115737: 50 push %eax
115738: 50 push %eax
115739: 8d 45 f4 lea -0xc(%ebp),%eax
11573c: 50 push %eax
11573d: ff 75 08 pushl 0x8(%ebp)
115740: e8 4f 3b 00 00 call 119294 <_Thread_Get>
switch ( location ) {
115745: 83 c4 10 add $0x10,%esp
115748: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
11574c: 75 51 jne 11579f <rtems_signal_send+0x7b>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
11574e: 8b 90 e0 00 00 00 mov 0xe0(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
115754: 83 7a 0c 00 cmpl $0x0,0xc(%edx)
115758: 74 39 je 115793 <rtems_signal_send+0x6f>
if ( asr->is_enabled ) {
11575a: 80 7a 08 00 cmpb $0x0,0x8(%edx)
11575e: 74 22 je 115782 <rtems_signal_send+0x5e>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
115760: 9c pushf
115761: fa cli
115762: 59 pop %ecx
*signal_set |= signals;
115763: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
115766: 51 push %ecx
115767: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
115768: 83 3d 1c 59 14 00 00 cmpl $0x0,0x14591c
11576f: 74 19 je 11578a <rtems_signal_send+0x66>
115771: 3b 05 20 59 14 00 cmp 0x145920,%eax
115777: 75 11 jne 11578a <rtems_signal_send+0x66><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
115779: c6 05 2c 59 14 00 01 movb $0x1,0x14592c
115780: eb 08 jmp 11578a <rtems_signal_send+0x66>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
115782: 9c pushf
115783: fa cli
115784: 58 pop %eax
*signal_set |= signals;
115785: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
115788: 50 push %eax
115789: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
11578a: e8 e5 3a 00 00 call 119274 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11578f: 31 c0 xor %eax,%eax
115791: eb 11 jmp 1157a4 <rtems_signal_send+0x80>
}
_Thread_Enable_dispatch();
115793: e8 dc 3a 00 00 call 119274 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
115798: b8 0b 00 00 00 mov $0xb,%eax
11579d: eb 05 jmp 1157a4 <rtems_signal_send+0x80>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11579f: b8 04 00 00 00 mov $0x4,%eax
}
1157a4: 8b 5d fc mov -0x4(%ebp),%ebx
1157a7: c9 leave
1157a8: c3 ret
001201cf <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
1201cf: 55 push %ebp
1201d0: 89 e5 mov %esp,%ebp
1201d2: 57 push %edi
1201d3: 56 push %esi
1201d4: 8b 45 08 mov 0x8(%ebp),%eax
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
1201d7: 83 78 08 00 cmpl $0x0,0x8(%eax)
1201db: 74 15 je 1201f2 <rtems_stack_checker_begin_extension+0x23><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
1201dd: 8b b8 b4 00 00 00 mov 0xb4(%eax),%edi
1201e3: 83 c7 08 add $0x8,%edi
1201e6: be dc cc 16 00 mov $0x16ccdc,%esi
1201eb: b9 04 00 00 00 mov $0x4,%ecx
1201f0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
1201f2: 5e pop %esi
1201f3: 5f pop %edi
1201f4: 5d pop %ebp
1201f5: c3 ret
00120148 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
120148: 55 push %ebp
120149: 89 e5 mov %esp,%ebp
12014b: 57 push %edi
12014c: 53 push %ebx
12014d: 8b 5d 0c mov 0xc(%ebp),%ebx
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
120150: 83 3d c8 c1 16 00 00 cmpl $0x0,0x16c1c8
120157: 75 5a jne 1201b3 <rtems_stack_checker_create_extension+0x6b>
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
120159: c7 05 dc cc 16 00 0d movl $0xfeedf00d,0x16ccdc
120160: f0 ed fe
120163: c7 05 e0 cc 16 00 06 movl $0xbad0d06,0x16cce0
12016a: 0d ad 0b
12016d: c7 05 e4 cc 16 00 0d movl $0xdeadf00d,0x16cce4
120174: f0 ad de
120177: c7 05 e8 cc 16 00 06 movl $0x600d0d06,0x16cce8
12017e: 0d 0d 60
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
120181: 8b 15 6c cb 16 00 mov 0x16cb6c,%edx
120187: 85 d2 test %edx,%edx
120189: 74 1e je 1201a9 <rtems_stack_checker_create_extension+0x61><== NEVER TAKEN
12018b: 8b 0d 70 cb 16 00 mov 0x16cb70,%ecx
120191: 85 c9 test %ecx,%ecx
120193: 74 14 je 1201a9 <rtems_stack_checker_create_extension+0x61><== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
120195: 89 15 f0 cc 16 00 mov %edx,0x16ccf0
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
12019b: 29 d1 sub %edx,%ecx
12019d: 89 0d ec cc 16 00 mov %ecx,0x16ccec
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
1201a3: b0 a5 mov $0xa5,%al
1201a5: 89 d7 mov %edx,%edi
1201a7: f3 aa rep stos %al,%es:(%edi)
}
#endif
Stack_check_Initialized = 1;
1201a9: c7 05 c8 c1 16 00 01 movl $0x1,0x16c1c8
1201b0: 00 00 00
Thread_Control *the_thread
)
{
Stack_check_Initialize();
if (the_thread)
1201b3: 85 db test %ebx,%ebx
1201b5: 74 12 je 1201c9 <rtems_stack_checker_create_extension+0x81><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
1201b7: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx
1201bd: 8b 8b b0 00 00 00 mov 0xb0(%ebx),%ecx
1201c3: b0 a5 mov $0xa5,%al
1201c5: 89 d7 mov %edx,%edi
1201c7: f3 aa rep stos %al,%es:(%edi)
return true;
}
1201c9: b0 01 mov $0x1,%al
1201cb: 5b pop %ebx
1201cc: 5f pop %edi
1201cd: 5d pop %ebp
1201ce: c3 ret
00120301 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
120301: 55 push %ebp
120302: 89 e5 mov %esp,%ebp
120304: 53 push %ebx
120305: 83 ec 14 sub $0x14,%esp
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
120308: 8b 1d 78 cb 16 00 mov 0x16cb78,%ebx
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
12030e: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx
return false;
120314: 31 c9 xor %ecx,%ecx
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
120316: 39 d5 cmp %edx,%ebp
120318: 72 0d jb 120327 <rtems_stack_checker_is_blown+0x26><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
12031a: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax
120320: 01 d0 add %edx,%eax
120322: 39 c5 cmp %eax,%ebp
120324: 0f 96 c1 setbe %cl
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
120327: b0 01 mov $0x1,%al
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
120329: 83 3d c8 c1 16 00 00 cmpl $0x0,0x16c1c8
120330: 74 1f je 120351 <rtems_stack_checker_is_blown+0x50><== NEVER TAKEN
pattern_ok = (!memcmp(
120332: 50 push %eax
120333: 6a 10 push $0x10
120335: 68 dc cc 16 00 push $0x16ccdc
12033a: 83 c2 08 add $0x8,%edx
12033d: 52 push %edx
12033e: 88 4d f4 mov %cl,-0xc(%ebp)
120341: e8 92 30 01 00 call 1333d8 <memcmp>
120346: 83 c4 10 add $0x10,%esp
120349: 85 c0 test %eax,%eax
12034b: 0f 94 c0 sete %al
12034e: 8a 4d f4 mov -0xc(%ebp),%cl
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
120351: 84 c0 test %al,%al
120353: 74 04 je 120359 <rtems_stack_checker_is_blown+0x58><== NEVER TAKEN
120355: 84 c9 test %cl,%cl
120357: 75 0c jne 120365 <rtems_stack_checker_is_blown+0x64><== ALWAYS TAKEN
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
120359: 52 push %edx <== NOT EXECUTED
12035a: 52 push %edx <== NOT EXECUTED
12035b: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
12035e: 50 push %eax <== NOT EXECUTED
12035f: 53 push %ebx <== NOT EXECUTED
120360: e8 91 fe ff ff call 1201f6 <Stack_check_report_blown_task><== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
120365: 31 c0 xor %eax,%eax
120367: 8b 5d fc mov -0x4(%ebp),%ebx
12036a: c9 leave
12036b: c3 ret
001203d1 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
1203d1: 55 push %ebp <== NOT EXECUTED
1203d2: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1203d4: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
1203d7: 68 34 20 12 00 push $0x122034 <== NOT EXECUTED
1203dc: 6a 00 push $0x0 <== NOT EXECUTED
1203de: e8 89 ff ff ff call 12036c <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
1203e3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1203e6: c9 leave <== NOT EXECUTED
1203e7: c3 ret <== NOT EXECUTED
0012036c <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
12036c: 55 push %ebp <== NOT EXECUTED
12036d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12036f: 56 push %esi <== NOT EXECUTED
120370: 53 push %ebx <== NOT EXECUTED
120371: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
120374: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
if ( !print )
120377: 85 db test %ebx,%ebx <== NOT EXECUTED
120379: 74 4f je 1203ca <rtems_stack_checker_report_usage_with_plugin+0x5e><== NOT EXECUTED
return;
print_context = context;
12037b: 89 35 cc c1 16 00 mov %esi,0x16c1cc <== NOT EXECUTED
print_handler = print;
120381: 89 1d d0 c1 16 00 mov %ebx,0x16c1d0 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
120387: 50 push %eax <== NOT EXECUTED
120388: 50 push %eax <== NOT EXECUTED
120389: 68 07 ed 14 00 push $0x14ed07 <== NOT EXECUTED
12038e: 56 push %esi <== NOT EXECUTED
12038f: ff d3 call *%ebx <== NOT EXECUTED
(*print)( context,
120391: 58 pop %eax <== NOT EXECUTED
120392: 5a pop %edx <== NOT EXECUTED
120393: 68 1e ed 14 00 push $0x14ed1e <== NOT EXECUTED
120398: 56 push %esi <== NOT EXECUTED
120399: ff d3 call *%ebx <== NOT EXECUTED
" ID NAME LOW HIGH CURRENT AVAILABLE USED\n"
);
/* iterate over all threads and dump the usage */
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
12039b: c7 04 24 30 00 12 00 movl $0x120030,(%esp) <== NOT EXECUTED
1203a2: e8 8d 32 00 00 call 123634 <rtems_iterate_over_all_threads><== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
1203a7: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED
1203ae: e8 7d fc ff ff call 120030 <Stack_check_Dump_threads_usage><== NOT EXECUTED
#endif
print_context = NULL;
1203b3: c7 05 cc c1 16 00 00 movl $0x0,0x16c1cc <== NOT EXECUTED
1203ba: 00 00 00
print_handler = NULL;
1203bd: c7 05 d0 c1 16 00 00 movl $0x0,0x16c1d0 <== NOT EXECUTED
1203c4: 00 00 00
1203c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1203ca: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1203cd: 5b pop %ebx <== NOT EXECUTED
1203ce: 5e pop %esi <== NOT EXECUTED
1203cf: 5d pop %ebp <== NOT EXECUTED
1203d0: c3 ret <== NOT EXECUTED
001202aa <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
1202aa: 55 push %ebp
1202ab: 89 e5 mov %esp,%ebp
1202ad: 53 push %ebx
1202ae: 83 ec 14 sub $0x14,%esp
1202b1: 8b 5d 08 mov 0x8(%ebp),%ebx
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = Stack_check_Get_pattern_area(the_stack);
1202b4: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax
1202ba: 8d 48 08 lea 0x8(%eax),%ecx
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
1202bd: 31 d2 xor %edx,%edx
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
1202bf: 39 c5 cmp %eax,%ebp
1202c1: 72 0b jb 1202ce <rtems_stack_checker_switch_extension+0x24><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
1202c3: 03 83 b0 00 00 00 add 0xb0(%ebx),%eax
1202c9: 39 c5 cmp %eax,%ebp
1202cb: 0f 96 c2 setbe %dl
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
1202ce: 50 push %eax
1202cf: 6a 10 push $0x10
1202d1: 68 dc cc 16 00 push $0x16ccdc
1202d6: 51 push %ecx
1202d7: 88 55 f4 mov %dl,-0xc(%ebp)
1202da: e8 f9 30 01 00 call 1333d8 <memcmp>
1202df: 83 c4 10 add $0x10,%esp
1202e2: 85 c0 test %eax,%eax
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
1202e4: 0f 94 c0 sete %al
1202e7: 8a 55 f4 mov -0xc(%ebp),%dl
1202ea: 75 04 jne 1202f0 <rtems_stack_checker_switch_extension+0x46><== NEVER TAKEN
1202ec: 84 d2 test %dl,%dl
1202ee: 75 0c jne 1202fc <rtems_stack_checker_switch_extension+0x52><== ALWAYS TAKEN
Stack_check_report_blown_task( running, pattern_ok );
1202f0: 51 push %ecx <== NOT EXECUTED
1202f1: 51 push %ecx <== NOT EXECUTED
1202f2: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
1202f5: 50 push %eax <== NOT EXECUTED
1202f6: 53 push %ebx <== NOT EXECUTED
1202f7: e8 fa fe ff ff call 1201f6 <Stack_check_report_blown_task><== NOT EXECUTED
}
}
1202fc: 8b 5d fc mov -0x4(%ebp),%ebx
1202ff: c9 leave
120300: c3 ret
0010e82c <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
10e82c: 55 push %ebp
10e82d: 89 e5 mov %esp,%ebp
10e82f: 57 push %edi
10e830: 56 push %esi
10e831: 53 push %ebx
10e832: 83 ec 2c sub $0x2c,%esp
10e835: 8b 75 08 mov 0x8(%ebp),%esi
10e838: 8b 5d 0c mov 0xc(%ebp),%ebx
10e83b: 8b 7d 10 mov 0x10(%ebp),%edi
double result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e83e: ba 09 00 00 00 mov $0x9,%edx
)
{
double result;
char *end;
if ( !n )
10e843: 85 db test %ebx,%ebx
10e845: 0f 84 95 00 00 00 je 10e8e0 <rtems_string_to_double+0xb4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e84b: e8 18 25 00 00 call 110d68 <__errno>
10e850: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e856: c7 03 00 00 00 00 movl $0x0,(%ebx)
10e85c: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtod( s, &end );
10e863: 50 push %eax
10e864: 50 push %eax
10e865: 8d 45 e4 lea -0x1c(%ebp),%eax
10e868: 50 push %eax
10e869: 56 push %esi
10e86a: e8 a1 52 00 00 call 113b10 <strtod>
if ( endptr )
10e86f: 83 c4 10 add $0x10,%esp
10e872: 85 ff test %edi,%edi
10e874: 74 05 je 10e87b <rtems_string_to_double+0x4f>
*endptr = end;
10e876: 8b 45 e4 mov -0x1c(%ebp),%eax
10e879: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e87b: ba 0b 00 00 00 mov $0xb,%edx
result = strtod( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
10e880: 39 75 e4 cmp %esi,-0x1c(%ebp)
10e883: 74 4d je 10e8d2 <rtems_string_to_double+0xa6>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e885: dd 5d c8 fstpl -0x38(%ebp)
10e888: e8 db 24 00 00 call 110d68 <__errno>
10e88d: 83 38 22 cmpl $0x22,(%eax)
10e890: dd 45 c8 fldl -0x38(%ebp)
10e893: 75 37 jne 10e8cc <rtems_string_to_double+0xa0>
10e895: d9 ee fldz
10e897: d9 c9 fxch %st(1)
10e899: dd e1 fucom %st(1)
10e89b: df e0 fnstsw %ax
10e89d: dd d9 fstp %st(1)
10e89f: 9e sahf
10e8a0: 7a 07 jp 10e8a9 <rtems_string_to_double+0x7d><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
10e8a2: ba 0a 00 00 00 mov $0xa,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e8a7: 74 2d je 10e8d6 <rtems_string_to_double+0xaa><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
10e8a9: ba 0a 00 00 00 mov $0xa,%edx
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
10e8ae: dd 05 b8 34 12 00 fldl 0x1234b8
10e8b4: d9 c9 fxch %st(1)
10e8b6: dd e1 fucom %st(1)
10e8b8: df e0 fnstsw %ax
10e8ba: dd d9 fstp %st(1)
10e8bc: 9e sahf
10e8bd: 77 1b ja 10e8da <rtems_string_to_double+0xae>
10e8bf: dd 05 c0 34 12 00 fldl 0x1234c0
10e8c5: dd e9 fucomp %st(1)
10e8c7: df e0 fnstsw %ax
10e8c9: 9e sahf
10e8ca: 77 12 ja 10e8de <rtems_string_to_double+0xb2><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
10e8cc: dd 1b fstpl (%ebx)
return RTEMS_SUCCESSFUL;
10e8ce: 31 d2 xor %edx,%edx
10e8d0: eb 0e jmp 10e8e0 <rtems_string_to_double+0xb4>
10e8d2: dd d8 fstp %st(0)
10e8d4: eb 0a jmp 10e8e0 <rtems_string_to_double+0xb4>
10e8d6: dd d8 fstp %st(0) <== NOT EXECUTED
10e8d8: eb 06 jmp 10e8e0 <rtems_string_to_double+0xb4><== NOT EXECUTED
10e8da: dd d8 fstp %st(0)
10e8dc: eb 02 jmp 10e8e0 <rtems_string_to_double+0xb4>
10e8de: dd d8 fstp %st(0)
}
10e8e0: 89 d0 mov %edx,%eax
10e8e2: 8d 65 f4 lea -0xc(%ebp),%esp
10e8e5: 5b pop %ebx
10e8e6: 5e pop %esi
10e8e7: 5f pop %edi
10e8e8: 5d pop %ebp
10e8e9: c3 ret
0010e8ec <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
10e8ec: 55 push %ebp
10e8ed: 89 e5 mov %esp,%ebp
10e8ef: 57 push %edi
10e8f0: 56 push %esi
10e8f1: 53 push %ebx
10e8f2: 83 ec 2c sub $0x2c,%esp
10e8f5: 8b 75 08 mov 0x8(%ebp),%esi
10e8f8: 8b 5d 0c mov 0xc(%ebp),%ebx
10e8fb: 8b 7d 10 mov 0x10(%ebp),%edi
float result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e8fe: ba 09 00 00 00 mov $0x9,%edx
)
{
float result;
char *end;
if ( !n )
10e903: 85 db test %ebx,%ebx
10e905: 0f 84 8e 00 00 00 je 10e999 <rtems_string_to_float+0xad>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e90b: e8 58 24 00 00 call 110d68 <__errno>
10e910: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e916: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtof( s, &end );
10e91c: 50 push %eax
10e91d: 50 push %eax
10e91e: 8d 45 e4 lea -0x1c(%ebp),%eax
10e921: 50 push %eax
10e922: 56 push %esi
10e923: e8 0c 52 00 00 call 113b34 <strtof>
if ( endptr )
10e928: 83 c4 10 add $0x10,%esp
10e92b: 85 ff test %edi,%edi
10e92d: 74 05 je 10e934 <rtems_string_to_float+0x48>
*endptr = end;
10e92f: 8b 45 e4 mov -0x1c(%ebp),%eax
10e932: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e934: ba 0b 00 00 00 mov $0xb,%edx
result = strtof( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
10e939: 39 75 e4 cmp %esi,-0x1c(%ebp)
10e93c: 74 4d je 10e98b <rtems_string_to_float+0x9f>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e93e: d9 5d c8 fstps -0x38(%ebp)
10e941: e8 22 24 00 00 call 110d68 <__errno>
10e946: 83 38 22 cmpl $0x22,(%eax)
10e949: d9 45 c8 flds -0x38(%ebp)
10e94c: 75 37 jne 10e985 <rtems_string_to_float+0x99>
10e94e: d9 ee fldz
10e950: d9 c9 fxch %st(1)
10e952: dd e1 fucom %st(1)
10e954: df e0 fnstsw %ax
10e956: dd d9 fstp %st(1)
10e958: 9e sahf
10e959: 7a 07 jp 10e962 <rtems_string_to_float+0x76><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
10e95b: ba 0a 00 00 00 mov $0xa,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e960: 74 2d je 10e98f <rtems_string_to_float+0xa3><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
10e962: ba 0a 00 00 00 mov $0xa,%edx
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
10e967: d9 05 c8 34 12 00 flds 0x1234c8
10e96d: d9 c9 fxch %st(1)
10e96f: dd e1 fucom %st(1)
10e971: df e0 fnstsw %ax
10e973: dd d9 fstp %st(1)
10e975: 9e sahf
10e976: 77 1b ja 10e993 <rtems_string_to_float+0xa7>
10e978: d9 05 cc 34 12 00 flds 0x1234cc
10e97e: dd e9 fucomp %st(1)
10e980: df e0 fnstsw %ax
10e982: 9e sahf
10e983: 77 12 ja 10e997 <rtems_string_to_float+0xab><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
10e985: d9 1b fstps (%ebx)
return RTEMS_SUCCESSFUL;
10e987: 31 d2 xor %edx,%edx
10e989: eb 0e jmp 10e999 <rtems_string_to_float+0xad>
10e98b: dd d8 fstp %st(0)
10e98d: eb 0a jmp 10e999 <rtems_string_to_float+0xad>
10e98f: dd d8 fstp %st(0) <== NOT EXECUTED
10e991: eb 06 jmp 10e999 <rtems_string_to_float+0xad><== NOT EXECUTED
10e993: dd d8 fstp %st(0)
10e995: eb 02 jmp 10e999 <rtems_string_to_float+0xad>
10e997: dd d8 fstp %st(0)
}
10e999: 89 d0 mov %edx,%eax
10e99b: 8d 65 f4 lea -0xc(%ebp),%esp
10e99e: 5b pop %ebx
10e99f: 5e pop %esi
10e9a0: 5f pop %edi
10e9a1: 5d pop %ebp
10e9a2: c3 ret
0011be3c <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
11be3c: 55 push %ebp
11be3d: 89 e5 mov %esp,%ebp
11be3f: 57 push %edi
11be40: 56 push %esi
11be41: 53 push %ebx
11be42: 83 ec 1c sub $0x1c,%esp
11be45: 8b 5d 0c mov 0xc(%ebp),%ebx
11be48: 8b 7d 10 mov 0x10(%ebp),%edi
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
11be4b: b8 09 00 00 00 mov $0x9,%eax
)
{
long result;
char *end;
if ( !n )
11be50: 85 db test %ebx,%ebx
11be52: 74 63 je 11beb7 <rtems_string_to_int+0x7b>
return RTEMS_INVALID_ADDRESS;
errno = 0;
11be54: e8 9b 43 01 00 call 1301f4 <__errno>
11be59: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
11be5f: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtol( s, &end, base );
11be65: 50 push %eax
11be66: ff 75 14 pushl 0x14(%ebp)
11be69: 8d 45 e4 lea -0x1c(%ebp),%eax
11be6c: 50 push %eax
11be6d: ff 75 08 pushl 0x8(%ebp)
11be70: e8 27 bb 01 00 call 13799c <strtol>
11be75: 89 c6 mov %eax,%esi
if ( endptr )
11be77: 83 c4 10 add $0x10,%esp
11be7a: 85 ff test %edi,%edi
11be7c: 74 05 je 11be83 <rtems_string_to_int+0x47>
*endptr = end;
11be7e: 8b 45 e4 mov -0x1c(%ebp),%eax
11be81: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
11be83: b8 0b 00 00 00 mov $0xb,%eax
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
11be88: 8b 55 08 mov 0x8(%ebp),%edx
11be8b: 39 55 e4 cmp %edx,-0x1c(%ebp)
11be8e: 74 27 je 11beb7 <rtems_string_to_int+0x7b>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
11be90: e8 5f 43 01 00 call 1301f4 <__errno>
11be95: 83 38 22 cmpl $0x22,(%eax)
11be98: 75 19 jne 11beb3 <rtems_string_to_int+0x77>
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
11be9a: b8 0a 00 00 00 mov $0xa,%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
11be9f: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi
11bea5: 74 10 je 11beb7 <rtems_string_to_int+0x7b>
11bea7: 85 f6 test %esi,%esi
11bea9: 74 0c je 11beb7 <rtems_string_to_int+0x7b><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
11beab: 81 fe 00 00 00 80 cmp $0x80000000,%esi
11beb1: 74 04 je 11beb7 <rtems_string_to_int+0x7b><== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
11beb3: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
11beb5: 31 c0 xor %eax,%eax
}
11beb7: 8d 65 f4 lea -0xc(%ebp),%esp
11beba: 5b pop %ebx
11bebb: 5e pop %esi
11bebc: 5f pop %edi
11bebd: 5d pop %ebp
11bebe: c3 ret
0010ead4 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
10ead4: 55 push %ebp
10ead5: 89 e5 mov %esp,%ebp
10ead7: 57 push %edi
10ead8: 56 push %esi
10ead9: 53 push %ebx
10eada: 83 ec 1c sub $0x1c,%esp
10eadd: 8b 5d 0c mov 0xc(%ebp),%ebx
10eae0: 8b 7d 10 mov 0x10(%ebp),%edi
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10eae3: b8 09 00 00 00 mov $0x9,%eax
)
{
long result;
char *end;
if ( !n )
10eae8: 85 db test %ebx,%ebx
10eaea: 74 63 je 10eb4f <rtems_string_to_long+0x7b>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10eaec: e8 77 22 00 00 call 110d68 <__errno>
10eaf1: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10eaf7: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtol( s, &end, base );
10eafd: 50 push %eax
10eafe: ff 75 14 pushl 0x14(%ebp)
10eb01: 8d 45 e4 lea -0x1c(%ebp),%eax
10eb04: 50 push %eax
10eb05: ff 75 08 pushl 0x8(%ebp)
10eb08: e8 3b 52 00 00 call 113d48 <strtol>
10eb0d: 89 c6 mov %eax,%esi
if ( endptr )
10eb0f: 83 c4 10 add $0x10,%esp
10eb12: 85 ff test %edi,%edi
10eb14: 74 05 je 10eb1b <rtems_string_to_long+0x47>
*endptr = end;
10eb16: 8b 45 e4 mov -0x1c(%ebp),%eax
10eb19: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10eb1b: b8 0b 00 00 00 mov $0xb,%eax
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10eb20: 8b 55 08 mov 0x8(%ebp),%edx
10eb23: 39 55 e4 cmp %edx,-0x1c(%ebp)
10eb26: 74 27 je 10eb4f <rtems_string_to_long+0x7b>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10eb28: e8 3b 22 00 00 call 110d68 <__errno>
10eb2d: 83 38 22 cmpl $0x22,(%eax)
10eb30: 75 19 jne 10eb4b <rtems_string_to_long+0x77>
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
10eb32: b8 0a 00 00 00 mov $0xa,%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10eb37: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi
10eb3d: 74 10 je 10eb4f <rtems_string_to_long+0x7b>
10eb3f: 85 f6 test %esi,%esi
10eb41: 74 0c je 10eb4f <rtems_string_to_long+0x7b><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
10eb43: 81 fe 00 00 00 80 cmp $0x80000000,%esi
10eb49: 74 04 je 10eb4f <rtems_string_to_long+0x7b><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
10eb4b: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
10eb4d: 31 c0 xor %eax,%eax
}
10eb4f: 8d 65 f4 lea -0xc(%ebp),%esp
10eb52: 5b pop %ebx
10eb53: 5e pop %esi
10eb54: 5f pop %edi
10eb55: 5d pop %ebp
10eb56: c3 ret
0010ea28 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
10ea28: 55 push %ebp
10ea29: 89 e5 mov %esp,%ebp
10ea2b: 57 push %edi
10ea2c: 56 push %esi
10ea2d: 53 push %ebx
10ea2e: 83 ec 2c sub $0x2c,%esp
10ea31: 8b 75 08 mov 0x8(%ebp),%esi
10ea34: 8b 5d 0c mov 0xc(%ebp),%ebx
long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10ea37: b8 09 00 00 00 mov $0x9,%eax
)
{
long long result;
char *end;
if ( !n )
10ea3c: 85 db test %ebx,%ebx
10ea3e: 0f 84 85 00 00 00 je 10eac9 <rtems_string_to_long_long+0xa1>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10ea44: e8 1f 23 00 00 call 110d68 <__errno>
10ea49: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10ea4f: c7 03 00 00 00 00 movl $0x0,(%ebx)
10ea55: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtoll( s, &end, base );
10ea5c: 50 push %eax
10ea5d: ff 75 14 pushl 0x14(%ebp)
10ea60: 8d 45 e4 lea -0x1c(%ebp),%eax
10ea63: 50 push %eax
10ea64: 56 push %esi
10ea65: e8 0a 53 00 00 call 113d74 <strtoll>
10ea6a: 89 c7 mov %eax,%edi
if ( endptr )
10ea6c: 83 c4 10 add $0x10,%esp
10ea6f: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10ea73: 74 08 je 10ea7d <rtems_string_to_long_long+0x55>
*endptr = end;
10ea75: 8b 45 e4 mov -0x1c(%ebp),%eax
10ea78: 8b 4d 10 mov 0x10(%ebp),%ecx
10ea7b: 89 01 mov %eax,(%ecx)
if ( end == s )
return RTEMS_NOT_DEFINED;
10ea7d: b8 0b 00 00 00 mov $0xb,%eax
result = strtoll( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10ea82: 39 75 e4 cmp %esi,-0x1c(%ebp)
10ea85: 74 42 je 10eac9 <rtems_string_to_long_long+0xa1>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ea87: 89 55 d4 mov %edx,-0x2c(%ebp)
10ea8a: e8 d9 22 00 00 call 110d68 <__errno>
10ea8f: 83 38 22 cmpl $0x22,(%eax)
10ea92: 8b 55 d4 mov -0x2c(%ebp),%edx
10ea95: 75 24 jne 10eabb <rtems_string_to_long_long+0x93>
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
10ea97: 89 fe mov %edi,%esi
10ea99: f7 d6 not %esi
10ea9b: 89 d0 mov %edx,%eax
10ea9d: 35 ff ff ff 7f xor $0x7fffffff,%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10eaa2: 09 c6 or %eax,%esi
10eaa4: 74 1e je 10eac4 <rtems_string_to_long_long+0x9c>
10eaa6: 89 f8 mov %edi,%eax
10eaa8: 09 d0 or %edx,%eax
10eaaa: 74 18 je 10eac4 <rtems_string_to_long_long+0x9c><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
10eaac: 8d b2 00 00 00 80 lea -0x80000000(%edx),%esi
return RTEMS_INVALID_NUMBER;
10eab2: b8 0a 00 00 00 mov $0xa,%eax
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
10eab7: 09 fe or %edi,%esi
10eab9: 74 0e je 10eac9 <rtems_string_to_long_long+0xa1><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
10eabb: 89 3b mov %edi,(%ebx)
10eabd: 89 53 04 mov %edx,0x4(%ebx)
return RTEMS_SUCCESSFUL;
10eac0: 31 c0 xor %eax,%eax
10eac2: eb 05 jmp 10eac9 <rtems_string_to_long_long+0xa1>
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
10eac4: b8 0a 00 00 00 mov $0xa,%eax
*n = result;
return RTEMS_SUCCESSFUL;
}
10eac9: 8d 65 f4 lea -0xc(%ebp),%esp
10eacc: 5b pop %ebx
10eacd: 5e pop %esi
10eace: 5f pop %edi
10eacf: 5d pop %ebp
10ead0: c3 ret
0011bed8 <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
11bed8: 55 push %ebp
11bed9: 89 e5 mov %esp,%ebp
11bedb: 57 push %edi
11bedc: 56 push %esi
11bedd: 53 push %ebx
11bede: 83 ec 2c sub $0x2c,%esp
11bee1: 8b 75 08 mov 0x8(%ebp),%esi
11bee4: 8b 5d 0c mov 0xc(%ebp),%ebx
11bee7: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
11beea: ba 09 00 00 00 mov $0x9,%edx
)
{
unsigned long result;
char *end;
if ( !n )
11beef: 85 db test %ebx,%ebx
11bef1: 74 6f je 11bf62 <rtems_string_to_unsigned_char+0x8a>
return RTEMS_INVALID_ADDRESS;
errno = 0;
11bef3: e8 fc 42 01 00 call 1301f4 <__errno>
11bef8: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
11befe: c6 03 00 movb $0x0,(%ebx)
result = strtoul( s, &end, base );
11bf01: 50 push %eax
11bf02: ff 75 14 pushl 0x14(%ebp)
11bf05: 8d 45 e4 lea -0x1c(%ebp),%eax
11bf08: 50 push %eax
11bf09: 56 push %esi
11bf0a: e8 09 c0 01 00 call 137f18 <strtoul>
11bf0f: 89 c1 mov %eax,%ecx
if ( endptr )
11bf11: 83 c4 10 add $0x10,%esp
11bf14: 85 ff test %edi,%edi
11bf16: 74 05 je 11bf1d <rtems_string_to_unsigned_char+0x45>
*endptr = end;
11bf18: 8b 45 e4 mov -0x1c(%ebp),%eax
11bf1b: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
11bf1d: ba 0b 00 00 00 mov $0xb,%edx
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
11bf22: 39 75 e4 cmp %esi,-0x1c(%ebp)
11bf25: 74 3b je 11bf62 <rtems_string_to_unsigned_char+0x8a>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
11bf27: 89 4d d4 mov %ecx,-0x2c(%ebp)
11bf2a: e8 c5 42 01 00 call 1301f4 <__errno>
11bf2f: 83 38 22 cmpl $0x22,(%eax)
11bf32: 8b 4d d4 mov -0x2c(%ebp),%ecx
11bf35: 75 0d jne 11bf44 <rtems_string_to_unsigned_char+0x6c>
(( result == 0 ) || ( result == ULONG_MAX )))
11bf37: 8d 41 ff lea -0x1(%ecx),%eax
return RTEMS_INVALID_NUMBER;
11bf3a: ba 0a 00 00 00 mov $0xa,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
11bf3f: 83 f8 fd cmp $0xfffffffd,%eax
11bf42: 77 1e ja 11bf62 <rtems_string_to_unsigned_char+0x8a><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
11bf44: 81 f9 ff 00 00 00 cmp $0xff,%ecx
11bf4a: 76 12 jbe 11bf5e <rtems_string_to_unsigned_char+0x86>
errno = ERANGE;
11bf4c: e8 a3 42 01 00 call 1301f4 <__errno>
11bf51: c7 00 22 00 00 00 movl $0x22,(%eax)
return RTEMS_INVALID_NUMBER;
11bf57: ba 0a 00 00 00 mov $0xa,%edx
11bf5c: eb 04 jmp 11bf62 <rtems_string_to_unsigned_char+0x8a>
}
#endif
*n = result;
11bf5e: 88 0b mov %cl,(%ebx)
return RTEMS_SUCCESSFUL;
11bf60: 31 d2 xor %edx,%edx
}
11bf62: 89 d0 mov %edx,%eax
11bf64: 8d 65 f4 lea -0xc(%ebp),%esp
11bf67: 5b pop %ebx
11bf68: 5e pop %esi
11bf69: 5f pop %edi
11bf6a: 5d pop %ebp
11bf6b: c3 ret
0010ec04 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
10ec04: 55 push %ebp
10ec05: 89 e5 mov %esp,%ebp
10ec07: 57 push %edi
10ec08: 56 push %esi
10ec09: 53 push %ebx
10ec0a: 83 ec 1c sub $0x1c,%esp
10ec0d: 8b 5d 0c mov 0xc(%ebp),%ebx
10ec10: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10ec13: ba 09 00 00 00 mov $0x9,%edx
)
{
unsigned long result;
char *end;
if ( !n )
10ec18: 85 db test %ebx,%ebx
10ec1a: 74 57 je 10ec73 <rtems_string_to_unsigned_int+0x6f>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10ec1c: e8 47 21 00 00 call 110d68 <__errno>
10ec21: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10ec27: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtoul( s, &end, base );
10ec2d: 50 push %eax
10ec2e: ff 75 14 pushl 0x14(%ebp)
10ec31: 8d 45 e4 lea -0x1c(%ebp),%eax
10ec34: 50 push %eax
10ec35: ff 75 08 pushl 0x8(%ebp)
10ec38: e8 87 56 00 00 call 1142c4 <strtoul>
10ec3d: 89 c6 mov %eax,%esi
if ( endptr )
10ec3f: 83 c4 10 add $0x10,%esp
10ec42: 85 ff test %edi,%edi
10ec44: 74 05 je 10ec4b <rtems_string_to_unsigned_int+0x47>
*endptr = end;
10ec46: 8b 45 e4 mov -0x1c(%ebp),%eax
10ec49: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10ec4b: ba 0b 00 00 00 mov $0xb,%edx
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10ec50: 8b 45 08 mov 0x8(%ebp),%eax
10ec53: 39 45 e4 cmp %eax,-0x1c(%ebp)
10ec56: 74 1b je 10ec73 <rtems_string_to_unsigned_int+0x6f>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ec58: e8 0b 21 00 00 call 110d68 <__errno>
10ec5d: 83 38 22 cmpl $0x22,(%eax)
10ec60: 75 0d jne 10ec6f <rtems_string_to_unsigned_int+0x6b>
(( result == 0 ) || ( result == ULONG_MAX )))
10ec62: 8d 46 ff lea -0x1(%esi),%eax
return RTEMS_INVALID_NUMBER;
10ec65: ba 0a 00 00 00 mov $0xa,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ec6a: 83 f8 fd cmp $0xfffffffd,%eax
10ec6d: 77 04 ja 10ec73 <rtems_string_to_unsigned_int+0x6f><== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
10ec6f: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
10ec71: 31 d2 xor %edx,%edx
}
10ec73: 89 d0 mov %edx,%eax
10ec75: 8d 65 f4 lea -0xc(%ebp),%esp
10ec78: 5b pop %ebx
10ec79: 5e pop %esi
10ec7a: 5f pop %edi
10ec7b: 5d pop %ebp
10ec7c: c3 ret
0010d3c0 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
10d3c0: 55 push %ebp
10d3c1: 89 e5 mov %esp,%ebp
10d3c3: 57 push %edi
10d3c4: 56 push %esi
10d3c5: 53 push %ebx
10d3c6: 83 ec 1c sub $0x1c,%esp
10d3c9: 8b 5d 0c mov 0xc(%ebp),%ebx
10d3cc: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10d3cf: ba 09 00 00 00 mov $0x9,%edx
)
{
unsigned long result;
char *end;
if ( !n )
10d3d4: 85 db test %ebx,%ebx
10d3d6: 74 57 je 10d42f <rtems_string_to_unsigned_long+0x6f>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10d3d8: e8 17 2e 02 00 call 1301f4 <__errno>
10d3dd: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10d3e3: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtoul( s, &end, base );
10d3e9: 50 push %eax
10d3ea: ff 75 14 pushl 0x14(%ebp)
10d3ed: 8d 45 e4 lea -0x1c(%ebp),%eax
10d3f0: 50 push %eax
10d3f1: ff 75 08 pushl 0x8(%ebp)
10d3f4: e8 1f ab 02 00 call 137f18 <strtoul>
10d3f9: 89 c6 mov %eax,%esi
if ( endptr )
10d3fb: 83 c4 10 add $0x10,%esp
10d3fe: 85 ff test %edi,%edi
10d400: 74 05 je 10d407 <rtems_string_to_unsigned_long+0x47>
*endptr = end;
10d402: 8b 45 e4 mov -0x1c(%ebp),%eax
10d405: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10d407: ba 0b 00 00 00 mov $0xb,%edx
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10d40c: 8b 45 08 mov 0x8(%ebp),%eax
10d40f: 39 45 e4 cmp %eax,-0x1c(%ebp)
10d412: 74 1b je 10d42f <rtems_string_to_unsigned_long+0x6f>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10d414: e8 db 2d 02 00 call 1301f4 <__errno>
10d419: 83 38 22 cmpl $0x22,(%eax)
10d41c: 75 0d jne 10d42b <rtems_string_to_unsigned_long+0x6b>
(( result == 0 ) || ( result == ULONG_MAX )))
10d41e: 8d 46 ff lea -0x1(%esi),%eax
return RTEMS_INVALID_NUMBER;
10d421: ba 0a 00 00 00 mov $0xa,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10d426: 83 f8 fd cmp $0xfffffffd,%eax
10d429: 77 04 ja 10d42f <rtems_string_to_unsigned_long+0x6f><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
10d42b: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
10d42d: 31 d2 xor %edx,%edx
}
10d42f: 89 d0 mov %edx,%eax
10d431: 8d 65 f4 lea -0xc(%ebp),%esp
10d434: 5b pop %ebx
10d435: 5e pop %esi
10d436: 5f pop %edi
10d437: 5d pop %ebp
10d438: c3 ret
0010ec80 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
10ec80: 55 push %ebp
10ec81: 89 e5 mov %esp,%ebp
10ec83: 57 push %edi
10ec84: 56 push %esi
10ec85: 53 push %ebx
10ec86: 83 ec 1c sub $0x1c,%esp
10ec89: 8b 5d 08 mov 0x8(%ebp),%ebx
unsigned long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10ec8c: b8 09 00 00 00 mov $0x9,%eax
)
{
unsigned long long result;
char *end;
if ( !n )
10ec91: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10ec95: 74 75 je 10ed0c <rtems_string_to_unsigned_long_long+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10ec97: e8 cc 20 00 00 call 110d68 <__errno>
10ec9c: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10eca2: 8b 45 0c mov 0xc(%ebp),%eax
10eca5: c7 00 00 00 00 00 movl $0x0,(%eax)
10ecab: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
result = strtoull( s, &end, base );
10ecb2: 50 push %eax
10ecb3: ff 75 14 pushl 0x14(%ebp)
10ecb6: 8d 45 e4 lea -0x1c(%ebp),%eax
10ecb9: 50 push %eax
10ecba: 53 push %ebx
10ecbb: e8 30 56 00 00 call 1142f0 <strtoull>
10ecc0: 89 c6 mov %eax,%esi
10ecc2: 89 d7 mov %edx,%edi
if ( endptr )
10ecc4: 83 c4 10 add $0x10,%esp
10ecc7: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10eccb: 74 08 je 10ecd5 <rtems_string_to_unsigned_long_long+0x55>
*endptr = end;
10eccd: 8b 45 e4 mov -0x1c(%ebp),%eax
10ecd0: 8b 55 10 mov 0x10(%ebp),%edx
10ecd3: 89 02 mov %eax,(%edx)
if ( end == s )
return RTEMS_NOT_DEFINED;
10ecd5: b8 0b 00 00 00 mov $0xb,%eax
result = strtoull( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10ecda: 39 5d e4 cmp %ebx,-0x1c(%ebp)
10ecdd: 74 2d je 10ed0c <rtems_string_to_unsigned_long_long+0x8c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ecdf: e8 84 20 00 00 call 110d68 <__errno>
10ece4: 83 38 22 cmpl $0x22,(%eax)
10ece7: 75 19 jne 10ed02 <rtems_string_to_unsigned_long_long+0x82>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
10ece9: 89 f1 mov %esi,%ecx
10eceb: 89 fb mov %edi,%ebx
10eced: 83 c1 ff add $0xffffffff,%ecx
10ecf0: 83 d3 ff adc $0xffffffff,%ebx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ecf3: 83 fb ff cmp $0xffffffff,%ebx
10ecf6: 72 0a jb 10ed02 <rtems_string_to_unsigned_long_long+0x82><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
10ecf8: b8 0a 00 00 00 mov $0xa,%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ecfd: 83 f9 fd cmp $0xfffffffd,%ecx
10ed00: 77 0a ja 10ed0c <rtems_string_to_unsigned_long_long+0x8c><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
10ed02: 8b 45 0c mov 0xc(%ebp),%eax
10ed05: 89 30 mov %esi,(%eax)
10ed07: 89 78 04 mov %edi,0x4(%eax)
return RTEMS_SUCCESSFUL;
10ed0a: 31 c0 xor %eax,%eax
}
10ed0c: 8d 65 f4 lea -0xc(%ebp),%esp
10ed0f: 5b pop %ebx
10ed10: 5e pop %esi
10ed11: 5f pop %edi
10ed12: 5d pop %ebp
10ed13: c3 ret
0010b68c <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
10b68c: 55 push %ebp
10b68d: 89 e5 mov %esp,%ebp
10b68f: 56 push %esi
10b690: 53 push %ebx
10b691: 83 ec 10 sub $0x10,%esp
10b694: 8b 55 08 mov 0x8(%ebp),%edx
10b697: 8b 75 0c mov 0xc(%ebp),%esi
10b69a: 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() )
return RTEMS_NOT_CONFIGURED;
10b69d: b8 16 00 00 00 mov $0x16,%eax
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10b6a2: 80 3d 74 b7 12 00 00 cmpb $0x0,0x12b774
10b6a9: 74 5d je 10b708 <rtems_task_get_note+0x7c><== NEVER TAKEN
return RTEMS_NOT_CONFIGURED;
if ( !note )
10b6ab: 85 db test %ebx,%ebx
10b6ad: 74 4d je 10b6fc <rtems_task_get_note+0x70>
* 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;
10b6af: b0 0a mov $0xa,%al
/*
* 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 )
10b6b1: 83 fe 0f cmp $0xf,%esi
10b6b4: 77 52 ja 10b708 <rtems_task_get_note+0x7c>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10b6b6: 85 d2 test %edx,%edx
10b6b8: a1 d8 fd 12 00 mov 0x12fdd8,%eax
10b6bd: 74 05 je 10b6c4 <rtems_task_get_note+0x38>
10b6bf: 3b 50 08 cmp 0x8(%eax),%edx
10b6c2: 75 0e jne 10b6d2 <rtems_task_get_note+0x46>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10b6c4: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax
10b6ca: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10b6ce: 89 03 mov %eax,(%ebx)
10b6d0: eb 26 jmp 10b6f8 <rtems_task_get_note+0x6c>
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10b6d2: 50 push %eax
10b6d3: 50 push %eax
10b6d4: 8d 45 f4 lea -0xc(%ebp),%eax
10b6d7: 50 push %eax
10b6d8: 52 push %edx
10b6d9: e8 8e 1f 00 00 call 10d66c <_Thread_Get>
switch ( location ) {
10b6de: 83 c4 10 add $0x10,%esp
10b6e1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10b6e5: 75 1c jne 10b703 <rtems_task_get_note+0x77>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10b6e7: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax
10b6ed: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10b6f1: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10b6f3: e8 54 1f 00 00 call 10d64c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b6f8: 31 c0 xor %eax,%eax
10b6fa: eb 0c jmp 10b708 <rtems_task_get_note+0x7c>
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
return RTEMS_INVALID_ADDRESS;
10b6fc: b8 09 00 00 00 mov $0x9,%eax
10b701: eb 05 jmp 10b708 <rtems_task_get_note+0x7c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b703: b8 04 00 00 00 mov $0x4,%eax
}
10b708: 8d 65 f8 lea -0x8(%ebp),%esp
10b70b: 5b pop %ebx
10b70c: 5e pop %esi
10b70d: 5d pop %ebp
10b70e: c3 ret
0010fe34 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
10fe34: 55 push %ebp
10fe35: 89 e5 mov %esp,%ebp
10fe37: 57 push %edi
10fe38: 56 push %esi
10fe39: 53 push %ebx
10fe3a: 83 ec 1c sub $0x1c,%esp
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
10fe3d: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10fe41: 0f 84 00 01 00 00 je 10ff47 <rtems_task_mode+0x113>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
10fe47: 8b 35 68 c5 12 00 mov 0x12c568,%esi
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10fe4d: 8b 9e e0 00 00 00 mov 0xe0(%esi),%ebx
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
10fe53: 80 7e 70 01 cmpb $0x1,0x70(%esi)
10fe57: 19 ff sbb %edi,%edi
10fe59: 81 e7 00 01 00 00 and $0x100,%edi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
10fe5f: 83 7e 78 00 cmpl $0x0,0x78(%esi)
10fe63: 74 06 je 10fe6b <rtems_task_mode+0x37>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
10fe65: 81 cf 00 02 00 00 or $0x200,%edi
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
10fe6b: 80 7b 08 01 cmpb $0x1,0x8(%ebx)
10fe6f: 19 c9 sbb %ecx,%ecx
10fe71: 81 e1 00 04 00 00 and $0x400,%ecx
old_mode |= _ISR_Get_level();
10fe77: 89 4d e4 mov %ecx,-0x1c(%ebp)
10fe7a: e8 d1 cf ff ff call 10ce50 <_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;
10fe7f: 8b 4d e4 mov -0x1c(%ebp),%ecx
10fe82: 09 c8 or %ecx,%eax
old_mode |= _ISR_Get_level();
10fe84: 09 f8 or %edi,%eax
10fe86: 8b 55 10 mov 0x10(%ebp),%edx
10fe89: 89 02 mov %eax,(%edx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
10fe8b: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
10fe92: 74 0f je 10fea3 <rtems_task_mode+0x6f>
10fe94: 8b 45 08 mov 0x8(%ebp),%eax
10fe97: c1 e8 08 shr $0x8,%eax
10fe9a: 83 f0 01 xor $0x1,%eax
10fe9d: 83 e0 01 and $0x1,%eax
10fea0: 88 46 70 mov %al,0x70(%esi)
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
10fea3: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
10feaa: 74 21 je 10fecd <rtems_task_mode+0x99>
if ( _Modes_Is_timeslice(mode_set) ) {
10feac: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
10feb3: 74 11 je 10fec6 <rtems_task_mode+0x92>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
10feb5: c7 46 78 01 00 00 00 movl $0x1,0x78(%esi)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10febc: a1 40 c3 12 00 mov 0x12c340,%eax
10fec1: 89 46 74 mov %eax,0x74(%esi)
10fec4: eb 07 jmp 10fecd <rtems_task_mode+0x99>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
10fec6: c7 46 78 00 00 00 00 movl $0x0,0x78(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
10fecd: f6 45 0c 01 testb $0x1,0xc(%ebp)
10fed1: 74 0a je 10fedd <rtems_task_mode+0xa9>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
10fed3: f6 45 08 01 testb $0x1,0x8(%ebp)
10fed7: 74 03 je 10fedc <rtems_task_mode+0xa8>
10fed9: fa cli
10feda: eb 01 jmp 10fedd <rtems_task_mode+0xa9>
10fedc: fb sti
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
10fedd: 31 d2 xor %edx,%edx
if ( mask & RTEMS_ASR_MASK ) {
10fedf: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
10fee6: 74 2c je 10ff14 <rtems_task_mode+0xe0>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
10fee8: 8b 45 08 mov 0x8(%ebp),%eax
10feeb: c1 e8 0a shr $0xa,%eax
10feee: 83 f0 01 xor $0x1,%eax
10fef1: 83 e0 01 and $0x1,%eax
if ( is_asr_enabled != asr->is_enabled ) {
10fef4: 3a 43 08 cmp 0x8(%ebx),%al
10fef7: 74 1b je 10ff14 <rtems_task_mode+0xe0>
asr->is_enabled = is_asr_enabled;
10fef9: 88 43 08 mov %al,0x8(%ebx)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
10fefc: 9c pushf
10fefd: fa cli
10fefe: 58 pop %eax
_signals = information->signals_pending;
10feff: 8b 53 18 mov 0x18(%ebx),%edx
information->signals_pending = information->signals_posted;
10ff02: 8b 4b 14 mov 0x14(%ebx),%ecx
10ff05: 89 4b 18 mov %ecx,0x18(%ebx)
information->signals_posted = _signals;
10ff08: 89 53 14 mov %edx,0x14(%ebx)
_ISR_Enable( _level );
10ff0b: 50 push %eax
10ff0c: 9d popf
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
10ff0d: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10ff11: 0f 95 c2 setne %dl
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
10ff14: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
10ff16: 83 3d a8 c4 12 00 03 cmpl $0x3,0x12c4a8
10ff1d: 75 2d jne 10ff4c <rtems_task_mode+0x118>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
10ff1f: 8b 0d 68 c5 12 00 mov 0x12c568,%ecx
if ( are_signals_pending ||
10ff25: 84 d2 test %dl,%dl
10ff27: 75 0e jne 10ff37 <rtems_task_mode+0x103>
10ff29: 3b 0d 6c c5 12 00 cmp 0x12c56c,%ecx
10ff2f: 74 1b je 10ff4c <rtems_task_mode+0x118>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
10ff31: 80 79 70 00 cmpb $0x0,0x70(%ecx)
10ff35: 74 15 je 10ff4c <rtems_task_mode+0x118> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
10ff37: c6 05 74 c5 12 00 01 movb $0x1,0x12c574
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
10ff3e: e8 1d bd ff ff call 10bc60 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
10ff43: 31 c0 xor %eax,%eax
10ff45: eb 05 jmp 10ff4c <rtems_task_mode+0x118>
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
10ff47: b8 09 00 00 00 mov $0x9,%eax
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
10ff4c: 83 c4 1c add $0x1c,%esp
10ff4f: 5b pop %ebx
10ff50: 5e pop %esi
10ff51: 5f pop %edi
10ff52: 5d pop %ebp
10ff53: c3 ret
0010d48c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10d48c: 55 push %ebp
10d48d: 89 e5 mov %esp,%ebp
10d48f: 56 push %esi
10d490: 53 push %ebx
10d491: 83 ec 10 sub $0x10,%esp
10d494: 8b 5d 0c mov 0xc(%ebp),%ebx
10d497: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10d49a: 85 db test %ebx,%ebx
10d49c: 74 10 je 10d4ae <rtems_task_set_priority+0x22>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10d49e: 0f b6 15 88 c1 12 00 movzbl 0x12c188,%edx
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10d4a5: b8 13 00 00 00 mov $0x13,%eax
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10d4aa: 39 d3 cmp %edx,%ebx
10d4ac: 77 52 ja 10d500 <rtems_task_set_priority+0x74>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10d4ae: b8 09 00 00 00 mov $0x9,%eax
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10d4b3: 85 f6 test %esi,%esi
10d4b5: 74 49 je 10d500 <rtems_task_set_priority+0x74>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10d4b7: 51 push %ecx
10d4b8: 51 push %ecx
10d4b9: 8d 45 f4 lea -0xc(%ebp),%eax
10d4bc: 50 push %eax
10d4bd: ff 75 08 pushl 0x8(%ebp)
10d4c0: e8 67 1d 00 00 call 10f22c <_Thread_Get>
switch ( location ) {
10d4c5: 83 c4 10 add $0x10,%esp
10d4c8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10d4cc: 75 2d jne 10d4fb <rtems_task_set_priority+0x6f>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10d4ce: 8b 50 14 mov 0x14(%eax),%edx
10d4d1: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10d4d3: 85 db test %ebx,%ebx
10d4d5: 74 1b je 10d4f2 <rtems_task_set_priority+0x66>
the_thread->real_priority = new_priority;
10d4d7: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10d4da: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10d4de: 74 05 je 10d4e5 <rtems_task_set_priority+0x59>
10d4e0: 39 58 14 cmp %ebx,0x14(%eax)
10d4e3: 76 0d jbe 10d4f2 <rtems_task_set_priority+0x66><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10d4e5: 52 push %edx
10d4e6: 6a 00 push $0x0
10d4e8: 53 push %ebx
10d4e9: 50 push %eax
10d4ea: e8 2d 19 00 00 call 10ee1c <_Thread_Change_priority>
10d4ef: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10d4f2: e8 15 1d 00 00 call 10f20c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d4f7: 31 c0 xor %eax,%eax
10d4f9: eb 05 jmp 10d500 <rtems_task_set_priority+0x74>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d4fb: b8 04 00 00 00 mov $0x4,%eax
}
10d500: 8d 65 f8 lea -0x8(%ebp),%esp
10d503: 5b pop %ebx
10d504: 5e pop %esi
10d505: 5d pop %ebp
10d506: c3 ret
00108cfc <rtems_termios_baud_to_index>:
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
108cfc: 55 push %ebp
108cfd: 89 e5 mov %esp,%ebp
108cff: 8b 55 08 mov 0x8(%ebp),%edx
int baud_index;
switch (termios_baud) {
108d02: 83 fa 09 cmp $0x9,%edx
108d05: 0f 84 eb 00 00 00 je 108df6 <rtems_termios_baud_to_index+0xfa>
108d0b: 77 61 ja 108d6e <rtems_termios_baud_to_index+0x72>
108d0d: 83 fa 04 cmp $0x4,%edx
108d10: 0f 84 c4 00 00 00 je 108dda <rtems_termios_baud_to_index+0xde>
108d16: 77 2b ja 108d43 <rtems_termios_baud_to_index+0x47>
108d18: 83 fa 01 cmp $0x1,%edx
108d1b: 0f 84 20 01 00 00 je 108e41 <rtems_termios_baud_to_index+0x145>
case B0: baud_index = 0; break;
108d21: b8 00 00 00 00 mov $0x0,%eax
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
108d26: 0f 82 1a 01 00 00 jb 108e46 <rtems_termios_baud_to_index+0x14a>
108d2c: 83 fa 02 cmp $0x2,%edx
108d2f: 0f 84 97 00 00 00 je 108dcc <rtems_termios_baud_to_index+0xd0>
108d35: 83 fa 03 cmp $0x3,%edx
108d38: 0f 85 fe 00 00 00 jne 108e3c <rtems_termios_baud_to_index+0x140><== NEVER TAKEN
108d3e: e9 90 00 00 00 jmp 108dd3 <rtems_termios_baud_to_index+0xd7>
108d43: 83 fa 06 cmp $0x6,%edx
108d46: 0f 84 95 00 00 00 je 108de1 <rtems_termios_baud_to_index+0xe5>
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
108d4c: b8 05 00 00 00 mov $0x5,%eax
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
108d51: 0f 82 ef 00 00 00 jb 108e46 <rtems_termios_baud_to_index+0x14a>
108d57: 83 fa 07 cmp $0x7,%edx
108d5a: 0f 84 88 00 00 00 je 108de8 <rtems_termios_baud_to_index+0xec>
108d60: 83 fa 08 cmp $0x8,%edx
108d63: 0f 85 d3 00 00 00 jne 108e3c <rtems_termios_baud_to_index+0x140><== NEVER TAKEN
108d69: e9 81 00 00 00 jmp 108def <rtems_termios_baud_to_index+0xf3>
108d6e: 83 fa 0e cmp $0xe,%edx
108d71: 0f 84 9b 00 00 00 je 108e12 <rtems_termios_baud_to_index+0x116>
108d77: 77 20 ja 108d99 <rtems_termios_baud_to_index+0x9d>
108d79: 83 fa 0b cmp $0xb,%edx
108d7c: 74 7f je 108dfd <rtems_termios_baud_to_index+0x101>
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
108d7e: b8 0a 00 00 00 mov $0xa,%eax
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
108d83: 0f 82 bd 00 00 00 jb 108e46 <rtems_termios_baud_to_index+0x14a>
108d89: 83 fa 0c cmp $0xc,%edx
108d8c: 74 76 je 108e04 <rtems_termios_baud_to_index+0x108>
108d8e: 83 fa 0d cmp $0xd,%edx
108d91: 0f 85 a5 00 00 00 jne 108e3c <rtems_termios_baud_to_index+0x140><== NEVER TAKEN
108d97: eb 72 jmp 108e0b <rtems_termios_baud_to_index+0x10f>
108d99: 81 fa 02 10 00 00 cmp $0x1002,%edx
108d9f: 0f 84 82 00 00 00 je 108e27 <rtems_termios_baud_to_index+0x12b>
108da5: 77 13 ja 108dba <rtems_termios_baud_to_index+0xbe>
108da7: 83 fa 0f cmp $0xf,%edx
108daa: 74 6d je 108e19 <rtems_termios_baud_to_index+0x11d>
108dac: 81 fa 01 10 00 00 cmp $0x1001,%edx
108db2: 0f 85 84 00 00 00 jne 108e3c <rtems_termios_baud_to_index+0x140><== NEVER TAKEN
108db8: eb 66 jmp 108e20 <rtems_termios_baud_to_index+0x124>
108dba: 81 fa 03 10 00 00 cmp $0x1003,%edx
108dc0: 74 6c je 108e2e <rtems_termios_baud_to_index+0x132>
108dc2: 81 fa 04 10 00 00 cmp $0x1004,%edx
108dc8: 75 72 jne 108e3c <rtems_termios_baud_to_index+0x140>
108dca: eb 69 jmp 108e35 <rtems_termios_baud_to_index+0x139>
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
108dcc: b8 02 00 00 00 mov $0x2,%eax
108dd1: eb 73 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B110: baud_index = 3; break;
108dd3: b8 03 00 00 00 mov $0x3,%eax
108dd8: eb 6c jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B134: baud_index = 4; break;
108dda: b8 04 00 00 00 mov $0x4,%eax
108ddf: eb 65 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
108de1: b8 06 00 00 00 mov $0x6,%eax
108de6: eb 5e jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B300: baud_index = 7; break;
108de8: b8 07 00 00 00 mov $0x7,%eax
108ded: eb 57 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B600: baud_index = 8; break;
108def: b8 08 00 00 00 mov $0x8,%eax
108df4: eb 50 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B1200: baud_index = 9; break;
108df6: b8 09 00 00 00 mov $0x9,%eax
108dfb: eb 49 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
108dfd: b8 0b 00 00 00 mov $0xb,%eax
108e02: eb 42 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B4800: baud_index = 12; break;
108e04: b8 0c 00 00 00 mov $0xc,%eax
108e09: eb 3b jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B9600: baud_index = 13; break;
108e0b: b8 0d 00 00 00 mov $0xd,%eax
108e10: eb 34 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B19200: baud_index = 14; break;
108e12: b8 0e 00 00 00 mov $0xe,%eax
108e17: eb 2d jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B38400: baud_index = 15; break;
108e19: b8 0f 00 00 00 mov $0xf,%eax
108e1e: eb 26 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B57600: baud_index = 16; break;
108e20: b8 10 00 00 00 mov $0x10,%eax
108e25: eb 1f jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B115200: baud_index = 17; break;
108e27: b8 11 00 00 00 mov $0x11,%eax
108e2c: eb 18 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B230400: baud_index = 18; break;
108e2e: b8 12 00 00 00 mov $0x12,%eax
108e33: eb 11 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B460800: baud_index = 19; break;
108e35: b8 13 00 00 00 mov $0x13,%eax
108e3a: eb 0a jmp 108e46 <rtems_termios_baud_to_index+0x14a>
default: baud_index = -1; break;
108e3c: 83 c8 ff or $0xffffffff,%eax
108e3f: eb 05 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
{
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
108e41: b8 01 00 00 00 mov $0x1,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
108e46: 5d pop %ebp
108e47: c3 ret
001083dd <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
1083dd: 55 push %ebp
1083de: 89 e5 mov %esp,%ebp
1083e0: 56 push %esi
1083e1: 53 push %ebx
1083e2: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
1083e5: 8b 06 mov (%esi),%eax
1083e7: 8b 58 2c mov 0x2c(%eax),%ebx
rtems_status_code sc;
sc = rtems_semaphore_obtain(
1083ea: 50 push %eax
1083eb: 6a 00 push $0x0
1083ed: 6a 00 push $0x0
1083ef: ff 35 9c c2 12 00 pushl 0x12c29c
1083f5: e8 96 19 00 00 call 109d90 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1083fa: 83 c4 10 add $0x10,%esp
1083fd: 85 c0 test %eax,%eax
1083ff: 74 05 je 108406 <rtems_termios_close+0x29><== ALWAYS TAKEN
108401: e9 8f 00 00 00 jmp 108495 <rtems_termios_close+0xb8><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
108406: ff 4b 08 decl 0x8(%ebx)
108409: 0f 85 4b 01 00 00 jne 10855a <rtems_termios_close+0x17d>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
10840f: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
108415: c1 e0 05 shl $0x5,%eax
108418: 8b 80 48 bf 12 00 mov 0x12bf48(%eax),%eax
10841e: 85 c0 test %eax,%eax
108420: 74 08 je 10842a <rtems_termios_close+0x4d>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
108422: 83 ec 0c sub $0xc,%esp
108425: 53 push %ebx
108426: ff d0 call *%eax
108428: eb 31 jmp 10845b <rtems_termios_close+0x7e>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10842a: 50 push %eax
10842b: 6a 00 push $0x0
10842d: 6a 00 push $0x0
10842f: ff 73 18 pushl 0x18(%ebx)
108432: e8 59 19 00 00 call 109d90 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
108437: 83 c4 10 add $0x10,%esp
10843a: 85 c0 test %eax,%eax
10843c: 74 02 je 108440 <rtems_termios_close+0x63><== ALWAYS TAKEN
10843e: eb 55 jmp 108495 <rtems_termios_close+0xb8><== NOT EXECUTED
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
108440: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
108447: 74 07 je 108450 <rtems_termios_close+0x73>
108449: 89 d8 mov %ebx,%eax
10844b: e8 56 fb ff ff call 107fa6 <drainOutput.part.0>
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
108450: 83 ec 0c sub $0xc,%esp
108453: ff 73 18 pushl 0x18(%ebx)
108456: e8 25 1a 00 00 call 109e80 <rtems_semaphore_release>
10845b: 83 c4 10 add $0x10,%esp
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10845e: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
108465: 75 37 jne 10849e <rtems_termios_close+0xc1>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
108467: 50 push %eax
108468: 50 push %eax
108469: 6a 01 push $0x1
10846b: ff b3 c4 00 00 00 pushl 0xc4(%ebx)
108471: e8 4e 15 00 00 call 1099c4 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
108476: 83 c4 10 add $0x10,%esp
108479: 85 c0 test %eax,%eax
10847b: 74 02 je 10847f <rtems_termios_close+0xa2><== ALWAYS TAKEN
10847d: eb 16 jmp 108495 <rtems_termios_close+0xb8><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
10847f: 51 push %ecx
108480: 51 push %ecx
108481: 6a 01 push $0x1
108483: ff b3 c8 00 00 00 pushl 0xc8(%ebx)
108489: e8 36 15 00 00 call 1099c4 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10848e: 83 c4 10 add $0x10,%esp
108491: 85 c0 test %eax,%eax
108493: 74 09 je 10849e <rtems_termios_close+0xc1><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
108495: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108498: 50 push %eax <== NOT EXECUTED
108499: e8 12 1f 00 00 call 10a3b0 <rtems_fatal_error_occurred><== NOT EXECUTED
}
if (tty->device.lastClose)
10849e: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax
1084a4: 85 c0 test %eax,%eax
1084a6: 74 0d je 1084b5 <rtems_termios_close+0xd8>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
1084a8: 52 push %edx
1084a9: 56 push %esi
1084aa: ff 73 10 pushl 0x10(%ebx)
1084ad: ff 73 0c pushl 0xc(%ebx)
1084b0: ff d0 call *%eax
1084b2: 83 c4 10 add $0x10,%esp
if (tty->forw == NULL) {
1084b5: 8b 13 mov (%ebx),%edx
1084b7: 85 d2 test %edx,%edx
1084b9: 8b 43 04 mov 0x4(%ebx),%eax
1084bc: 75 11 jne 1084cf <rtems_termios_close+0xf2>
rtems_termios_ttyTail = tty->back;
1084be: a3 a0 c2 12 00 mov %eax,0x12c2a0
if ( rtems_termios_ttyTail != NULL ) {
1084c3: 85 c0 test %eax,%eax
1084c5: 74 0b je 1084d2 <rtems_termios_close+0xf5><== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
1084c7: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
1084cd: eb 03 jmp 1084d2 <rtems_termios_close+0xf5><== NOT EXECUTED
}
} else {
tty->forw->back = tty->back;
1084cf: 89 42 04 mov %eax,0x4(%edx)
}
if (tty->back == NULL) {
1084d2: 8b 53 04 mov 0x4(%ebx),%edx
1084d5: 85 d2 test %edx,%edx
1084d7: 8b 03 mov (%ebx),%eax
1084d9: 75 12 jne 1084ed <rtems_termios_close+0x110><== NEVER TAKEN
rtems_termios_ttyHead = tty->forw;
1084db: a3 a4 c2 12 00 mov %eax,0x12c2a4
if ( rtems_termios_ttyHead != NULL ) {
1084e0: 85 c0 test %eax,%eax
1084e2: 74 0b je 1084ef <rtems_termios_close+0x112>
rtems_termios_ttyHead->back = NULL;
1084e4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
1084eb: eb 02 jmp 1084ef <rtems_termios_close+0x112>
}
} else {
tty->back->forw = tty->forw;
1084ed: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
1084ef: 83 ec 0c sub $0xc,%esp
1084f2: ff 73 14 pushl 0x14(%ebx)
1084f5: e8 06 18 00 00 call 109d00 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
1084fa: 58 pop %eax
1084fb: ff 73 18 pushl 0x18(%ebx)
1084fe: e8 fd 17 00 00 call 109d00 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
108503: 58 pop %eax
108504: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10850a: e8 f1 17 00 00 call 109d00 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
10850f: 83 c4 10 add $0x10,%esp
108512: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
108519: 74 09 je 108524 <rtems_termios_close+0x147>
10851b: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
108522: 75 0e jne 108532 <rtems_termios_close+0x155>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
108524: 83 ec 0c sub $0xc,%esp
108527: ff 73 68 pushl 0x68(%ebx)
10852a: e8 d1 17 00 00 call 109d00 <rtems_semaphore_delete>
10852f: 83 c4 10 add $0x10,%esp
free (tty->rawInBuf.theBuf);
108532: 83 ec 0c sub $0xc,%esp
108535: ff 73 58 pushl 0x58(%ebx)
108538: e8 f7 e1 ff ff call 106734 <free>
free (tty->rawOutBuf.theBuf);
10853d: 58 pop %eax
10853e: ff 73 7c pushl 0x7c(%ebx)
108541: e8 ee e1 ff ff call 106734 <free>
free (tty->cbuf);
108546: 58 pop %eax
108547: ff 73 1c pushl 0x1c(%ebx)
10854a: e8 e5 e1 ff ff call 106734 <free>
free (tty);
10854f: 89 1c 24 mov %ebx,(%esp)
108552: e8 dd e1 ff ff call 106734 <free>
108557: 83 c4 10 add $0x10,%esp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
10855a: 83 ec 0c sub $0xc,%esp
10855d: ff 35 9c c2 12 00 pushl 0x12c29c
108563: e8 18 19 00 00 call 109e80 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
108568: 31 c0 xor %eax,%eax
10856a: 8d 65 f8 lea -0x8(%ebp),%esp
10856d: 5b pop %ebx
10856e: 5e pop %esi
10856f: 5d pop %ebp
108570: c3 ret
00109495 <rtems_termios_dequeue_characters>:
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
109495: 55 push %ebp
109496: 89 e5 mov %esp,%ebp
109498: 83 ec 08 sub $0x8,%esp
10949b: 8b 45 08 mov 0x8(%ebp),%eax
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
10949e: 8b 55 0c mov 0xc(%ebp),%edx
1094a1: 01 90 90 00 00 00 add %edx,0x90(%eax)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
1094a7: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
1094ae: 75 1f jne 1094cf <rtems_termios_dequeue_characters+0x3a>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
1094b0: 52 push %edx
1094b1: 52 push %edx
1094b2: 6a 02 push $0x2
1094b4: ff b0 c8 00 00 00 pushl 0xc8(%eax)
1094ba: e8 05 05 00 00 call 1099c4 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
1094bf: 83 c4 10 add $0x10,%esp
1094c2: 85 c0 test %eax,%eax
1094c4: 74 2d je 1094f3 <rtems_termios_dequeue_characters+0x5e><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
1094c6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1094c9: 50 push %eax <== NOT EXECUTED
1094ca: e8 e1 0e 00 00 call 10a3b0 <rtems_fatal_error_occurred><== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
1094cf: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax)
1094d6: 75 15 jne 1094ed <rtems_termios_dequeue_characters+0x58><== ALWAYS TAKEN
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
1094d8: 8b 15 f8 bf 12 00 mov 0x12bff8,%edx
1094de: 85 d2 test %edx,%edx
1094e0: 74 11 je 1094f3 <rtems_termios_dequeue_characters+0x5e><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
1094e2: 83 ec 0c sub $0xc,%esp
1094e5: 50 push %eax
1094e6: ff d2 call *%edx
1094e8: 83 c4 10 add $0x10,%esp
1094eb: eb 06 jmp 1094f3 <rtems_termios_dequeue_characters+0x5e>
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
1094ed: c9 leave
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
1094ee: e9 8d e8 ff ff jmp 107d80 <rtems_termios_refill_transmitter>
}
1094f3: 31 c0 xor %eax,%eax
1094f5: c9 leave
1094f6: c3 ret
001091b7 <rtems_termios_enqueue_raw_characters>:
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
{
1091b7: 55 push %ebp
1091b8: 89 e5 mov %esp,%ebp
1091ba: 57 push %edi
1091bb: 56 push %esi
1091bc: 53 push %ebx
1091bd: 83 ec 2c sub $0x2c,%esp
1091c0: 8b 5d 08 mov 0x8(%ebp),%ebx
1091c3: 8b 75 0c mov 0xc(%ebp),%esi
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
1091c6: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
1091cc: c1 e0 05 shl $0x5,%eax
1091cf: 83 b8 54 bf 12 00 00 cmpl $0x0,0x12bf54(%eax)
1091d6: 8b 45 10 mov 0x10(%ebp),%eax
1091d9: 8d 04 06 lea (%esi,%eax,1),%eax
1091dc: 89 45 dc mov %eax,-0x24(%ebp)
1091df: 75 31 jne 109212 <rtems_termios_enqueue_raw_characters+0x5b>
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
1091e1: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
1091e5: 31 ff xor %edi,%edi
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
1091e7: 8d 4b 30 lea 0x30(%ebx),%ecx
1091ea: 89 4d d4 mov %ecx,-0x2c(%ebp)
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
1091ed: 8d 4b 4a lea 0x4a(%ebx),%ecx
1091f0: 89 4d d0 mov %ecx,-0x30(%ebp)
1091f3: e9 0a 02 00 00 jmp 109402 <rtems_termios_enqueue_raw_characters+0x24b>
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
1091f8: 0f be 16 movsbl (%esi),%edx
1091fb: 46 inc %esi
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
1091fc: 57 push %edi
1091fd: 57 push %edi
1091fe: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
109204: c1 e0 05 shl $0x5,%eax
109207: 53 push %ebx
109208: 52 push %edx
109209: ff 90 54 bf 12 00 call *0x12bf54(%eax)
10920f: 83 c4 10 add $0x10,%esp
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
109212: 3b 75 dc cmp -0x24(%ebp),%esi
109215: 75 e1 jne 1091f8 <rtems_termios_enqueue_raw_characters+0x41>
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
109217: 31 ff xor %edi,%edi
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
109219: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx)
109220: 0f 85 01 02 00 00 jne 109427 <rtems_termios_enqueue_raw_characters+0x270><== NEVER TAKEN
109226: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
10922c: 85 c0 test %eax,%eax
10922e: 0f 84 f3 01 00 00 je 109427 <rtems_termios_enqueue_raw_characters+0x270>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
109234: 51 push %ecx
109235: 51 push %ecx
109236: ff b3 e0 00 00 00 pushl 0xe0(%ebx)
10923c: 8d 53 30 lea 0x30(%ebx),%edx
10923f: 52 push %edx
109240: ff d0 call *%eax
tty->tty_rcvwakeup = 1;
109242: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx)
109249: 00 00 00
10924c: e9 c8 01 00 00 jmp 109419 <rtems_termios_enqueue_raw_characters+0x262>
}
return 0;
}
while (len--) {
c = *buf++;
109251: 8a 0e mov (%esi),%cl
109253: 88 4d e2 mov %cl,-0x1e(%ebp)
109256: 46 inc %esi
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
109257: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10925d: f6 c4 02 test $0x2,%ah
109260: 74 3b je 10929d <rtems_termios_enqueue_raw_characters+0xe6>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
109262: 0f be c1 movsbl %cl,%eax
109265: 0f b6 53 4a movzbl 0x4a(%ebx),%edx
109269: 39 d0 cmp %edx,%eax
if (c == tty->termios.c_cc[VSTART]) {
10926b: 0f b6 53 49 movzbl 0x49(%ebx),%edx
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
10926f: 75 1d jne 10928e <rtems_termios_enqueue_raw_characters+0xd7>
if (c == tty->termios.c_cc[VSTART]) {
109271: 39 d0 cmp %edx,%eax
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
109273: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
109279: 75 05 jne 109280 <rtems_termios_enqueue_raw_characters+0xc9><== ALWAYS TAKEN
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
10927b: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED
10927e: eb 03 jmp 109283 <rtems_termios_enqueue_raw_characters+0xcc><== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
109280: 83 c8 10 or $0x10,%eax
109283: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
109289: e9 90 01 00 00 jmp 10941e <rtems_termios_enqueue_raw_characters+0x267>
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
10928e: 39 d0 cmp %edx,%eax
109290: 75 0b jne 10929d <rtems_termios_enqueue_raw_characters+0xe6><== ALWAYS TAKEN
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
109292: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109298: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED
10929b: eb e6 jmp 109283 <rtems_termios_enqueue_raw_characters+0xcc><== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
10929d: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
1092a1: 74 51 je 1092f4 <rtems_termios_enqueue_raw_characters+0x13d><== ALWAYS TAKEN
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
1092a3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1092a9: 83 e0 30 and $0x30,%eax
1092ac: 83 f8 20 cmp $0x20,%eax
1092af: 0f 85 4d 01 00 00 jne 109402 <rtems_termios_enqueue_raw_characters+0x24b><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
1092b5: 9c pushf <== NOT EXECUTED
1092b6: fa cli <== NOT EXECUTED
1092b7: 8f 45 e4 popl -0x1c(%ebp) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
1092ba: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1092c0: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
1092c3: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
1092c9: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
1092d0: 74 19 je 1092eb <rtems_termios_enqueue_raw_characters+0x134><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
1092d2: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
1092d8: 52 push %edx <== NOT EXECUTED
1092d9: 6a 01 push $0x1 <== NOT EXECUTED
1092db: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
1092de: 50 push %eax <== NOT EXECUTED
1092df: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1092e2: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
1092e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
1092eb: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
1092ee: 9d popf <== NOT EXECUTED
1092ef: e9 0e 01 00 00 jmp 109402 <rtems_termios_enqueue_raw_characters+0x24b><== NOT EXECUTED
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
1092f4: 8b 43 60 mov 0x60(%ebx),%eax
1092f7: 8b 4b 64 mov 0x64(%ebx),%ecx
1092fa: 40 inc %eax
1092fb: 31 d2 xor %edx,%edx
1092fd: f7 f1 div %ecx
1092ff: 89 55 e4 mov %edx,-0x1c(%ebp)
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
109302: 9c pushf
109303: fa cli
109304: 8f 45 d8 popl -0x28(%ebp)
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
109307: 8b 53 5c mov 0x5c(%ebx),%edx
10930a: 8b 43 64 mov 0x64(%ebx),%eax
% tty->rawInBuf.Size) > tty->highwater) &&
10930d: 8b 4b 64 mov 0x64(%ebx),%ecx
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
109310: 29 d0 sub %edx,%eax
109312: 03 45 e4 add -0x1c(%ebp),%eax
% tty->rawInBuf.Size) > tty->highwater) &&
109315: 31 d2 xor %edx,%edx
109317: f7 f1 div %ecx
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
109319: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx
10931f: 0f 86 92 00 00 00 jbe 1093b7 <rtems_termios_enqueue_raw_characters+0x200><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
109325: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
10932b: a8 01 test $0x1,%al <== NOT EXECUTED
10932d: 0f 85 84 00 00 00 jne 1093b7 <rtems_termios_enqueue_raw_characters+0x200><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
109333: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109339: 83 c8 01 or $0x1,%eax <== NOT EXECUTED
10933c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
109342: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109348: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED
10934d: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
109352: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
109358: 75 2d jne 109387 <rtems_termios_enqueue_raw_characters+0x1d0><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
10935a: a8 20 test $0x20,%al <== NOT EXECUTED
10935c: 75 09 jne 109367 <rtems_termios_enqueue_raw_characters+0x1b0><== NOT EXECUTED
10935e: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
109365: 75 50 jne 1093b7 <rtems_termios_enqueue_raw_characters+0x200><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
109367: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10936d: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
109370: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
109376: 51 push %ecx <== NOT EXECUTED
109377: 6a 01 push $0x1 <== NOT EXECUTED
109379: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
10937c: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10937f: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
109385: eb 2d jmp 1093b4 <rtems_termios_enqueue_raw_characters+0x1fd><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
109387: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED
10938c: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED
109391: 75 24 jne 1093b7 <rtems_termios_enqueue_raw_characters+0x200><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
109393: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109399: 83 c8 04 or $0x4,%eax <== NOT EXECUTED
10939c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
1093a2: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED
1093a8: 85 c0 test %eax,%eax <== NOT EXECUTED
1093aa: 74 0b je 1093b7 <rtems_termios_enqueue_raw_characters+0x200><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
1093ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1093af: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1093b2: ff d0 call *%eax <== NOT EXECUTED
1093b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
1093b7: ff 75 d8 pushl -0x28(%ebp)
1093ba: 9d popf
if (newTail == tty->rawInBuf.Head) {
1093bb: 8b 43 5c mov 0x5c(%ebx),%eax
1093be: 39 45 e4 cmp %eax,-0x1c(%ebp)
1093c1: 75 03 jne 1093c6 <rtems_termios_enqueue_raw_characters+0x20f><== ALWAYS TAKEN
dropped++;
1093c3: 47 inc %edi <== NOT EXECUTED
1093c4: eb 3c jmp 109402 <rtems_termios_enqueue_raw_characters+0x24b><== NOT EXECUTED
} else {
tty->rawInBuf.theBuf[newTail] = c;
1093c6: 8b 43 58 mov 0x58(%ebx),%eax
1093c9: 8a 4d e2 mov -0x1e(%ebp),%cl
1093cc: 8b 55 e4 mov -0x1c(%ebp),%edx
1093cf: 88 0c 10 mov %cl,(%eax,%edx,1)
tty->rawInBuf.Tail = newTail;
1093d2: 89 53 60 mov %edx,0x60(%ebx)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
1093d5: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx)
1093dc: 75 24 jne 109402 <rtems_termios_enqueue_raw_characters+0x24b><== NEVER TAKEN
1093de: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
1093e4: 85 c0 test %eax,%eax
1093e6: 74 1a je 109402 <rtems_termios_enqueue_raw_characters+0x24b><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
1093e8: 52 push %edx <== NOT EXECUTED
1093e9: 52 push %edx <== NOT EXECUTED
1093ea: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED
1093f0: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
1093f3: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
1093f5: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
1093fc: 00 00 00
1093ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
109402: 3b 75 dc cmp -0x24(%ebp),%esi
109405: 0f 85 46 fe ff ff jne 109251 <rtems_termios_enqueue_raw_characters+0x9a>
}
}
}
}
tty->rawInBufDropped += dropped;
10940b: 01 7b 78 add %edi,0x78(%ebx)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
10940e: 83 ec 0c sub $0xc,%esp
109411: ff 73 68 pushl 0x68(%ebx)
109414: e8 67 0a 00 00 call 109e80 <rtems_semaphore_release>
return dropped;
109419: 83 c4 10 add $0x10,%esp
10941c: eb 09 jmp 109427 <rtems_termios_enqueue_raw_characters+0x270>
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
{
10941e: c6 45 e3 01 movb $0x1,-0x1d(%ebp)
109422: e9 7c fe ff ff jmp 1092a3 <rtems_termios_enqueue_raw_characters+0xec>
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
109427: 89 f8 mov %edi,%eax
109429: 8d 65 f4 lea -0xc(%ebp),%esp
10942c: 5b pop %ebx
10942d: 5e pop %esi
10942e: 5f pop %edi
10942f: 5d pop %ebp
109430: c3 ret
00108590 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
108590: 55 push %ebp
108591: 89 e5 mov %esp,%ebp
108593: 57 push %edi
108594: 56 push %esi
108595: 53 push %ebx
108596: 83 ec 20 sub $0x20,%esp
108599: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10859c: 8b 06 mov (%esi),%eax
10859e: 8b 58 2c mov 0x2c(%eax),%ebx
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
1085a1: 8b 7e 08 mov 0x8(%esi),%edi
rtems_status_code sc;
args->ioctl_return = 0;
1085a4: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
1085ab: 6a 00 push $0x0
1085ad: 6a 00 push $0x0
1085af: ff 73 18 pushl 0x18(%ebx)
1085b2: e8 d9 17 00 00 call 109d90 <rtems_semaphore_obtain>
1085b7: 89 45 e4 mov %eax,-0x1c(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
1085ba: 83 c4 10 add $0x10,%esp
1085bd: 85 c0 test %eax,%eax
1085bf: 0f 85 f5 02 00 00 jne 1088ba <rtems_termios_ioctl+0x32a><== NEVER TAKEN
return sc;
}
switch (args->command) {
1085c5: 8b 46 04 mov 0x4(%esi),%eax
1085c8: 83 f8 04 cmp $0x4,%eax
1085cb: 0f 84 55 02 00 00 je 108826 <rtems_termios_ioctl+0x296>
1085d1: 77 10 ja 1085e3 <rtems_termios_ioctl+0x53>
1085d3: 83 f8 02 cmp $0x2,%eax
1085d6: 74 71 je 108649 <rtems_termios_ioctl+0xb9>
1085d8: 0f 87 19 02 00 00 ja 1087f7 <rtems_termios_ioctl+0x267>
1085de: 48 dec %eax
1085df: 75 35 jne 108616 <rtems_termios_ioctl+0x86><== NEVER TAKEN
1085e1: eb 52 jmp 108635 <rtems_termios_ioctl+0xa5>
1085e3: 3d 7f 66 04 40 cmp $0x4004667f,%eax
1085e8: 0f 84 9b 02 00 00 je 108889 <rtems_termios_ioctl+0x2f9><== NEVER TAKEN
1085ee: 77 0a ja 1085fa <rtems_termios_ioctl+0x6a>
1085f0: 83 f8 05 cmp $0x5,%eax
1085f3: 75 21 jne 108616 <rtems_termios_ioctl+0x86>
1085f5: e9 16 02 00 00 jmp 108810 <rtems_termios_ioctl+0x280>
1085fa: 3d 1a 74 04 40 cmp $0x4004741a,%eax
1085ff: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx
108605: 0f 84 77 02 00 00 je 108882 <rtems_termios_ioctl+0x2f2>
10860b: 3d 1b 74 04 80 cmp $0x8004741b,%eax
108610: 0f 84 23 02 00 00 je 108839 <rtems_termios_ioctl+0x2a9><== ALWAYS TAKEN
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
108616: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10861c: c1 e0 05 shl $0x5,%eax
10861f: 8b 80 5c bf 12 00 mov 0x12bf5c(%eax),%eax
108625: 85 c0 test %eax,%eax
108627: 0f 84 78 02 00 00 je 1088a5 <rtems_termios_ioctl+0x315><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
10862d: 57 push %edi
10862e: 57 push %edi
10862f: 56 push %esi
108630: e9 42 02 00 00 jmp 108877 <rtems_termios_ioctl+0x2e7>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
108635: 8b 46 08 mov 0x8(%esi),%eax
108638: 8d 73 30 lea 0x30(%ebx),%esi
10863b: b9 09 00 00 00 mov $0x9,%ecx
108640: 89 c7 mov %eax,%edi
108642: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
break;
108644: e9 63 02 00 00 jmp 1088ac <rtems_termios_ioctl+0x31c>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
108649: 8b 76 08 mov 0x8(%esi),%esi
10864c: 8d 7b 30 lea 0x30(%ebx),%edi
10864f: b9 09 00 00 00 mov $0x9,%ecx
108654: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
108656: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10865c: f6 c4 02 test $0x2,%ah
10865f: 74 57 je 1086b8 <rtems_termios_ioctl+0x128>
108661: f6 43 31 04 testb $0x4,0x31(%ebx)
108665: 75 51 jne 1086b8 <rtems_termios_ioctl+0x128>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
108667: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10866d: 25 ef fd ff ff and $0xfffffdef,%eax
108672: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
108678: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10867e: a8 20 test $0x20,%al
108680: 74 36 je 1086b8 <rtems_termios_ioctl+0x128><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
108682: 9c pushf <== NOT EXECUTED
108683: fa cli <== NOT EXECUTED
108684: 5e pop %esi <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
108685: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10868b: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
10868e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
108694: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
10869b: 74 19 je 1086b6 <rtems_termios_ioctl+0x126><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
10869d: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
1086a3: 51 push %ecx <== NOT EXECUTED
1086a4: 6a 01 push $0x1 <== NOT EXECUTED
1086a6: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
1086a9: 50 push %eax <== NOT EXECUTED
1086aa: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1086ad: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
1086b3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
1086b6: 56 push %esi <== NOT EXECUTED
1086b7: 9d popf <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
1086b8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1086be: f6 c4 04 test $0x4,%ah
1086c1: 74 24 je 1086e7 <rtems_termios_ioctl+0x157>
1086c3: f6 43 31 10 testb $0x10,0x31(%ebx)
1086c7: 75 1e jne 1086e7 <rtems_termios_ioctl+0x157><== NEVER TAKEN
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
1086c9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1086cf: 80 e4 fb and $0xfb,%ah
1086d2: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
1086d8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1086de: 83 e0 fd and $0xfffffffd,%eax
1086e1: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
1086e7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1086ed: f6 c4 01 test $0x1,%ah
1086f0: 74 43 je 108735 <rtems_termios_ioctl+0x1a5><== ALWAYS TAKEN
1086f2: 83 7b 38 00 cmpl $0x0,0x38(%ebx) <== NOT EXECUTED
1086f6: 78 3d js 108735 <rtems_termios_ioctl+0x1a5><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
1086f8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1086fe: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED
108701: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
108707: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10870d: a8 04 test $0x4,%al <== NOT EXECUTED
10870f: 74 15 je 108726 <rtems_termios_ioctl+0x196><== NOT EXECUTED
108711: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
108717: 85 c0 test %eax,%eax <== NOT EXECUTED
108719: 74 0b je 108726 <rtems_termios_ioctl+0x196><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
10871b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10871e: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108721: ff d0 call *%eax <== NOT EXECUTED
108723: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
108726: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10872c: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
10872f: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
108735: 83 7b 38 00 cmpl $0x0,0x38(%ebx)
108739: 79 0f jns 10874a <rtems_termios_ioctl+0x1ba><== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
10873b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108741: 80 cc 01 or $0x1,%ah <== NOT EXECUTED
108744: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
10874a: 8b 53 30 mov 0x30(%ebx),%edx
10874d: f6 c6 10 test $0x10,%dh
108750: 74 0f je 108761 <rtems_termios_ioctl+0x1d1>
tty->flow_ctrl |= FL_MDXOF;
108752: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108758: 80 cc 04 or $0x4,%ah
10875b: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
108761: 80 e6 04 and $0x4,%dh
108764: 74 0f je 108775 <rtems_termios_ioctl+0x1e5>
tty->flow_ctrl |= FL_MDXON;
108766: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10876c: 80 cc 02 or $0x2,%ah
10876f: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
108775: f6 43 3c 02 testb $0x2,0x3c(%ebx)
108779: 74 02 je 10877d <rtems_termios_ioctl+0x1ed>
10877b: eb 3b jmp 1087b8 <rtems_termios_ioctl+0x228>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
10877d: 0f b6 73 46 movzbl 0x46(%ebx),%esi
rtems_clock_get_ticks_per_second() / 10;
108781: e8 5e 10 00 00 call 1097e4 <rtems_clock_get_ticks_per_second>
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
108786: 0f af c6 imul %esi,%eax
rtems_clock_get_ticks_per_second() / 10;
108789: b9 0a 00 00 00 mov $0xa,%ecx
10878e: 31 d2 xor %edx,%edx
108790: f7 f1 div %ecx
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
108792: 89 43 54 mov %eax,0x54(%ebx)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
108795: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
108799: 74 17 je 1087b2 <rtems_termios_ioctl+0x222>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
10879b: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
1087a2: 89 43 70 mov %eax,0x70(%ebx)
if (tty->termios.c_cc[VMIN])
1087a5: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
1087a9: 74 02 je 1087ad <rtems_termios_ioctl+0x21d>
1087ab: eb 19 jmp 1087c6 <rtems_termios_ioctl+0x236>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
1087ad: 89 43 74 mov %eax,0x74(%ebx)
1087b0: eb 24 jmp 1087d6 <rtems_termios_ioctl+0x246>
} else {
if (tty->termios.c_cc[VMIN]) {
1087b2: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
1087b6: 74 17 je 1087cf <rtems_termios_ioctl+0x23f><== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
1087b8: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
1087bf: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
1087c6: c7 43 74 00 00 00 00 movl $0x0,0x74(%ebx)
1087cd: eb 07 jmp 1087d6 <rtems_termios_ioctl+0x246>
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
1087cf: c7 43 6c 01 00 00 00 movl $0x1,0x6c(%ebx)
}
}
}
if (tty->device.setAttributes)
1087d6: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
1087dc: 85 c0 test %eax,%eax
1087de: 0f 84 c8 00 00 00 je 1088ac <rtems_termios_ioctl+0x31c><== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
1087e4: 52 push %edx
1087e5: 52 push %edx
1087e6: 8d 53 30 lea 0x30(%ebx),%edx
1087e9: 52 push %edx
1087ea: ff 73 10 pushl 0x10(%ebx)
1087ed: ff d0 call *%eax
1087ef: 83 c4 10 add $0x10,%esp
1087f2: e9 b5 00 00 00 jmp 1088ac <rtems_termios_ioctl+0x31c>
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
1087f7: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
1087fe: 0f 84 a8 00 00 00 je 1088ac <rtems_termios_ioctl+0x31c>
108804: 89 d8 mov %ebx,%eax
108806: e8 9b f7 ff ff call 107fa6 <drainOutput.part.0>
10880b: e9 9c 00 00 00 jmp 1088ac <rtems_termios_ioctl+0x31c>
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
108810: 8b 07 mov (%edi),%eax
108812: 8b 57 04 mov 0x4(%edi),%edx
108815: 89 83 d4 00 00 00 mov %eax,0xd4(%ebx)
10881b: 89 93 d8 00 00 00 mov %edx,0xd8(%ebx)
break;
108821: e9 86 00 00 00 jmp 1088ac <rtems_termios_ioctl+0x31c>
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
108826: 8b 07 mov (%edi),%eax
108828: 8b 57 04 mov 0x4(%edi),%edx
10882b: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx)
108831: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx)
break;
108837: eb 73 jmp 1088ac <rtems_termios_ioctl+0x31c>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
108839: c1 e2 05 shl $0x5,%edx
10883c: 8b 82 48 bf 12 00 mov 0x12bf48(%edx),%eax
108842: 85 c0 test %eax,%eax
108844: 74 0c je 108852 <rtems_termios_ioctl+0x2c2>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
108846: 83 ec 0c sub $0xc,%esp
108849: 53 push %ebx
10884a: ff d0 call *%eax
10884c: 89 45 e4 mov %eax,-0x1c(%ebp)
10884f: 83 c4 10 add $0x10,%esp
}
tty->t_line=*(int*)(args->buffer);
108852: 8b 46 08 mov 0x8(%esi),%eax
108855: 8b 00 mov (%eax),%eax
108857: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
tty->t_sc = NULL; /* ensure that no more valid data */
10885d: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx)
108864: 00 00 00
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
108867: c1 e0 05 shl $0x5,%eax
10886a: 8b 80 44 bf 12 00 mov 0x12bf44(%eax),%eax
108870: 85 c0 test %eax,%eax
108872: 74 38 je 1088ac <rtems_termios_ioctl+0x31c>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
108874: 83 ec 0c sub $0xc,%esp
108877: 53 push %ebx
108878: ff d0 call *%eax
10887a: 89 45 e4 mov %eax,-0x1c(%ebp)
10887d: e9 6d ff ff ff jmp 1087ef <rtems_termios_ioctl+0x25f>
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
108882: 8b 46 08 mov 0x8(%esi),%eax
108885: 89 10 mov %edx,(%eax)
break;
108887: eb 23 jmp 1088ac <rtems_termios_ioctl+0x31c>
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
108889: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
10888c: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED
if ( rawnc < 0 )
10888f: 29 d0 sub %edx,%eax <== NOT EXECUTED
108891: 79 05 jns 108898 <rtems_termios_ioctl+0x308><== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
108893: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED
108896: 01 d0 add %edx,%eax <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
108898: 8b 56 08 mov 0x8(%esi),%edx <== NOT EXECUTED
10889b: 03 43 20 add 0x20(%ebx),%eax <== NOT EXECUTED
10889e: 2b 43 24 sub 0x24(%ebx),%eax <== NOT EXECUTED
1088a1: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
break;
1088a3: eb 07 jmp 1088ac <rtems_termios_ioctl+0x31c><== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
1088a5: c7 45 e4 0a 00 00 00 movl $0xa,-0x1c(%ebp) <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
1088ac: 83 ec 0c sub $0xc,%esp
1088af: ff 73 18 pushl 0x18(%ebx)
1088b2: e8 c9 15 00 00 call 109e80 <rtems_semaphore_release>
return sc;
1088b7: 83 c4 10 add $0x10,%esp
}
1088ba: 8b 45 e4 mov -0x1c(%ebp),%eax
1088bd: 8d 65 f4 lea -0xc(%ebp),%esp
1088c0: 5b pop %ebx
1088c1: 5e pop %esi
1088c2: 5f pop %edi
1088c3: 5d pop %ebp
1088c4: c3 ret
00107ff5 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
107ff5: 55 push %ebp
107ff6: 89 e5 mov %esp,%ebp
107ff8: 57 push %edi
107ff9: 56 push %esi
107ffa: 53 push %ebx
107ffb: 83 ec 20 sub $0x20,%esp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
107ffe: 6a 00 push $0x0
108000: 6a 00 push $0x0
108002: ff 35 9c c2 12 00 pushl 0x12c29c
108008: e8 83 1d 00 00 call 109d90 <rtems_semaphore_obtain>
10800d: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
108010: 83 c4 10 add $0x10,%esp
108013: 85 c0 test %eax,%eax
108015: 0f 85 b7 03 00 00 jne 1083d2 <rtems_termios_open+0x3dd><== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
10801b: 8b 35 a4 c2 12 00 mov 0x12c2a4,%esi
108021: 89 f3 mov %esi,%ebx
108023: eb 16 jmp 10803b <rtems_termios_open+0x46>
if ((tty->major == major) && (tty->minor == minor))
108025: 8b 55 08 mov 0x8(%ebp),%edx
108028: 39 53 0c cmp %edx,0xc(%ebx)
10802b: 75 0c jne 108039 <rtems_termios_open+0x44>
10802d: 8b 55 0c mov 0xc(%ebp),%edx
108030: 39 53 10 cmp %edx,0x10(%ebx)
108033: 0f 84 f2 02 00 00 je 10832b <rtems_termios_open+0x336>
sc = rtems_semaphore_obtain(
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
108039: 8b 1b mov (%ebx),%ebx
10803b: 85 db test %ebx,%ebx
10803d: 75 e6 jne 108025 <rtems_termios_open+0x30>
10803f: e9 6e 03 00 00 jmp 1083b2 <rtems_termios_open+0x3bd>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
108044: 83 ec 0c sub $0xc,%esp
108047: e9 84 00 00 00 jmp 1080d0 <rtems_termios_open+0xdb>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
10804c: a1 04 a1 12 00 mov 0x12a104,%eax
108051: 89 43 64 mov %eax,0x64(%ebx)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
108054: 8b 43 64 mov 0x64(%ebx),%eax
108057: 83 ec 0c sub $0xc,%esp
10805a: 50 push %eax
10805b: e8 94 e9 ff ff call 1069f4 <malloc>
108060: 89 c7 mov %eax,%edi
108062: 89 43 58 mov %eax,0x58(%ebx)
if (tty->rawInBuf.theBuf == NULL) {
108065: 83 c4 10 add $0x10,%esp
108068: 85 c0 test %eax,%eax
10806a: 75 05 jne 108071 <rtems_termios_open+0x7c>
free(tty);
10806c: 83 ec 0c sub $0xc,%esp
10806f: eb 58 jmp 1080c9 <rtems_termios_open+0xd4>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
108071: a1 08 a1 12 00 mov 0x12a108,%eax
108076: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
10807c: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
108082: 83 ec 0c sub $0xc,%esp
108085: 50 push %eax
108086: e8 69 e9 ff ff call 1069f4 <malloc>
10808b: 89 43 7c mov %eax,0x7c(%ebx)
if (tty->rawOutBuf.theBuf == NULL) {
10808e: 83 c4 10 add $0x10,%esp
108091: 85 c0 test %eax,%eax
108093: 75 05 jne 10809a <rtems_termios_open+0xa5>
free((void *)(tty->rawInBuf.theBuf));
108095: 83 ec 0c sub $0xc,%esp
108098: eb 28 jmp 1080c2 <rtems_termios_open+0xcd>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
10809a: 83 ec 0c sub $0xc,%esp
10809d: ff 35 0c a1 12 00 pushl 0x12a10c
1080a3: 89 45 e0 mov %eax,-0x20(%ebp)
1080a6: e8 49 e9 ff ff call 1069f4 <malloc>
1080ab: 89 43 1c mov %eax,0x1c(%ebx)
if (tty->cbuf == NULL) {
1080ae: 83 c4 10 add $0x10,%esp
1080b1: 85 c0 test %eax,%eax
1080b3: 8b 55 e0 mov -0x20(%ebp),%edx
1080b6: 75 32 jne 1080ea <rtems_termios_open+0xf5>
free((void *)(tty->rawOutBuf.theBuf));
1080b8: 83 ec 0c sub $0xc,%esp
1080bb: 52 push %edx
1080bc: e8 73 e6 ff ff call 106734 <free>
free((void *)(tty->rawInBuf.theBuf));
1080c1: 58 pop %eax
1080c2: 57 push %edi
1080c3: e8 6c e6 ff ff call 106734 <free>
free(tty);
1080c8: 58 pop %eax
1080c9: 53 push %ebx
1080ca: e8 65 e6 ff ff call 106734 <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
1080cf: 5f pop %edi
1080d0: ff 35 9c c2 12 00 pushl 0x12c29c
1080d6: e8 a5 1d 00 00 call 109e80 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
1080db: 83 c4 10 add $0x10,%esp
1080de: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp)
1080e5: e9 e8 02 00 00 jmp 1083d2 <rtems_termios_open+0x3dd>
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
1080ea: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx)
1080f1: 00 00 00
tty->tty_snd.sw_arg = NULL;
1080f4: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx)
1080fb: 00 00 00
tty->tty_rcv.sw_pfn = NULL;
1080fe: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx)
108105: 00 00 00
tty->tty_rcv.sw_arg = NULL;
108108: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
10810f: 00 00 00
tty->tty_rcvwakeup = 0;
108112: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
108119: 00 00 00
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
10811c: 89 33 mov %esi,(%ebx)
tty->back = NULL;
10811e: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
if (rtems_termios_ttyHead != NULL)
108125: 85 f6 test %esi,%esi
108127: 74 03 je 10812c <rtems_termios_open+0x137>
rtems_termios_ttyHead->back = tty;
108129: 89 5e 04 mov %ebx,0x4(%esi)
rtems_termios_ttyHead = tty;
10812c: 89 1d a4 c2 12 00 mov %ebx,0x12c2a4
if (rtems_termios_ttyTail == NULL)
108132: 83 3d a0 c2 12 00 00 cmpl $0x0,0x12c2a0
108139: 75 06 jne 108141 <rtems_termios_open+0x14c>
rtems_termios_ttyTail = tty;
10813b: 89 1d a0 c2 12 00 mov %ebx,0x12c2a0
tty->minor = minor;
108141: 8b 55 0c mov 0xc(%ebp),%edx
108144: 89 53 10 mov %edx,0x10(%ebx)
tty->major = major;
108147: 8b 55 08 mov 0x8(%ebp),%edx
10814a: 89 53 0c mov %edx,0xc(%ebx)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
10814d: 83 ec 0c sub $0xc,%esp
108150: 8d 43 14 lea 0x14(%ebx),%eax
108153: 50 push %eax
108154: 6a 00 push $0x0
108156: 6a 54 push $0x54
108158: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'i', c),
10815a: 0f be 05 10 a1 12 00 movsbl 0x12a110,%eax
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
108161: 0d 00 69 52 54 or $0x54526900,%eax
108166: 50 push %eax
108167: e8 f4 19 00 00 call 109b60 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'i', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
10816c: 83 c4 20 add $0x20,%esp
10816f: 85 c0 test %eax,%eax
108171: 74 05 je 108178 <rtems_termios_open+0x183>
108173: e9 1e 02 00 00 jmp 108396 <rtems_termios_open+0x3a1>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
108178: 83 ec 0c sub $0xc,%esp
10817b: 8d 43 18 lea 0x18(%ebx),%eax
10817e: 50 push %eax
10817f: 6a 00 push $0x0
108181: 6a 54 push $0x54
108183: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'o', c),
108185: 0f be 05 10 a1 12 00 movsbl 0x12a110,%eax
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
10818c: 0d 00 6f 52 54 or $0x54526f00,%eax
108191: 50 push %eax
108192: e8 c9 19 00 00 call 109b60 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'o', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
108197: 83 c4 20 add $0x20,%esp
10819a: 85 c0 test %eax,%eax
10819c: 74 05 je 1081a3 <rtems_termios_open+0x1ae>
10819e: e9 f3 01 00 00 jmp 108396 <rtems_termios_open+0x3a1>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
1081a3: 83 ec 0c sub $0xc,%esp
1081a6: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax
1081ac: 50 push %eax
1081ad: 6a 00 push $0x0
1081af: 6a 20 push $0x20
1081b1: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'x', c),
1081b3: 0f be 05 10 a1 12 00 movsbl 0x12a110,%eax
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
1081ba: 0d 00 78 52 54 or $0x54527800,%eax
1081bf: 50 push %eax
1081c0: e8 9b 19 00 00 call 109b60 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
1081c5: 83 c4 20 add $0x20,%esp
1081c8: 85 c0 test %eax,%eax
1081ca: 74 05 je 1081d1 <rtems_termios_open+0x1dc>
1081cc: e9 c5 01 00 00 jmp 108396 <rtems_termios_open+0x3a1>
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
1081d1: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
1081d8: 00 00 00
/*
* Set callbacks
*/
tty->device = *callbacks;
1081db: 8d bb 98 00 00 00 lea 0x98(%ebx),%edi
1081e1: b9 08 00 00 00 mov $0x8,%ecx
1081e6: 8b 75 14 mov 0x14(%ebp),%esi
1081e9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
1081eb: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
1081f2: 75 6a jne 10825e <rtems_termios_open+0x269>
sc = rtems_task_create (
1081f4: 56 push %esi
1081f5: 56 push %esi
1081f6: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax
1081fc: 50 push %eax
1081fd: 6a 00 push $0x0
1081ff: 68 00 05 00 00 push $0x500
108204: 68 00 04 00 00 push $0x400
108209: 6a 0a push $0xa
rtems_build_name ('T', 'x', 'T', c),
10820b: 0f be 05 10 a1 12 00 movsbl 0x12a110,%eax
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
108212: 0d 00 54 78 54 or $0x54785400,%eax
108217: 50 push %eax
108218: e8 f3 1c 00 00 call 109f10 <rtems_task_create>
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
10821d: 83 c4 20 add $0x20,%esp
108220: 85 c0 test %eax,%eax
108222: 74 05 je 108229 <rtems_termios_open+0x234><== ALWAYS TAKEN
108224: e9 6d 01 00 00 jmp 108396 <rtems_termios_open+0x3a1><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
108229: 51 push %ecx
10822a: 51 push %ecx
10822b: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax
108231: 50 push %eax
108232: 6a 00 push $0x0
108234: 68 00 05 00 00 push $0x500
108239: 68 00 04 00 00 push $0x400
10823e: 6a 09 push $0x9
rtems_build_name ('R', 'x', 'T', c),
108240: 0f be 05 10 a1 12 00 movsbl 0x12a110,%eax
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
108247: 0d 00 54 78 52 or $0x52785400,%eax
10824c: 50 push %eax
10824d: e8 be 1c 00 00 call 109f10 <rtems_task_create>
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
108252: 83 c4 20 add $0x20,%esp
108255: 85 c0 test %eax,%eax
108257: 74 05 je 10825e <rtems_termios_open+0x269><== ALWAYS TAKEN
108259: e9 38 01 00 00 jmp 108396 <rtems_termios_open+0x3a1><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
10825e: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
108265: 74 09 je 108270 <rtems_termios_open+0x27b>
108267: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
10826e: 75 2b jne 10829b <rtems_termios_open+0x2a6>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
108270: 83 ec 0c sub $0xc,%esp
108273: 8d 43 68 lea 0x68(%ebx),%eax
108276: 50 push %eax
108277: 6a 00 push $0x0
108279: 6a 24 push $0x24
10827b: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'r', c),
10827d: 0f be 05 10 a1 12 00 movsbl 0x12a110,%eax
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
108284: 0d 00 72 52 54 or $0x54527200,%eax
108289: 50 push %eax
10828a: e8 d1 18 00 00 call 109b60 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
10828f: 83 c4 20 add $0x20,%esp
108292: 85 c0 test %eax,%eax
108294: 74 05 je 10829b <rtems_termios_open+0x2a6>
108296: e9 fb 00 00 00 jmp 108396 <rtems_termios_open+0x3a1>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
10829b: c7 43 30 02 25 00 00 movl $0x2502,0x30(%ebx)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
1082a2: c7 43 34 05 18 00 00 movl $0x1805,0x34(%ebx)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
1082a9: c7 43 38 bd 08 00 00 movl $0x8bd,0x38(%ebx)
tty->termios.c_lflag =
1082b0: c7 43 3c 3b 82 00 00 movl $0x823b,0x3c(%ebx)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
1082b7: c6 43 41 03 movb $0x3,0x41(%ebx)
tty->termios.c_cc[VQUIT] = '\034';
1082bb: c6 43 42 1c movb $0x1c,0x42(%ebx)
tty->termios.c_cc[VERASE] = '\177';
1082bf: c6 43 43 7f movb $0x7f,0x43(%ebx)
tty->termios.c_cc[VKILL] = '\025';
1082c3: c6 43 44 15 movb $0x15,0x44(%ebx)
tty->termios.c_cc[VEOF] = '\004';
1082c7: c6 43 45 04 movb $0x4,0x45(%ebx)
tty->termios.c_cc[VEOL] = '\000';
1082cb: c6 43 4c 00 movb $0x0,0x4c(%ebx)
tty->termios.c_cc[VEOL2] = '\000';
1082cf: c6 43 51 00 movb $0x0,0x51(%ebx)
tty->termios.c_cc[VSTART] = '\021';
1082d3: c6 43 49 11 movb $0x11,0x49(%ebx)
tty->termios.c_cc[VSTOP] = '\023';
1082d7: c6 43 4a 13 movb $0x13,0x4a(%ebx)
tty->termios.c_cc[VSUSP] = '\032';
1082db: c6 43 4b 1a movb $0x1a,0x4b(%ebx)
tty->termios.c_cc[VREPRINT] = '\022';
1082df: c6 43 4d 12 movb $0x12,0x4d(%ebx)
tty->termios.c_cc[VDISCARD] = '\017';
1082e3: c6 43 4e 0f movb $0xf,0x4e(%ebx)
tty->termios.c_cc[VWERASE] = '\027';
1082e7: c6 43 4f 17 movb $0x17,0x4f(%ebx)
tty->termios.c_cc[VLNEXT] = '\026';
1082eb: c6 43 50 16 movb $0x16,0x50(%ebx)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
1082ef: c7 83 b8 00 00 00 00 movl $0x0,0xb8(%ebx)
1082f6: 00 00 00
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
1082f9: 8b 43 64 mov 0x64(%ebx),%eax
1082fc: d1 e8 shr %eax
1082fe: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
tty->highwater = tty->rawInBuf.Size * 3/4;
108304: 8b 43 64 mov 0x64(%ebx),%eax
108307: 8d 04 40 lea (%eax,%eax,2),%eax
10830a: c1 e8 02 shr $0x2,%eax
10830d: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx)
/*
* Bump name characer
*/
if (c++ == 'z')
108313: a0 10 a1 12 00 mov 0x12a110,%al
108318: 3c 7a cmp $0x7a,%al
10831a: 74 08 je 108324 <rtems_termios_open+0x32f>
10831c: 40 inc %eax
10831d: a2 10 a1 12 00 mov %al,0x12a110
108322: eb 07 jmp 10832b <rtems_termios_open+0x336>
c = 'a';
108324: c6 05 10 a1 12 00 61 movb $0x61,0x12a110
}
args->iop->data1 = tty;
10832b: 8b 55 10 mov 0x10(%ebp),%edx
10832e: 8b 02 mov (%edx),%eax
108330: 89 58 2c mov %ebx,0x2c(%eax)
if (!tty->refcount++) {
108333: 8b 43 08 mov 0x8(%ebx),%eax
108336: 8d 50 01 lea 0x1(%eax),%edx
108339: 89 53 08 mov %edx,0x8(%ebx)
10833c: 85 c0 test %eax,%eax
10833e: 75 5f jne 10839f <rtems_termios_open+0x3aa>
if (tty->device.firstOpen)
108340: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax
108346: 85 c0 test %eax,%eax
108348: 74 0f je 108359 <rtems_termios_open+0x364>
(*tty->device.firstOpen)(major, minor, arg);
10834a: 52 push %edx
10834b: ff 75 10 pushl 0x10(%ebp)
10834e: ff 75 0c pushl 0xc(%ebp)
108351: ff 75 08 pushl 0x8(%ebp)
108354: ff d0 call *%eax
108356: 83 c4 10 add $0x10,%esp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
108359: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
108360: 75 3d jne 10839f <rtems_termios_open+0x3aa>
sc = rtems_task_start(
108362: 57 push %edi
108363: 53 push %ebx
108364: 68 31 94 10 00 push $0x109431
108369: ff b3 c4 00 00 00 pushl 0xc4(%ebx)
10836f: e8 18 1e 00 00 call 10a18c <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
108374: 83 c4 10 add $0x10,%esp
108377: 85 c0 test %eax,%eax
108379: 74 02 je 10837d <rtems_termios_open+0x388><== ALWAYS TAKEN
10837b: eb 19 jmp 108396 <rtems_termios_open+0x3a1><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
10837d: 56 push %esi
10837e: 53 push %ebx
10837f: 68 47 7f 10 00 push $0x107f47
108384: ff b3 c8 00 00 00 pushl 0xc8(%ebx)
10838a: e8 fd 1d 00 00 call 10a18c <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
10838f: 83 c4 10 add $0x10,%esp
108392: 85 c0 test %eax,%eax
108394: 74 09 je 10839f <rtems_termios_open+0x3aa><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
108396: 83 ec 0c sub $0xc,%esp
108399: 50 push %eax
10839a: e8 11 20 00 00 call 10a3b0 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
10839f: 83 ec 0c sub $0xc,%esp
1083a2: ff 35 9c c2 12 00 pushl 0x12c29c
1083a8: e8 d3 1a 00 00 call 109e80 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
1083ad: 83 c4 10 add $0x10,%esp
1083b0: eb 20 jmp 1083d2 <rtems_termios_open+0x3dd>
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
1083b2: 51 push %ecx
1083b3: 51 push %ecx
1083b4: 68 e8 00 00 00 push $0xe8
1083b9: 6a 01 push $0x1
1083bb: e8 6c e1 ff ff call 10652c <calloc>
1083c0: 89 c3 mov %eax,%ebx
if (tty == NULL) {
1083c2: 83 c4 10 add $0x10,%esp
1083c5: 85 c0 test %eax,%eax
1083c7: 0f 85 7f fc ff ff jne 10804c <rtems_termios_open+0x57>
1083cd: e9 72 fc ff ff jmp 108044 <rtems_termios_open+0x4f>
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
1083d2: 8b 45 e4 mov -0x1c(%ebp),%eax
1083d5: 8d 65 f4 lea -0xc(%ebp),%esp
1083d8: 5b pop %ebx
1083d9: 5e pop %esi
1083da: 5f pop %edi
1083db: 5d pop %ebp
1083dc: c3 ret
001088c5 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, size_t len, struct rtems_termios_tty *tty)
{
1088c5: 55 push %ebp
1088c6: 89 e5 mov %esp,%ebp
1088c8: 57 push %edi
1088c9: 56 push %esi
1088ca: 53 push %ebx
1088cb: 83 ec 1c sub $0x1c,%esp
1088ce: 8b 75 08 mov 0x8(%ebp),%esi
1088d1: 8b 45 0c mov 0xc(%ebp),%eax
1088d4: 8b 5d 10 mov 0x10(%ebp),%ebx
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
1088d7: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
1088de: 75 1b jne 1088fb <rtems_termios_puts+0x36>
(*tty->device.write)(tty->minor, buf, len);
1088e0: 89 45 10 mov %eax,0x10(%ebp)
1088e3: 89 75 0c mov %esi,0xc(%ebp)
1088e6: 8b 43 10 mov 0x10(%ebx),%eax
1088e9: 89 45 08 mov %eax,0x8(%ebp)
1088ec: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
1088f2: 8d 65 f4 lea -0xc(%ebp),%esp
1088f5: 5b pop %ebx
1088f6: 5e pop %esi
1088f7: 5f pop %edi
1088f8: 5d pop %ebp
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
1088f9: ff e0 jmp *%eax
return;
}
newHead = tty->rawOutBuf.Head;
1088fb: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi
/*
* Send characters to device-specific code
*/
void
rtems_termios_puts (
108901: 01 f0 add %esi,%eax
108903: 89 45 e0 mov %eax,-0x20(%ebp)
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
108906: e9 b5 00 00 00 jmp 1089c0 <rtems_termios_puts+0xfb>
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
10890b: 8d 47 01 lea 0x1(%edi),%eax
10890e: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
108914: 31 d2 xor %edx,%edx
108916: f7 f1 div %ecx
108918: 89 55 d8 mov %edx,-0x28(%ebp)
10891b: 89 d7 mov %edx,%edi
10891d: eb 2e jmp 10894d <rtems_termios_puts+0x88>
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
10891f: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
108926: 00 00 00
rtems_interrupt_enable (level);
108929: ff 75 e4 pushl -0x1c(%ebp)
10892c: 9d popf
sc = rtems_semaphore_obtain(
10892d: 51 push %ecx
10892e: 6a 00 push $0x0
108930: 6a 00 push $0x0
108932: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
108938: e8 53 14 00 00 call 109d90 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
10893d: 83 c4 10 add $0x10,%esp
108940: 85 c0 test %eax,%eax
108942: 74 09 je 10894d <rtems_termios_puts+0x88><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
108944: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108947: 50 push %eax <== NOT EXECUTED
108948: e8 63 1a 00 00 call 10a3b0 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_interrupt_disable (level);
10894d: 9c pushf
10894e: fa cli
10894f: 8f 45 e4 popl -0x1c(%ebp)
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
108952: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
108958: 39 45 d8 cmp %eax,-0x28(%ebp)
10895b: 74 c2 je 10891f <rtems_termios_puts+0x5a>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
10895d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
108963: 8a 0e mov (%esi),%cl
108965: 8b 53 7c mov 0x7c(%ebx),%edx
108968: 88 0c 02 mov %cl,(%edx,%eax,1)
10896b: 46 inc %esi
tty->rawOutBuf.Head = newHead;
10896c: 8b 55 d8 mov -0x28(%ebp),%edx
10896f: 89 93 80 00 00 00 mov %edx,0x80(%ebx)
if (tty->rawOutBufState == rob_idle) {
108975: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx)
10897c: 75 3e jne 1089bc <rtems_termios_puts+0xf7>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
10897e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108984: a8 10 test $0x10,%al
108986: 75 1b jne 1089a3 <rtems_termios_puts+0xde><== NEVER TAKEN
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
108988: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(
10898e: 52 push %edx
10898f: 6a 01 push $0x1
108991: 03 43 7c add 0x7c(%ebx),%eax
108994: 50 push %eax
108995: ff 73 10 pushl 0x10(%ebx)
108998: ff 93 a4 00 00 00 call *0xa4(%ebx)
10899e: 83 c4 10 add $0x10,%esp
1089a1: eb 0f jmp 1089b2 <rtems_termios_puts+0xed>
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
1089a3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1089a9: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
1089ac: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
1089b2: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
1089b9: 00 00 00
}
rtems_interrupt_enable (level);
1089bc: ff 75 e4 pushl -0x1c(%ebp)
1089bf: 9d popf
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
1089c0: 3b 75 e0 cmp -0x20(%ebp),%esi
1089c3: 0f 85 42 ff ff ff jne 10890b <rtems_termios_puts+0x46>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
1089c9: 8d 65 f4 lea -0xc(%ebp),%esp
1089cc: 5b pop %ebx
1089cd: 5e pop %esi
1089ce: 5f pop %edi
1089cf: 5d pop %ebp
1089d0: c3 ret
00108ed2 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
108ed2: 55 push %ebp
108ed3: 89 e5 mov %esp,%ebp
108ed5: 57 push %edi
108ed6: 56 push %esi
108ed7: 53 push %ebx
108ed8: 83 ec 30 sub $0x30,%esp
108edb: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
108ede: 8b 06 mov (%esi),%eax
108ee0: 8b 58 2c mov 0x2c(%eax),%ebx
uint32_t count = args->count;
108ee3: 8b 4e 10 mov 0x10(%esi),%ecx
108ee6: 89 4d e4 mov %ecx,-0x1c(%ebp)
char *buffer = args->buffer;
108ee9: 8b 4e 0c mov 0xc(%esi),%ecx
108eec: 89 4d dc mov %ecx,-0x24(%ebp)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108eef: 6a 00 push $0x0
108ef1: 6a 00 push $0x0
108ef3: ff 73 14 pushl 0x14(%ebx)
108ef6: e8 95 0e 00 00 call 109d90 <rtems_semaphore_obtain>
108efb: 89 45 d8 mov %eax,-0x28(%ebp)
if (sc != RTEMS_SUCCESSFUL)
108efe: 83 c4 10 add $0x10,%esp
108f01: 85 c0 test %eax,%eax
108f03: 0f 85 88 02 00 00 jne 109191 <rtems_termios_read+0x2bf><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
108f09: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
108f0f: c1 e0 05 shl $0x5,%eax
108f12: 8b 80 4c bf 12 00 mov 0x12bf4c(%eax),%eax
108f18: 85 c0 test %eax,%eax
108f1a: 74 19 je 108f35 <rtems_termios_read+0x63>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
108f1c: 52 push %edx
108f1d: 52 push %edx
108f1e: 56 push %esi
108f1f: 53 push %ebx
108f20: ff d0 call *%eax
108f22: 89 45 d8 mov %eax,-0x28(%ebp)
tty->tty_rcvwakeup = 0;
108f25: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
108f2c: 00 00 00
rtems_semaphore_release (tty->isem);
108f2f: 59 pop %ecx
108f30: e9 51 02 00 00 jmp 109186 <rtems_termios_read+0x2b4>
return sc;
}
if (tty->cindex == tty->ccount) {
108f35: 8b 43 20 mov 0x20(%ebx),%eax
108f38: 39 43 24 cmp %eax,0x24(%ebx)
108f3b: 0f 85 21 02 00 00 jne 109162 <rtems_termios_read+0x290><== NEVER TAKEN
tty->cindex = tty->ccount = 0;
108f41: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
108f48: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
tty->read_start_column = tty->column;
108f4f: 8b 43 28 mov 0x28(%ebx),%eax
108f52: 89 43 2c mov %eax,0x2c(%ebx)
if (tty->device.pollRead != NULL &&
108f55: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
108f5c: 0f 84 c9 00 00 00 je 10902b <rtems_termios_read+0x159>
108f62: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
108f69: 0f 85 bc 00 00 00 jne 10902b <rtems_termios_read+0x159>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
108f6f: f6 43 3c 02 testb $0x2,0x3c(%ebx)
108f73: 74 37 je 108fac <rtems_termios_read+0xda>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
108f75: 83 ec 0c sub $0xc,%esp
108f78: ff 73 10 pushl 0x10(%ebx)
108f7b: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (n < 0) {
108f81: 83 c4 10 add $0x10,%esp
108f84: 85 c0 test %eax,%eax
108f86: 79 0f jns 108f97 <rtems_termios_read+0xc5>
rtems_task_wake_after (1);
108f88: 83 ec 0c sub $0xc,%esp
108f8b: 6a 01 push $0x1
108f8d: e8 5e 12 00 00 call 10a1f0 <rtems_task_wake_after>
108f92: 83 c4 10 add $0x10,%esp
108f95: eb de jmp 108f75 <rtems_termios_read+0xa3>
} else {
if (siproc (n, tty))
108f97: 25 ff 00 00 00 and $0xff,%eax
108f9c: 89 da mov %ebx,%edx
108f9e: e8 3a fe ff ff call 108ddd <siproc>
108fa3: 85 c0 test %eax,%eax
108fa5: 74 ce je 108f75 <rtems_termios_read+0xa3>
108fa7: e9 b6 01 00 00 jmp 109162 <rtems_termios_read+0x290>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
108fac: e8 47 08 00 00 call 1097f8 <rtems_clock_get_ticks_since_boot>
108fb1: 89 c7 mov %eax,%edi
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
108fb3: 83 ec 0c sub $0xc,%esp
108fb6: ff 73 10 pushl 0x10(%ebx)
108fb9: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (n < 0) {
108fbf: 83 c4 10 add $0x10,%esp
108fc2: 85 c0 test %eax,%eax
108fc4: 79 3e jns 109004 <rtems_termios_read+0x132>
if (tty->termios.c_cc[VMIN]) {
108fc6: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
108fca: 74 1d je 108fe9 <rtems_termios_read+0x117><== NEVER TAKEN
if (tty->termios.c_cc[VTIME] && tty->ccount) {
108fcc: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
108fd0: 75 0f jne 108fe1 <rtems_termios_read+0x10f><== ALWAYS TAKEN
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
108fd2: 83 ec 0c sub $0xc,%esp
108fd5: 6a 01 push $0x1
108fd7: e8 14 12 00 00 call 10a1f0 <rtems_task_wake_after>
108fdc: 83 c4 10 add $0x10,%esp
108fdf: eb d2 jmp 108fb3 <rtems_termios_read+0xe1>
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
if (tty->termios.c_cc[VTIME] && tty->ccount) {
108fe1: 83 7b 20 00 cmpl $0x0,0x20(%ebx)
108fe5: 74 eb je 108fd2 <rtems_termios_read+0x100>
108fe7: eb 0a jmp 108ff3 <rtems_termios_read+0x121>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
108fe9: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
108fed: 0f 84 6f 01 00 00 je 109162 <rtems_termios_read+0x290><== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
108ff3: e8 00 08 00 00 call 1097f8 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
108ff8: 29 f8 sub %edi,%eax
108ffa: 3b 43 54 cmp 0x54(%ebx),%eax
108ffd: 76 d3 jbe 108fd2 <rtems_termios_read+0x100>
108fff: e9 5e 01 00 00 jmp 109162 <rtems_termios_read+0x290>
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
109004: 25 ff 00 00 00 and $0xff,%eax
109009: 89 da mov %ebx,%edx
10900b: e8 cd fd ff ff call 108ddd <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
109010: 8a 43 47 mov 0x47(%ebx),%al
109013: 0f b6 d0 movzbl %al,%edx
109016: 39 53 20 cmp %edx,0x20(%ebx)
109019: 0f 8d 43 01 00 00 jge 109162 <rtems_termios_read+0x290>
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
10901f: 84 c0 test %al,%al
109021: 74 90 je 108fb3 <rtems_termios_read+0xe1><== NEVER TAKEN
109023: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
109027: 74 8a je 108fb3 <rtems_termios_read+0xe1><== NEVER TAKEN
109029: eb 81 jmp 108fac <rtems_termios_read+0xda>
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
10902b: 8b 7b 74 mov 0x74(%ebx),%edi
rtems_status_code sc;
int wait = 1;
10902e: c7 45 d4 01 00 00 00 movl $0x1,-0x2c(%ebp)
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
109035: 8d 4b 49 lea 0x49(%ebx),%ecx
109038: 89 4d d0 mov %ecx,-0x30(%ebp)
10903b: e9 d3 00 00 00 jmp 109113 <rtems_termios_read+0x241>
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
109040: 8b 43 5c mov 0x5c(%ebx),%eax
109043: 8b 4b 64 mov 0x64(%ebx),%ecx
109046: 40 inc %eax
109047: 31 d2 xor %edx,%edx
109049: f7 f1 div %ecx
c = tty->rawInBuf.theBuf[newHead];
10904b: 8b 43 58 mov 0x58(%ebx),%eax
10904e: 8a 04 10 mov (%eax,%edx,1),%al
109051: 88 45 e3 mov %al,-0x1d(%ebp)
tty->rawInBuf.Head = newHead;
109054: 89 53 5c mov %edx,0x5c(%ebx)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
109057: 8b 43 60 mov 0x60(%ebx),%eax
10905a: 8b 7b 64 mov 0x64(%ebx),%edi
% tty->rawInBuf.Size)
10905d: 8b 4b 64 mov 0x64(%ebx),%ecx
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
109060: 01 f8 add %edi,%eax
109062: 29 d0 sub %edx,%eax
% tty->rawInBuf.Size)
109064: 31 d2 xor %edx,%edx
109066: f7 f1 div %ecx
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
109068: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx
10906e: 73 74 jae 1090e4 <rtems_termios_read+0x212><== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
109070: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109076: 83 e0 fe and $0xfffffffe,%eax
109079: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
10907f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109085: 25 02 02 00 00 and $0x202,%eax
10908a: 3d 02 02 00 00 cmp $0x202,%eax
10908f: 75 24 jne 1090b5 <rtems_termios_read+0x1e3><== ALWAYS TAKEN
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
109091: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
109098: 74 0a je 1090a4 <rtems_termios_read+0x1d2><== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
10909a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1090a0: a8 20 test $0x20,%al <== NOT EXECUTED
1090a2: 74 11 je 1090b5 <rtems_termios_read+0x1e3><== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
1090a4: 50 push %eax <== NOT EXECUTED
1090a5: 6a 01 push $0x1 <== NOT EXECUTED
1090a7: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
1090aa: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1090ad: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
1090b3: eb 2c jmp 1090e1 <rtems_termios_read+0x20f><== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
1090b5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1090bb: f6 c4 01 test $0x1,%ah
1090be: 74 24 je 1090e4 <rtems_termios_read+0x212><== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
1090c0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1090c6: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
1090c9: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
1090cf: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
1090d5: 85 c0 test %eax,%eax <== NOT EXECUTED
1090d7: 74 0b je 1090e4 <rtems_termios_read+0x212><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
1090d9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1090dc: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1090df: ff d0 call *%eax <== NOT EXECUTED
1090e1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
1090e4: 0f b6 45 e3 movzbl -0x1d(%ebp),%eax
1090e8: 89 da mov %ebx,%edx
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
1090ea: f6 43 3c 02 testb $0x2,0x3c(%ebx)
1090ee: 74 12 je 109102 <rtems_termios_read+0x230><== NEVER TAKEN
if (siproc (c, tty))
1090f0: e8 e8 fc ff ff call 108ddd <siproc>
1090f5: 85 c0 test %eax,%eax
1090f7: 74 17 je 109110 <rtems_termios_read+0x23e>
wait = 0;
1090f9: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
109100: eb 0e jmp 109110 <rtems_termios_read+0x23e>
} else {
siproc (c, tty);
109102: e8 d6 fc ff ff call 108ddd <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
109107: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED
10910b: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
10910e: 7d e9 jge 1090f9 <rtems_termios_read+0x227><== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
109110: 8b 7b 70 mov 0x70(%ebx),%edi
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
109113: 8b 53 5c mov 0x5c(%ebx),%edx
109116: 8b 43 60 mov 0x60(%ebx),%eax
109119: 39 c2 cmp %eax,%edx
10911b: 75 08 jne 109125 <rtems_termios_read+0x253>
}
/*
* Wait for characters
*/
if ( wait ) {
10911d: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
109121: 74 3f je 109162 <rtems_termios_read+0x290>
109123: eb 11 jmp 109136 <rtems_termios_read+0x264>
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
109125: a1 0c a1 12 00 mov 0x12a10c,%eax
10912a: 48 dec %eax
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10912b: 39 43 20 cmp %eax,0x20(%ebx)
10912e: 0f 82 0c ff ff ff jb 109040 <rtems_termios_read+0x16e><== ALWAYS TAKEN
109134: eb e7 jmp 10911d <rtems_termios_read+0x24b><== NOT EXECUTED
/*
* Wait for characters
*/
if ( wait ) {
sc = rtems_semaphore_obtain(
109136: 50 push %eax
109137: 57 push %edi
109138: ff 73 6c pushl 0x6c(%ebx)
10913b: ff 73 68 pushl 0x68(%ebx)
10913e: e8 4d 0c 00 00 call 109d90 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
109143: 83 c4 10 add $0x10,%esp
109146: 85 c0 test %eax,%eax
109148: 74 c9 je 109113 <rtems_termios_read+0x241>
10914a: eb 16 jmp 109162 <rtems_termios_read+0x290>
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
10914c: 8b 53 1c mov 0x1c(%ebx),%edx
10914f: 8a 14 02 mov (%edx,%eax,1),%dl
109152: 8b 4d dc mov -0x24(%ebp),%ecx
109155: 88 11 mov %dl,(%ecx)
109157: 41 inc %ecx
109158: 89 4d dc mov %ecx,-0x24(%ebp)
10915b: 40 inc %eax
10915c: 89 43 24 mov %eax,0x24(%ebx)
count--;
10915f: ff 4d e4 decl -0x1c(%ebp)
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
109162: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
109166: 74 08 je 109170 <rtems_termios_read+0x29e>
109168: 8b 43 24 mov 0x24(%ebx),%eax
10916b: 3b 43 20 cmp 0x20(%ebx),%eax
10916e: 7c dc jl 10914c <rtems_termios_read+0x27a>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
109170: 8b 46 10 mov 0x10(%esi),%eax
109173: 2b 45 e4 sub -0x1c(%ebp),%eax
109176: 89 46 18 mov %eax,0x18(%esi)
tty->tty_rcvwakeup = 0;
109179: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
109180: 00 00 00
rtems_semaphore_release (tty->isem);
109183: 83 ec 0c sub $0xc,%esp
109186: ff 73 14 pushl 0x14(%ebx)
109189: e8 f2 0c 00 00 call 109e80 <rtems_semaphore_release>
return sc;
10918e: 83 c4 10 add $0x10,%esp
}
109191: 8b 45 d8 mov -0x28(%ebp),%eax
109194: 8d 65 f4 lea -0xc(%ebp),%esp
109197: 5b pop %ebx
109198: 5e pop %esi
109199: 5f pop %edi
10919a: 5d pop %ebp
10919b: c3 ret
00107d80 <rtems_termios_refill_transmitter>:
* in task-driven mode, this function is called in Tx task context
* in interrupt-driven mode, this function is called in TxIRQ context
*/
static int
rtems_termios_refill_transmitter (struct rtems_termios_tty *tty)
{
107d80: 55 push %ebp
107d81: 89 e5 mov %esp,%ebp
107d83: 57 push %edi
107d84: 56 push %esi
107d85: 53 push %ebx
107d86: 83 ec 0c sub $0xc,%esp
107d89: 89 c3 mov %eax,%ebx
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
107d8b: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax
107d91: 25 03 04 00 00 and $0x403,%eax
107d96: 3d 01 04 00 00 cmp $0x401,%eax
107d9b: 75 24 jne 107dc1 <rtems_termios_refill_transmitter+0x41><== ALWAYS TAKEN
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
107d9d: 56 push %esi <== NOT EXECUTED
107d9e: 6a 01 push $0x1 <== NOT EXECUTED
107da0: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED
107da3: 50 push %eax <== NOT EXECUTED
107da4: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
107da7: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
107dad: 9c pushf <== NOT EXECUTED
107dae: fa cli <== NOT EXECUTED
107daf: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
107db0: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
107db6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107dbc: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
107dbf: eb 30 jmp 107df1 <rtems_termios_refill_transmitter+0x71><== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
107dc1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107dc7: 83 e0 03 and $0x3,%eax
107dca: 83 f8 02 cmp $0x2,%eax
107dcd: 75 37 jne 107e06 <rtems_termios_refill_transmitter+0x86><== ALWAYS TAKEN
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
107dcf: 51 push %ecx <== NOT EXECUTED
107dd0: 6a 01 push $0x1 <== NOT EXECUTED
107dd2: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED
107dd5: 50 push %eax <== NOT EXECUTED
107dd6: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
107dd9: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
107ddf: 9c pushf <== NOT EXECUTED
107de0: fa cli <== NOT EXECUTED
107de1: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
107de2: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
107de8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107dee: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
107df1: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
107df7: 52 push %edx <== NOT EXECUTED
107df8: 9d popf <== NOT EXECUTED
107df9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend = 1;
107dfc: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
107e01: e9 37 01 00 00 jmp 107f3d <rtems_termios_refill_transmitter+0x1bd><== NOT EXECUTED
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
107e06: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
107e0c: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
107e12: 39 c2 cmp %eax,%edx
107e14: 75 25 jne 107e3b <rtems_termios_refill_transmitter+0xbb>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
107e16: 31 f6 xor %esi,%esi
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
107e18: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
107e1f: 0f 85 18 01 00 00 jne 107f3d <rtems_termios_refill_transmitter+0x1bd><== ALWAYS TAKEN
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
107e25: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107e28: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED
107e2e: e8 4d 20 00 00 call 109e80 <rtems_semaphore_release><== NOT EXECUTED
107e33: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107e36: e9 02 01 00 00 jmp 107f3d <rtems_termios_refill_transmitter+0x1bd><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
107e3b: 9c pushf
107e3c: fa cli
107e3d: 58 pop %eax
len = tty->t_dqlen;
107e3e: 8b bb 90 00 00 00 mov 0x90(%ebx),%edi
tty->t_dqlen = 0;
107e44: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx)
107e4b: 00 00 00
rtems_interrupt_enable(level);
107e4e: 50 push %eax
107e4f: 9d popf
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
107e50: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
107e56: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
107e5c: 01 f8 add %edi,%eax
107e5e: 31 d2 xor %edx,%edx
107e60: f7 f1 div %ecx
107e62: 89 d7 mov %edx,%edi
tty->rawOutBuf.Tail = newTail;
107e64: 89 93 84 00 00 00 mov %edx,0x84(%ebx)
if (tty->rawOutBufState == rob_wait) {
107e6a: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
107e71: 75 11 jne 107e84 <rtems_termios_refill_transmitter+0x104>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
107e73: 83 ec 0c sub $0xc,%esp
107e76: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
107e7c: e8 ff 1f 00 00 call 109e80 <rtems_semaphore_release>
107e81: 83 c4 10 add $0x10,%esp
}
if (newTail == tty->rawOutBuf.Head) {
107e84: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
107e8a: 39 c7 cmp %eax,%edi
107e8c: 75 2b jne 107eb9 <rtems_termios_refill_transmitter+0x139>
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
107e8e: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
107e95: 00 00 00
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
107e98: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax
107e9e: 85 c0 test %eax,%eax
107ea0: 0f 84 8f 00 00 00 je 107f35 <rtems_termios_refill_transmitter+0x1b5><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
107ea6: 52 push %edx <== NOT EXECUTED
107ea7: 52 push %edx <== NOT EXECUTED
107ea8: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED
107eae: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
107eb1: 52 push %edx <== NOT EXECUTED
107eb2: ff d0 call *%eax <== NOT EXECUTED
107eb4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107eb7: eb 7c jmp 107f35 <rtems_termios_refill_transmitter+0x1b5><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
107eb9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107ebf: 25 10 02 00 00 and $0x210,%eax
107ec4: 3d 10 02 00 00 cmp $0x210,%eax
107ec9: 75 20 jne 107eeb <rtems_termios_refill_transmitter+0x16b><== ALWAYS TAKEN
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
107ecb: 9c pushf <== NOT EXECUTED
107ecc: fa cli <== NOT EXECUTED
107ecd: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
107ece: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107ed4: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
107ed7: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
107edd: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED
107ee4: 00 00 00
rtems_interrupt_enable(level);
107ee7: 52 push %edx <== NOT EXECUTED
107ee8: 9d popf <== NOT EXECUTED
107ee9: eb 4a jmp 107f35 <rtems_termios_refill_transmitter+0x1b5><== NOT EXECUTED
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
107eeb: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
107ef1: 39 c7 cmp %eax,%edi
107ef3: 76 08 jbe 107efd <rtems_termios_refill_transmitter+0x17d>
nToSend = tty->rawOutBuf.Size - newTail;
107ef5: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi
107efb: eb 06 jmp 107f03 <rtems_termios_refill_transmitter+0x183>
else
nToSend = tty->rawOutBuf.Head - newTail;
107efd: 8b b3 80 00 00 00 mov 0x80(%ebx),%esi
107f03: 29 fe sub %edi,%esi
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
107f05: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107f0b: f6 c4 06 test $0x6,%ah
107f0e: 74 05 je 107f15 <rtems_termios_refill_transmitter+0x195>
nToSend = 1;
107f10: be 01 00 00 00 mov $0x1,%esi
}
tty->rawOutBufState = rob_busy; /*apm*/
107f15: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
107f1c: 00 00 00
(*tty->device.write)(
107f1f: 50 push %eax
107f20: 56 push %esi
107f21: 8b 43 7c mov 0x7c(%ebx),%eax
107f24: 01 f8 add %edi,%eax
107f26: 50 push %eax
107f27: ff 73 10 pushl 0x10(%ebx)
107f2a: ff 93 a4 00 00 00 call *0xa4(%ebx)
107f30: 83 c4 10 add $0x10,%esp
107f33: eb 02 jmp 107f37 <rtems_termios_refill_transmitter+0x1b7>
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
107f35: 31 f6 xor %esi,%esi
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
107f37: 89 bb 84 00 00 00 mov %edi,0x84(%ebx)
}
return nToSend;
}
107f3d: 89 f0 mov %esi,%eax
107f3f: 8d 65 f4 lea -0xc(%ebp),%esp
107f42: 5b pop %ebx
107f43: 5e pop %esi
107f44: 5f pop %edi
107f45: 5d pop %ebp
107f46: c3 ret
00109431 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
109431: 55 push %ebp
109432: 89 e5 mov %esp,%ebp
109434: 57 push %edi
109435: 56 push %esi
109436: 53 push %ebx
109437: 83 ec 1c sub $0x1c,%esp
10943a: 8b 5d 08 mov 0x8(%ebp),%ebx
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
10943d: 8d 7d e4 lea -0x1c(%ebp),%edi
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
109440: 8d 75 e3 lea -0x1d(%ebp),%esi
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
109443: 57 push %edi
109444: 6a 00 push $0x0
109446: 6a 02 push $0x2
109448: 6a 03 push $0x3
10944a: e8 0d 04 00 00 call 10985c <rtems_event_receive>
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
10944f: 83 c4 10 add $0x10,%esp
109452: f6 45 e4 01 testb $0x1,-0x1c(%ebp)
109456: 74 17 je 10946f <rtems_termios_rxdaemon+0x3e><== ALWAYS TAKEN
tty->rxTaskId = 0;
109458: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED
10945f: 00 00 00
rtems_task_delete(RTEMS_SELF);
109462: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109465: 6a 00 push $0x0 <== NOT EXECUTED
109467: e8 dc 0b 00 00 call 10a048 <rtems_task_delete> <== NOT EXECUTED
10946c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
10946f: 83 ec 0c sub $0xc,%esp
109472: ff 73 10 pushl 0x10(%ebx)
109475: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (c != EOF) {
10947b: 83 c4 10 add $0x10,%esp
10947e: 83 f8 ff cmp $0xffffffff,%eax
109481: 74 c0 je 109443 <rtems_termios_rxdaemon+0x12>
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
109483: 88 45 e3 mov %al,-0x1d(%ebp)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
109486: 50 push %eax
109487: 6a 01 push $0x1
109489: 56 push %esi
10948a: 53 push %ebx
10948b: e8 27 fd ff ff call 1091b7 <rtems_termios_enqueue_raw_characters>
109490: 83 c4 10 add $0x10,%esp
109493: eb ae jmp 109443 <rtems_termios_rxdaemon+0x12>
00107f47 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
107f47: 55 push %ebp
107f48: 89 e5 mov %esp,%ebp
107f4a: 56 push %esi
107f4b: 53 push %ebx
107f4c: 83 ec 10 sub $0x10,%esp
107f4f: 8b 5d 08 mov 0x8(%ebp),%ebx
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
107f52: 8d 75 f4 lea -0xc(%ebp),%esi
107f55: 56 push %esi
107f56: 6a 00 push $0x0
107f58: 6a 02 push $0x2
107f5a: 6a 03 push $0x3
107f5c: e8 fb 18 00 00 call 10985c <rtems_event_receive>
(TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
107f61: 83 c4 10 add $0x10,%esp
107f64: f6 45 f4 01 testb $0x1,-0xc(%ebp)
107f68: 74 17 je 107f81 <rtems_termios_txdaemon+0x3a><== ALWAYS TAKEN
tty->txTaskId = 0;
107f6a: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED
107f71: 00 00 00
rtems_task_delete(RTEMS_SELF);
107f74: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f77: 6a 00 push $0x0 <== NOT EXECUTED
107f79: e8 ca 20 00 00 call 10a048 <rtems_task_delete> <== NOT EXECUTED
107f7e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
107f81: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
107f87: c1 e0 05 shl $0x5,%eax
107f8a: 8b 80 58 bf 12 00 mov 0x12bf58(%eax),%eax
107f90: 85 c0 test %eax,%eax
107f92: 74 09 je 107f9d <rtems_termios_txdaemon+0x56><== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
107f94: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f97: 53 push %ebx <== NOT EXECUTED
107f98: ff d0 call *%eax <== NOT EXECUTED
107f9a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
107f9d: 89 d8 mov %ebx,%eax
107f9f: e8 dc fd ff ff call 107d80 <rtems_termios_refill_transmitter>
}
107fa4: eb af jmp 107f55 <rtems_termios_txdaemon+0xe>
00108e2f <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
108e2f: 55 push %ebp
108e30: 89 e5 mov %esp,%ebp
108e32: 57 push %edi
108e33: 56 push %esi
108e34: 53 push %ebx
108e35: 83 ec 20 sub $0x20,%esp
108e38: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
108e3b: 8b 03 mov (%ebx),%eax
108e3d: 8b 70 2c mov 0x2c(%eax),%esi
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108e40: 6a 00 push $0x0
108e42: 6a 00 push $0x0
108e44: ff 76 18 pushl 0x18(%esi)
108e47: e8 44 0f 00 00 call 109d90 <rtems_semaphore_obtain>
108e4c: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL)
108e4e: 83 c4 10 add $0x10,%esp
108e51: 85 c0 test %eax,%eax
108e53: 75 73 jne 108ec8 <rtems_termios_write+0x99><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
108e55: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
108e5b: c1 e0 05 shl $0x5,%eax
108e5e: 8b 80 50 bf 12 00 mov 0x12bf50(%eax),%eax
108e64: 85 c0 test %eax,%eax
108e66: 74 0b je 108e73 <rtems_termios_write+0x44>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
108e68: 52 push %edx
108e69: 52 push %edx
108e6a: 53 push %ebx
108e6b: 56 push %esi
108e6c: ff d0 call *%eax
108e6e: 89 c7 mov %eax,%edi
rtems_semaphore_release (tty->osem);
108e70: 59 pop %ecx
108e71: eb 4a jmp 108ebd <rtems_termios_write+0x8e>
return sc;
}
if (tty->termios.c_oflag & OPOST) {
108e73: f6 46 34 01 testb $0x1,0x34(%esi)
108e77: 74 2b je 108ea4 <rtems_termios_write+0x75><== NEVER TAKEN
uint32_t count = args->count;
char *buffer = args->buffer;
108e79: 8b 4b 0c mov 0xc(%ebx),%ecx
}
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
108e7c: 8b 43 10 mov 0x10(%ebx),%eax
108e7f: 01 c8 add %ecx,%eax
108e81: 89 45 e4 mov %eax,-0x1c(%ebp)
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
108e84: eb 11 jmp 108e97 <rtems_termios_write+0x68>
oproc (*buffer++, tty);
108e86: 0f b6 01 movzbl (%ecx),%eax
108e89: 41 inc %ecx
108e8a: 89 f2 mov %esi,%edx
108e8c: 89 4d e0 mov %ecx,-0x20(%ebp)
108e8f: e8 3d fb ff ff call 1089d1 <oproc>
108e94: 8b 4d e0 mov -0x20(%ebp),%ecx
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
108e97: 3b 4d e4 cmp -0x1c(%ebp),%ecx
108e9a: 75 ea jne 108e86 <rtems_termios_write+0x57>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
108e9c: 8b 43 10 mov 0x10(%ebx),%eax
108e9f: 89 43 18 mov %eax,0x18(%ebx)
108ea2: eb 16 jmp 108eba <rtems_termios_write+0x8b>
} else {
rtems_termios_puts (args->buffer, args->count, tty);
108ea4: 50 push %eax <== NOT EXECUTED
108ea5: 56 push %esi <== NOT EXECUTED
108ea6: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108ea9: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
108eac: e8 14 fa ff ff call 1088c5 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
108eb1: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
108eb4: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED
108eb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_semaphore_release (tty->osem);
108eba: 83 ec 0c sub $0xc,%esp
108ebd: ff 76 18 pushl 0x18(%esi)
108ec0: e8 bb 0f 00 00 call 109e80 <rtems_semaphore_release>
return sc;
108ec5: 83 c4 10 add $0x10,%esp
}
108ec8: 89 f8 mov %edi,%eax
108eca: 8d 65 f4 lea -0xc(%ebp),%esp
108ecd: 5b pop %ebx
108ece: 5e pop %esi
108ecf: 5f pop %edi
108ed0: 5d pop %ebp
108ed1: c3 ret
00115fac <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
115fac: 55 push %ebp
115fad: 89 e5 mov %esp,%ebp
115faf: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
115fb2: 8d 45 f4 lea -0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
115fb5: 50 push %eax
115fb6: ff 75 08 pushl 0x8(%ebp)
115fb9: 68 a0 59 14 00 push $0x1459a0
115fbe: e8 31 27 00 00 call 1186f4 <_Objects_Get>
switch ( location ) {
115fc3: 83 c4 10 add $0x10,%esp
115fc6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115fca: 75 1e jne 115fea <rtems_timer_cancel+0x3e>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
115fcc: 83 78 38 04 cmpl $0x4,0x38(%eax)
115fd0: 74 0f je 115fe1 <rtems_timer_cancel+0x35><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
115fd2: 83 ec 0c sub $0xc,%esp
115fd5: 83 c0 10 add $0x10,%eax
115fd8: 50 push %eax
115fd9: e8 0e 40 00 00 call 119fec <_Watchdog_Remove>
115fde: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
115fe1: e8 8e 32 00 00 call 119274 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115fe6: 31 c0 xor %eax,%eax
115fe8: eb 05 jmp 115fef <rtems_timer_cancel+0x43>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115fea: b8 04 00 00 00 mov $0x4,%eax
}
115fef: c9 leave
115ff0: c3 ret
001168b9 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
1168b9: 55 push %ebp
1168ba: 89 e5 mov %esp,%ebp
1168bc: 53 push %ebx
1168bd: 83 ec 24 sub $0x24,%esp
1168c0: 8b 55 08 mov 0x8(%ebp),%edx
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
1168c3: 31 c0 xor %eax,%eax
1168c5: 85 d2 test %edx,%edx
1168c7: 74 0f je 1168d8 <rtems_timer_initiate_server+0x1f>
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
1168c9: 0f b6 05 88 d1 13 00 movzbl 0x13d188,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
1168d0: 39 c2 cmp %eax,%edx
1168d2: 0f 96 c0 setbe %al
1168d5: 0f b6 c0 movzbl %al,%eax
* Make sure the requested priority is valid. The if is
* 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 ) ) {
1168d8: 85 c0 test %eax,%eax
1168da: 75 0d jne 1168e9 <rtems_timer_initiate_server+0x30>
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
return RTEMS_INVALID_PRIORITY;
1168dc: b0 13 mov $0x13,%al
* 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 )
1168de: 42 inc %edx
1168df: 0f 85 5c 01 00 00 jne 116a41 <rtems_timer_initiate_server+0x188>
return RTEMS_INVALID_PRIORITY;
_priority = 0;
1168e5: 31 db xor %ebx,%ebx
1168e7: eb 02 jmp 1168eb <rtems_timer_initiate_server+0x32>
* Make sure the requested priority is valid. The if is
* 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 ) ) {
1168e9: 89 d3 mov %edx,%ebx
1168eb: e8 78 fc ff ff call 116568 <_Thread_Dispatch_increment_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
1168f0: 8a 15 84 10 14 00 mov 0x141084,%dl
initialized = true;
1168f6: c6 05 84 10 14 00 01 movb $0x1,0x141084
_Thread_Enable_dispatch();
1168fd: 88 55 e4 mov %dl,-0x1c(%ebp)
116900: e8 6f 29 00 00 call 119274 <_Thread_Enable_dispatch>
if ( tmpInitialized )
return RTEMS_INCORRECT_STATE;
116905: b8 0e 00 00 00 mov $0xe,%eax
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
_Thread_Enable_dispatch();
if ( tmpInitialized )
11690a: 8a 55 e4 mov -0x1c(%ebp),%dl
11690d: 84 d2 test %dl,%dl
11690f: 0f 85 2c 01 00 00 jne 116a41 <rtems_timer_initiate_server+0x188><== NEVER TAKEN
* 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(
116915: 50 push %eax
116916: 50 push %eax
116917: 8d 45 f4 lea -0xc(%ebp),%eax
11691a: 50 push %eax
11691b: 8b 45 10 mov 0x10(%ebp),%eax
11691e: 80 cc 80 or $0x80,%ah
116921: 50 push %eax
116922: 68 00 01 00 00 push $0x100
116927: ff 75 0c pushl 0xc(%ebp)
11692a: 53 push %ebx
11692b: 68 45 4d 49 54 push $0x54494d45
116930: e8 77 ee ff ff call 1157ac <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) {
116935: 83 c4 20 add $0x20,%esp
116938: 85 c0 test %eax,%eax
11693a: 74 0c je 116948 <rtems_timer_initiate_server+0x8f>
initialized = false;
11693c: c6 05 84 10 14 00 00 movb $0x0,0x141084
116943: e9 f9 00 00 00 jmp 116a41 <rtems_timer_initiate_server+0x188>
* 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)
116948: 8b 5d f4 mov -0xc(%ebp),%ebx
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
11694b: 0f b7 d3 movzwl %bx,%edx
11694e: a1 b4 56 14 00 mov 0x1456b4,%eax
116953: 8b 04 90 mov (%eax,%edx,4),%eax
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
116956: a3 88 10 14 00 mov %eax,0x141088
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
11695b: c7 05 b8 10 14 00 bc movl $0x1410bc,0x1410b8
116962: 10 14 00
head->previous = NULL;
116965: c7 05 bc 10 14 00 00 movl $0x0,0x1410bc
11696c: 00 00 00
tail->previous = head;
11696f: c7 05 c0 10 14 00 b8 movl $0x1410b8,0x1410c0
116976: 10 14 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
116979: c7 05 f0 10 14 00 f4 movl $0x1410f4,0x1410f0
116980: 10 14 00
head->previous = NULL;
116983: c7 05 f4 10 14 00 00 movl $0x0,0x1410f4
11698a: 00 00 00
tail->previous = head;
11698d: c7 05 f8 10 14 00 f0 movl $0x1410f0,0x1410f8
116994: 10 14 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
116997: c7 05 98 10 14 00 00 movl $0x0,0x141098
11699e: 00 00 00
the_watchdog->routine = routine;
1169a1: c7 05 ac 10 14 00 f8 movl $0x1190f8,0x1410ac
1169a8: 90 11 00
the_watchdog->id = id;
1169ab: 89 1d b0 10 14 00 mov %ebx,0x1410b0
the_watchdog->user_data = user_data;
1169b1: c7 05 b4 10 14 00 00 movl $0x0,0x1410b4
1169b8: 00 00 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1169bb: c7 05 d0 10 14 00 00 movl $0x0,0x1410d0
1169c2: 00 00 00
the_watchdog->routine = routine;
1169c5: c7 05 e4 10 14 00 f8 movl $0x1190f8,0x1410e4
1169cc: 90 11 00
the_watchdog->id = id;
1169cf: 89 1d e8 10 14 00 mov %ebx,0x1410e8
the_watchdog->user_data = user_data;
1169d5: c7 05 ec 10 14 00 00 movl $0x0,0x1410ec
1169dc: 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;
1169df: c7 05 8c 10 14 00 09 movl $0x116609,0x14108c
1169e6: 66 11 00
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
1169e9: a1 10 58 14 00 mov 0x145810,%eax
1169ee: a3 c4 10 14 00 mov %eax,0x1410c4
1169f3: 6a 00 push $0x0
1169f5: 68 00 ca 9a 3b push $0x3b9aca00
1169fa: ff 35 dc 56 14 00 pushl 0x1456dc
116a00: ff 35 d8 56 14 00 pushl 0x1456d8
116a06: e8 29 2f 01 00 call 129934 <__divdi3>
116a0b: 83 c4 0c add $0xc,%esp
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
116a0e: a3 fc 10 14 00 mov %eax,0x1410fc
ts->insert_chain = NULL;
116a13: c7 05 00 11 14 00 00 movl $0x0,0x141100
116a1a: 00 00 00
ts->active = false;
116a1d: c6 05 04 11 14 00 00 movb $0x0,0x141104
/*
* The default timer server is now available.
*/
_Timer_server = ts;
116a24: c7 05 e0 59 14 00 88 movl $0x141088,0x1459e0
116a2b: 10 14 00
/*
* Start the timer server
*/
status = rtems_task_start(
116a2e: 68 88 10 14 00 push $0x141088
116a33: 68 32 67 11 00 push $0x116732
116a38: 53 push %ebx
116a39: e8 56 f3 ff ff call 115d94 <rtems_task_start>
116a3e: 83 c4 10 add $0x10,%esp
initialized = false;
}
#endif
return status;
}
116a41: 8b 5d fc mov -0x4(%ebp),%ebx
116a44: c9 leave
116a45: c3 ret
0011645c <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
11645c: 55 push %ebp
11645d: 89 e5 mov %esp,%ebp
11645f: 57 push %edi
116460: 56 push %esi
116461: 53 push %ebx
116462: 83 ec 1c sub $0x1c,%esp
116465: 8b 75 0c mov 0xc(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
116468: 8b 1d e0 59 14 00 mov 0x1459e0,%ebx
if ( !timer_server )
11646e: 85 db test %ebx,%ebx
116470: 0f 84 e1 00 00 00 je 116557 <rtems_timer_server_fire_when+0xfb>
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
116476: b8 0b 00 00 00 mov $0xb,%eax
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
11647b: 80 3d ec 56 14 00 00 cmpb $0x0,0x1456ec
116482: 0f 84 d6 00 00 00 je 11655e <rtems_timer_server_fire_when+0x102><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
116488: b0 09 mov $0x9,%al
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
11648a: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
11648e: 0f 84 ca 00 00 00 je 11655e <rtems_timer_server_fire_when+0x102>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
116494: 83 ec 0c sub $0xc,%esp
116497: 56 push %esi
116498: e8 b3 d4 ff ff call 113950 <_TOD_Validate>
11649d: 83 c4 10 add $0x10,%esp
1164a0: 84 c0 test %al,%al
1164a2: 75 0a jne 1164ae <rtems_timer_server_fire_when+0x52>
return RTEMS_INVALID_CLOCK;
1164a4: b8 14 00 00 00 mov $0x14,%eax
1164a9: e9 b0 00 00 00 jmp 11655e <rtems_timer_server_fire_when+0x102>
seconds = _TOD_To_seconds( wall_time );
1164ae: 83 ec 0c sub $0xc,%esp
1164b1: 56 push %esi
1164b2: e8 25 d4 ff ff call 1138dc <_TOD_To_seconds>
1164b7: 89 c6 mov %eax,%esi
1164b9: 6a 00 push $0x0
1164bb: 68 00 ca 9a 3b push $0x3b9aca00
1164c0: ff 35 dc 56 14 00 pushl 0x1456dc
1164c6: ff 35 d8 56 14 00 pushl 0x1456d8
1164cc: e8 63 34 01 00 call 129934 <__divdi3>
if ( seconds <= _TOD_Seconds_since_epoch() )
1164d1: 83 c4 20 add $0x20,%esp
1164d4: 39 c6 cmp %eax,%esi
1164d6: 76 cc jbe 1164a4 <rtems_timer_server_fire_when+0x48>
1164d8: 50 push %eax
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
1164d9: 8d 45 e4 lea -0x1c(%ebp),%eax
1164dc: 50 push %eax
1164dd: ff 75 08 pushl 0x8(%ebp)
1164e0: 68 a0 59 14 00 push $0x1459a0
1164e5: e8 0a 22 00 00 call 1186f4 <_Objects_Get>
1164ea: 89 c7 mov %eax,%edi
switch ( location ) {
1164ec: 83 c4 10 add $0x10,%esp
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1164ef: b8 04 00 00 00 mov $0x4,%eax
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1164f4: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
1164f8: 75 64 jne 11655e <rtems_timer_server_fire_when+0x102>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
1164fa: 83 ec 0c sub $0xc,%esp
1164fd: 8d 47 10 lea 0x10(%edi),%eax
116500: 50 push %eax
116501: e8 e6 3a 00 00 call 119fec <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
116506: c7 47 38 03 00 00 00 movl $0x3,0x38(%edi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11650d: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
116514: 8b 45 10 mov 0x10(%ebp),%eax
116517: 89 47 2c mov %eax,0x2c(%edi)
the_watchdog->id = id;
11651a: 8b 45 08 mov 0x8(%ebp),%eax
11651d: 89 47 30 mov %eax,0x30(%edi)
the_watchdog->user_data = user_data;
116520: 8b 45 14 mov 0x14(%ebp),%eax
116523: 89 47 34 mov %eax,0x34(%edi)
116526: 6a 00 push $0x0
116528: 68 00 ca 9a 3b push $0x3b9aca00
11652d: ff 35 dc 56 14 00 pushl 0x1456dc
116533: ff 35 d8 56 14 00 pushl 0x1456d8
116539: e8 f6 33 01 00 call 129934 <__divdi3>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
11653e: 29 c6 sub %eax,%esi
116540: 89 77 1c mov %esi,0x1c(%edi)
(*timer_server->schedule_operation)( timer_server, the_timer );
116543: 83 c4 18 add $0x18,%esp
116546: 57 push %edi
116547: 53 push %ebx
116548: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
11654b: e8 24 2d 00 00 call 119274 <_Thread_Enable_dispatch>
116550: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
116553: 31 c0 xor %eax,%eax
116555: eb 07 jmp 11655e <rtems_timer_server_fire_when+0x102>
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
116557: b8 0e 00 00 00 mov $0xe,%eax
11655c: eb 00 jmp 11655e <rtems_timer_server_fire_when+0x102>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11655e: 8d 65 f4 lea -0xc(%ebp),%esp
116561: 5b pop %ebx
116562: 5e pop %esi
116563: 5f pop %edi
116564: 5d pop %ebp
116565: c3 ret
0010657d <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
10657d: 55 push %ebp
10657e: 89 e5 mov %esp,%ebp
106580: 57 push %edi
106581: 56 push %esi
106582: 53 push %ebx
106583: 83 ec 1c sub $0x1c,%esp
106586: 89 c3 mov %eax,%ebx
106588: 89 55 e4 mov %edx,-0x1c(%ebp)
10658b: 89 cf mov %ecx,%edi
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
10658d: a9 00 00 00 20 test $0x20000000,%eax
106592: 75 27 jne 1065bb <rtems_verror+0x3e>
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
106594: 83 ec 0c sub $0xc,%esp
106597: a1 60 a2 12 00 mov 0x12a260,%eax
10659c: ff 70 08 pushl 0x8(%eax)
10659f: e8 d0 9f 00 00 call 110574 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
1065a4: 89 de mov %ebx,%esi
1065a6: 81 e6 ff ff ff 8f and $0x8fffffff,%esi
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
1065ac: 83 c4 10 add $0x10,%esp
1065af: 81 e3 00 00 00 40 and $0x40000000,%ebx
1065b5: 75 36 jne 1065ed <rtems_verror+0x70>
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
1065b7: 31 db xor %ebx,%ebx
1065b9: eb 39 jmp 1065f4 <rtems_verror+0x77>
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
1065bb: a1 54 c2 12 00 mov 0x12c254,%eax
1065c0: 8d 50 01 lea 0x1(%eax),%edx
1065c3: 89 15 54 c2 12 00 mov %edx,0x12c254
1065c9: 85 c0 test %eax,%eax
1065cb: 74 10 je 1065dd <rtems_verror+0x60> <== ALWAYS TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
1065cd: a1 6c c3 12 00 mov 0x12c36c,%eax <== NOT EXECUTED
1065d2: 40 inc %eax <== NOT EXECUTED
1065d3: a3 6c c3 12 00 mov %eax,0x12c36c <== NOT EXECUTED
return _Thread_Dispatch_disable_level;
1065d8: a1 6c c3 12 00 mov 0x12c36c,%eax <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
1065dd: 31 f6 xor %esi,%esi
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
1065df: 83 3d 54 c2 12 00 02 cmpl $0x2,0x12c254
1065e6: 7e ac jle 106594 <rtems_verror+0x17> <== ALWAYS TAKEN
1065e8: e9 b3 00 00 00 jmp 1066a0 <rtems_verror+0x123> <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
1065ed: e8 1a 9c 00 00 call 11020c <__errno>
1065f2: 8b 18 mov (%eax),%ebx
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
1065f4: 50 push %eax
1065f5: 57 push %edi
1065f6: ff 75 e4 pushl -0x1c(%ebp)
1065f9: a1 60 a2 12 00 mov 0x12a260,%eax
1065fe: ff 70 0c pushl 0xc(%eax)
106601: e8 1a 1a 01 00 call 118020 <vfprintf>
106606: 89 c7 mov %eax,%edi
if (status)
106608: 83 c4 10 add $0x10,%esp
10660b: 85 f6 test %esi,%esi
10660d: 74 24 je 106633 <rtems_verror+0xb6>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
10660f: 83 ec 0c sub $0xc,%esp
106612: 56 push %esi
106613: e8 50 ff ff ff call 106568 <rtems_status_text>
106618: 83 c4 0c add $0xc,%esp
10661b: 50 push %eax
10661c: 68 b1 e2 11 00 push $0x11e2b1
106621: a1 60 a2 12 00 mov 0x12a260,%eax
106626: ff 70 0c pushl 0xc(%eax)
106629: e8 06 a3 00 00 call 110934 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
10662e: 01 c7 add %eax,%edi
106630: 83 c4 10 add $0x10,%esp
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
106633: 83 fb 00 cmp $0x0,%ebx
106636: 74 40 je 106678 <rtems_verror+0xfb>
if ((local_errno > 0) && *strerror(local_errno))
106638: 7e 25 jle 10665f <rtems_verror+0xe2>
10663a: 83 ec 0c sub $0xc,%esp
10663d: 53 push %ebx
10663e: e8 a1 ad 00 00 call 1113e4 <strerror>
106643: 83 c4 10 add $0x10,%esp
106646: 80 38 00 cmpb $0x0,(%eax)
106649: 74 14 je 10665f <rtems_verror+0xe2> <== NEVER TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
10664b: 83 ec 0c sub $0xc,%esp
10664e: 53 push %ebx
10664f: e8 90 ad 00 00 call 1113e4 <strerror>
106654: 83 c4 0c add $0xc,%esp
106657: 50 push %eax
106658: 68 bf e2 11 00 push $0x11e2bf
10665d: eb 07 jmp 106666 <rtems_verror+0xe9>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
10665f: 51 push %ecx
106660: 53 push %ebx
106661: 68 cc e2 11 00 push $0x11e2cc
106666: a1 60 a2 12 00 mov 0x12a260,%eax
10666b: ff 70 0c pushl 0xc(%eax)
10666e: e8 c1 a2 00 00 call 110934 <fprintf>
106673: 01 c7 add %eax,%edi
106675: 83 c4 10 add $0x10,%esp
}
chars_written += fprintf(stderr, "\n");
106678: 50 push %eax
106679: 50 push %eax
10667a: 68 ab eb 11 00 push $0x11ebab
10667f: a1 60 a2 12 00 mov 0x12a260,%eax
106684: ff 70 0c pushl 0xc(%eax)
106687: e8 a8 a2 00 00 call 110934 <fprintf>
10668c: 8d 34 07 lea (%edi,%eax,1),%esi
(void) fflush(stderr);
10668f: 5a pop %edx
106690: a1 60 a2 12 00 mov 0x12a260,%eax
106695: ff 70 0c pushl 0xc(%eax)
106698: e8 d7 9e 00 00 call 110574 <fflush>
return chars_written;
10669d: 83 c4 10 add $0x10,%esp
}
1066a0: 89 f0 mov %esi,%eax
1066a2: 8d 65 f4 lea -0xc(%ebp),%esp
1066a5: 5b pop %ebx
1066a6: 5e pop %esi
1066a7: 5f pop %edi
1066a8: 5d pop %ebp
1066a9: c3 ret
00121610 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
121610: 55 push %ebp
121611: 89 e5 mov %esp,%ebp
121613: 57 push %edi
121614: 56 push %esi
121615: 53 push %ebx
121616: 83 ec 1c sub $0x1c,%esp
121619: 89 c6 mov %eax,%esi
12161b: 89 55 dc mov %edx,-0x24(%ebp)
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
12161e: 31 db xor %ebx,%ebx
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
121620: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp)
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
121627: 31 ff xor %edi,%edi
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
121629: ff 4e 04 decl 0x4(%esi)
12162c: 79 13 jns 121641 <scanInt+0x31> <== ALWAYS TAKEN
12162e: 50 push %eax <== NOT EXECUTED
12162f: 50 push %eax <== NOT EXECUTED
121630: 56 push %esi <== NOT EXECUTED
121631: ff 35 e0 78 16 00 pushl 0x1678e0 <== NOT EXECUTED
121637: e8 74 3c 01 00 call 1352b0 <__srget_r> <== NOT EXECUTED
12163c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12163f: eb 08 jmp 121649 <scanInt+0x39> <== NOT EXECUTED
121641: 8b 16 mov (%esi),%edx
121643: 0f b6 02 movzbl (%edx),%eax
121646: 42 inc %edx
121647: 89 16 mov %edx,(%esi)
if (c == ':')
121649: 83 f8 3a cmp $0x3a,%eax
12164c: 74 45 je 121693 <scanInt+0x83>
break;
if (sign == 0) {
12164e: 85 db test %ebx,%ebx
121650: 75 0f jne 121661 <scanInt+0x51>
if (c == '-') {
sign = -1;
limit++;
continue;
}
sign = 1;
121652: b3 01 mov $0x1,%bl
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
121654: 83 f8 2d cmp $0x2d,%eax
121657: 75 08 jne 121661 <scanInt+0x51>
sign = -1;
limit++;
121659: ff 45 e4 incl -0x1c(%ebp)
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
12165c: 83 cb ff or $0xffffffff,%ebx
limit++;
continue;
12165f: eb c8 jmp 121629 <scanInt+0x19>
}
sign = 1;
}
if (!isdigit(c))
121661: 8b 15 bc 78 16 00 mov 0x1678bc,%edx
121667: f6 44 02 01 04 testb $0x4,0x1(%edx,%eax,1)
12166c: 74 3a je 1216a8 <scanInt+0x98>
return 0;
d = c - '0';
12166e: 83 e8 30 sub $0x30,%eax
121671: 89 45 e0 mov %eax,-0x20(%ebp)
if ((i > (limit / 10))
121674: b9 0a 00 00 00 mov $0xa,%ecx
121679: 8b 45 e4 mov -0x1c(%ebp),%eax
12167c: 31 d2 xor %edx,%edx
12167e: f7 f1 div %ecx
121680: 39 c7 cmp %eax,%edi
121682: 77 24 ja 1216a8 <scanInt+0x98>
|| ((i == (limit / 10)) && (d > (limit % 10))))
121684: 75 05 jne 12168b <scanInt+0x7b>
121686: 39 55 e0 cmp %edx,-0x20(%ebp)
121689: 77 1d ja 1216a8 <scanInt+0x98> <== ALWAYS TAKEN
return 0;
i = i * 10 + d;
12168b: 6b ff 0a imul $0xa,%edi,%edi
12168e: 03 7d e0 add -0x20(%ebp),%edi
121691: eb 96 jmp 121629 <scanInt+0x19>
continue;
}
sign = 1;
}
if (!isdigit(c))
return 0;
121693: 31 c0 xor %eax,%eax
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
121695: 85 db test %ebx,%ebx
121697: 74 11 je 1216aa <scanInt+0x9a> <== NEVER TAKEN
return 0;
*val = i * sign;
121699: 0f af df imul %edi,%ebx
12169c: 8b 45 dc mov -0x24(%ebp),%eax
12169f: 89 18 mov %ebx,(%eax)
return 1;
1216a1: b8 01 00 00 00 mov $0x1,%eax
1216a6: eb 02 jmp 1216aa <scanInt+0x9a>
continue;
}
sign = 1;
}
if (!isdigit(c))
return 0;
1216a8: 31 c0 xor %eax,%eax
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
1216aa: 8d 65 f4 lea -0xc(%ebp),%esp
1216ad: 5b pop %ebx
1216ae: 5e pop %esi
1216af: 5f pop %edi
1216b0: 5d pop %ebp
1216b1: c3 ret
00121732 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
121732: 55 push %ebp
121733: 89 e5 mov %esp,%ebp
121735: 56 push %esi
121736: 53 push %ebx
121737: 83 ec 28 sub $0x28,%esp
12173a: 89 c6 mov %eax,%esi
12173c: 89 d3 mov %edx,%ebx
12173e: 89 4d e4 mov %ecx,-0x1c(%ebp)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
121741: 6a 00 push $0x0
121743: 8d 45 08 lea 0x8(%ebp),%eax
121746: 50 push %eax
121747: 8d 4d e4 lea -0x1c(%ebp),%ecx
12174a: 89 f0 mov %esi,%eax
12174c: e8 61 ff ff ff call 1216b2 <scanString>
121751: 83 c4 10 add $0x10,%esp
121754: 85 c0 test %eax,%eax
121756: 75 07 jne 12175f <scangr+0x2d>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
121758: 31 c0 xor %eax,%eax
12175a: e9 b7 00 00 00 jmp 121816 <scangr+0xe4>
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
12175f: 50 push %eax
121760: 50 push %eax
121761: 8d 53 04 lea 0x4(%ebx),%edx
121764: 6a 00 push $0x0
121766: 8d 45 08 lea 0x8(%ebp),%eax
121769: 50 push %eax
12176a: 8d 4d e4 lea -0x1c(%ebp),%ecx
12176d: 89 f0 mov %esi,%eax
12176f: e8 3e ff ff ff call 1216b2 <scanString>
121774: 83 c4 10 add $0x10,%esp
121777: 85 c0 test %eax,%eax
121779: 74 dd je 121758 <scangr+0x26> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
12177b: 8d 55 f0 lea -0x10(%ebp),%edx
12177e: 89 f0 mov %esi,%eax
121780: e8 8b fe ff ff call 121610 <scanInt>
121785: 85 c0 test %eax,%eax
121787: 74 cf je 121758 <scangr+0x26> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
121789: 51 push %ecx
12178a: 51 push %ecx
12178b: 6a 01 push $0x1
12178d: 8d 45 08 lea 0x8(%ebp),%eax
121790: 50 push %eax
121791: 8d 4d e4 lea -0x1c(%ebp),%ecx
121794: 8d 55 f4 lea -0xc(%ebp),%edx
121797: 89 f0 mov %esi,%eax
121799: e8 14 ff ff ff call 1216b2 <scanString>
12179e: 83 c4 10 add $0x10,%esp
1217a1: 85 c0 test %eax,%eax
1217a3: 74 b3 je 121758 <scangr+0x26> <== NEVER TAKEN
return 0;
grp->gr_gid = grgid;
1217a5: 8b 45 f0 mov -0x10(%ebp),%eax
1217a8: 66 89 43 08 mov %ax,0x8(%ebx)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
1217ac: 8b 75 f4 mov -0xc(%ebp),%esi
1217af: 89 f2 mov %esi,%edx
1217b1: b8 01 00 00 00 mov $0x1,%eax
1217b6: eb 0c jmp 1217c4 <scangr+0x92>
if(*cp == ',')
memcount++;
1217b8: 80 f9 2c cmp $0x2c,%cl
1217bb: 0f 94 c1 sete %cl
1217be: 0f b6 c9 movzbl %cl,%ecx
1217c1: 01 c8 add %ecx,%eax
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
1217c3: 42 inc %edx
1217c4: 8a 0a mov (%edx),%cl
1217c6: 84 c9 test %cl,%cl
1217c8: 75 ee jne 1217b8 <scangr+0x86>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
1217ca: 8d 04 85 13 00 00 00 lea 0x13(,%eax,4),%eax
1217d1: 39 45 08 cmp %eax,0x8(%ebp)
1217d4: 72 82 jb 121758 <scangr+0x26> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
1217d6: 8b 45 e4 mov -0x1c(%ebp),%eax
1217d9: 83 c0 0f add $0xf,%eax
1217dc: 83 e0 f0 and $0xfffffff0,%eax
1217df: 89 43 0c mov %eax,0xc(%ebx)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
1217e2: 89 30 mov %esi,(%eax)
}
/*
* Extract a single group record from the database
*/
static int scangr(
1217e4: 8b 45 f4 mov -0xc(%ebp),%eax
1217e7: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
1217e8: ba 01 00 00 00 mov $0x1,%edx
1217ed: eb 11 jmp 121800 <scangr+0xce>
if(*cp == ',') {
1217ef: 80 f9 2c cmp $0x2c,%cl
1217f2: 75 0b jne 1217ff <scangr+0xcd>
*cp = '\0';
1217f4: c6 40 ff 00 movb $0x0,-0x1(%eax)
grp->gr_mem[memcount++] = cp + 1;
1217f8: 8b 4b 0c mov 0xc(%ebx),%ecx
1217fb: 89 04 91 mov %eax,(%ecx,%edx,4)
1217fe: 42 inc %edx
1217ff: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
121800: 8a 48 ff mov -0x1(%eax),%cl
121803: 84 c9 test %cl,%cl
121805: 75 e8 jne 1217ef <scangr+0xbd>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
121807: 8b 43 0c mov 0xc(%ebx),%eax
12180a: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
return 1;
121811: b8 01 00 00 00 mov $0x1,%eax
}
121816: 8d 65 f8 lea -0x8(%ebp),%esp
121819: 5b pop %ebx
12181a: 5e pop %esi
12181b: 5d pop %ebp
12181c: c3 ret
0012181d <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
12181d: 55 push %ebp
12181e: 89 e5 mov %esp,%ebp
121820: 56 push %esi
121821: 53 push %ebx
121822: 83 ec 28 sub $0x28,%esp
121825: 89 c6 mov %eax,%esi
121827: 89 d3 mov %edx,%ebx
121829: 89 4d e4 mov %ecx,-0x1c(%ebp)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
12182c: 6a 00 push $0x0
12182e: 8d 45 08 lea 0x8(%ebp),%eax
121831: 50 push %eax
121832: 8d 4d e4 lea -0x1c(%ebp),%ecx
121835: 89 f0 mov %esi,%eax
121837: e8 76 fe ff ff call 1216b2 <scanString>
12183c: 83 c4 10 add $0x10,%esp
12183f: 85 c0 test %eax,%eax
121841: 75 07 jne 12184a <scanpw+0x2d>
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
121843: 31 c0 xor %eax,%eax
121845: e9 c3 00 00 00 jmp 12190d <scanpw+0xf0>
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
12184a: 50 push %eax
12184b: 50 push %eax
12184c: 8d 53 04 lea 0x4(%ebx),%edx
12184f: 6a 00 push $0x0
121851: 8d 45 08 lea 0x8(%ebp),%eax
121854: 50 push %eax
121855: 8d 4d e4 lea -0x1c(%ebp),%ecx
121858: 89 f0 mov %esi,%eax
12185a: e8 53 fe ff ff call 1216b2 <scanString>
12185f: 83 c4 10 add $0x10,%esp
121862: 85 c0 test %eax,%eax
121864: 74 dd je 121843 <scanpw+0x26> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
121866: 8d 55 f0 lea -0x10(%ebp),%edx
121869: 89 f0 mov %esi,%eax
12186b: e8 a0 fd ff ff call 121610 <scanInt>
121870: 85 c0 test %eax,%eax
121872: 74 cf je 121843 <scanpw+0x26>
|| !scanInt(fp, &pwgid)
121874: 8d 55 f4 lea -0xc(%ebp),%edx
121877: 89 f0 mov %esi,%eax
121879: e8 92 fd ff ff call 121610 <scanInt>
12187e: 85 c0 test %eax,%eax
121880: 74 c1 je 121843 <scanpw+0x26>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
121882: 50 push %eax
121883: 50 push %eax
121884: 8d 53 0c lea 0xc(%ebx),%edx
121887: 6a 00 push $0x0
121889: 8d 45 08 lea 0x8(%ebp),%eax
12188c: 50 push %eax
12188d: 8d 4d e4 lea -0x1c(%ebp),%ecx
121890: 89 f0 mov %esi,%eax
121892: e8 1b fe ff ff call 1216b2 <scanString>
121897: 83 c4 10 add $0x10,%esp
12189a: 85 c0 test %eax,%eax
12189c: 74 a5 je 121843 <scanpw+0x26> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
12189e: 50 push %eax
12189f: 50 push %eax
1218a0: 8d 53 10 lea 0x10(%ebx),%edx
1218a3: 6a 00 push $0x0
1218a5: 8d 45 08 lea 0x8(%ebp),%eax
1218a8: 50 push %eax
1218a9: 8d 4d e4 lea -0x1c(%ebp),%ecx
1218ac: 89 f0 mov %esi,%eax
1218ae: e8 ff fd ff ff call 1216b2 <scanString>
1218b3: 83 c4 10 add $0x10,%esp
1218b6: 85 c0 test %eax,%eax
1218b8: 74 89 je 121843 <scanpw+0x26> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
1218ba: 50 push %eax
1218bb: 50 push %eax
1218bc: 8d 53 14 lea 0x14(%ebx),%edx
1218bf: 6a 00 push $0x0
1218c1: 8d 45 08 lea 0x8(%ebp),%eax
1218c4: 50 push %eax
1218c5: 8d 4d e4 lea -0x1c(%ebp),%ecx
1218c8: 89 f0 mov %esi,%eax
1218ca: e8 e3 fd ff ff call 1216b2 <scanString>
1218cf: 83 c4 10 add $0x10,%esp
1218d2: 85 c0 test %eax,%eax
1218d4: 0f 84 69 ff ff ff je 121843 <scanpw+0x26> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
1218da: 50 push %eax
1218db: 50 push %eax
1218dc: 8d 53 18 lea 0x18(%ebx),%edx
1218df: 6a 01 push $0x1
1218e1: 8d 45 08 lea 0x8(%ebp),%eax
1218e4: 50 push %eax
1218e5: 8d 4d e4 lea -0x1c(%ebp),%ecx
1218e8: 89 f0 mov %esi,%eax
1218ea: e8 c3 fd ff ff call 1216b2 <scanString>
1218ef: 83 c4 10 add $0x10,%esp
1218f2: 85 c0 test %eax,%eax
1218f4: 0f 84 49 ff ff ff je 121843 <scanpw+0x26>
return 0;
pwd->pw_uid = pwuid;
1218fa: 8b 45 f0 mov -0x10(%ebp),%eax
1218fd: 66 89 43 08 mov %ax,0x8(%ebx)
pwd->pw_gid = pwgid;
121901: 8b 45 f4 mov -0xc(%ebp),%eax
121904: 66 89 43 0a mov %ax,0xa(%ebx)
return 1;
121908: b8 01 00 00 00 mov $0x1,%eax
}
12190d: 8d 65 f8 lea -0x8(%ebp),%esp
121910: 5b pop %ebx
121911: 5e pop %esi
121912: 5d pop %ebp
121913: c3 ret
00108ddd <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
108ddd: 55 push %ebp
108dde: 89 e5 mov %esp,%ebp
108de0: 56 push %esi
108de1: 53 push %ebx
108de2: 89 d3 mov %edx,%ebx
108de4: 89 c6 mov %eax,%esi
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
108de6: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx)
108ded: 75 10 jne 108dff <siproc+0x22> <== ALWAYS TAKEN
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
108def: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
108df2: 89 da mov %ebx,%edx <== NOT EXECUTED
}
return i;
}
108df4: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
108df7: 5b pop %ebx <== NOT EXECUTED
108df8: 5e pop %esi <== NOT EXECUTED
108df9: 5d pop %ebp <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
108dfa: e9 70 fe ff ff jmp 108c6f <iproc> <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108dff: 50 push %eax
108e00: 6a 00 push $0x0
108e02: 6a 00 push $0x0
108e04: ff 72 18 pushl 0x18(%edx)
108e07: e8 84 0f 00 00 call 109d90 <rtems_semaphore_obtain>
i = iproc (c, tty);
108e0c: 89 f2 mov %esi,%edx
108e0e: 0f b6 c2 movzbl %dl,%eax
108e11: 89 da mov %ebx,%edx
108e13: e8 57 fe ff ff call 108c6f <iproc>
108e18: 89 c6 mov %eax,%esi
rtems_semaphore_release (tty->osem);
108e1a: 58 pop %eax
108e1b: ff 73 18 pushl 0x18(%ebx)
108e1e: e8 5d 10 00 00 call 109e80 <rtems_semaphore_release>
108e23: 83 c4 10 add $0x10,%esp
}
else {
i = iproc (c, tty);
}
return i;
}
108e26: 89 f0 mov %esi,%eax
108e28: 8d 65 f8 lea -0x8(%ebp),%esp
108e2b: 5b pop %ebx
108e2c: 5e pop %esi
108e2d: 5d pop %ebp
108e2e: c3 ret
001088c4 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
1088c4: 55 push %ebp
1088c5: 89 e5 mov %esp,%ebp
1088c7: 53 push %ebx
1088c8: 51 push %ecx
1088c9: 8b 45 08 mov 0x8(%ebp),%eax
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
1088cc: 8b 88 dc 00 00 00 mov 0xdc(%eax),%ecx
if ( this_reent ) {
1088d2: 85 c9 test %ecx,%ecx
1088d4: 74 32 je 108908 <sync_per_thread+0x44> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
1088d6: 8b 15 68 e5 12 00 mov 0x12e568,%edx
1088dc: 8b 9a dc 00 00 00 mov 0xdc(%edx),%ebx
_Thread_Executing->libc_reent = this_reent;
1088e2: 89 8a dc 00 00 00 mov %ecx,0xdc(%edx)
_fwalk (t->libc_reent, sync_wrapper);
1088e8: 52 push %edx
1088e9: 52 push %edx
1088ea: 68 0d 89 10 00 push $0x10890d
1088ef: ff b0 dc 00 00 00 pushl 0xdc(%eax)
1088f5: e8 96 93 00 00 call 111c90 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
1088fa: a1 68 e5 12 00 mov 0x12e568,%eax
1088ff: 89 98 dc 00 00 00 mov %ebx,0xdc(%eax)
108905: 83 c4 10 add $0x10,%esp
}
}
108908: 8b 5d fc mov -0x4(%ebp),%ebx
10890b: c9 leave
10890c: c3 ret
00113114 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
113114: 55 push %ebp
113115: 89 e5 mov %esp,%ebp
113117: 56 push %esi
113118: 53 push %ebx
113119: 8b 5d 08 mov 0x8(%ebp),%ebx
11311c: 8b 45 0c mov 0xc(%ebp),%eax
11311f: 8b 75 10 mov 0x10(%ebp),%esi
switch (opt) {
113122: 85 c0 test %eax,%eax
113124: 74 22 je 113148 <tcsetattr+0x34>
113126: 48 dec %eax
113127: 74 0d je 113136 <tcsetattr+0x22>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
113129: e8 76 2e 00 00 call 115fa4 <__errno>
11312e: c7 00 86 00 00 00 movl $0x86,(%eax)
113134: eb 2a jmp 113160 <tcsetattr+0x4c>
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
113136: 50 push %eax
113137: 6a 00 push $0x0
113139: 6a 03 push $0x3
11313b: 53 push %ebx
11313c: e8 37 f9 ff ff call 112a78 <ioctl>
113141: 83 c4 10 add $0x10,%esp
113144: 85 c0 test %eax,%eax
113146: 78 18 js 113160 <tcsetattr+0x4c> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
113148: 89 75 10 mov %esi,0x10(%ebp)
11314b: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp)
113152: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
113155: 8d 65 f8 lea -0x8(%ebp),%esp
113158: 5b pop %ebx
113159: 5e pop %esi
11315a: 5d pop %ebp
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
11315b: e9 18 f9 ff ff jmp 112a78 <ioctl>
}
}
113160: 83 c8 ff or $0xffffffff,%eax
113163: 8d 65 f8 lea -0x8(%ebp),%esp
113166: 5b pop %ebx
113167: 5e pop %esi
113168: 5d pop %ebp
113169: c3 ret
0010981c <unmount>:
return mt_entry == root->mt_entry || mt_entry == current->mt_entry;
}
int unmount( const char *path )
{
10981c: 55 push %ebp
10981d: 89 e5 mov %esp,%ebp
10981f: 56 push %esi
109820: 53 push %ebx
109821: 83 ec 44 sub $0x44,%esp
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK;
const rtems_filesystem_location_info_t *currentloc =
109824: 6a 18 push $0x18
109826: ff 75 08 pushl 0x8(%ebp)
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
109829: 8d 45 c0 lea -0x40(%ebp),%eax
int unmount( const char *path )
{
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK;
const rtems_filesystem_location_info_t *currentloc =
10982c: 50 push %eax
10982d: e8 a3 e2 ff ff call 107ad5 <rtems_filesystem_eval_path_start>
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
rtems_filesystem_mount_table_entry_t *mt_entry = currentloc->mt_entry;
109832: 8b 58 14 mov 0x14(%eax),%ebx
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
return (*mt_entry->ops->are_nodes_equal_h)(
109835: 5a pop %edx
109836: 59 pop %ecx
109837: 8b 53 0c mov 0xc(%ebx),%edx
10983a: ff 73 24 pushl 0x24(%ebx)
10983d: 50 push %eax
10983e: ff 52 10 call *0x10(%edx)
if ( rtems_filesystem_location_is_root( currentloc ) ) {
109841: 83 c4 10 add $0x10,%esp
109844: 84 c0 test %al,%al
109846: 74 5b je 1098a3 <unmount+0x87>
static bool contains_root_or_current_directory(
const rtems_filesystem_mount_table_entry_t *mt_entry
)
{
const rtems_filesystem_location_info_t *root =
&rtems_filesystem_root->location;
109848: a1 d4 b3 12 00 mov 0x12b3d4,%eax
const rtems_filesystem_location_info_t *current =
&rtems_filesystem_current->location;
10984d: 8b 10 mov (%eax),%edx
return mt_entry == root->mt_entry || mt_entry == current->mt_entry;
10984f: 8b 40 04 mov 0x4(%eax),%eax
109852: 3b 58 14 cmp 0x14(%eax),%ebx
109855: 74 0a je 109861 <unmount+0x45>
109857: 31 c0 xor %eax,%eax
109859: 3b 5a 14 cmp 0x14(%edx),%ebx
10985c: 0f 94 c0 sete %al
10985f: eb 05 jmp 109866 <unmount+0x4a>
109861: b8 01 00 00 00 mov $0x1,%eax
const rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
rtems_filesystem_mount_table_entry_t *mt_entry = currentloc->mt_entry;
if ( rtems_filesystem_location_is_root( currentloc ) ) {
if ( !contains_root_or_current_directory( mt_entry ) ) {
109866: 85 c0 test %eax,%eax
109868: 75 2c jne 109896 <unmount+0x7a>
const rtems_filesystem_operations_table *mt_point_ops =
mt_entry->mt_point_node->location.mt_entry->ops;
rv = (*mt_point_ops->unmount_h)( mt_entry );
10986a: 83 ec 0c sub $0xc,%esp
rtems_filesystem_mount_table_entry_t *mt_entry = currentloc->mt_entry;
if ( rtems_filesystem_location_is_root( currentloc ) ) {
if ( !contains_root_or_current_directory( mt_entry ) ) {
const rtems_filesystem_operations_table *mt_point_ops =
mt_entry->mt_point_node->location.mt_entry->ops;
10986d: 8b 43 20 mov 0x20(%ebx),%eax
109870: 8b 40 14 mov 0x14(%eax),%eax
rv = (*mt_point_ops->unmount_h)( mt_entry );
109873: 8b 40 0c mov 0xc(%eax),%eax
109876: 53 push %ebx
109877: ff 50 38 call *0x38(%eax)
10987a: 89 c6 mov %eax,%esi
if ( rv == 0 ) {
10987c: 83 c4 10 add $0x10,%esp
10987f: 85 c0 test %eax,%eax
109881: 75 2e jne 1098b1 <unmount+0x95>
rtems_id self_task_id = rtems_task_self();
109883: e8 80 0c 00 00 call 10a508 <rtems_task_self>
rtems_filesystem_mt_entry_declare_lock_context( lock_context );
rtems_filesystem_mt_entry_lock( lock_context );
109888: 9c pushf
109889: fa cli
10988a: 5a pop %edx
mt_entry->unmount_task = self_task_id;
10988b: 89 43 3c mov %eax,0x3c(%ebx)
mt_entry->mounted = false;
10988e: c6 43 28 00 movb $0x0,0x28(%ebx)
rtems_filesystem_mt_entry_unlock( lock_context );
109892: 52 push %edx
109893: 9d popf
109894: eb 1b jmp 1098b1 <unmount+0x95>
}
} else {
errno = EBUSY;
109896: e8 09 6d 00 00 call 1105a4 <__errno>
10989b: c7 00 10 00 00 00 movl $0x10,(%eax)
1098a1: eb 0b jmp 1098ae <unmount+0x92>
rv = -1;
}
} else {
errno = EACCES;
1098a3: e8 fc 6c 00 00 call 1105a4 <__errno>
1098a8: c7 00 0d 00 00 00 movl $0xd,(%eax)
rv = -1;
1098ae: 83 ce ff or $0xffffffff,%esi
}
rtems_filesystem_eval_path_cleanup( &ctx );
1098b1: 83 ec 0c sub $0xc,%esp
1098b4: 8d 45 c0 lea -0x40(%ebp),%eax
1098b7: 50 push %eax
1098b8: e8 d4 e2 ff ff call 107b91 <rtems_filesystem_eval_path_cleanup>
if ( rv == 0 ) {
1098bd: 83 c4 10 add $0x10,%esp
1098c0: 85 f6 test %esi,%esi
1098c2: 75 23 jne 1098e7 <unmount+0xcb>
rtems_event_set out;
rtems_status_code sc = rtems_event_receive(
1098c4: 8d 45 bc lea -0x44(%ebp),%eax
1098c7: 50 push %eax
1098c8: 6a 00 push $0x0
1098ca: 6a 00 push $0x0
1098cc: 6a 02 push $0x2
1098ce: e8 4d 03 00 00 call 109c20 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out
);
if ( sc != RTEMS_SUCCESSFUL ) {
1098d3: 83 c4 10 add $0x10,%esp
1098d6: 85 c0 test %eax,%eax
1098d8: 74 0d je 1098e7 <unmount+0xcb> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
1098da: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1098dd: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
1098e2: e8 55 0e 00 00 call 10a73c <rtems_fatal_error_occurred><== NOT EXECUTED
}
}
return rv;
}
1098e7: 89 f0 mov %esi,%eax
1098e9: 8d 65 f8 lea -0x8(%ebp),%esp
1098ec: 5b pop %ebx
1098ed: 5e pop %esi
1098ee: 5d pop %ebp
1098ef: c3 ret
0011cc4c <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
11cc4c: 55 push %ebp
11cc4d: 89 e5 mov %esp,%ebp
11cc4f: 53 push %ebx
11cc50: 53 push %ebx
11cc51: 8b 45 08 mov 0x8(%ebp),%eax
11cc54: 8b 55 0c mov 0xc(%ebp),%edx
11cc57: 8b 4d 10 mov 0x10(%ebp),%ecx
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11cc5a: 3b 05 70 82 12 00 cmp 0x128270,%eax
11cc60: 72 02 jb 11cc64 <write+0x18>
11cc62: eb 2d jmp 11cc91 <write+0x45>
iop = rtems_libio_iop( fd );
11cc64: 6b c0 30 imul $0x30,%eax,%eax
11cc67: 03 05 58 c2 12 00 add 0x12c258,%eax
rtems_libio_check_is_open( iop );
11cc6d: 8b 58 0c mov 0xc(%eax),%ebx
11cc70: f6 c7 01 test $0x1,%bh
11cc73: 75 02 jne 11cc77 <write+0x2b>
11cc75: eb 1a jmp 11cc91 <write+0x45>
rtems_libio_check_buffer( buffer );
11cc77: 85 d2 test %edx,%edx
11cc79: 75 0d jne 11cc88 <write+0x3c> <== ALWAYS TAKEN
11cc7b: e8 8c 35 ff ff call 11020c <__errno> <== NOT EXECUTED
11cc80: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11cc86: eb 14 jmp 11cc9c <write+0x50> <== NOT EXECUTED
rtems_libio_check_count( count );
11cc88: 85 c9 test %ecx,%ecx
11cc8a: 74 29 je 11ccb5 <write+0x69>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
11cc8c: 80 e3 04 and $0x4,%bl
11cc8f: 75 10 jne 11cca1 <write+0x55>
11cc91: e8 76 35 ff ff call 11020c <__errno>
11cc96: c7 00 09 00 00 00 movl $0x9,(%eax)
11cc9c: 83 c8 ff or $0xffffffff,%eax
11cc9f: eb 16 jmp 11ccb7 <write+0x6b>
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
11cca1: 8b 58 20 mov 0x20(%eax),%ebx
11cca4: 89 4d 10 mov %ecx,0x10(%ebp)
11cca7: 89 55 0c mov %edx,0xc(%ebp)
11ccaa: 89 45 08 mov %eax,0x8(%ebp)
11ccad: 8b 43 0c mov 0xc(%ebx),%eax
}
11ccb0: 59 pop %ecx
11ccb1: 5b pop %ebx
11ccb2: 5d pop %ebp
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
11ccb3: ff e0 jmp *%eax
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
11ccb5: 31 c0 xor %eax,%eax
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
}
11ccb7: 5a pop %edx
11ccb8: 5b pop %ebx
11ccb9: 5d pop %ebp
11ccba: c3 ret
0010a278 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
10a278: 55 push %ebp
10a279: 89 e5 mov %esp,%ebp
10a27b: 57 push %edi
10a27c: 56 push %esi
10a27d: 53 push %ebx
10a27e: 83 ec 1c sub $0x1c,%esp
10a281: 8b 75 08 mov 0x8(%ebp),%esi
10a284: 8b 5d 0c mov 0xc(%ebp),%ebx
10a287: 8b 45 10 mov 0x10(%ebp),%eax
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
10a28a: 3b 35 70 96 12 00 cmp 0x129670,%esi
10a290: 72 02 jb 10a294 <writev+0x1c>
10a292: eb 18 jmp 10a2ac <writev+0x34>
iop = rtems_libio_iop( fd );
10a294: 6b f6 30 imul $0x30,%esi,%esi
10a297: 03 35 58 d6 12 00 add 0x12d658,%esi
rtems_libio_check_is_open( iop );
10a29d: 8b 56 0c mov 0xc(%esi),%edx
10a2a0: f6 c6 01 test $0x1,%dh
10a2a3: 75 02 jne 10a2a7 <writev+0x2f>
10a2a5: eb 05 jmp 10a2ac <writev+0x34>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
10a2a7: 80 e2 04 and $0x4,%dl
10a2aa: 75 10 jne 10a2bc <writev+0x44> <== ALWAYS TAKEN
10a2ac: e8 63 68 00 00 call 110b14 <__errno>
10a2b1: c7 00 09 00 00 00 movl $0x9,(%eax)
10a2b7: e9 95 00 00 00 jmp 10a351 <writev+0xd9>
/*
* Argument validation on IO vector
*/
if ( !iov )
10a2bc: 85 db test %ebx,%ebx
10a2be: 75 02 jne 10a2c2 <writev+0x4a>
10a2c0: eb 3f jmp 10a301 <writev+0x89>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
10a2c2: 85 c0 test %eax,%eax
10a2c4: 7f 02 jg 10a2c8 <writev+0x50>
10a2c6: eb 39 jmp 10a301 <writev+0x89>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
10a2c8: 3d 00 04 00 00 cmp $0x400,%eax
10a2cd: 7e 02 jle 10a2d1 <writev+0x59> <== ALWAYS TAKEN
10a2cf: eb 30 jmp 10a301 <writev+0x89> <== NOT EXECUTED
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
10a2d1: 8d 04 c3 lea (%ebx,%eax,8),%eax
10a2d4: 89 45 e4 mov %eax,-0x1c(%ebp)
10a2d7: 89 d8 mov %ebx,%eax
10a2d9: bf 01 00 00 00 mov $0x1,%edi
10a2de: 31 c9 xor %ecx,%ecx
10a2e0: eb 02 jmp 10a2e4 <writev+0x6c>
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
10a2e2: 89 d1 mov %edx,%ecx
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
10a2e4: 83 38 00 cmpl $0x0,(%eax)
10a2e7: 75 02 jne 10a2eb <writev+0x73>
10a2e9: eb 16 jmp 10a301 <writev+0x89>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
10a2eb: 83 78 04 00 cmpl $0x0,0x4(%eax)
10a2ef: 0f 94 c2 sete %dl
10a2f2: f7 da neg %edx
10a2f4: 21 d7 and %edx,%edi
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
10a2f6: 8b 50 04 mov 0x4(%eax),%edx
10a2f9: 01 ca add %ecx,%edx
10a2fb: 78 04 js 10a301 <writev+0x89>
10a2fd: 39 ca cmp %ecx,%edx
10a2ff: 7d 0d jge 10a30e <writev+0x96>
rtems_set_errno_and_return_minus_one( EINVAL );
10a301: e8 0e 68 00 00 call 110b14 <__errno>
10a306: c7 00 16 00 00 00 movl $0x16,(%eax)
10a30c: eb 43 jmp 10a351 <writev+0xd9>
10a30e: 83 c0 08 add $0x8,%eax
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
10a311: 3b 45 e4 cmp -0x1c(%ebp),%eax
10a314: 75 cc jne 10a2e2 <writev+0x6a>
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
return 0;
10a316: 31 d2 xor %edx,%edx
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
10a318: 89 f8 mov %edi,%eax
10a31a: 84 c0 test %al,%al
10a31c: 75 36 jne 10a354 <writev+0xdc>
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
10a31e: 8b 43 04 mov 0x4(%ebx),%eax
10a321: 85 c0 test %eax,%eax
10a323: 74 22 je 10a347 <writev+0xcf> <== NEVER TAKEN
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
10a325: 51 push %ecx
10a326: 8b 4e 20 mov 0x20(%esi),%ecx
10a329: 50 push %eax
10a32a: ff 33 pushl (%ebx)
10a32c: 56 push %esi
10a32d: 89 55 e0 mov %edx,-0x20(%ebp)
10a330: ff 51 0c call *0xc(%ecx)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
10a333: 83 c4 10 add $0x10,%esp
10a336: 83 f8 00 cmp $0x0,%eax
10a339: 8b 55 e0 mov -0x20(%ebp),%edx
10a33c: 7c 13 jl 10a351 <writev+0xd9> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
10a33e: 74 02 je 10a342 <writev+0xca> <== NEVER TAKEN
total += bytes;
10a340: 01 c2 add %eax,%edx
}
if (bytes != iov[ v ].iov_len)
10a342: 3b 43 04 cmp 0x4(%ebx),%eax
10a345: 75 0d jne 10a354 <writev+0xdc> <== NEVER TAKEN
10a347: 83 c3 08 add $0x8,%ebx
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
10a34a: 3b 5d e4 cmp -0x1c(%ebp),%ebx
10a34d: 75 cf jne 10a31e <writev+0xa6>
10a34f: eb 03 jmp 10a354 <writev+0xdc>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
10a351: 83 ca ff or $0xffffffff,%edx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10a354: 89 d0 mov %edx,%eax
10a356: 8d 65 f4 lea -0xc(%ebp),%esp
10a359: 5b pop %ebx
10a35a: 5e pop %esi
10a35b: 5f pop %edi
10a35c: 5d pop %ebp
10a35d: c3 ret