RTEMS 4.11Annotated Report
Wed Sep 12 22:36:40 2012
00127d2c <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
static void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
127d2c: 55 push %ebp <== NOT EXECUTED
127d2d: 57 push %edi <== NOT EXECUTED
127d2e: 56 push %esi <== NOT EXECUTED
127d2f: 53 push %ebx <== NOT EXECUTED
127d30: 83 ec 4c sub $0x4c,%esp <== NOT EXECUTED
127d33: 8b 5c 24 60 mov 0x60(%esp),%ebx <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
127d37: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED
127d3a: 0f 84 58 01 00 00 je 127e98 <Stack_check_Dump_threads_usage+0x16c><== NOT EXECUTED
the_thread = 0;
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
127d40: 8d b3 b4 00 00 00 lea 0xb4(%ebx),%esi <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
127d46: 8b 93 c8 00 00 00 mov 0xc8(%ebx),%edx <== NOT EXECUTED
127d4c: 8b bb b8 00 00 00 mov 0xb8(%ebx),%edi <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
127d52: 8b 2e mov (%esi),%ebp <== NOT EXECUTED
127d54: 83 ed 10 sub $0x10,%ebp <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
127d57: 8d 47 20 lea 0x20(%edi),%eax <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
127d5a: 89 e9 mov %ebp,%ecx <== NOT EXECUTED
127d5c: 83 e1 fc and $0xfffffffc,%ecx <== NOT EXECUTED
127d5f: 01 c1 add %eax,%ecx <== NOT EXECUTED
127d61: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
127d63: 73 22 jae 127d87 <Stack_check_Dump_threads_usage+0x5b><== NOT EXECUTED
if (*base != U32_PATTERN)
127d65: 81 7f 20 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x20(%edi) <== NOT EXECUTED
127d6c: 74 12 je 127d80 <Stack_check_Dump_threads_usage+0x54><== NOT EXECUTED
127d6e: e9 e9 00 00 00 jmp 127e5c <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED
127d73: 90 nop <== NOT EXECUTED
127d74: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED
127d7a: 0f 85 dc 00 00 00 jne 127e5c <Stack_check_Dump_threads_usage+0x130><== 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++)
127d80: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
127d83: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
127d85: 77 ed ja 127d74 <Stack_check_Dump_threads_usage+0x48><== 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;
127d87: 31 ff xor %edi,%edi <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
127d89: 85 db test %ebx,%ebx <== NOT EXECUTED
127d8b: 0f 84 d9 00 00 00 je 127e6a <Stack_check_Dump_threads_usage+0x13e><== NOT EXECUTED
#endif
{
(*print_handler)(
127d91: 8b 0d 70 b6 17 00 mov 0x17b670,%ecx <== NOT EXECUTED
127d97: 8d 44 24 3b lea 0x3b(%esp),%eax <== NOT EXECUTED
127d9b: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
127d9f: c7 44 24 04 05 00 00 movl $0x5,0x4(%esp) <== NOT EXECUTED
127da6: 00
127da7: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
127daa: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
127dad: 89 54 24 28 mov %edx,0x28(%esp) <== NOT EXECUTED
127db1: 89 4c 24 2c mov %ecx,0x2c(%esp) <== NOT EXECUTED
127db5: e8 da b5 fe ff call 113394 <rtems_object_get_name> <== NOT EXECUTED
127dba: 89 44 24 0c mov %eax,0xc(%esp) <== NOT EXECUTED
127dbe: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
127dc1: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
127dc5: c7 44 24 04 7e c3 15 movl $0x15c37e,0x4(%esp) <== NOT EXECUTED
127dcc: 00
127dcd: a1 6c b6 17 00 mov 0x17b66c,%eax <== NOT EXECUTED
127dd2: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
127dd5: 8b 4c 24 2c mov 0x2c(%esp),%ecx <== NOT EXECUTED
127dd9: ff d1 call *%ecx <== NOT EXECUTED
127ddb: 8b 54 24 28 mov 0x28(%esp),%edx <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
127ddf: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
127de2: 89 6c 24 14 mov %ebp,0x14(%esp) <== NOT EXECUTED
127de6: 89 54 24 10 mov %edx,0x10(%esp) <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
127dea: 8b 16 mov (%esi),%edx <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
127dec: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED
127df0: 89 54 24 0c mov %edx,0xc(%esp) <== NOT EXECUTED
127df4: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
127df8: c7 44 24 04 99 c3 15 movl $0x15c399,0x4(%esp) <== NOT EXECUTED
127dff: 00
127e00: a1 6c b6 17 00 mov 0x17b66c,%eax <== NOT EXECUTED
127e05: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
127e08: ff 15 70 b6 17 00 call *0x17b670 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
127e0e: a1 68 b6 17 00 mov 0x17b668,%eax <== NOT EXECUTED
127e13: 85 c0 test %eax,%eax <== NOT EXECUTED
127e15: 74 25 je 127e3c <Stack_check_Dump_threads_usage+0x110><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
127e17: 89 7c 24 08 mov %edi,0x8(%esp) <== NOT EXECUTED
127e1b: c7 44 24 04 c4 c3 15 movl $0x15c3c4,0x4(%esp) <== NOT EXECUTED
127e22: 00
127e23: a1 6c b6 17 00 mov 0x17b66c,%eax <== NOT EXECUTED
127e28: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
127e2b: ff 15 70 b6 17 00 call *0x17b670 <== NOT EXECUTED
}
}
127e31: 83 c4 4c add $0x4c,%esp <== NOT EXECUTED
127e34: 5b pop %ebx <== NOT EXECUTED
127e35: 5e pop %esi <== NOT EXECUTED
127e36: 5f pop %edi <== NOT EXECUTED
127e37: 5d pop %ebp <== NOT EXECUTED
127e38: c3 ret <== NOT EXECUTED
127e39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
127e3c: c7 44 24 04 b7 c3 15 movl $0x15c3b7,0x4(%esp) <== NOT EXECUTED
127e43: 00
127e44: a1 6c b6 17 00 mov 0x17b66c,%eax <== NOT EXECUTED
127e49: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
127e4c: ff 15 70 b6 17 00 call *0x17b670 <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
127e52: 83 c4 4c add $0x4c,%esp <== NOT EXECUTED
127e55: 5b pop %ebx <== NOT EXECUTED
127e56: 5e pop %esi <== NOT EXECUTED
127e57: 5f pop %edi <== NOT EXECUTED
127e58: 5d pop %ebp <== NOT EXECUTED
127e59: c3 ret <== NOT EXECUTED
127e5a: 66 90 xchg %ax,%ax <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
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 );
127e5c: 8d 7c 2f 10 lea 0x10(%edi,%ebp,1),%edi <== NOT EXECUTED
127e60: 29 c7 sub %eax,%edi <== NOT EXECUTED
else
used = 0;
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
127e62: 85 db test %ebx,%ebx <== NOT EXECUTED
127e64: 0f 85 27 ff ff ff jne 127d91 <Stack_check_Dump_threads_usage+0x65><== 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 );
127e6a: c7 44 24 08 ff ff ff movl $0xffffffff,0x8(%esp) <== NOT EXECUTED
127e71: ff
127e72: c7 44 24 04 8b c3 15 movl $0x15c38b,0x4(%esp) <== NOT EXECUTED
127e79: 00
127e7a: a1 6c b6 17 00 mov 0x17b66c,%eax <== NOT EXECUTED
127e7f: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
127e82: 89 54 24 28 mov %edx,0x28(%esp) <== NOT EXECUTED
127e86: ff 15 70 b6 17 00 call *0x17b670 <== NOT EXECUTED
127e8c: 8b 54 24 28 mov 0x28(%esp),%edx <== NOT EXECUTED
127e90: e9 4a ff ff ff jmp 127ddf <Stack_check_Dump_threads_usage+0xb3><== NOT EXECUTED
127e95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
127e98: 8b 3d c0 c9 17 00 mov 0x17c9c0,%edi <== NOT EXECUTED
127e9e: 85 ff test %edi,%edi <== NOT EXECUTED
127ea0: 74 8f je 127e31 <Stack_check_Dump_threads_usage+0x105><== NOT EXECUTED
return;
stack = &Stack_check_Interrupt_stack;
127ea2: be bc c9 17 00 mov $0x17c9bc,%esi <== NOT EXECUTED
the_thread = 0;
current = 0;
127ea7: 31 d2 xor %edx,%edx <== 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;
127ea9: 31 db xor %ebx,%ebx <== NOT EXECUTED
127eab: e9 a2 fe ff ff jmp 127d52 <Stack_check_Dump_threads_usage+0x26><== NOT EXECUTED
00127f60 <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)
{
127f60: 56 push %esi <== NOT EXECUTED
127f61: 53 push %ebx <== NOT EXECUTED
127f62: 83 ec 44 sub $0x44,%esp <== NOT EXECUTED
127f65: 8b 5c 24 50 mov 0x50(%esp),%ebx <== NOT EXECUTED
127f69: 8a 4c 24 54 mov 0x54(%esp),%cl <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
127f6d: 8b b3 b8 00 00 00 mov 0xb8(%ebx),%esi <== NOT EXECUTED
char name[32];
printk("BLOWN STACK!!!\n");
127f73: c7 04 24 ca c3 15 00 movl $0x15c3ca,(%esp) <== NOT EXECUTED
127f7a: 88 4c 24 1c mov %cl,0x1c(%esp) <== NOT EXECUTED
127f7e: e8 85 06 fe ff call 108608 <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
127f83: 89 5c 24 04 mov %ebx,0x4(%esp) <== NOT EXECUTED
127f87: c7 04 24 da c3 15 00 movl $0x15c3da,(%esp) <== NOT EXECUTED
127f8e: e8 75 06 fe ff call 108608 <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
127f93: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
127f96: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
127f9a: c7 04 24 f7 c3 15 00 movl $0x15c3f7,(%esp) <== NOT EXECUTED
127fa1: e8 62 06 fe ff call 108608 <printk> <== NOT EXECUTED
printk(
127fa6: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
127fa9: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
127fad: c7 04 24 09 c4 15 00 movl $0x15c409,(%esp) <== NOT EXECUTED
127fb4: e8 4f 06 fe ff call 108608 <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
127fb9: 8d 44 24 20 lea 0x20(%esp),%eax <== NOT EXECUTED
127fbd: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
127fc1: c7 44 24 04 20 00 00 movl $0x20,0x4(%esp) <== NOT EXECUTED
127fc8: 00
127fc9: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
127fcc: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
127fcf: e8 c0 b3 fe ff call 113394 <rtems_object_get_name> <== NOT EXECUTED
127fd4: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
127fd8: c7 04 24 1d c4 15 00 movl $0x15c41d,(%esp) <== NOT EXECUTED
127fdf: e8 24 06 fe ff call 108608 <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)
127fe4: 8b 93 b8 00 00 00 mov 0xb8(%ebx),%edx <== NOT EXECUTED
127fea: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
127ff0: 8d 1c 02 lea (%edx,%eax,1),%ebx <== NOT EXECUTED
127ff3: 89 5c 24 0c mov %ebx,0xc(%esp) <== NOT EXECUTED
127ff7: 89 54 24 08 mov %edx,0x8(%esp) <== NOT EXECUTED
127ffb: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
127fff: c7 04 24 4c c4 15 00 movl $0x15c44c,(%esp) <== NOT EXECUTED
128006: e8 fd 05 fe ff call 108608 <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) {
12800b: 8a 4c 24 1c mov 0x1c(%esp),%cl <== NOT EXECUTED
12800f: 84 c9 test %cl,%cl <== NOT EXECUTED
128011: 74 0c je 12801f <Stack_check_report_blown_task+0xbf><== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
128013: c7 04 24 81 00 00 00 movl $0x81,(%esp) <== NOT EXECUTED
12801a: e8 dd 3d fe ff call 10bdfc <rtems_fatal_error_occurred><== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
12801f: 8d 46 18 lea 0x18(%esi),%eax <== NOT EXECUTED
128022: 89 44 24 0c mov %eax,0xc(%esp) <== 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);
128026: 83 c6 08 add $0x8,%esi <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
128029: 89 74 24 08 mov %esi,0x8(%esp) <== NOT EXECUTED
12802d: c7 44 24 04 10 00 00 movl $0x10,0x4(%esp) <== NOT EXECUTED
128034: 00
128035: c7 04 24 80 c4 15 00 movl $0x15c480,(%esp) <== NOT EXECUTED
12803c: e8 c7 05 fe ff call 108608 <printk> <== NOT EXECUTED
128041: eb d0 jmp 128013 <Stack_check_report_blown_task+0xb3><== NOT EXECUTED
0010c260 <_API_extensions_Run_postdriver>:
/*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
10c260: 53 push %ebx
10c261: 83 ec 08 sub $0x8,%esp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10c264: 8b 1d 38 21 13 00 mov 0x132138,%ebx
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10c26a: 81 fb 3c 21 13 00 cmp $0x13213c,%ebx
10c270: 74 0f je 10c281 <_API_extensions_Run_postdriver+0x21><== NEVER TAKEN
10c272: 66 90 xchg %ax,%ax
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
10c274: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10c277: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10c279: 81 fb 3c 21 13 00 cmp $0x13213c,%ebx
10c27f: 75 f3 jne 10c274 <_API_extensions_Run_postdriver+0x14>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
10c281: 83 c4 08 add $0x8,%esp
10c284: 5b pop %ebx
10c285: c3 ret
0010c288 <_API_extensions_Run_postswitch>:
/*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
10c288: 53 push %ebx
10c289: 83 ec 18 sub $0x18,%esp
10c28c: 8b 1d 38 21 13 00 mov 0x132138,%ebx
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10c292: 81 fb 3c 21 13 00 cmp $0x13213c,%ebx
10c298: 74 17 je 10c2b1 <_API_extensions_Run_postswitch+0x29><== NEVER TAKEN
10c29a: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
10c29c: a1 cc 24 13 00 mov 0x1324cc,%eax
10c2a1: 89 04 24 mov %eax,(%esp)
10c2a4: ff 53 0c call *0xc(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10c2a7: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10c2a9: 81 fb 3c 21 13 00 cmp $0x13213c,%ebx
10c2af: 75 eb jne 10c29c <_API_extensions_Run_postswitch+0x14>
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10c2b1: 83 c4 18 add $0x18,%esp
10c2b4: 5b pop %ebx
10c2b5: c3 ret
0010e9d4 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
10e9d4: 53 push %ebx
10e9d5: 83 ec 18 sub $0x18,%esp
10e9d8: 8b 5c 24 20 mov 0x20(%esp),%ebx
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e9dc: 8b 0d 2c 4c 13 00 mov 0x134c2c,%ecx
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
10e9e2: 9c pushf
10e9e3: fa cli
10e9e4: 5a pop %edx
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
10e9e5: 8b 43 44 mov 0x44(%ebx),%eax
10e9e8: 85 c0 test %eax,%eax
10e9ea: 74 6c je 10ea58 <_CORE_RWLock_Release+0x84>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
10e9ec: 48 dec %eax
10e9ed: 74 59 je 10ea48 <_CORE_RWLock_Release+0x74>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e9ef: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
10e9f6: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
_ISR_Enable( level );
10e9fd: 52 push %edx
10e9fe: 9d popf
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
10e9ff: 89 1c 24 mov %ebx,(%esp)
10ea02: e8 15 1b 00 00 call 11051c <_Thread_queue_Dequeue>
if ( next ) {
10ea07: 85 c0 test %eax,%eax
10ea09: 74 36 je 10ea41 <_CORE_RWLock_Release+0x6d>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
10ea0b: 83 78 30 01 cmpl $0x1,0x30(%eax)
10ea0f: 74 57 je 10ea68 <_CORE_RWLock_Release+0x94>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
10ea11: ff 43 48 incl 0x48(%ebx)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10ea14: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
10ea1b: eb 18 jmp 10ea35 <_CORE_RWLock_Release+0x61>
10ea1d: 8d 76 00 lea 0x0(%esi),%esi
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
10ea20: 83 78 30 01 cmpl $0x1,0x30(%eax)
10ea24: 74 1b je 10ea41 <_CORE_RWLock_Release+0x6d><== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
10ea26: ff 43 48 incl 0x48(%ebx)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
10ea29: 89 44 24 04 mov %eax,0x4(%esp)
10ea2d: 89 1c 24 mov %ebx,(%esp)
10ea30: e8 ff 1d 00 00 call 110834 <_Thread_queue_Extract>
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
10ea35: 89 1c 24 mov %ebx,(%esp)
10ea38: e8 0f 1f 00 00 call 11094c <_Thread_queue_First>
if ( !next ||
10ea3d: 85 c0 test %eax,%eax
10ea3f: 75 df jne 10ea20 <_CORE_RWLock_Release+0x4c>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10ea41: 31 c0 xor %eax,%eax
10ea43: 83 c4 18 add $0x18,%esp
10ea46: 5b pop %ebx
10ea47: c3 ret
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
if ( the_rwlock->number_of_readers != 0 ) {
10ea48: ff 4b 48 decl 0x48(%ebx)
10ea4b: 74 a2 je 10e9ef <_CORE_RWLock_Release+0x1b>
/* must be unlocked again */
_ISR_Enable( level );
10ea4d: 52 push %edx
10ea4e: 9d popf
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10ea4f: 31 c0 xor %eax,%eax
10ea51: 83 c4 18 add $0x18,%esp
10ea54: 5b pop %ebx
10ea55: c3 ret
10ea56: 66 90 xchg %ax,%ax
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
10ea58: 52 push %edx
10ea59: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10ea5a: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10ea61: 31 c0 xor %eax,%eax
10ea63: 83 c4 18 add $0x18,%esp
10ea66: 5b pop %ebx
10ea67: c3 ret
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10ea68: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx)
return CORE_RWLOCK_SUCCESSFUL;
10ea6f: eb d0 jmp 10ea41 <_CORE_RWLock_Release+0x6d>
0010ea74 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
10ea74: 83 ec 2c sub $0x2c,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10ea77: 8d 44 24 1c lea 0x1c(%esp),%eax
10ea7b: 89 44 24 04 mov %eax,0x4(%esp)
10ea7f: 8b 44 24 30 mov 0x30(%esp),%eax
10ea83: 89 04 24 mov %eax,(%esp)
10ea86: e8 e9 16 00 00 call 110174 <_Thread_Get>
switch ( location ) {
10ea8b: 8b 54 24 1c mov 0x1c(%esp),%edx
10ea8f: 85 d2 test %edx,%edx
10ea91: 75 18 jne 10eaab <_CORE_RWLock_Timeout+0x37><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10ea93: 89 04 24 mov %eax,(%esp)
10ea96: e8 75 1f 00 00 call 110a10 <_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--;
10ea9b: a1 a4 46 13 00 mov 0x1346a4,%eax
10eaa0: 48 dec %eax
10eaa1: a3 a4 46 13 00 mov %eax,0x1346a4
return _Thread_Dispatch_disable_level;
10eaa6: a1 a4 46 13 00 mov 0x1346a4,%eax
_Thread_Unnest_dispatch();
break;
}
}
10eaab: 83 c4 2c add $0x2c,%esp
10eaae: c3 ret
0010c594 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10c594: 56 push %esi
10c595: 53 push %ebx
10c596: 83 ec 14 sub $0x14,%esp
10c599: 8b 74 24 20 mov 0x20(%esp),%esi
10c59d: 8a 5c 24 28 mov 0x28(%esp),%bl
* 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 )
10c5a1: a1 44 1f 13 00 mov 0x131f44,%eax
10c5a6: 85 c0 test %eax,%eax
10c5a8: 74 6e je 10c618 <_CORE_mutex_Seize+0x84>
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c5aa: 84 db test %bl,%bl
10c5ac: 0f 84 95 00 00 00 je 10c647 <_CORE_mutex_Seize+0xb3>
10c5b2: 83 3d a0 20 13 00 01 cmpl $0x1,0x1320a0
10c5b9: 0f 87 9e 00 00 00 ja 10c65d <_CORE_mutex_Seize+0xc9>
10c5bf: 8d 44 24 30 lea 0x30(%esp),%eax
10c5c3: 89 44 24 04 mov %eax,0x4(%esp)
10c5c7: 89 34 24 mov %esi,(%esp)
10c5ca: e8 e5 52 00 00 call 1118b4 <_CORE_mutex_Seize_interrupt_trylock>
10c5cf: 85 c0 test %eax,%eax
10c5d1: 74 3c je 10c60f <_CORE_mutex_Seize+0x7b><== ALWAYS TAKEN
10c5d3: 90 nop
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;
10c5d4: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
10c5db: a1 cc 24 13 00 mov 0x1324cc,%eax
10c5e0: 89 70 44 mov %esi,0x44(%eax)
10c5e3: 8b 54 24 24 mov 0x24(%esp),%edx
10c5e7: 89 50 20 mov %edx,0x20(%eax)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10c5ea: a1 44 1f 13 00 mov 0x131f44,%eax
10c5ef: 40 inc %eax
10c5f0: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
10c5f5: a1 44 1f 13 00 mov 0x131f44,%eax
10c5fa: ff 74 24 30 pushl 0x30(%esp)
10c5fe: 9d popf
10c5ff: 8b 44 24 2c mov 0x2c(%esp),%eax
10c603: 89 44 24 04 mov %eax,0x4(%esp)
10c607: 89 34 24 mov %esi,(%esp)
10c60a: e8 11 ff ff ff call 10c520 <_CORE_mutex_Seize_interrupt_blocking>
}
10c60f: 83 c4 14 add $0x14,%esp
10c612: 5b pop %ebx
10c613: 5e pop %esi
10c614: c3 ret
10c615: 8d 76 00 lea 0x0(%esi),%esi
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c618: 8d 44 24 30 lea 0x30(%esp),%eax
10c61c: 89 44 24 04 mov %eax,0x4(%esp)
10c620: 89 34 24 mov %esi,(%esp)
10c623: e8 8c 52 00 00 call 1118b4 <_CORE_mutex_Seize_interrupt_trylock>
10c628: 85 c0 test %eax,%eax
10c62a: 74 e3 je 10c60f <_CORE_mutex_Seize+0x7b>
10c62c: 84 db test %bl,%bl
10c62e: 75 a4 jne 10c5d4 <_CORE_mutex_Seize+0x40>
10c630: ff 74 24 30 pushl 0x30(%esp)
10c634: 9d popf
10c635: a1 cc 24 13 00 mov 0x1324cc,%eax
10c63a: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
}
10c641: 83 c4 14 add $0x14,%esp
10c644: 5b pop %ebx
10c645: 5e pop %esi
10c646: c3 ret
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c647: 8d 44 24 30 lea 0x30(%esp),%eax
10c64b: 89 44 24 04 mov %eax,0x4(%esp)
10c64f: 89 34 24 mov %esi,(%esp)
10c652: e8 5d 52 00 00 call 1118b4 <_CORE_mutex_Seize_interrupt_trylock>
10c657: 85 c0 test %eax,%eax
10c659: 75 d5 jne 10c630 <_CORE_mutex_Seize+0x9c><== NEVER TAKEN
10c65b: eb b2 jmp 10c60f <_CORE_mutex_Seize+0x7b>
10c65d: c7 44 24 08 12 00 00 movl $0x12,0x8(%esp)
10c664: 00
10c665: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c66c: 00
10c66d: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c674: e8 93 05 00 00 call 10cc0c <_Internal_error_Occurred>
0010c7b4 <_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
)
{
10c7b4: 53 push %ebx
10c7b5: 83 ec 18 sub $0x18,%esp
10c7b8: 8b 5c 24 20 mov 0x20(%esp),%ebx
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10c7bc: 89 1c 24 mov %ebx,(%esp)
10c7bf: e8 28 1a 00 00 call 10e1ec <_Thread_queue_Dequeue>
10c7c4: 85 c0 test %eax,%eax
10c7c6: 74 08 je 10c7d0 <_CORE_semaphore_Surrender+0x1c>
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c7c8: 31 c0 xor %eax,%eax
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
10c7ca: 83 c4 18 add $0x18,%esp
10c7cd: 5b pop %ebx
10c7ce: c3 ret
10c7cf: 90 nop
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10c7d0: 9c pushf
10c7d1: fa cli
10c7d2: 5a pop %edx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10c7d3: 8b 43 48 mov 0x48(%ebx),%eax
10c7d6: 3b 43 40 cmp 0x40(%ebx),%eax
10c7d9: 72 0d jb 10c7e8 <_CORE_semaphore_Surrender+0x34><== ALWAYS TAKEN
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10c7db: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
_ISR_Enable( level );
10c7e0: 52 push %edx
10c7e1: 9d popf
}
return status;
}
10c7e2: 83 c4 18 add $0x18,%esp
10c7e5: 5b pop %ebx
10c7e6: c3 ret
10c7e7: 90 nop
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
10c7e8: 40 inc %eax
10c7e9: 89 43 48 mov %eax,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c7ec: 31 c0 xor %eax,%eax
10c7ee: eb f0 jmp 10c7e0 <_CORE_semaphore_Surrender+0x2c>
0010c418 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
10c418: 55 push %ebp
10c419: 57 push %edi
10c41a: 56 push %esi
10c41b: 53 push %ebx
10c41c: 8b 74 24 14 mov 0x14(%esp),%esi
10c420: 8b 44 24 1c mov 0x1c(%esp),%eax
10c424: 8b 5c 24 20 mov 0x20(%esp),%ebx
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c428: 8d 6e 04 lea 0x4(%esi),%ebp
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
10c42b: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
while ( count-- ) {
10c432: 8d 78 ff lea -0x1(%eax),%edi
10c435: 85 c0 test %eax,%eax
10c437: 74 2b je 10c464 <_Chain_Initialize+0x4c><== NEVER TAKEN
10c439: 89 f9 mov %edi,%ecx
10c43b: 8b 44 24 18 mov 0x18(%esp),%eax
10c43f: 89 f2 mov %esi,%edx
10c441: 8d 76 00 lea 0x0(%esi),%esi
current->next = next;
10c444: 89 02 mov %eax,(%edx)
next->previous = current;
10c446: 89 50 04 mov %edx,0x4(%eax)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
10c449: 49 dec %ecx
10c44a: 89 c2 mov %eax,%edx
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
10c44c: 01 d8 add %ebx,%eax
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
10c44e: 83 f9 ff cmp $0xffffffff,%ecx
10c451: 75 f1 jne 10c444 <_Chain_Initialize+0x2c>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
10c453: 0f af df imul %edi,%ebx
10c456: 03 5c 24 18 add 0x18(%esp),%ebx
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
10c45a: 89 2b mov %ebp,(%ebx)
tail->previous = current;
10c45c: 89 5e 08 mov %ebx,0x8(%esi)
}
10c45f: 5b pop %ebx
10c460: 5e pop %esi
10c461: 5f pop %edi
10c462: 5d pop %ebp
10c463: c3 ret
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
10c464: 89 f3 mov %esi,%ebx <== NOT EXECUTED
10c466: eb f2 jmp 10c45a <_Chain_Initialize+0x42><== NOT EXECUTED
0010b544 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
10b544: 55 push %ebp
10b545: 57 push %edi
10b546: 56 push %esi
10b547: 53 push %ebx
10b548: 83 ec 2c sub $0x2c,%esp
10b54b: 8b 5c 24 40 mov 0x40(%esp),%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 ];
10b54f: 8b 8b e4 00 00 00 mov 0xe4(%ebx),%ecx
option_set = (rtems_option) the_thread->Wait.option;
10b555: 8b 6b 30 mov 0x30(%ebx),%ebp
_ISR_Disable( level );
10b558: 9c pushf
10b559: fa cli
10b55a: 5e pop %esi
pending_events = api->pending_events;
10b55b: 8b 11 mov (%ecx),%edx
event_condition = (rtems_event_set) the_thread->Wait.count;
10b55d: 8b 43 24 mov 0x24(%ebx),%eax
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
10b560: 89 c7 mov %eax,%edi
10b562: 21 d7 and %edx,%edi
10b564: 89 7c 24 18 mov %edi,0x18(%esp)
10b568: 0f 84 ae 00 00 00 je 10b61c <_Event_Surrender+0xd8>
/*
* 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() &&
10b56e: 8b 3d c8 24 13 00 mov 0x1324c8,%edi
10b574: 85 ff test %edi,%edi
10b576: 74 08 je 10b580 <_Event_Surrender+0x3c>
10b578: 3b 1d cc 24 13 00 cmp 0x1324cc,%ebx
10b57e: 74 58 je 10b5d8 <_Event_Surrender+0x94>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
10b580: f6 43 11 01 testb $0x1,0x11(%ebx)
10b584: 0f 84 92 00 00 00 je 10b61c <_Event_Surrender+0xd8>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
10b58a: 3b 44 24 18 cmp 0x18(%esp),%eax
10b58e: 74 09 je 10b599 <_Event_Surrender+0x55>
10b590: 83 e5 02 and $0x2,%ebp
10b593: 0f 84 83 00 00 00 je 10b61c <_Event_Surrender+0xd8> <== 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) );
10b599: 8b 44 24 18 mov 0x18(%esp),%eax
10b59d: f7 d0 not %eax
10b59f: 21 d0 and %edx,%eax
10b5a1: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
10b5a3: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b5aa: 8b 43 28 mov 0x28(%ebx),%eax
10b5ad: 8b 7c 24 18 mov 0x18(%esp),%edi
10b5b1: 89 38 mov %edi,(%eax)
_ISR_Flash( level );
10b5b3: 56 push %esi
10b5b4: 9d popf
10b5b5: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10b5b6: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10b5ba: 74 6c je 10b628 <_Event_Surrender+0xe4>
_ISR_Enable( level );
10b5bc: 56 push %esi
10b5bd: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b5be: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
10b5c5: 10
10b5c6: 89 1c 24 mov %ebx,(%esp)
10b5c9: e8 b2 24 00 00 call 10da80 <_Thread_Clear_state>
}
return;
}
}
_ISR_Enable( level );
}
10b5ce: 83 c4 2c add $0x2c,%esp
10b5d1: 5b pop %ebx
10b5d2: 5e pop %esi
10b5d3: 5f pop %edi
10b5d4: 5d pop %ebp
10b5d5: c3 ret
10b5d6: 66 90 xchg %ax,%ax
* 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) ||
10b5d8: 8b 3d 08 29 13 00 mov 0x132908,%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 ) &&
10b5de: 83 ff 02 cmp $0x2,%edi
10b5e1: 74 09 je 10b5ec <_Event_Surrender+0xa8> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
10b5e3: 8b 3d 08 29 13 00 mov 0x132908,%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) ||
10b5e9: 4f dec %edi
10b5ea: 75 94 jne 10b580 <_Event_Surrender+0x3c>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
10b5ec: 3b 44 24 18 cmp 0x18(%esp),%eax
10b5f0: 74 05 je 10b5f7 <_Event_Surrender+0xb3>
10b5f2: 83 e5 02 and $0x2,%ebp
10b5f5: 74 25 je 10b61c <_Event_Surrender+0xd8> <== NEVER TAKEN
10b5f7: 8b 44 24 18 mov 0x18(%esp),%eax
10b5fb: f7 d0 not %eax
10b5fd: 21 d0 and %edx,%eax
10b5ff: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
10b601: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b608: 8b 43 28 mov 0x28(%ebx),%eax
10b60b: 8b 54 24 18 mov 0x18(%esp),%edx
10b60f: 89 10 mov %edx,(%eax)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
10b611: c7 05 08 29 13 00 03 movl $0x3,0x132908
10b618: 00 00 00
10b61b: 90 nop
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
10b61c: 56 push %esi
10b61d: 9d popf
}
10b61e: 83 c4 2c add $0x2c,%esp
10b621: 5b pop %ebx
10b622: 5e pop %esi
10b623: 5f pop %edi
10b624: 5d pop %ebp
10b625: c3 ret
10b626: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10b628: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10b62f: 56 push %esi
10b630: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10b631: 8d 43 48 lea 0x48(%ebx),%eax
10b634: 89 04 24 mov %eax,(%esp)
10b637: e8 24 35 00 00 call 10eb60 <_Watchdog_Remove>
10b63c: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
10b643: 10
10b644: 89 1c 24 mov %ebx,(%esp)
10b647: e8 34 24 00 00 call 10da80 <_Thread_Clear_state>
10b64c: eb d0 jmp 10b61e <_Event_Surrender+0xda>
0010b650 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
10b650: 83 ec 2c sub $0x2c,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
10b653: 8d 44 24 1c lea 0x1c(%esp),%eax
10b657: 89 44 24 04 mov %eax,0x4(%esp)
10b65b: 8b 44 24 30 mov 0x30(%esp),%eax
10b65f: 89 04 24 mov %eax,(%esp)
10b662: e8 dd 27 00 00 call 10de44 <_Thread_Get>
switch ( location ) {
10b667: 8b 54 24 1c mov 0x1c(%esp),%edx
10b66b: 85 d2 test %edx,%edx
10b66d: 75 3b jne 10b6aa <_Event_Timeout+0x5a> <== 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 );
10b66f: 9c pushf
10b670: fa cli
10b671: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
10b672: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
10b679: 3b 05 cc 24 13 00 cmp 0x1324cc,%eax
10b67f: 74 2f je 10b6b0 <_Event_Timeout+0x60>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
10b681: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
10b688: 52 push %edx
10b689: 9d popf
10b68a: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
10b691: 10
10b692: 89 04 24 mov %eax,(%esp)
10b695: e8 e6 23 00 00 call 10da80 <_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--;
10b69a: a1 44 1f 13 00 mov 0x131f44,%eax
10b69f: 48 dec %eax
10b6a0: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
10b6a5: a1 44 1f 13 00 mov 0x131f44,%eax
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b6aa: 83 c4 2c add $0x2c,%esp
10b6ad: c3 ret
10b6ae: 66 90 xchg %ax,%ax
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
10b6b0: 8b 0d 08 29 13 00 mov 0x132908,%ecx
10b6b6: 49 dec %ecx
10b6b7: 75 c8 jne 10b681 <_Event_Timeout+0x31>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10b6b9: c7 05 08 29 13 00 02 movl $0x2,0x132908
10b6c0: 00 00 00
10b6c3: eb bc jmp 10b681 <_Event_Timeout+0x31>
001119e8 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
1119e8: 55 push %ebp
1119e9: 57 push %edi
1119ea: 56 push %esi
1119eb: 53 push %ebx
1119ec: 83 ec 3c sub $0x3c,%esp
1119ef: 8b 6c 24 54 mov 0x54(%esp),%ebp
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
1119f3: 8d 45 04 lea 0x4(%ebp),%eax
1119f6: 89 44 24 10 mov %eax,0x10(%esp)
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
1119fa: 8b 54 24 50 mov 0x50(%esp),%edx
1119fe: 8b 52 10 mov 0x10(%edx),%edx
111a01: 89 54 24 18 mov %edx,0x18(%esp)
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
111a05: 39 c5 cmp %eax,%ebp
111a07: 0f 87 ab 01 00 00 ja 111bb8 <_Heap_Allocate_aligned_with_boundary+0x1d0>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
111a0d: 8b 5c 24 5c mov 0x5c(%esp),%ebx
111a11: 85 db test %ebx,%ebx
111a13: 0f 85 77 01 00 00 jne 111b90 <_Heap_Allocate_aligned_with_boundary+0x1a8>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
111a19: 8b 54 24 50 mov 0x50(%esp),%edx
111a1d: 8b 72 08 mov 0x8(%edx),%esi
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111a20: 31 ff xor %edi,%edi
111a22: 39 f2 cmp %esi,%edx
111a24: 74 4a je 111a70 <_Heap_Allocate_aligned_with_boundary+0x88>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
111a26: 8b 44 24 18 mov 0x18(%esp),%eax
111a2a: 83 c0 07 add $0x7,%eax
111a2d: 89 44 24 24 mov %eax,0x24(%esp)
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
111a31: c7 44 24 14 04 00 00 movl $0x4,0x14(%esp)
111a38: 00
111a39: 29 6c 24 14 sub %ebp,0x14(%esp)
111a3d: eb 1e jmp 111a5d <_Heap_Allocate_aligned_with_boundary+0x75>
111a3f: 90 nop
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
if ( alignment == 0 ) {
111a40: 8b 54 24 58 mov 0x58(%esp),%edx
111a44: 85 d2 test %edx,%edx
111a46: 75 40 jne 111a88 <_Heap_Allocate_aligned_with_boundary+0xa0>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
111a48: 8d 5e 08 lea 0x8(%esi),%ebx
);
}
}
/* Statistics */
++search_count;
111a4b: 47 inc %edi
if ( alloc_begin != 0 ) {
111a4c: 85 db test %ebx,%ebx
111a4e: 0f 85 14 01 00 00 jne 111b68 <_Heap_Allocate_aligned_with_boundary+0x180><== ALWAYS TAKEN
break;
}
block = block->next;
111a54: 8b 76 08 mov 0x8(%esi),%esi
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111a57: 39 74 24 50 cmp %esi,0x50(%esp)
111a5b: 74 13 je 111a70 <_Heap_Allocate_aligned_with_boundary+0x88>
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
111a5d: 8b 5e 04 mov 0x4(%esi),%ebx
111a60: 39 5c 24 10 cmp %ebx,0x10(%esp)
111a64: 72 da jb 111a40 <_Heap_Allocate_aligned_with_boundary+0x58>
);
}
}
/* Statistics */
++search_count;
111a66: 47 inc %edi
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
111a67: 8b 76 08 mov 0x8(%esi),%esi
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111a6a: 39 74 24 50 cmp %esi,0x50(%esp)
111a6e: 75 ed jne 111a5d <_Heap_Allocate_aligned_with_boundary+0x75>
);
}
}
/* Statistics */
++search_count;
111a70: 31 c0 xor %eax,%eax
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
111a72: 8b 54 24 50 mov 0x50(%esp),%edx
111a76: 39 7a 44 cmp %edi,0x44(%edx)
111a79: 73 03 jae 111a7e <_Heap_Allocate_aligned_with_boundary+0x96>
stats->max_search = search_count;
111a7b: 89 7a 44 mov %edi,0x44(%edx)
}
return (void *) alloc_begin;
}
111a7e: 83 c4 3c add $0x3c,%esp
111a81: 5b pop %ebx
111a82: 5e pop %esi
111a83: 5f pop %edi
111a84: 5d pop %ebp
111a85: c3 ret
111a86: 66 90 xchg %ax,%ax
111a88: 8b 54 24 50 mov 0x50(%esp),%edx
111a8c: 8b 52 14 mov 0x14(%edx),%edx
111a8f: 89 54 24 1c mov %edx,0x1c(%esp)
- 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;
111a93: 83 e3 fe and $0xfffffffe,%ebx
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
111a96: 01 f3 add %esi,%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
111a98: 8d 46 08 lea 0x8(%esi),%eax
111a9b: 89 44 24 20 mov %eax,0x20(%esp)
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
111a9f: 8b 4c 24 24 mov 0x24(%esp),%ecx
111aa3: 29 d1 sub %edx,%ecx
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
111aa5: 01 d9 add %ebx,%ecx
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
111aa7: 03 5c 24 14 add 0x14(%esp),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111aab: 89 d8 mov %ebx,%eax
111aad: 31 d2 xor %edx,%edx
111aaf: f7 74 24 58 divl 0x58(%esp)
111ab3: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
111ab5: 39 d9 cmp %ebx,%ecx
111ab7: 73 0c jae 111ac5 <_Heap_Allocate_aligned_with_boundary+0xdd>
111ab9: 89 c8 mov %ecx,%eax
111abb: 31 d2 xor %edx,%edx
111abd: f7 74 24 58 divl 0x58(%esp)
111ac1: 89 cb mov %ecx,%ebx
111ac3: 29 d3 sub %edx,%ebx
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
111ac5: 8b 44 24 5c mov 0x5c(%esp),%eax
111ac9: 85 c0 test %eax,%eax
111acb: 74 64 je 111b31 <_Heap_Allocate_aligned_with_boundary+0x149>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
111acd: 8d 0c 2b lea (%ebx,%ebp,1),%ecx
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
111ad0: 8b 54 24 20 mov 0x20(%esp),%edx
111ad4: 01 ea add %ebp,%edx
111ad6: 89 54 24 28 mov %edx,0x28(%esp)
111ada: 89 c8 mov %ecx,%eax
111adc: 31 d2 xor %edx,%edx
111ade: f7 74 24 5c divl 0x5c(%esp)
111ae2: 89 c8 mov %ecx,%eax
111ae4: 29 d0 sub %edx,%eax
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
111ae6: 39 c3 cmp %eax,%ebx
111ae8: 73 47 jae 111b31 <_Heap_Allocate_aligned_with_boundary+0x149>
111aea: 39 c1 cmp %eax,%ecx
111aec: 76 43 jbe 111b31 <_Heap_Allocate_aligned_with_boundary+0x149>
if ( boundary_line < boundary_floor ) {
111aee: 39 44 24 28 cmp %eax,0x28(%esp)
111af2: 77 68 ja 111b5c <_Heap_Allocate_aligned_with_boundary+0x174>
111af4: 89 74 24 2c mov %esi,0x2c(%esp)
111af8: 8b 74 24 28 mov 0x28(%esp),%esi
111afc: eb 0e jmp 111b0c <_Heap_Allocate_aligned_with_boundary+0x124>
111afe: 66 90 xchg %ax,%ax
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
111b00: 39 c1 cmp %eax,%ecx
111b02: 76 29 jbe 111b2d <_Heap_Allocate_aligned_with_boundary+0x145>
if ( boundary_line < boundary_floor ) {
111b04: 39 c6 cmp %eax,%esi
111b06: 0f 87 a0 00 00 00 ja 111bac <_Heap_Allocate_aligned_with_boundary+0x1c4><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
111b0c: 89 c3 mov %eax,%ebx
111b0e: 29 eb sub %ebp,%ebx
111b10: 89 d8 mov %ebx,%eax
111b12: 31 d2 xor %edx,%edx
111b14: f7 74 24 58 divl 0x58(%esp)
111b18: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
111b1a: 8d 0c 2b lea (%ebx,%ebp,1),%ecx
111b1d: 89 c8 mov %ecx,%eax
111b1f: 31 d2 xor %edx,%edx
111b21: f7 74 24 5c divl 0x5c(%esp)
111b25: 89 c8 mov %ecx,%eax
111b27: 29 d0 sub %edx,%eax
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
111b29: 39 c3 cmp %eax,%ebx
111b2b: 72 d3 jb 111b00 <_Heap_Allocate_aligned_with_boundary+0x118>
111b2d: 8b 74 24 2c mov 0x2c(%esp),%esi
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
111b31: 39 5c 24 20 cmp %ebx,0x20(%esp)
111b35: 77 25 ja 111b5c <_Heap_Allocate_aligned_with_boundary+0x174>
111b37: b9 f8 ff ff ff mov $0xfffffff8,%ecx
111b3c: 29 f1 sub %esi,%ecx
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
111b3e: 01 d9 add %ebx,%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111b40: 89 d8 mov %ebx,%eax
111b42: 31 d2 xor %edx,%edx
111b44: f7 74 24 18 divl 0x18(%esp)
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
111b48: 29 d1 sub %edx,%ecx
if ( free_size >= min_block_size || free_size == 0 ) {
111b4a: 39 4c 24 1c cmp %ecx,0x1c(%esp)
111b4e: 0f 86 f7 fe ff ff jbe 111a4b <_Heap_Allocate_aligned_with_boundary+0x63>
111b54: 85 c9 test %ecx,%ecx
111b56: 0f 84 ef fe ff ff je 111a4b <_Heap_Allocate_aligned_with_boundary+0x63>
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
return 0;
111b5c: 31 db xor %ebx,%ebx
);
}
}
/* Statistics */
++search_count;
111b5e: 47 inc %edi
if ( alloc_begin != 0 ) {
111b5f: 85 db test %ebx,%ebx
111b61: 0f 84 ed fe ff ff je 111a54 <_Heap_Allocate_aligned_with_boundary+0x6c><== ALWAYS TAKEN
111b67: 90 nop
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
111b68: 8b 44 24 50 mov 0x50(%esp),%eax
111b6c: ff 40 48 incl 0x48(%eax)
stats->searches += search_count;
111b6f: 01 78 4c add %edi,0x4c(%eax)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
111b72: 89 6c 24 0c mov %ebp,0xc(%esp)
111b76: 89 5c 24 08 mov %ebx,0x8(%esp)
111b7a: 89 74 24 04 mov %esi,0x4(%esp)
111b7e: 89 04 24 mov %eax,(%esp)
111b81: e8 a2 af ff ff call 10cb28 <_Heap_Block_allocate>
111b86: 89 d8 mov %ebx,%eax
111b88: e9 e5 fe ff ff jmp 111a72 <_Heap_Allocate_aligned_with_boundary+0x8a>
111b8d: 8d 76 00 lea 0x0(%esi),%esi
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
111b90: 3b 6c 24 5c cmp 0x5c(%esp),%ebp
111b94: 77 22 ja 111bb8 <_Heap_Allocate_aligned_with_boundary+0x1d0>
return NULL;
}
if ( alignment == 0 ) {
111b96: 8b 4c 24 58 mov 0x58(%esp),%ecx
111b9a: 85 c9 test %ecx,%ecx
111b9c: 0f 85 77 fe ff ff jne 111a19 <_Heap_Allocate_aligned_with_boundary+0x31>
alignment = page_size;
111ba2: 89 54 24 58 mov %edx,0x58(%esp)
111ba6: e9 6e fe ff ff jmp 111a19 <_Heap_Allocate_aligned_with_boundary+0x31>
111bab: 90 nop
111bac: 8b 74 24 2c mov 0x2c(%esp),%esi <== NOT EXECUTED
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
return 0;
111bb0: 31 db xor %ebx,%ebx <== NOT EXECUTED
111bb2: e9 94 fe ff ff jmp 111a4b <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED
111bb7: 90 nop <== NOT EXECUTED
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
/* Integer overflow occured */
return NULL;
111bb8: 31 c0 xor %eax,%eax
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
111bba: 83 c4 3c add $0x3c,%esp
111bbd: 5b pop %ebx
111bbe: 5e pop %esi
111bbf: 5f pop %edi
111bc0: 5d pop %ebp
111bc1: c3 ret
00111c10 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
111c10: 55 push %ebp
111c11: 57 push %edi
111c12: 56 push %esi
111c13: 53 push %ebx
111c14: 83 ec 5c sub $0x5c,%esp
111c17: 8b 7c 24 70 mov 0x70(%esp),%edi
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
111c1b: 8b 4f 20 mov 0x20(%edi),%ecx
111c1e: 89 4c 24 28 mov %ecx,0x28(%esp)
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;
111c22: c7 44 24 48 00 00 00 movl $0x0,0x48(%esp)
111c29: 00
Heap_Block *extend_last_block = NULL;
111c2a: c7 44 24 4c 00 00 00 movl $0x0,0x4c(%esp)
111c31: 00
uintptr_t const page_size = heap->page_size;
111c32: 8b 4f 10 mov 0x10(%edi),%ecx
111c35: 89 4c 24 24 mov %ecx,0x24(%esp)
uintptr_t const min_block_size = heap->min_block_size;
111c39: 8b 47 14 mov 0x14(%edi),%eax
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
111c3c: 8b 4f 30 mov 0x30(%edi),%ecx
111c3f: 89 4c 24 2c mov %ecx,0x2c(%esp)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
111c43: 8b 6c 24 74 mov 0x74(%esp),%ebp
111c47: 03 6c 24 78 add 0x78(%esp),%ebp
111c4b: 73 0b jae 111c58 <_Heap_Extend+0x48>
return false;
111c4d: 31 c0 xor %eax,%eax
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
111c4f: 83 c4 5c add $0x5c,%esp
111c52: 5b pop %ebx
111c53: 5e pop %esi
111c54: 5f pop %edi
111c55: 5d pop %ebp
111c56: c3 ret
111c57: 90 nop
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
111c58: 8d 54 24 4c lea 0x4c(%esp),%edx
111c5c: 89 54 24 14 mov %edx,0x14(%esp)
111c60: 8d 54 24 48 lea 0x48(%esp),%edx
111c64: 89 54 24 10 mov %edx,0x10(%esp)
111c68: 89 44 24 0c mov %eax,0xc(%esp)
111c6c: 8b 4c 24 24 mov 0x24(%esp),%ecx
111c70: 89 4c 24 08 mov %ecx,0x8(%esp)
111c74: 8b 44 24 78 mov 0x78(%esp),%eax
111c78: 89 44 24 04 mov %eax,0x4(%esp)
111c7c: 8b 4c 24 74 mov 0x74(%esp),%ecx
111c80: 89 0c 24 mov %ecx,(%esp)
111c83: e8 80 ad ff ff call 10ca08 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
111c88: 84 c0 test %al,%al
111c8a: 74 c1 je 111c4d <_Heap_Extend+0x3d>
111c8c: 8b 5c 24 28 mov 0x28(%esp),%ebx
111c90: c7 44 24 34 00 00 00 movl $0x0,0x34(%esp)
111c97: 00
111c98: c7 44 24 38 00 00 00 movl $0x0,0x38(%esp)
111c9f: 00
111ca0: c7 44 24 20 00 00 00 movl $0x0,0x20(%esp)
111ca7: 00
111ca8: c7 44 24 30 00 00 00 movl $0x0,0x30(%esp)
111caf: 00
111cb0: 89 7c 24 3c mov %edi,0x3c(%esp)
111cb4: eb 28 jmp 111cde <_Heap_Extend+0xce>
111cb6: 66 90 xchg %ax,%ax
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
111cb8: 39 cd cmp %ecx,%ebp
111cba: 73 04 jae 111cc0 <_Heap_Extend+0xb0>
111cbc: 89 5c 24 38 mov %ebx,0x38(%esp)
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
111cc0: 3b 4c 24 74 cmp 0x74(%esp),%ecx
111cc4: 74 4f je 111d15 <_Heap_Extend+0x105>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
111cc6: 39 4c 24 74 cmp %ecx,0x74(%esp)
111cca: 76 04 jbe 111cd0 <_Heap_Extend+0xc0>
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 )
111ccc: 89 74 24 34 mov %esi,0x34(%esp)
- 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;
111cd0: 8b 5e 04 mov 0x4(%esi),%ebx
111cd3: 83 e3 fe and $0xfffffffe,%ebx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
111cd6: 01 f3 add %esi,%ebx
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
111cd8: 39 5c 24 28 cmp %ebx,0x28(%esp)
111cdc: 74 4b je 111d29 <_Heap_Extend+0x119>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
111cde: 3b 5c 24 28 cmp 0x28(%esp),%ebx
111ce2: 0f 84 40 01 00 00 je 111e28 <_Heap_Extend+0x218>
111ce8: 89 df mov %ebx,%edi
uintptr_t const sub_area_end = start_block->prev_size;
111cea: 8b 0b mov (%ebx),%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111cec: 8d 71 f8 lea -0x8(%ecx),%esi
111cef: 89 c8 mov %ecx,%eax
111cf1: 31 d2 xor %edx,%edx
111cf3: f7 74 24 24 divl 0x24(%esp)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
111cf7: 29 d6 sub %edx,%esi
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
111cf9: 39 4c 24 74 cmp %ecx,0x74(%esp)
111cfd: 73 08 jae 111d07 <_Heap_Extend+0xf7>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
111cff: 39 ef cmp %ebp,%edi
111d01: 0f 82 46 ff ff ff jb 111c4d <_Heap_Extend+0x3d>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
111d07: 39 ef cmp %ebp,%edi
111d09: 75 ad jne 111cb8 <_Heap_Extend+0xa8>
111d0b: 89 5c 24 30 mov %ebx,0x30(%esp)
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
111d0f: 3b 4c 24 74 cmp 0x74(%esp),%ecx
111d13: 75 b1 jne 111cc6 <_Heap_Extend+0xb6> <== ALWAYS TAKEN
start_block->prev_size = extend_area_end;
111d15: 89 2b mov %ebp,(%ebx)
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 )
111d17: 89 74 24 20 mov %esi,0x20(%esp)
- 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;
111d1b: 8b 5e 04 mov 0x4(%esi),%ebx
111d1e: 83 e3 fe and $0xfffffffe,%ebx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
111d21: 01 f3 add %esi,%ebx
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
111d23: 39 5c 24 28 cmp %ebx,0x28(%esp)
111d27: 75 b5 jne 111cde <_Heap_Extend+0xce> <== NEVER TAKEN
111d29: 8b 7c 24 3c mov 0x3c(%esp),%edi
if ( extend_area_begin < heap->area_begin ) {
111d2d: 8b 4c 24 74 mov 0x74(%esp),%ecx
111d31: 3b 4f 18 cmp 0x18(%edi),%ecx
111d34: 0f 82 fa 00 00 00 jb 111e34 <_Heap_Extend+0x224>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
111d3a: 3b 6f 1c cmp 0x1c(%edi),%ebp
111d3d: 76 03 jbe 111d42 <_Heap_Extend+0x132>
heap->area_end = extend_area_end;
111d3f: 89 6f 1c mov %ebp,0x1c(%edi)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
111d42: 8b 54 24 4c mov 0x4c(%esp),%edx
111d46: 8b 44 24 48 mov 0x48(%esp),%eax
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
111d4a: 89 d1 mov %edx,%ecx
111d4c: 29 c1 sub %eax,%ecx
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
111d4e: 89 28 mov %ebp,(%eax)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
111d50: 89 cb mov %ecx,%ebx
111d52: 83 cb 01 or $0x1,%ebx
111d55: 89 58 04 mov %ebx,0x4(%eax)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
111d58: 89 0a mov %ecx,(%edx)
extend_last_block->size_and_flag = 0;
111d5a: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
111d61: 39 47 20 cmp %eax,0x20(%edi)
111d64: 0f 86 d2 00 00 00 jbe 111e3c <_Heap_Extend+0x22c>
heap->first_block = extend_first_block;
111d6a: 89 47 20 mov %eax,0x20(%edi)
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
111d6d: 8b 44 24 30 mov 0x30(%esp),%eax
111d71: 85 c0 test %eax,%eax
111d73: 0f 84 d7 00 00 00 je 111e50 <_Heap_Extend+0x240>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
111d79: 8b 4f 10 mov 0x10(%edi),%ecx
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
111d7c: 8b 5c 24 74 mov 0x74(%esp),%ebx
111d80: 83 c3 08 add $0x8,%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
111d83: 89 d8 mov %ebx,%eax
111d85: 31 d2 xor %edx,%edx
111d87: f7 f1 div %ecx
if ( remainder != 0 ) {
111d89: 85 d2 test %edx,%edx
111d8b: 74 04 je 111d91 <_Heap_Extend+0x181>
return value - remainder + alignment;
111d8d: 01 cb add %ecx,%ebx
111d8f: 29 d3 sub %edx,%ebx
uintptr_t const new_first_block_begin =
111d91: 8d 53 f8 lea -0x8(%ebx),%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;
111d94: 8b 4c 24 30 mov 0x30(%esp),%ecx
111d98: 8b 01 mov (%ecx),%eax
111d9a: 89 43 f8 mov %eax,-0x8(%ebx)
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 =
111d9d: 89 c8 mov %ecx,%eax
111d9f: 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;
111da1: 83 c8 01 or $0x1,%eax
111da4: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
111da7: 89 f8 mov %edi,%eax
111da9: e8 46 fe ff ff call 111bf4 <_Heap_Free_block>
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
111dae: 8b 5c 24 20 mov 0x20(%esp),%ebx
111db2: 85 db test %ebx,%ebx
111db4: 0f 84 b6 00 00 00 je 111e70 <_Heap_Extend+0x260>
)
{
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,
111dba: 8d 4d f8 lea -0x8(%ebp),%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(
111dbd: 2b 4c 24 20 sub 0x20(%esp),%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111dc1: 89 c8 mov %ecx,%eax
111dc3: 31 d2 xor %edx,%edx
111dc5: f7 77 10 divl 0x10(%edi)
111dc8: 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)
111dca: 8b 54 24 20 mov 0x20(%esp),%edx
111dce: 8b 42 04 mov 0x4(%edx),%eax
111dd1: 29 c8 sub %ecx,%eax
| HEAP_PREV_BLOCK_USED;
111dd3: 83 c8 01 or $0x1,%eax
111dd6: 89 44 11 04 mov %eax,0x4(%ecx,%edx,1)
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
111dda: 8b 42 04 mov 0x4(%edx),%eax
111ddd: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
111de0: 09 c8 or %ecx,%eax
111de2: 89 42 04 mov %eax,0x4(%edx)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
111de5: 89 f8 mov %edi,%eax
111de7: e8 08 fe ff ff call 111bf4 <_Heap_Free_block>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
111dec: 8b 57 24 mov 0x24(%edi),%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;
111def: 8b 42 04 mov 0x4(%edx),%eax
111df2: 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(
111df5: 8b 4f 20 mov 0x20(%edi),%ecx
111df8: 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;
111dfa: 09 c8 or %ecx,%eax
111dfc: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
111dff: 8b 47 30 mov 0x30(%edi),%eax
111e02: 2b 44 24 2c sub 0x2c(%esp),%eax
/* Statistics */
stats->size += extended_size;
111e06: 01 47 2c add %eax,0x2c(%edi)
if ( extended_size_ptr != NULL )
111e09: 8b 54 24 7c mov 0x7c(%esp),%edx
111e0d: 85 d2 test %edx,%edx
111e0f: 0f 84 a3 00 00 00 je 111eb8 <_Heap_Extend+0x2a8> <== NEVER TAKEN
*extended_size_ptr = extended_size;
111e15: 8b 4c 24 7c mov 0x7c(%esp),%ecx
111e19: 89 01 mov %eax,(%ecx)
return true;
111e1b: b0 01 mov $0x1,%al
}
111e1d: 83 c4 5c add $0x5c,%esp
111e20: 5b pop %ebx
111e21: 5e pop %esi
111e22: 5f pop %edi
111e23: 5d pop %ebp
111e24: c3 ret
111e25: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
111e28: 8b 4c 24 3c mov 0x3c(%esp),%ecx
111e2c: 8b 79 18 mov 0x18(%ecx),%edi
111e2f: e9 b6 fe ff ff jmp 111cea <_Heap_Extend+0xda>
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
111e34: 89 4f 18 mov %ecx,0x18(%edi)
111e37: e9 06 ff ff ff jmp 111d42 <_Heap_Extend+0x132>
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
111e3c: 39 57 24 cmp %edx,0x24(%edi)
111e3f: 0f 83 28 ff ff ff jae 111d6d <_Heap_Extend+0x15d>
heap->last_block = extend_last_block;
111e45: 89 57 24 mov %edx,0x24(%edi)
111e48: e9 20 ff ff ff jmp 111d6d <_Heap_Extend+0x15d>
111e4d: 8d 76 00 lea 0x0(%esi),%esi
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
111e50: 8b 74 24 38 mov 0x38(%esp),%esi
111e54: 85 f6 test %esi,%esi
111e56: 0f 84 52 ff ff ff je 111dae <_Heap_Extend+0x19e>
{
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;
111e5c: 8b 44 24 38 mov 0x38(%esp),%eax
111e60: 29 d0 sub %edx,%eax
111e62: 83 c8 01 or $0x1,%eax
111e65: 89 42 04 mov %eax,0x4(%edx)
111e68: e9 41 ff ff ff jmp 111dae <_Heap_Extend+0x19e>
111e6d: 8d 76 00 lea 0x0(%esi),%esi
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
111e70: 8b 4c 24 34 mov 0x34(%esp),%ecx
111e74: 85 c9 test %ecx,%ecx
111e76: 74 23 je 111e9b <_Heap_Extend+0x28b>
_Heap_Link_above(
111e78: 8b 4c 24 4c mov 0x4c(%esp),%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;
111e7c: 8b 54 24 34 mov 0x34(%esp),%edx
111e80: 8b 42 04 mov 0x4(%edx),%eax
111e83: 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 );
111e86: 8b 54 24 48 mov 0x48(%esp),%edx
111e8a: 2b 54 24 34 sub 0x34(%esp),%edx
block->size_and_flag = size | flag;
111e8e: 09 d0 or %edx,%eax
111e90: 8b 54 24 34 mov 0x34(%esp),%edx
111e94: 89 42 04 mov %eax,0x4(%edx)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
111e97: 83 49 04 01 orl $0x1,0x4(%ecx)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
111e9b: 83 7c 24 30 00 cmpl $0x0,0x30(%esp)
111ea0: 0f 85 46 ff ff ff jne 111dec <_Heap_Extend+0x1dc>
_Heap_Free_block( heap, extend_first_block );
111ea6: 8b 54 24 48 mov 0x48(%esp),%edx
111eaa: 89 f8 mov %edi,%eax
111eac: e8 43 fd ff ff call 111bf4 <_Heap_Free_block>
111eb1: e9 36 ff ff ff jmp 111dec <_Heap_Extend+0x1dc>
111eb6: 66 90 xchg %ax,%ax
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
111eb8: b0 01 mov $0x1,%al <== NOT EXECUTED
111eba: e9 90 fd ff ff jmp 111c4f <_Heap_Extend+0x3f> <== NOT EXECUTED
00111bc4 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
111bc4: 55 push %ebp
111bc5: 57 push %edi
111bc6: 56 push %esi
111bc7: 53 push %ebx
111bc8: 83 ec 0c sub $0xc,%esp
111bcb: 8b 4c 24 20 mov 0x20(%esp),%ecx
111bcf: 8b 44 24 24 mov 0x24(%esp),%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 ) {
111bd3: 85 c0 test %eax,%eax
111bd5: 0f 84 a1 00 00 00 je 111c7c <_Heap_Free+0xb8>
111bdb: 8d 58 f8 lea -0x8(%eax),%ebx
111bde: 31 d2 xor %edx,%edx
111be0: 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);
111be3: 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
111be5: 8b 41 20 mov 0x20(%ecx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
111be8: 39 c3 cmp %eax,%ebx
111bea: 72 1c jb 111c08 <_Heap_Free+0x44>
111bec: 8b 71 24 mov 0x24(%ecx),%esi
111bef: 39 f3 cmp %esi,%ebx
111bf1: 77 15 ja 111c08 <_Heap_Free+0x44>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111bf3: 8b 53 04 mov 0x4(%ebx),%edx
111bf6: 89 14 24 mov %edx,(%esp)
- 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;
111bf9: 89 d7 mov %edx,%edi
111bfb: 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);
111bfe: 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;
111c01: 39 d0 cmp %edx,%eax
111c03: 76 0f jbe 111c14 <_Heap_Free+0x50> <== ALWAYS TAKEN
111c05: 8d 76 00 lea 0x0(%esi),%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;
111c08: 31 c0 xor %eax,%eax
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111c0a: 83 c4 0c add $0xc,%esp
111c0d: 5b pop %ebx
111c0e: 5e pop %esi
111c0f: 5f pop %edi
111c10: 5d pop %ebp
111c11: c3 ret
111c12: 66 90 xchg %ax,%ax
111c14: 39 d6 cmp %edx,%esi
111c16: 72 f0 jb 111c08 <_Heap_Free+0x44> <== NEVER TAKEN
111c18: 8b 6a 04 mov 0x4(%edx),%ebp
111c1b: 89 6c 24 04 mov %ebp,0x4(%esp)
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
111c1f: 83 e5 01 and $0x1,%ebp
111c22: 74 e4 je 111c08 <_Heap_Free+0x44> <== 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;
111c24: 8b 6c 24 04 mov 0x4(%esp),%ebp
111c28: 83 e5 fe and $0xfffffffe,%ebp
111c2b: 89 6c 24 04 mov %ebp,0x4(%esp)
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
111c2f: 39 d6 cmp %edx,%esi
111c31: 74 53 je 111c86 <_Heap_Free+0xc2>
111c33: f6 44 2a 04 01 testb $0x1,0x4(%edx,%ebp,1)
111c38: 75 4c jne 111c86 <_Heap_Free+0xc2>
if ( !_Heap_Is_prev_used( block ) ) {
111c3a: f6 04 24 01 testb $0x1,(%esp)
111c3e: 0f 84 df 00 00 00 je 111d23 <_Heap_Free+0x15f>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
111c44: 8b 6c 24 04 mov 0x4(%esp),%ebp
111c48: 01 fd add %edi,%ebp
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111c4a: 8b 72 08 mov 0x8(%edx),%esi
111c4d: 8b 42 0c mov 0xc(%edx),%eax
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
111c50: 89 73 08 mov %esi,0x8(%ebx)
new_block->prev = prev;
111c53: 89 43 0c mov %eax,0xc(%ebx)
next->prev = new_block;
111c56: 89 5e 0c mov %ebx,0xc(%esi)
prev->next = new_block;
111c59: 89 58 08 mov %ebx,0x8(%eax)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
111c5c: 89 e8 mov %ebp,%eax
111c5e: 83 c8 01 or $0x1,%eax
111c61: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
111c64: 89 6c 1d 00 mov %ebp,0x0(%ebp,%ebx,1)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
111c68: ff 49 40 decl 0x40(%ecx)
++stats->frees;
111c6b: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
111c6e: 01 79 30 add %edi,0x30(%ecx)
return( true );
111c71: b0 01 mov $0x1,%al
}
111c73: 83 c4 0c add $0xc,%esp
111c76: 5b pop %ebx
111c77: 5e pop %esi
111c78: 5f pop %edi
111c79: 5d pop %ebp
111c7a: c3 ret
111c7b: 90 nop
* 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;
111c7c: b0 01 mov $0x1,%al
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111c7e: 83 c4 0c add $0xc,%esp
111c81: 5b pop %ebx
111c82: 5e pop %esi
111c83: 5f pop %edi
111c84: 5d pop %ebp
111c85: c3 ret
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
111c86: f6 04 24 01 testb $0x1,(%esp)
111c8a: 75 4d jne 111cd9 <_Heap_Free+0x115>
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
111c8c: c6 44 24 0b 00 movb $0x0,0xb(%esp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
uintptr_t const prev_size = block->prev_size;
111c91: 8b 2b mov (%ebx),%ebp
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
111c93: 29 eb sub %ebp,%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;
111c95: 39 d8 cmp %ebx,%eax
111c97: 0f 87 6b ff ff ff ja 111c08 <_Heap_Free+0x44> <== NEVER TAKEN
111c9d: 39 de cmp %ebx,%esi
111c9f: 0f 82 63 ff ff ff jb 111c08 <_Heap_Free+0x44> <== 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) ) {
111ca5: f6 43 04 01 testb $0x1,0x4(%ebx)
111ca9: 0f 84 59 ff ff ff je 111c08 <_Heap_Free+0x44> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
111caf: 01 fd add %edi,%ebp
if ( !_Heap_Is_prev_used ( prev_block) ) {
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
111cb1: 80 7c 24 0b 00 cmpb $0x0,0xb(%esp)
111cb6: 74 58 je 111d10 <_Heap_Free+0x14c>
uintptr_t const size = block_size + prev_size + next_block_size;
111cb8: 03 6c 24 04 add 0x4(%esp),%ebp
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111cbc: 8b 42 08 mov 0x8(%edx),%eax
111cbf: 8b 52 0c mov 0xc(%edx),%edx
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
111cc2: 89 42 08 mov %eax,0x8(%edx)
next->prev = prev;
111cc5: 89 50 0c mov %edx,0xc(%eax)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
111cc8: ff 49 38 decl 0x38(%ecx)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
111ccb: 89 e8 mov %ebp,%eax
111ccd: 83 c8 01 or $0x1,%eax
111cd0: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
111cd3: 89 6c 1d 00 mov %ebp,0x0(%ebp,%ebx,1)
111cd7: eb 8f jmp 111c68 <_Heap_Free+0xa4>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
111cd9: 8b 41 08 mov 0x8(%ecx),%eax
new_block->next = next;
111cdc: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = block_before;
111cdf: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
111ce2: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
111ce5: 89 58 0c mov %ebx,0xc(%eax)
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
111ce8: 89 f8 mov %edi,%eax
111cea: 83 c8 01 or $0x1,%eax
111ced: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
111cf0: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
111cf4: 89 3a mov %edi,(%edx)
/* Statistics */
++stats->free_blocks;
111cf6: 8b 41 38 mov 0x38(%ecx),%eax
111cf9: 40 inc %eax
111cfa: 89 41 38 mov %eax,0x38(%ecx)
if ( stats->max_free_blocks < stats->free_blocks ) {
111cfd: 3b 41 3c cmp 0x3c(%ecx),%eax
111d00: 0f 86 62 ff ff ff jbe 111c68 <_Heap_Free+0xa4>
stats->max_free_blocks = stats->free_blocks;
111d06: 89 41 3c mov %eax,0x3c(%ecx)
111d09: e9 5a ff ff ff jmp 111c68 <_Heap_Free+0xa4>
111d0e: 66 90 xchg %ax,%ax
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;
111d10: 89 e8 mov %ebp,%eax
111d12: 83 c8 01 or $0x1,%eax
111d15: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
111d18: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
111d1c: 89 2a mov %ebp,(%edx)
111d1e: e9 45 ff ff ff jmp 111c68 <_Heap_Free+0xa4>
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
111d23: c6 44 24 0b 01 movb $0x1,0xb(%esp)
111d28: e9 64 ff ff ff jmp 111c91 <_Heap_Free+0xcd>
00115d34 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
115d34: 55 push %ebp
115d35: 57 push %edi
115d36: 56 push %esi
115d37: 53 push %ebx
115d38: 8b 6c 24 14 mov 0x14(%esp),%ebp
115d3c: 8b 7c 24 18 mov 0x18(%esp),%edi
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
115d40: c7 07 00 00 00 00 movl $0x0,(%edi)
info->largest = 0;
115d46: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
info->total = 0;
115d4d: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
115d54: 8b 55 08 mov 0x8(%ebp),%edx
for(the_block = _Heap_Free_list_first(the_heap);
115d57: 39 d5 cmp %edx,%ebp
115d59: 74 30 je 115d8b <_Heap_Get_free_information+0x57><== NEVER TAKEN
115d5b: bb 01 00 00 00 mov $0x1,%ebx
115d60: 31 f6 xor %esi,%esi
115d62: 31 c9 xor %ecx,%ecx
115d64: eb 07 jmp 115d6d <_Heap_Get_free_information+0x39>
115d66: 66 90 xchg %ax,%ax
115d68: 8b 77 04 mov 0x4(%edi),%esi
115d6b: 89 c3 mov %eax,%ebx
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
115d6d: 8b 42 04 mov 0x4(%edx),%eax
115d70: 83 e0 fe and $0xfffffffe,%eax
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
115d73: 01 c1 add %eax,%ecx
if ( info->largest < the_size )
115d75: 39 f0 cmp %esi,%eax
115d77: 76 03 jbe 115d7c <_Heap_Get_free_information+0x48>
info->largest = the_size;
115d79: 89 47 04 mov %eax,0x4(%edi)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
115d7c: 8b 52 08 mov 0x8(%edx),%edx
115d7f: 8d 43 01 lea 0x1(%ebx),%eax
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
115d82: 39 d5 cmp %edx,%ebp
115d84: 75 e2 jne 115d68 <_Heap_Get_free_information+0x34>
115d86: 89 1f mov %ebx,(%edi)
115d88: 89 4f 08 mov %ecx,0x8(%edi)
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
115d8b: 5b pop %ebx
115d8c: 5e pop %esi
115d8d: 5f pop %edi
115d8e: 5d pop %ebp
115d8f: c3 ret
0010e864 <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
10e864: 55 push %ebp
10e865: 57 push %edi
10e866: 56 push %esi
10e867: 53 push %ebx
10e868: 83 ec 1c sub $0x1c,%esp
10e86b: 8b 5c 24 30 mov 0x30(%esp),%ebx
10e86f: 8b 7c 24 34 mov 0x34(%esp),%edi
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
10e873: 8b 44 24 38 mov 0x38(%esp),%eax
10e877: 85 c0 test %eax,%eax
10e879: 0f 84 9f 00 00 00 je 10e91e <_Heap_Greedy_allocate+0xba>
10e87f: 31 ed xor %ebp,%ebp
10e881: 31 f6 xor %esi,%esi
10e883: 90 nop
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and
* boundary equals zero.
*/
RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size )
{
return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
10e884: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10e88b: 00
10e88c: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10e893: 00
10e894: 8b 04 af mov (%edi,%ebp,4),%eax
10e897: 89 44 24 04 mov %eax,0x4(%esp)
10e89b: 89 1c 24 mov %ebx,(%esp)
10e89e: e8 21 77 00 00 call 115fc4 <_Heap_Allocate_aligned_with_boundary>
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
10e8a3: 85 c0 test %eax,%eax
10e8a5: 74 0f je 10e8b6 <_Heap_Greedy_allocate+0x52><== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10e8a7: 8d 48 f8 lea -0x8(%eax),%ecx
10e8aa: 31 d2 xor %edx,%edx
10e8ac: 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);
10e8af: 29 d1 sub %edx,%ecx
Heap_Block *next_block = _Heap_Block_of_alloc_area(
(uintptr_t) next,
heap->page_size
);
next_block->next = allocated_blocks;
10e8b1: 89 71 08 mov %esi,0x8(%ecx)
10e8b4: 89 ce mov %ecx,%esi
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
10e8b6: 45 inc %ebp
10e8b7: 3b 6c 24 38 cmp 0x38(%esp),%ebp
10e8bb: 75 c7 jne 10e884 <_Heap_Greedy_allocate+0x20>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10e8bd: 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 ) {
10e8c0: 39 fb cmp %edi,%ebx
10e8c2: 74 5e je 10e922 <_Heap_Greedy_allocate+0xbe><== NEVER TAKEN
10e8c4: 31 ed xor %ebp,%ebp
10e8c6: eb 02 jmp 10e8ca <_Heap_Greedy_allocate+0x66>
10e8c8: 89 c7 mov %eax,%edi
- 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;
10e8ca: 8b 47 04 mov 0x4(%edi),%eax
10e8cd: 83 e0 fe and $0xfffffffe,%eax
_Heap_Block_allocate(
10e8d0: 83 e8 08 sub $0x8,%eax
10e8d3: 89 44 24 0c mov %eax,0xc(%esp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10e8d7: 8d 47 08 lea 0x8(%edi),%eax
10e8da: 89 44 24 08 mov %eax,0x8(%esp)
10e8de: 89 7c 24 04 mov %edi,0x4(%esp)
10e8e2: 89 1c 24 mov %ebx,(%esp)
10e8e5: e8 ce 02 00 00 call 10ebb8 <_Heap_Block_allocate>
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
10e8ea: 89 6f 08 mov %ebp,0x8(%edi)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10e8ed: 8b 43 08 mov 0x8(%ebx),%eax
10e8f0: 89 fd mov %edi,%ebp
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
10e8f2: 39 c3 cmp %eax,%ebx
10e8f4: 75 d2 jne 10e8c8 <_Heap_Greedy_allocate+0x64>
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
10e8f6: 85 f6 test %esi,%esi
10e8f8: 74 1a je 10e914 <_Heap_Greedy_allocate+0xb0>
10e8fa: 66 90 xchg %ax,%ax
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
10e8fc: 8b 6e 08 mov 0x8(%esi),%ebp
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10e8ff: 83 c6 08 add $0x8,%esi
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
10e902: 89 74 24 04 mov %esi,0x4(%esp)
10e906: 89 1c 24 mov %ebx,(%esp)
10e909: e8 92 78 00 00 call 1161a0 <_Heap_Free>
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
10e90e: 89 ee mov %ebp,%esi
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
10e910: 85 f6 test %esi,%esi
10e912: 75 e8 jne 10e8fc <_Heap_Greedy_allocate+0x98>
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
return blocks;
}
10e914: 89 f8 mov %edi,%eax
10e916: 83 c4 1c add $0x1c,%esp
10e919: 5b pop %ebx
10e91a: 5e pop %esi
10e91b: 5f pop %edi
10e91c: 5d pop %ebp
10e91d: c3 ret
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;
10e91e: 31 f6 xor %esi,%esi
10e920: eb 9b jmp 10e8bd <_Heap_Greedy_allocate+0x59>
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
10e922: 31 ff xor %edi,%edi <== NOT EXECUTED
10e924: eb ea jmp 10e910 <_Heap_Greedy_allocate+0xac><== NOT EXECUTED
0010e928 <_Heap_Greedy_free>:
void _Heap_Greedy_free(
Heap_Control *heap,
Heap_Block *blocks
)
{
10e928: 56 push %esi
10e929: 53 push %ebx
10e92a: 83 ec 14 sub $0x14,%esp
10e92d: 8b 74 24 20 mov 0x20(%esp),%esi
10e931: 8b 44 24 24 mov 0x24(%esp),%eax
while ( blocks != NULL ) {
10e935: 85 c0 test %eax,%eax
10e937: 74 1b je 10e954 <_Heap_Greedy_free+0x2c><== NEVER TAKEN
10e939: 8d 76 00 lea 0x0(%esi),%esi
Heap_Block *current = blocks;
blocks = blocks->next;
10e93c: 8b 58 08 mov 0x8(%eax),%ebx
10e93f: 83 c0 08 add $0x8,%eax
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
10e942: 89 44 24 04 mov %eax,0x4(%esp)
10e946: 89 34 24 mov %esi,(%esp)
10e949: e8 52 78 00 00 call 1161a0 <_Heap_Free>
)
{
while ( blocks != NULL ) {
Heap_Block *current = blocks;
blocks = blocks->next;
10e94e: 89 d8 mov %ebx,%eax
void _Heap_Greedy_free(
Heap_Control *heap,
Heap_Block *blocks
)
{
while ( blocks != NULL ) {
10e950: 85 db test %ebx,%ebx
10e952: 75 e8 jne 10e93c <_Heap_Greedy_free+0x14>
Heap_Block *current = blocks;
blocks = blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
}
10e954: 83 c4 14 add $0x14,%esp
10e957: 5b pop %ebx
10e958: 5e pop %esi
10e959: c3 ret
00115de4 <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
115de4: 55 push %ebp
115de5: 57 push %edi
115de6: 56 push %esi
115de7: 53 push %ebx
115de8: 83 ec 1c sub $0x1c,%esp
115deb: 8b 54 24 30 mov 0x30(%esp),%edx
115def: 8b 7c 24 34 mov 0x34(%esp),%edi
115df3: 8b 74 24 38 mov 0x38(%esp),%esi
Heap_Block *current = heap->first_block;
115df7: 8b 42 20 mov 0x20(%edx),%eax
Heap_Block *end = heap->last_block;
115dfa: 8b 5a 24 mov 0x24(%edx),%ebx
bool stop = false;
while ( !stop && current != end ) {
115dfd: 39 d8 cmp %ebx,%eax
115dff: 75 09 jne 115e0a <_Heap_Iterate+0x26> <== ALWAYS TAKEN
115e01: eb 2b jmp 115e2e <_Heap_Iterate+0x4a> <== NOT EXECUTED
115e03: 90 nop <== NOT EXECUTED
115e04: 89 e8 mov %ebp,%eax
115e06: 39 eb cmp %ebp,%ebx
115e08: 74 24 je 115e2e <_Heap_Iterate+0x4a>
115e0a: 8b 50 04 mov 0x4(%eax),%edx
115e0d: 83 e2 fe and $0xfffffffe,%edx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
115e10: 8d 2c 10 lea (%eax,%edx,1),%ebp
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 );
115e13: 89 74 24 0c mov %esi,0xc(%esp)
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;
115e17: 8b 4d 04 mov 0x4(%ebp),%ecx
115e1a: 83 e1 01 and $0x1,%ecx
115e1d: 89 4c 24 08 mov %ecx,0x8(%esp)
115e21: 89 54 24 04 mov %edx,0x4(%esp)
115e25: 89 04 24 mov %eax,(%esp)
115e28: ff d7 call *%edi
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
115e2a: 84 c0 test %al,%al
115e2c: 74 d6 je 115e04 <_Heap_Iterate+0x20> <== ALWAYS TAKEN
stop = (*visitor)( current, size, used, visitor_arg );
current = next;
}
}
115e2e: 83 c4 1c add $0x1c,%esp
115e31: 5b pop %ebx
115e32: 5e pop %esi
115e33: 5f pop %edi
115e34: 5d pop %ebp
115e35: c3 ret
00111e3c <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
111e3c: 56 push %esi
111e3d: 53 push %ebx
111e3e: 8b 5c 24 0c mov 0xc(%esp),%ebx
111e42: 8b 74 24 10 mov 0x10(%esp),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111e46: 8d 4e f8 lea -0x8(%esi),%ecx
111e49: 89 f0 mov %esi,%eax
111e4b: 31 d2 xor %edx,%edx
111e4d: 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);
111e50: 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
111e52: 8b 43 20 mov 0x20(%ebx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
111e55: 39 c1 cmp %eax,%ecx
111e57: 72 07 jb 111e60 <_Heap_Size_of_alloc_area+0x24>
111e59: 8b 53 24 mov 0x24(%ebx),%edx
111e5c: 39 d1 cmp %edx,%ecx
111e5e: 76 08 jbe 111e68 <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN
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;
111e60: 31 c0 xor %eax,%eax
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
111e62: 5b pop %ebx
111e63: 5e pop %esi
111e64: c3 ret
111e65: 8d 76 00 lea 0x0(%esi),%esi
- 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;
111e68: 8b 59 04 mov 0x4(%ecx),%ebx
111e6b: 83 e3 fe and $0xfffffffe,%ebx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
111e6e: 01 d9 add %ebx,%ecx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
111e70: 39 c8 cmp %ecx,%eax
111e72: 77 ec ja 111e60 <_Heap_Size_of_alloc_area+0x24><== NEVER TAKEN
111e74: 39 ca cmp %ecx,%edx
111e76: 72 e8 jb 111e60 <_Heap_Size_of_alloc_area+0x24><== NEVER TAKEN
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
111e78: f6 41 04 01 testb $0x1,0x4(%ecx)
111e7c: 74 e2 je 111e60 <_Heap_Size_of_alloc_area+0x24><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
111e7e: 29 f1 sub %esi,%ecx
111e80: 8d 51 04 lea 0x4(%ecx),%edx
111e83: 8b 44 24 14 mov 0x14(%esp),%eax
111e87: 89 10 mov %edx,(%eax)
return true;
111e89: b0 01 mov $0x1,%al
}
111e8b: 5b pop %ebx
111e8c: 5e pop %esi
111e8d: c3 ret
0010d508 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10d508: 55 push %ebp
10d509: 57 push %edi
10d50a: 56 push %esi
10d50b: 53 push %ebx
10d50c: 83 ec 5c sub $0x5c,%esp
10d50f: 8b 5c 24 70 mov 0x70(%esp),%ebx
uintptr_t const page_size = heap->page_size;
10d513: 8b 4b 10 mov 0x10(%ebx),%ecx
10d516: 89 4c 24 30 mov %ecx,0x30(%esp)
uintptr_t const min_block_size = heap->min_block_size;
10d51a: 8b 43 14 mov 0x14(%ebx),%eax
10d51d: 89 44 24 38 mov %eax,0x38(%esp)
Heap_Block *const first_block = heap->first_block;
10d521: 8b 4b 20 mov 0x20(%ebx),%ecx
10d524: 89 4c 24 34 mov %ecx,0x34(%esp)
Heap_Block *const last_block = heap->last_block;
10d528: 8b 4b 24 mov 0x24(%ebx),%ecx
10d52b: 89 4c 24 3c mov %ecx,0x3c(%esp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d52f: 80 7c 24 78 00 cmpb $0x0,0x78(%esp)
10d534: 74 1a je 10d550 <_Heap_Walk+0x48>
10d536: bd c0 d4 10 00 mov $0x10d4c0,%ebp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d53b: 83 3d a0 38 13 00 03 cmpl $0x3,0x1338a0
10d542: 74 1a je 10d55e <_Heap_Walk+0x56> <== ALWAYS TAKEN
}
block = next_block;
} while ( block != first_block );
return true;
10d544: b0 01 mov $0x1,%al
}
10d546: 83 c4 5c add $0x5c,%esp
10d549: 5b pop %ebx
10d54a: 5e pop %esi
10d54b: 5f pop %edi
10d54c: 5d pop %ebp
10d54d: c3 ret
10d54e: 66 90 xchg %ax,%ax
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d550: bd bc d4 10 00 mov $0x10d4bc,%ebp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d555: 83 3d a0 38 13 00 03 cmpl $0x3,0x1338a0
10d55c: 75 e6 jne 10d544 <_Heap_Walk+0x3c>
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)(
10d55e: 8b 43 0c mov 0xc(%ebx),%eax
10d561: 89 44 24 28 mov %eax,0x28(%esp)
10d565: 8b 43 08 mov 0x8(%ebx),%eax
10d568: 89 44 24 24 mov %eax,0x24(%esp)
10d56c: 8b 4c 24 3c mov 0x3c(%esp),%ecx
10d570: 89 4c 24 20 mov %ecx,0x20(%esp)
10d574: 8b 4c 24 34 mov 0x34(%esp),%ecx
10d578: 89 4c 24 1c mov %ecx,0x1c(%esp)
10d57c: 8b 43 1c mov 0x1c(%ebx),%eax
10d57f: 89 44 24 18 mov %eax,0x18(%esp)
10d583: 8b 43 18 mov 0x18(%ebx),%eax
10d586: 89 44 24 14 mov %eax,0x14(%esp)
10d58a: 8b 44 24 38 mov 0x38(%esp),%eax
10d58e: 89 44 24 10 mov %eax,0x10(%esp)
10d592: 8b 4c 24 30 mov 0x30(%esp),%ecx
10d596: 89 4c 24 0c mov %ecx,0xc(%esp)
10d59a: c7 44 24 08 10 3c 12 movl $0x123c10,0x8(%esp)
10d5a1: 00
10d5a2: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10d5a9: 00
10d5aa: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d5ae: 89 0c 24 mov %ecx,(%esp)
10d5b1: ff d5 call *%ebp
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
10d5b3: 8b 4c 24 30 mov 0x30(%esp),%ecx
10d5b7: 85 c9 test %ecx,%ecx
10d5b9: 0f 84 a1 00 00 00 je 10d660 <_Heap_Walk+0x158>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10d5bf: f6 44 24 30 03 testb $0x3,0x30(%esp)
10d5c4: 0f 85 b6 00 00 00 jne 10d680 <_Heap_Walk+0x178>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d5ca: 8b 44 24 38 mov 0x38(%esp),%eax
10d5ce: 31 d2 xor %edx,%edx
10d5d0: f7 74 24 30 divl 0x30(%esp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10d5d4: 85 d2 test %edx,%edx
10d5d6: 0f 85 cc 00 00 00 jne 10d6a8 <_Heap_Walk+0x1a0>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d5dc: 8b 44 24 34 mov 0x34(%esp),%eax
10d5e0: 83 c0 08 add $0x8,%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d5e3: 31 d2 xor %edx,%edx
10d5e5: f7 74 24 30 divl 0x30(%esp)
);
return false;
}
if (
10d5e9: 85 d2 test %edx,%edx
10d5eb: 0f 85 df 00 00 00 jne 10d6d0 <_Heap_Walk+0x1c8>
block = next_block;
} while ( block != first_block );
return true;
}
10d5f1: 8b 44 24 34 mov 0x34(%esp),%eax
10d5f5: 8b 48 04 mov 0x4(%eax),%ecx
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10d5f8: f6 c1 01 test $0x1,%cl
10d5fb: 0f 84 f7 00 00 00 je 10d6f8 <_Heap_Walk+0x1f0>
- 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;
10d601: 8b 54 24 3c mov 0x3c(%esp),%edx
10d605: 8b 42 04 mov 0x4(%edx),%eax
10d608: 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);
10d60b: 01 d0 add %edx,%eax
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10d60d: f6 40 04 01 testb $0x1,0x4(%eax)
10d611: 74 2d je 10d640 <_Heap_Walk+0x138>
);
return false;
}
if (
10d613: 39 44 24 34 cmp %eax,0x34(%esp)
10d617: 0f 84 fb 00 00 00 je 10d718 <_Heap_Walk+0x210>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10d61d: c7 44 24 08 2c 3d 12 movl $0x123d2c,0x8(%esp)
10d624: 00
10d625: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d62c: 00
10d62d: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d631: 89 0c 24 mov %ecx,(%esp)
10d634: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d636: 31 c0 xor %eax,%eax
block = next_block;
} while ( block != first_block );
return true;
}
10d638: 83 c4 5c add $0x5c,%esp
10d63b: 5b pop %ebx
10d63c: 5e pop %esi
10d63d: 5f pop %edi
10d63e: 5d pop %ebp
10d63f: c3 ret
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
10d640: c7 44 24 08 c5 3b 12 movl $0x123bc5,0x8(%esp)
10d647: 00
10d648: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d64f: 00
10d650: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d654: 89 0c 24 mov %ecx,(%esp)
10d657: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d659: 31 c0 xor %eax,%eax
10d65b: eb db jmp 10d638 <_Heap_Walk+0x130>
10d65d: 8d 76 00 lea 0x0(%esi),%esi
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
10d660: c7 44 24 08 94 3b 12 movl $0x123b94,0x8(%esp)
10d667: 00
10d668: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d66f: 00
10d670: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d674: 89 0c 24 mov %ecx,(%esp)
10d677: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d679: 31 c0 xor %eax,%eax
10d67b: eb bb jmp 10d638 <_Heap_Walk+0x130>
10d67d: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
10d680: 8b 4c 24 30 mov 0x30(%esp),%ecx
10d684: 89 4c 24 0c mov %ecx,0xc(%esp)
10d688: c7 44 24 08 a7 3b 12 movl $0x123ba7,0x8(%esp)
10d68f: 00
10d690: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d697: 00
10d698: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d69c: 89 0c 24 mov %ecx,(%esp)
10d69f: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d6a1: 31 c0 xor %eax,%eax
10d6a3: eb 93 jmp 10d638 <_Heap_Walk+0x130>
10d6a5: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
10d6a8: 8b 44 24 38 mov 0x38(%esp),%eax
10d6ac: 89 44 24 0c mov %eax,0xc(%esp)
10d6b0: c7 44 24 08 a4 3c 12 movl $0x123ca4,0x8(%esp)
10d6b7: 00
10d6b8: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d6bf: 00
10d6c0: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d6c4: 89 0c 24 mov %ecx,(%esp)
10d6c7: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d6c9: 31 c0 xor %eax,%eax
10d6cb: e9 68 ff ff ff jmp 10d638 <_Heap_Walk+0x130>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10d6d0: 8b 4c 24 34 mov 0x34(%esp),%ecx
10d6d4: 89 4c 24 0c mov %ecx,0xc(%esp)
10d6d8: c7 44 24 08 c8 3c 12 movl $0x123cc8,0x8(%esp)
10d6df: 00
10d6e0: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d6e7: 00
10d6e8: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d6ec: 89 0c 24 mov %ecx,(%esp)
10d6ef: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d6f1: 31 c0 xor %eax,%eax
10d6f3: e9 40 ff ff ff jmp 10d638 <_Heap_Walk+0x130>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
10d6f8: c7 44 24 08 fc 3c 12 movl $0x123cfc,0x8(%esp)
10d6ff: 00
10d700: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d707: 00
10d708: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d70c: 89 0c 24 mov %ecx,(%esp)
10d70f: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d711: 31 c0 xor %eax,%eax
10d713: e9 20 ff ff ff jmp 10d638 <_Heap_Walk+0x130>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10d718: 8b 43 10 mov 0x10(%ebx),%eax
10d71b: 89 44 24 40 mov %eax,0x40(%esp)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10d71f: 8b 73 08 mov 0x8(%ebx),%esi
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 ) {
10d722: 39 f3 cmp %esi,%ebx
10d724: 0f 84 f3 03 00 00 je 10db1d <_Heap_Walk+0x615>
block = next_block;
} while ( block != first_block );
return true;
}
10d72a: 8b 43 20 mov 0x20(%ebx),%eax
10d72d: 89 44 24 48 mov %eax,0x48(%esp)
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;
10d731: 39 f0 cmp %esi,%eax
10d733: 76 27 jbe 10d75c <_Heap_Walk+0x254> <== ALWAYS TAKEN
10d735: 8d 76 00 lea 0x0(%esi),%esi
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
10d738: 89 74 24 0c mov %esi,0xc(%esp)
10d73c: c7 44 24 08 5c 3d 12 movl $0x123d5c,0x8(%esp)
10d743: 00
10d744: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d74b: 00
10d74c: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d750: 89 0c 24 mov %ecx,(%esp)
10d753: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d755: 31 c0 xor %eax,%eax
10d757: e9 dc fe ff ff jmp 10d638 <_Heap_Walk+0x130>
10d75c: 8b 53 24 mov 0x24(%ebx),%edx
10d75f: 89 54 24 44 mov %edx,0x44(%esp)
10d763: 39 f2 cmp %esi,%edx
10d765: 72 d1 jb 10d738 <_Heap_Walk+0x230> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d767: 8d 46 08 lea 0x8(%esi),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d76a: 31 d2 xor %edx,%edx
10d76c: f7 74 24 40 divl 0x40(%esp)
);
return false;
}
if (
10d770: 85 d2 test %edx,%edx
10d772: 0f 85 a2 00 00 00 jne 10d81a <_Heap_Walk+0x312> <== 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;
10d778: 8b 46 04 mov 0x4(%esi),%eax
10d77b: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d77e: f6 44 06 04 01 testb $0x1,0x4(%esi,%eax,1)
10d783: 75 71 jne 10d7f6 <_Heap_Walk+0x2ee> <== NEVER TAKEN
10d785: 89 da mov %ebx,%edx
10d787: 89 f7 mov %esi,%edi
10d789: 89 4c 24 4c mov %ecx,0x4c(%esp)
10d78d: 8b 4c 24 48 mov 0x48(%esp),%ecx
10d791: eb 34 jmp 10d7c7 <_Heap_Walk+0x2bf>
10d793: 90 nop
return false;
}
prev_block = free_block;
free_block = free_block->next;
10d794: 8b 76 08 mov 0x8(%esi),%esi
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 ) {
10d797: 39 f3 cmp %esi,%ebx
10d799: 0f 84 9f 00 00 00 je 10d83e <_Heap_Walk+0x336>
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;
10d79f: 39 ce cmp %ecx,%esi
10d7a1: 72 95 jb 10d738 <_Heap_Walk+0x230>
10d7a3: 3b 74 24 44 cmp 0x44(%esp),%esi
10d7a7: 77 8f ja 10d738 <_Heap_Walk+0x230> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d7a9: 8d 46 08 lea 0x8(%esi),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d7ac: 31 d2 xor %edx,%edx
10d7ae: f7 74 24 40 divl 0x40(%esp)
);
return false;
}
if (
10d7b2: 85 d2 test %edx,%edx
10d7b4: 75 64 jne 10d81a <_Heap_Walk+0x312>
10d7b6: 89 fa mov %edi,%edx
- 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;
10d7b8: 8b 46 04 mov 0x4(%esi),%eax
10d7bb: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d7be: f6 44 06 04 01 testb $0x1,0x4(%esi,%eax,1)
10d7c3: 75 31 jne 10d7f6 <_Heap_Walk+0x2ee>
10d7c5: 89 f7 mov %esi,%edi
);
return false;
}
if ( free_block->prev != prev_block ) {
10d7c7: 8b 46 0c mov 0xc(%esi),%eax
10d7ca: 39 d0 cmp %edx,%eax
10d7cc: 74 c6 je 10d794 <_Heap_Walk+0x28c>
(*printer)(
10d7ce: 89 44 24 10 mov %eax,0x10(%esp)
10d7d2: 89 74 24 0c mov %esi,0xc(%esp)
10d7d6: c7 44 24 08 ac 3d 12 movl $0x123dac,0x8(%esp)
10d7dd: 00
10d7de: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d7e5: 00
10d7e6: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d7ea: 89 0c 24 mov %ecx,(%esp)
10d7ed: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d7ef: 31 c0 xor %eax,%eax
10d7f1: e9 42 fe ff ff jmp 10d638 <_Heap_Walk+0x130>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
10d7f6: 89 74 24 0c mov %esi,0xc(%esp)
10d7fa: c7 44 24 08 da 3b 12 movl $0x123bda,0x8(%esp)
10d801: 00
10d802: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d809: 00
10d80a: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d80e: 89 0c 24 mov %ecx,(%esp)
10d811: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d813: 31 c0 xor %eax,%eax
10d815: e9 1e fe ff ff jmp 10d638 <_Heap_Walk+0x130>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10d81a: 89 74 24 0c mov %esi,0xc(%esp)
10d81e: c7 44 24 08 7c 3d 12 movl $0x123d7c,0x8(%esp)
10d825: 00
10d826: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d82d: 00
10d82e: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d832: 89 0c 24 mov %ecx,(%esp)
10d835: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d837: 31 c0 xor %eax,%eax
10d839: e9 fa fd ff ff jmp 10d638 <_Heap_Walk+0x130>
10d83e: 8b 4c 24 4c mov 0x4c(%esp),%ecx
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d842: 8b 74 24 34 mov 0x34(%esp),%esi
10d846: 89 6c 24 44 mov %ebp,0x44(%esp)
10d84a: 8b 44 24 48 mov 0x48(%esp),%eax
10d84e: 89 dd mov %ebx,%ebp
10d850: 89 cb mov %ecx,%ebx
10d852: 83 e3 fe and $0xfffffffe,%ebx
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;
10d855: 83 e1 01 and $0x1,%ecx
10d858: 89 4c 24 40 mov %ecx,0x40(%esp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10d85c: 8d 3c 33 lea (%ebx,%esi,1),%edi
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;
10d85f: 39 f8 cmp %edi,%eax
10d861: 76 2d jbe 10d890 <_Heap_Walk+0x388> <== ALWAYS TAKEN
10d863: 8b 6c 24 44 mov 0x44(%esp),%ebp
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
10d867: 89 7c 24 10 mov %edi,0x10(%esp)
10d86b: 89 74 24 0c mov %esi,0xc(%esp)
10d86f: c7 44 24 08 e0 3d 12 movl $0x123de0,0x8(%esp)
10d876: 00
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
10d877: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d87e: 00
10d87f: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d883: 89 0c 24 mov %ecx,(%esp)
10d886: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d888: 31 c0 xor %eax,%eax
10d88a: e9 a9 fd ff ff jmp 10d638 <_Heap_Walk+0x130>
10d88f: 90 nop
10d890: 39 7d 24 cmp %edi,0x24(%ebp)
10d893: 72 ce jb 10d863 <_Heap_Walk+0x35b>
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;
10d895: 3b 74 24 3c cmp 0x3c(%esp),%esi
10d899: 0f 95 c1 setne %cl
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d89c: 89 d8 mov %ebx,%eax
10d89e: 31 d2 xor %edx,%edx
10d8a0: f7 74 24 30 divl 0x30(%esp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10d8a4: 85 d2 test %edx,%edx
10d8a6: 74 5c je 10d904 <_Heap_Walk+0x3fc>
10d8a8: 84 c9 test %cl,%cl
10d8aa: 0f 85 54 02 00 00 jne 10db04 <_Heap_Walk+0x5fc>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10d8b0: f6 47 04 01 testb $0x1,0x4(%edi)
10d8b4: 0f 84 e6 00 00 00 je 10d9a0 <_Heap_Walk+0x498>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10d8ba: 8b 44 24 40 mov 0x40(%esp),%eax
10d8be: 85 c0 test %eax,%eax
10d8c0: 0f 84 aa 00 00 00 je 10d970 <_Heap_Walk+0x468>
(*printer)(
10d8c6: 89 5c 24 10 mov %ebx,0x10(%esp)
10d8ca: 89 74 24 0c mov %esi,0xc(%esp)
10d8ce: c7 44 24 08 f6 3b 12 movl $0x123bf6,0x8(%esp)
10d8d5: 00
10d8d6: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10d8dd: 00
10d8de: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d8e2: 89 0c 24 mov %ecx,(%esp)
10d8e5: 8b 4c 24 44 mov 0x44(%esp),%ecx
10d8e9: ff d1 call *%ecx
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10d8eb: 39 7c 24 34 cmp %edi,0x34(%esp)
10d8ef: 0f 84 4f fc ff ff je 10d544 <_Heap_Walk+0x3c>
10d8f5: 8b 4f 04 mov 0x4(%edi),%ecx
10d8f8: 8b 45 20 mov 0x20(%ebp),%eax
10d8fb: 89 fe mov %edi,%esi
10d8fd: e9 4e ff ff ff jmp 10d850 <_Heap_Walk+0x348>
10d902: 66 90 xchg %ax,%ax
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10d904: 39 5c 24 38 cmp %ebx,0x38(%esp)
10d908: 76 3a jbe 10d944 <_Heap_Walk+0x43c>
10d90a: 84 c9 test %cl,%cl
10d90c: 74 a2 je 10d8b0 <_Heap_Walk+0x3a8> <== NEVER TAKEN
10d90e: 8b 6c 24 44 mov 0x44(%esp),%ebp
(*printer)(
10d912: 8b 44 24 38 mov 0x38(%esp),%eax
10d916: 89 44 24 14 mov %eax,0x14(%esp)
10d91a: 89 5c 24 10 mov %ebx,0x10(%esp)
10d91e: 89 74 24 0c mov %esi,0xc(%esp)
10d922: c7 44 24 08 40 3e 12 movl $0x123e40,0x8(%esp)
10d929: 00
10d92a: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d931: 00
10d932: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d936: 89 0c 24 mov %ecx,(%esp)
10d939: ff d5 call *%ebp
block,
block_size,
min_block_size
);
return false;
10d93b: 31 c0 xor %eax,%eax
10d93d: e9 04 fc ff ff jmp 10d546 <_Heap_Walk+0x3e>
10d942: 66 90 xchg %ax,%ax
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10d944: 39 fe cmp %edi,%esi
10d946: 0f 82 64 ff ff ff jb 10d8b0 <_Heap_Walk+0x3a8>
10d94c: 84 c9 test %cl,%cl
10d94e: 0f 84 5c ff ff ff je 10d8b0 <_Heap_Walk+0x3a8>
10d954: 8b 6c 24 44 mov 0x44(%esp),%ebp
(*printer)(
10d958: 89 7c 24 10 mov %edi,0x10(%esp)
10d95c: 89 74 24 0c mov %esi,0xc(%esp)
10d960: c7 44 24 08 6c 3e 12 movl $0x123e6c,0x8(%esp)
10d967: 00
10d968: e9 0a ff ff ff jmp 10d877 <_Heap_Walk+0x36f>
10d96d: 8d 76 00 lea 0x0(%esi),%esi
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10d970: 8b 06 mov (%esi),%eax
10d972: 89 44 24 14 mov %eax,0x14(%esp)
10d976: 89 5c 24 10 mov %ebx,0x10(%esp)
10d97a: 89 74 24 0c mov %esi,0xc(%esp)
10d97e: c7 44 24 08 44 3f 12 movl $0x123f44,0x8(%esp)
10d985: 00
10d986: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10d98d: 00
10d98e: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d992: 89 0c 24 mov %ecx,(%esp)
10d995: 8b 4c 24 44 mov 0x44(%esp),%ecx
10d999: ff d1 call *%ecx
10d99b: e9 4b ff ff ff jmp 10d8eb <_Heap_Walk+0x3e3>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10d9a0: 8b 4d 08 mov 0x8(%ebp),%ecx
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
10d9a3: 8b 56 08 mov 0x8(%esi),%edx
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d9a6: 39 55 0c cmp %edx,0xc(%ebp)
10d9a9: 0f 84 fd 00 00 00 je 10daac <_Heap_Walk+0x5a4>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10d9af: 39 d5 cmp %edx,%ebp
10d9b1: 0f 84 05 01 00 00 je 10dabc <_Heap_Walk+0x5b4>
10d9b7: c7 44 24 48 01 3a 12 movl $0x123a01,0x48(%esp)
10d9be: 00
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 ?
10d9bf: 8b 46 0c mov 0xc(%esi),%eax
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d9c2: 39 c1 cmp %eax,%ecx
10d9c4: 0f 84 d2 00 00 00 je 10da9c <_Heap_Walk+0x594>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10d9ca: 39 c5 cmp %eax,%ebp
10d9cc: 0f 84 fa 00 00 00 je 10dacc <_Heap_Walk+0x5c4>
10d9d2: c7 44 24 4c 01 3a 12 movl $0x123a01,0x4c(%esp)
10d9d9: 00
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)(
10d9da: 8b 4c 24 48 mov 0x48(%esp),%ecx
10d9de: 89 4c 24 20 mov %ecx,0x20(%esp)
10d9e2: 89 54 24 1c mov %edx,0x1c(%esp)
10d9e6: 8b 54 24 4c mov 0x4c(%esp),%edx
10d9ea: 89 54 24 18 mov %edx,0x18(%esp)
10d9ee: 89 44 24 14 mov %eax,0x14(%esp)
10d9f2: 89 5c 24 10 mov %ebx,0x10(%esp)
10d9f6: 89 74 24 0c mov %esi,0xc(%esp)
10d9fa: c7 44 24 08 a0 3e 12 movl $0x123ea0,0x8(%esp)
10da01: 00
10da02: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10da09: 00
10da0a: 8b 4c 24 74 mov 0x74(%esp),%ecx
10da0e: 89 0c 24 mov %ecx,(%esp)
10da11: 8b 4c 24 44 mov 0x44(%esp),%ecx
10da15: ff d1 call *%ecx
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10da17: 8b 07 mov (%edi),%eax
10da19: 39 c3 cmp %eax,%ebx
10da1b: 75 4b jne 10da68 <_Heap_Walk+0x560>
);
return false;
}
if ( !prev_used ) {
10da1d: 8b 54 24 40 mov 0x40(%esp),%edx
10da21: 85 d2 test %edx,%edx
10da23: 0f 84 b3 00 00 00 je 10dadc <_Heap_Walk+0x5d4>
10da29: 8b 45 08 mov 0x8(%ebp),%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 ) {
10da2c: 39 c5 cmp %eax,%ebp
10da2e: 74 0f je 10da3f <_Heap_Walk+0x537> <== NEVER TAKEN
if ( free_block == block ) {
10da30: 39 c6 cmp %eax,%esi
10da32: 0f 84 b3 fe ff ff je 10d8eb <_Heap_Walk+0x3e3>
return true;
}
free_block = free_block->next;
10da38: 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 ) {
10da3b: 39 c5 cmp %eax,%ebp
10da3d: 75 f1 jne 10da30 <_Heap_Walk+0x528>
10da3f: 8b 6c 24 44 mov 0x44(%esp),%ebp
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10da43: 89 74 24 0c mov %esi,0xc(%esp)
10da47: c7 44 24 08 6c 3f 12 movl $0x123f6c,0x8(%esp)
10da4e: 00
10da4f: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10da56: 00
10da57: 8b 4c 24 74 mov 0x74(%esp),%ecx
10da5b: 89 0c 24 mov %ecx,(%esp)
10da5e: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10da60: 31 c0 xor %eax,%eax
10da62: e9 d1 fb ff ff jmp 10d638 <_Heap_Walk+0x130>
10da67: 90 nop
10da68: 8b 6c 24 44 mov 0x44(%esp),%ebp
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
10da6c: 89 7c 24 18 mov %edi,0x18(%esp)
10da70: 89 44 24 14 mov %eax,0x14(%esp)
10da74: 89 5c 24 10 mov %ebx,0x10(%esp)
10da78: 89 74 24 0c mov %esi,0xc(%esp)
10da7c: c7 44 24 08 d8 3e 12 movl $0x123ed8,0x8(%esp)
10da83: 00
10da84: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10da8b: 00
10da8c: 8b 4c 24 74 mov 0x74(%esp),%ecx
10da90: 89 0c 24 mov %ecx,(%esp)
10da93: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10da95: 31 c0 xor %eax,%eax
10da97: e9 9c fb ff ff jmp 10d638 <_Heap_Walk+0x130>
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)(
10da9c: c7 44 24 4c 7a 3b 12 movl $0x123b7a,0x4c(%esp)
10daa3: 00
10daa4: e9 31 ff ff ff jmp 10d9da <_Heap_Walk+0x4d2>
10daa9: 8d 76 00 lea 0x0(%esi),%esi
10daac: c7 44 24 48 61 3b 12 movl $0x123b61,0x48(%esp)
10dab3: 00
10dab4: e9 06 ff ff ff jmp 10d9bf <_Heap_Walk+0x4b7>
10dab9: 8d 76 00 lea 0x0(%esi),%esi
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10dabc: c7 44 24 48 70 3b 12 movl $0x123b70,0x48(%esp)
10dac3: 00
10dac4: e9 f6 fe ff ff jmp 10d9bf <_Heap_Walk+0x4b7>
10dac9: 8d 76 00 lea 0x0(%esi),%esi
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10dacc: c7 44 24 4c 8a 3b 12 movl $0x123b8a,0x4c(%esp)
10dad3: 00
10dad4: e9 01 ff ff ff jmp 10d9da <_Heap_Walk+0x4d2>
10dad9: 8d 76 00 lea 0x0(%esi),%esi
10dadc: 8b 6c 24 44 mov 0x44(%esp),%ebp
return false;
}
if ( !prev_used ) {
(*printer)(
10dae0: 89 74 24 0c mov %esi,0xc(%esp)
10dae4: c7 44 24 08 14 3f 12 movl $0x123f14,0x8(%esp)
10daeb: 00
10daec: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10daf3: 00
10daf4: 8b 4c 24 74 mov 0x74(%esp),%ecx
10daf8: 89 0c 24 mov %ecx,(%esp)
10dafb: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10dafd: 31 c0 xor %eax,%eax
10daff: e9 34 fb ff ff jmp 10d638 <_Heap_Walk+0x130>
10db04: 8b 6c 24 44 mov 0x44(%esp),%ebp
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
10db08: 89 5c 24 10 mov %ebx,0x10(%esp)
10db0c: 89 74 24 0c mov %esi,0xc(%esp)
10db10: c7 44 24 08 10 3e 12 movl $0x123e10,0x8(%esp)
10db17: 00
10db18: e9 5a fd ff ff jmp 10d877 <_Heap_Walk+0x36f>
10db1d: 8b 53 20 mov 0x20(%ebx),%edx
10db20: 89 54 24 48 mov %edx,0x48(%esp)
10db24: e9 19 fd ff ff jmp 10d842 <_Heap_Walk+0x33a>
0010c15c <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
10c15c: 53 push %ebx
10c15d: 83 ec 18 sub $0x18,%esp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10c160: 31 db xor %ebx,%ebx
10c162: a1 60 29 13 00 mov 0x132960,%eax
10c167: 85 c0 test %eax,%eax
10c169: 74 22 je 10c18d <_IO_Initialize_all_drivers+0x31><== NEVER TAKEN
10c16b: 90 nop
(void) rtems_io_initialize( major, 0, NULL );
10c16c: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10c173: 00
10c174: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c17b: 00
10c17c: 89 1c 24 mov %ebx,(%esp)
10c17f: e8 64 53 00 00 call 1114e8 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10c184: 43 inc %ebx
10c185: 39 1d 60 29 13 00 cmp %ebx,0x132960
10c18b: 77 df ja 10c16c <_IO_Initialize_all_drivers+0x10>
(void) rtems_io_initialize( major, 0, NULL );
}
10c18d: 83 c4 18 add $0x18,%esp
10c190: 5b pop %ebx
10c191: c3 ret
0010c0d4 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
10c0d4: 55 push %ebp
10c0d5: 57 push %edi
10c0d6: 56 push %esi
10c0d7: 53 push %ebx
10c0d8: 83 ec 1c sub $0x1c,%esp
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
10c0db: 8b 1d 40 da 12 00 mov 0x12da40,%ebx
drivers_in_table = Configuration.number_of_device_drivers;
10c0e1: 8b 35 3c da 12 00 mov 0x12da3c,%esi
number_of_drivers = Configuration.maximum_drivers;
10c0e7: 8b 3d 38 da 12 00 mov 0x12da38,%edi
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
10c0ed: 39 fe cmp %edi,%esi
10c0ef: 73 57 jae 10c148 <_IO_Manager_initialization+0x74>
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
10c0f1: 8d 2c 7f lea (%edi,%edi,2),%ebp
10c0f4: c1 e5 03 shl $0x3,%ebp
10c0f7: 89 2c 24 mov %ebp,(%esp)
10c0fa: e8 fd 2b 00 00 call 10ecfc <_Workspace_Allocate_or_fatal_error>
10c0ff: 89 c2 mov %eax,%edx
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
10c101: a3 64 29 13 00 mov %eax,0x132964
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
10c106: 89 3d 60 29 13 00 mov %edi,0x132960
memset(
10c10c: 31 c0 xor %eax,%eax
10c10e: 89 d7 mov %edx,%edi
10c110: 89 e9 mov %ebp,%ecx
10c112: f3 aa rep stos %al,%es:(%edi)
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10c114: 85 f6 test %esi,%esi
10c116: 74 28 je 10c140 <_IO_Manager_initialization+0x6c><== NEVER TAKEN
10c118: 8b 15 64 29 13 00 mov 0x132964,%edx
* registration. The driver table is now allocated in the
* workspace.
*
*/
void _IO_Manager_initialization(void)
10c11e: 8d 04 76 lea (%esi,%esi,2),%eax
10c121: 8d 2c c5 00 00 00 00 lea 0x0(,%eax,8),%ebp
10c128: 31 c0 xor %eax,%eax
10c12a: 66 90 xchg %ax,%ax
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
10c12c: 8d 3c 02 lea (%edx,%eax,1),%edi
10c12f: 8d 34 03 lea (%ebx,%eax,1),%esi
10c132: b9 06 00 00 00 mov $0x6,%ecx
10c137: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10c139: 83 c0 18 add $0x18,%eax
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10c13c: 39 e8 cmp %ebp,%eax
10c13e: 75 ec jne 10c12c <_IO_Manager_initialization+0x58>
_IO_Driver_address_table[index] = driver_table[index];
}
10c140: 83 c4 1c add $0x1c,%esp
10c143: 5b pop %ebx
10c144: 5e pop %esi
10c145: 5f pop %edi
10c146: 5d pop %ebp
10c147: c3 ret
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
10c148: 89 1d 64 29 13 00 mov %ebx,0x132964
_IO_Number_of_drivers = number_of_drivers;
10c14e: 89 35 60 29 13 00 mov %esi,0x132960
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
10c154: 83 c4 1c add $0x1c,%esp
10c157: 5b pop %ebx
10c158: 5e pop %esi
10c159: 5f pop %edi
10c15a: 5d pop %ebp
10c15b: c3 ret
0010cc0c <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10cc0c: 53 push %ebx
10cc0d: 83 ec 18 sub $0x18,%esp
10cc10: 8b 54 24 20 mov 0x20(%esp),%edx
10cc14: 8b 44 24 24 mov 0x24(%esp),%eax
10cc18: 8b 5c 24 28 mov 0x28(%esp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10cc1c: 89 15 c4 1f 13 00 mov %edx,0x131fc4
_Internal_errors_What_happened.is_internal = is_internal;
10cc22: a2 c8 1f 13 00 mov %al,0x131fc8
_Internal_errors_What_happened.the_error = the_error;
10cc27: 89 1d cc 1f 13 00 mov %ebx,0x131fcc
_User_extensions_Fatal( the_source, is_internal, the_error );
10cc2d: 89 5c 24 08 mov %ebx,0x8(%esp)
10cc31: 0f b6 c0 movzbl %al,%eax
10cc34: 89 44 24 04 mov %eax,0x4(%esp)
10cc38: 89 14 24 mov %edx,(%esp)
10cc3b: e8 bc 1c 00 00 call 10e8fc <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10cc40: c7 05 a0 20 13 00 05 movl $0x5,0x1320a0 <== NOT EXECUTED
10cc47: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10cc4a: fa cli <== NOT EXECUTED
10cc4b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10cc4d: f4 hlt <== NOT EXECUTED
10cc4e: eb fe jmp 10cc4e <_Internal_error_Occurred+0x42><== NOT EXECUTED
0010cca8 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10cca8: 56 push %esi
10cca9: 53 push %ebx
10ccaa: 83 ec 14 sub $0x14,%esp
10ccad: 8b 5c 24 20 mov 0x20(%esp),%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 )
10ccb1: 8b 43 18 mov 0x18(%ebx),%eax
10ccb4: 85 c0 test %eax,%eax
10ccb6: 74 54 je 10cd0c <_Objects_Allocate+0x64><== NEVER TAKEN
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10ccb8: 8d 73 20 lea 0x20(%ebx),%esi
10ccbb: 89 34 24 mov %esi,(%esp)
10ccbe: e8 35 f7 ff ff call 10c3f8 <_Chain_Get>
10ccc3: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10ccc5: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10ccc9: 74 20 je 10cceb <_Objects_Allocate+0x43>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10cccb: 85 c0 test %eax,%eax
10cccd: 74 25 je 10ccf4 <_Objects_Allocate+0x4c>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10cccf: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10ccd3: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10ccd7: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10ccd9: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10ccdd: 31 d2 xor %edx,%edx
10ccdf: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10cce1: 8b 53 30 mov 0x30(%ebx),%edx
10cce4: ff 0c 82 decl (%edx,%eax,4)
information->inactive--;
10cce7: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10cceb: 89 c8 mov %ecx,%eax
10cced: 83 c4 14 add $0x14,%esp
10ccf0: 5b pop %ebx
10ccf1: 5e pop %esi
10ccf2: c3 ret
10ccf3: 90 nop
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
10ccf4: 89 1c 24 mov %ebx,(%esp)
10ccf7: e8 3c 00 00 00 call 10cd38 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10ccfc: 89 34 24 mov %esi,(%esp)
10ccff: e8 f4 f6 ff ff call 10c3f8 <_Chain_Get>
10cd04: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10cd06: 85 c0 test %eax,%eax
10cd08: 75 c5 jne 10cccf <_Objects_Allocate+0x27>
10cd0a: 66 90 xchg %ax,%ax
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
return NULL;
10cd0c: 31 c9 xor %ecx,%ecx
);
}
#endif
return the_object;
}
10cd0e: 89 c8 mov %ecx,%eax
10cd10: 83 c4 14 add $0x14,%esp
10cd13: 5b pop %ebx
10cd14: 5e pop %esi
10cd15: c3 ret
0010cd38 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10cd38: 55 push %ebp
10cd39: 57 push %edi
10cd3a: 56 push %esi
10cd3b: 53 push %ebx
10cd3c: 83 ec 4c sub $0x4c,%esp
10cd3f: 8b 5c 24 60 mov 0x60(%esp),%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 );
10cd43: 0f b7 43 08 movzwl 0x8(%ebx),%eax
10cd47: 89 44 24 20 mov %eax,0x20(%esp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10cd4b: 8b 4b 34 mov 0x34(%ebx),%ecx
10cd4e: 8b 7b 10 mov 0x10(%ebx),%edi
10cd51: 85 c9 test %ecx,%ecx
10cd53: 0f 84 73 02 00 00 je 10cfcc <_Objects_Extend_information+0x294>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10cd59: 8b 73 14 mov 0x14(%ebx),%esi
10cd5c: 89 f8 mov %edi,%eax
10cd5e: 31 d2 xor %edx,%edx
10cd60: 66 f7 f6 div %si
10cd63: 0f b7 c0 movzwl %ax,%eax
10cd66: 89 44 24 18 mov %eax,0x18(%esp)
for ( ; block < block_count; block++ ) {
10cd6a: 85 c0 test %eax,%eax
10cd6c: 0f b7 c6 movzwl %si,%eax
10cd6f: 0f 84 77 02 00 00 je 10cfec <_Objects_Extend_information+0x2b4><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL ) {
10cd75: 8b 11 mov (%ecx),%edx
10cd77: 85 d2 test %edx,%edx
10cd79: 0f 84 81 02 00 00 je 10d000 <_Objects_Extend_information+0x2c8><== NEVER TAKEN
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10cd7f: 8b 74 24 18 mov 0x18(%esp),%esi
10cd83: 4e dec %esi
/*
* 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 );
10cd84: 8b 54 24 20 mov 0x20(%esp),%edx
10cd88: 89 54 24 14 mov %edx,0x14(%esp)
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10cd8c: 31 d2 xor %edx,%edx
10cd8e: 89 5c 24 1c mov %ebx,0x1c(%esp)
10cd92: 8b 5c 24 14 mov 0x14(%esp),%ebx
10cd96: eb 0c jmp 10cda4 <_Objects_Extend_information+0x6c>
10cd98: 89 ea mov %ebp,%edx
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
10cd9a: 83 3c a9 00 cmpl $0x0,(%ecx,%ebp,4)
10cd9e: 0f 84 d4 01 00 00 je 10cf78 <_Objects_Extend_information+0x240>
do_extend = false;
break;
} else
index_base += information->allocation_size;
10cda4: 01 c3 add %eax,%ebx
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10cda6: 8d 6a 01 lea 0x1(%edx),%ebp
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10cda9: 39 f2 cmp %esi,%edx
10cdab: 75 eb jne 10cd98 <_Objects_Extend_information+0x60>
10cdad: 89 5c 24 14 mov %ebx,0x14(%esp)
10cdb1: 8b 5c 24 1c mov 0x1c(%esp),%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;
10cdb5: be 01 00 00 00 mov $0x1,%esi
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10cdba: 0f b7 d7 movzwl %di,%edx
10cdbd: 01 c2 add %eax,%edx
10cdbf: 89 54 24 1c mov %edx,0x1c(%esp)
/*
* 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 ) {
10cdc3: 81 fa ff ff 00 00 cmp $0xffff,%edx
10cdc9: 0f 87 9f 01 00 00 ja 10cf6e <_Objects_Extend_information+0x236>
/*
* 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;
10cdcf: 0f af 43 18 imul 0x18(%ebx),%eax
if ( information->auto_extend ) {
10cdd3: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
new_object_block = _Workspace_Allocate( block_size );
10cdd7: 89 04 24 mov %eax,(%esp)
/*
* 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;
if ( information->auto_extend ) {
10cdda: 0f 84 a8 01 00 00 je 10cf88 <_Objects_Extend_information+0x250>
new_object_block = _Workspace_Allocate( block_size );
10cde0: e8 cf 1e 00 00 call 10ecb4 <_Workspace_Allocate>
10cde5: 89 44 24 28 mov %eax,0x28(%esp)
if ( !new_object_block )
10cde9: 85 c0 test %eax,%eax
10cdeb: 0f 84 7d 01 00 00 je 10cf6e <_Objects_Extend_information+0x236>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
10cdf1: 89 f0 mov %esi,%eax
10cdf3: 84 c0 test %al,%al
10cdf5: 0f 84 ee 00 00 00 je 10cee9 <_Objects_Extend_information+0x1b1>
*/
/*
* Up the block count and maximum
*/
block_count++;
10cdfb: 8b 74 24 18 mov 0x18(%esp),%esi
10cdff: 46 inc %esi
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10ce00: 8d 04 76 lea (%esi,%esi,2),%eax
((maximum + minimum_index) * sizeof(Objects_Control *));
10ce03: 03 44 24 1c add 0x1c(%esp),%eax
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10ce07: 03 44 24 20 add 0x20(%esp),%eax
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
10ce0b: 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 );
10ce0e: 89 04 24 mov %eax,(%esp)
10ce11: e8 9e 1e 00 00 call 10ecb4 <_Workspace_Allocate>
10ce16: 89 c2 mov %eax,%edx
if ( !object_blocks ) {
10ce18: 85 c0 test %eax,%eax
10ce1a: 0f 84 f1 01 00 00 je 10d011 <_Objects_Extend_information+0x2d9>
10ce20: 8d 3c b0 lea (%eax,%esi,4),%edi
10ce23: 89 7c 24 2c mov %edi,0x2c(%esp)
10ce27: 8d 34 f0 lea (%eax,%esi,8),%esi
10ce2a: 89 74 24 24 mov %esi,0x24(%esp)
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10ce2e: 0f b7 43 10 movzwl 0x10(%ebx),%eax
10ce32: 39 44 24 20 cmp %eax,0x20(%esp)
10ce36: 0f 82 5a 01 00 00 jb 10cf96 <_Objects_Extend_information+0x25e>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10ce3c: 8b 44 24 20 mov 0x20(%esp),%eax
10ce40: 85 c0 test %eax,%eax
10ce42: 74 1d je 10ce61 <_Objects_Extend_information+0x129><== NEVER TAKEN
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10ce44: 8b 44 24 20 mov 0x20(%esp),%eax
10ce48: 8b 7c 24 24 mov 0x24(%esp),%edi
10ce4c: 8d 0c 87 lea (%edi,%eax,4),%ecx
10ce4f: 89 f8 mov %edi,%eax
10ce51: 8d 76 00 lea 0x0(%esi),%esi
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
10ce54: c7 00 00 00 00 00 movl $0x0,(%eax)
10ce5a: 83 c0 04 add $0x4,%eax
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10ce5d: 39 c8 cmp %ecx,%eax
10ce5f: 75 f3 jne 10ce54 <_Objects_Extend_information+0x11c><== NEVER TAKEN
10ce61: 8b 44 24 18 mov 0x18(%esp),%eax
10ce65: c1 e0 02 shl $0x2,%eax
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10ce68: c7 04 02 00 00 00 00 movl $0x0,(%edx,%eax,1)
inactive_per_block[block_count] = 0;
10ce6f: 8b 7c 24 2c mov 0x2c(%esp),%edi
10ce73: c7 04 07 00 00 00 00 movl $0x0,(%edi,%eax,1)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10ce7a: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx
10ce7e: 03 4c 24 14 add 0x14(%esp),%ecx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10ce82: 39 4c 24 14 cmp %ecx,0x14(%esp)
10ce86: 73 1d jae 10cea5 <_Objects_Extend_information+0x16d><== NEVER TAKEN
10ce88: 8b 74 24 14 mov 0x14(%esp),%esi
10ce8c: 8b 7c 24 24 mov 0x24(%esp),%edi
10ce90: 8d 04 b7 lea (%edi,%esi,4),%eax
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10ce93: 8d 0c 8f lea (%edi,%ecx,4),%ecx
10ce96: 66 90 xchg %ax,%ax
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10ce98: c7 00 00 00 00 00 movl $0x0,(%eax)
10ce9e: 83 c0 04 add $0x4,%eax
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10cea1: 39 c8 cmp %ecx,%eax
10cea3: 75 f3 jne 10ce98 <_Objects_Extend_information+0x160>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10cea5: 9c pushf
10cea6: fa cli
10cea7: 59 pop %ecx
old_tables = information->object_blocks;
10cea8: 8b 43 34 mov 0x34(%ebx),%eax
information->object_blocks = object_blocks;
10ceab: 89 53 34 mov %edx,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10ceae: 8b 7c 24 2c mov 0x2c(%esp),%edi
10ceb2: 89 7b 30 mov %edi,0x30(%ebx)
information->local_table = local_table;
10ceb5: 8b 7c 24 24 mov 0x24(%esp),%edi
10ceb9: 89 7b 1c mov %edi,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10cebc: 8b 54 24 1c mov 0x1c(%esp),%edx
10cec0: 66 89 53 10 mov %dx,0x10(%ebx)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cec4: 8b 13 mov (%ebx),%edx
10cec6: c1 e2 18 shl $0x18,%edx
10cec9: 81 ca 00 00 01 00 or $0x10000,%edx
information->maximum_id = _Objects_Build_id(
10cecf: 0f b7 73 04 movzwl 0x4(%ebx),%esi
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10ced3: c1 e6 1b shl $0x1b,%esi
10ced6: 09 f2 or %esi,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10ced8: 0b 54 24 1c or 0x1c(%esp),%edx
10cedc: 89 53 0c mov %edx,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10cedf: 51 push %ecx
10cee0: 9d popf
_Workspace_Free( old_tables );
10cee1: 89 04 24 mov %eax,(%esp)
10cee4: e8 f7 1d 00 00 call 10ece0 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10cee9: c1 e5 02 shl $0x2,%ebp
10ceec: 89 6c 24 18 mov %ebp,0x18(%esp)
10cef0: 8b 43 34 mov 0x34(%ebx),%eax
10cef3: 8b 54 24 28 mov 0x28(%esp),%edx
10cef7: 89 14 28 mov %edx,(%eax,%ebp,1)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10cefa: 8b 43 18 mov 0x18(%ebx),%eax
10cefd: 89 44 24 0c mov %eax,0xc(%esp)
10cf01: 0f b7 43 14 movzwl 0x14(%ebx),%eax
10cf05: 89 44 24 08 mov %eax,0x8(%esp)
10cf09: 8b 43 34 mov 0x34(%ebx),%eax
10cf0c: 8b 04 28 mov (%eax,%ebp,1),%eax
10cf0f: 89 44 24 04 mov %eax,0x4(%esp)
10cf13: 8d 74 24 34 lea 0x34(%esp),%esi
10cf17: 89 34 24 mov %esi,(%esp)
10cf1a: e8 f9 f4 ff ff call 10c418 <_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 ) {
10cf1f: 8b 6c 24 14 mov 0x14(%esp),%ebp
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cf23: 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 ) {
10cf26: eb 26 jmp 10cf4e <_Objects_Extend_information+0x216>
10cf28: 8b 13 mov (%ebx),%edx
10cf2a: c1 e2 18 shl $0x18,%edx
10cf2d: 81 ca 00 00 01 00 or $0x10000,%edx
the_object->id = _Objects_Build_id(
10cf33: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10cf37: c1 e1 1b shl $0x1b,%ecx
10cf3a: 09 ca or %ecx,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cf3c: 09 ea or %ebp,%edx
10cf3e: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cf41: 89 44 24 04 mov %eax,0x4(%esp)
10cf45: 89 3c 24 mov %edi,(%esp)
10cf48: e8 87 f4 ff ff call 10c3d4 <_Chain_Append>
index++;
10cf4d: 45 inc %ebp
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10cf4e: 89 34 24 mov %esi,(%esp)
10cf51: e8 a2 f4 ff ff call 10c3f8 <_Chain_Get>
10cf56: 85 c0 test %eax,%eax
10cf58: 75 ce jne 10cf28 <_Objects_Extend_information+0x1f0>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10cf5a: 8b 43 14 mov 0x14(%ebx),%eax
10cf5d: 8b 53 30 mov 0x30(%ebx),%edx
10cf60: 0f b7 c8 movzwl %ax,%ecx
10cf63: 8b 74 24 18 mov 0x18(%esp),%esi
10cf67: 89 0c 32 mov %ecx,(%edx,%esi,1)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
10cf6a: 66 01 43 2c add %ax,0x2c(%ebx)
}
10cf6e: 83 c4 4c add $0x4c,%esp
10cf71: 5b pop %ebx
10cf72: 5e pop %esi
10cf73: 5f pop %edi
10cf74: 5d pop %ebp
10cf75: c3 ret
10cf76: 66 90 xchg %ax,%ax
10cf78: 89 5c 24 14 mov %ebx,0x14(%esp)
10cf7c: 8b 5c 24 1c mov 0x1c(%esp),%ebx
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10cf80: 31 f6 xor %esi,%esi
10cf82: e9 33 fe ff ff jmp 10cdba <_Objects_Extend_information+0x82>
10cf87: 90 nop
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
10cf88: e8 6f 1d 00 00 call 10ecfc <_Workspace_Allocate_or_fatal_error>
10cf8d: 89 44 24 28 mov %eax,0x28(%esp)
10cf91: e9 5b fe ff ff jmp 10cdf1 <_Objects_Extend_information+0xb9>
/*
* 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,
10cf96: 8b 44 24 18 mov 0x18(%esp),%eax
10cf9a: c1 e0 02 shl $0x2,%eax
10cf9d: 8b 73 34 mov 0x34(%ebx),%esi
10cfa0: 89 d7 mov %edx,%edi
10cfa2: 89 c1 mov %eax,%ecx
10cfa4: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10cfa6: 8b 73 30 mov 0x30(%ebx),%esi
10cfa9: 8b 7c 24 2c mov 0x2c(%esp),%edi
10cfad: 89 c1 mov %eax,%ecx
10cfaf: 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 *) );
10cfb1: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10cfb5: 03 4c 24 20 add 0x20(%esp),%ecx
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10cfb9: c1 e1 02 shl $0x2,%ecx
10cfbc: 8b 73 1c mov 0x1c(%ebx),%esi
10cfbf: 8b 7c 24 24 mov 0x24(%esp),%edi
10cfc3: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10cfc5: e9 9e fe ff ff jmp 10ce68 <_Objects_Extend_information+0x130>
10cfca: 66 90 xchg %ax,%ax
10cfcc: 0f b7 43 14 movzwl 0x14(%ebx),%eax
/*
* 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 );
10cfd0: 8b 54 24 20 mov 0x20(%esp),%edx
10cfd4: 89 54 24 14 mov %edx,0x14(%esp)
/*
* 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;
10cfd8: be 01 00 00 00 mov $0x1,%esi
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10cfdd: 31 ed xor %ebp,%ebp
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
10cfdf: c7 44 24 18 00 00 00 movl $0x0,0x18(%esp)
10cfe6: 00
10cfe7: e9 ce fd ff ff jmp 10cdba <_Objects_Extend_information+0x82>
/*
* 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 );
10cfec: 8b 4c 24 20 mov 0x20(%esp),%ecx <== NOT EXECUTED
10cff0: 89 4c 24 14 mov %ecx,0x14(%esp) <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10cff4: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10cff9: 31 ed xor %ebp,%ebp <== NOT EXECUTED
10cffb: e9 ba fd ff ff jmp 10cdba <_Objects_Extend_information+0x82><== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10d000: 8b 4c 24 20 mov 0x20(%esp),%ecx <== NOT EXECUTED
10d004: 89 4c 24 14 mov %ecx,0x14(%esp) <== NOT EXECUTED
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10d008: 31 f6 xor %esi,%esi <== NOT EXECUTED
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10d00a: 31 ed xor %ebp,%ebp <== NOT EXECUTED
10d00c: e9 a9 fd ff ff jmp 10cdba <_Objects_Extend_information+0x82><== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
10d011: 8b 44 24 28 mov 0x28(%esp),%eax
10d015: 89 04 24 mov %eax,(%esp)
10d018: e8 c3 1c 00 00 call 10ece0 <_Workspace_Free>
10d01d: e9 4c ff ff ff jmp 10cf6e <_Objects_Extend_information+0x236>
0010d0bc <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10d0bc: 56 push %esi
10d0bd: 53 push %ebx
10d0be: 83 ec 14 sub $0x14,%esp
10d0c1: 8b 74 24 20 mov 0x20(%esp),%esi
10d0c5: 0f b7 5c 24 24 movzwl 0x24(%esp),%ebx
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10d0ca: 66 85 db test %bx,%bx
10d0cd: 74 31 je 10d100 <_Objects_Get_information+0x44>
/*
* 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 );
10d0cf: 89 34 24 mov %esi,(%esp)
10d0d2: e8 b9 4d 00 00 call 111e90 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10d0d7: 85 c0 test %eax,%eax
10d0d9: 74 25 je 10d100 <_Objects_Get_information+0x44>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10d0db: 39 d8 cmp %ebx,%eax
10d0dd: 72 21 jb 10d100 <_Objects_Get_information+0x44>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10d0df: 8b 04 b5 1c 1f 13 00 mov 0x131f1c(,%esi,4),%eax
10d0e6: 85 c0 test %eax,%eax
10d0e8: 74 16 je 10d100 <_Objects_Get_information+0x44><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10d0ea: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !info )
10d0ed: 85 c0 test %eax,%eax
10d0ef: 74 0f je 10d100 <_Objects_Get_information+0x44><== 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 )
10d0f1: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10d0f6: 74 08 je 10d100 <_Objects_Get_information+0x44>
return NULL;
#endif
return info;
}
10d0f8: 83 c4 14 add $0x14,%esp
10d0fb: 5b pop %ebx
10d0fc: 5e pop %esi
10d0fd: c3 ret
10d0fe: 66 90 xchg %ax,%ax
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
10d100: 31 c0 xor %eax,%eax
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
10d102: 83 c4 14 add $0x14,%esp
10d105: 5b pop %ebx
10d106: 5e pop %esi
10d107: c3 ret
0011a2c4 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
11a2c4: 55 push %ebp
11a2c5: 57 push %edi
11a2c6: 56 push %esi
11a2c7: 53 push %ebx
11a2c8: 83 ec 2c sub $0x2c,%esp
11a2cb: 8b 6c 24 40 mov 0x40(%esp),%ebp
11a2cf: 8b 5c 24 44 mov 0x44(%esp),%ebx
11a2d3: 8b 74 24 48 mov 0x48(%esp),%esi
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
11a2d7: 85 db test %ebx,%ebx
11a2d9: 74 36 je 11a311 <_Objects_Get_name_as_string+0x4d>
return NULL;
if ( name == NULL )
11a2db: 85 f6 test %esi,%esi
11a2dd: 74 32 je 11a311 <_Objects_Get_name_as_string+0x4d>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
11a2df: 85 ed test %ebp,%ebp
11a2e1: 0f 84 b5 00 00 00 je 11a39c <_Objects_Get_name_as_string+0xd8>
information = _Objects_Get_information_id( tmpId );
11a2e7: 89 2c 24 mov %ebp,(%esp)
11a2ea: e8 fd 85 ff ff call 1128ec <_Objects_Get_information_id>
11a2ef: 89 c7 mov %eax,%edi
if ( !information )
11a2f1: 85 c0 test %eax,%eax
11a2f3: 74 1c je 11a311 <_Objects_Get_name_as_string+0x4d>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
11a2f5: 8d 44 24 14 lea 0x14(%esp),%eax
11a2f9: 89 44 24 08 mov %eax,0x8(%esp)
11a2fd: 89 6c 24 04 mov %ebp,0x4(%esp)
11a301: 89 3c 24 mov %edi,(%esp)
11a304: e8 ab 86 ff ff call 1129b4 <_Objects_Get>
switch ( location ) {
11a309: 8b 54 24 14 mov 0x14(%esp),%edx
11a30d: 85 d2 test %edx,%edx
11a30f: 74 0f je 11a320 <_Objects_Get_name_as_string+0x5c>
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
11a311: 31 f6 xor %esi,%esi
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
11a313: 89 f0 mov %esi,%eax
11a315: 83 c4 2c add $0x2c,%esp
11a318: 5b pop %ebx
11a319: 5e pop %esi
11a31a: 5f pop %edi
11a31b: 5d pop %ebp
11a31c: c3 ret
11a31d: 8d 76 00 lea 0x0(%esi),%esi
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
11a320: 80 7f 38 00 cmpb $0x0,0x38(%edi)
11a324: 0f 85 82 00 00 00 jne 11a3ac <_Objects_Get_name_as_string+0xe8>
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
11a32a: 8b 40 0c mov 0xc(%eax),%eax
lname[ 0 ] = (u32_name >> 24) & 0xff;
11a32d: 89 c2 mov %eax,%edx
11a32f: c1 ea 18 shr $0x18,%edx
11a332: 88 54 24 1b mov %dl,0x1b(%esp)
lname[ 1 ] = (u32_name >> 16) & 0xff;
11a336: 89 c2 mov %eax,%edx
11a338: c1 ea 10 shr $0x10,%edx
11a33b: 88 54 24 1c mov %dl,0x1c(%esp)
lname[ 2 ] = (u32_name >> 8) & 0xff;
11a33f: 89 c2 mov %eax,%edx
11a341: c1 ea 08 shr $0x8,%edx
11a344: 88 54 24 1d mov %dl,0x1d(%esp)
lname[ 3 ] = (u32_name >> 0) & 0xff;
11a348: 88 44 24 1e mov %al,0x1e(%esp)
lname[ 4 ] = '\0';
11a34c: c6 44 24 1f 00 movb $0x0,0x1f(%esp)
s = lname;
11a351: 8d 4c 24 1b lea 0x1b(%esp),%ecx
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
11a355: 83 fb 01 cmp $0x1,%ebx
11a358: 74 59 je 11a3b3 <_Objects_Get_name_as_string+0xef><== NEVER TAKEN
11a35a: 8a 11 mov (%ecx),%dl
11a35c: 84 d2 test %dl,%dl
11a35e: 74 53 je 11a3b3 <_Objects_Get_name_as_string+0xef>
* This method objects the name of an object and returns its name
* in the form of a C string. It attempts to be careful about
* overflowing the user's string and about returning unprintable characters.
*/
char *_Objects_Get_name_as_string(
11a360: 8d 7c 19 ff lea -0x1(%ecx,%ebx,1),%edi
11a364: 89 f3 mov %esi,%ebx
11a366: eb 06 jmp 11a36e <_Objects_Get_name_as_string+0xaa>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
11a368: 8a 11 mov (%ecx),%dl
11a36a: 84 d2 test %dl,%dl
11a36c: 74 1c je 11a38a <_Objects_Get_name_as_string+0xc6>
*d = (isprint((unsigned char)*s)) ? *s : '*';
11a36e: 0f b6 c2 movzbl %dl,%eax
11a371: 8b 2d e8 f6 13 00 mov 0x13f6e8,%ebp
11a377: 0f be 44 05 01 movsbl 0x1(%ebp,%eax,1),%eax
11a37c: a8 97 test $0x97,%al
11a37e: 75 02 jne 11a382 <_Objects_Get_name_as_string+0xbe>
11a380: b2 2a mov $0x2a,%dl
11a382: 88 13 mov %dl,(%ebx)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
11a384: 41 inc %ecx
11a385: 43 inc %ebx
11a386: 39 f9 cmp %edi,%ecx
11a388: 75 de jne 11a368 <_Objects_Get_name_as_string+0xa4>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
11a38a: c6 03 00 movb $0x0,(%ebx)
_Thread_Enable_dispatch();
11a38d: e8 62 93 ff ff call 1136f4 <_Thread_Enable_dispatch>
return name;
}
return NULL; /* unreachable path */
}
11a392: 89 f0 mov %esi,%eax
11a394: 83 c4 2c add $0x2c,%esp
11a397: 5b pop %ebx
11a398: 5e pop %esi
11a399: 5f pop %edi
11a39a: 5d pop %ebp
11a39b: c3 ret
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
11a39c: a1 0c 26 14 00 mov 0x14260c,%eax
11a3a1: 8b 68 08 mov 0x8(%eax),%ebp
11a3a4: e9 3e ff ff ff jmp 11a2e7 <_Objects_Get_name_as_string+0x23>
11a3a9: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
s = the_object->name.name_p;
11a3ac: 8b 48 0c mov 0xc(%eax),%ecx
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
11a3af: 85 c9 test %ecx,%ecx
11a3b1: 75 a2 jne 11a355 <_Objects_Get_name_as_string+0x91>
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
*d = (isprint((unsigned char)*s)) ? *s : '*';
11a3b3: 89 f3 mov %esi,%ebx
}
}
*d = '\0';
11a3b5: c6 03 00 movb $0x0,(%ebx)
_Thread_Enable_dispatch();
11a3b8: e8 37 93 ff ff call 1136f4 <_Thread_Enable_dispatch>
11a3bd: eb d3 jmp 11a392 <_Objects_Get_name_as_string+0xce>
0011cce0 <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
11cce0: 55 push %ebp
11cce1: 57 push %edi
11cce2: 56 push %esi
11cce3: 53 push %ebx
11cce4: 83 ec 1c sub $0x1c,%esp
11cce7: 8b 74 24 30 mov 0x30(%esp),%esi
11cceb: 8b 5c 24 34 mov 0x34(%esp),%ebx
11ccef: 8b 7c 24 38 mov 0x38(%esp),%edi
11ccf3: 8b 6c 24 3c mov 0x3c(%esp),%ebp
Objects_Control *object;
Objects_Id next_id;
if ( !information )
11ccf7: 85 f6 test %esi,%esi
11ccf9: 74 59 je 11cd54 <_Objects_Get_next+0x74>
return NULL;
if ( !location_p )
11ccfb: 85 ff test %edi,%edi
11ccfd: 74 55 je 11cd54 <_Objects_Get_next+0x74>
return NULL;
if ( !next_id_p )
11ccff: 85 ed test %ebp,%ebp
11cd01: 74 51 je 11cd54 <_Objects_Get_next+0x74>
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
11cd03: 66 85 db test %bx,%bx
11cd06: 74 28 je 11cd30 <_Objects_Get_next+0x50>
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
11cd08: 66 39 5e 10 cmp %bx,0x10(%esi)
11cd0c: 72 2e jb 11cd3c <_Objects_Get_next+0x5c>
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
11cd0e: 89 7c 24 08 mov %edi,0x8(%esp)
11cd12: 89 5c 24 04 mov %ebx,0x4(%esp)
11cd16: 89 34 24 mov %esi,(%esp)
11cd19: e8 96 5c ff ff call 1129b4 <_Objects_Get>
next_id++;
11cd1e: 43 inc %ebx
} while (*location_p != OBJECTS_LOCAL);
11cd1f: 8b 17 mov (%edi),%edx
11cd21: 85 d2 test %edx,%edx
11cd23: 75 e3 jne 11cd08 <_Objects_Get_next+0x28>
*next_id_p = next_id;
11cd25: 89 5d 00 mov %ebx,0x0(%ebp)
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
11cd28: 83 c4 1c add $0x1c,%esp
11cd2b: 5b pop %ebx
11cd2c: 5e pop %esi
11cd2d: 5f pop %edi
11cd2e: 5d pop %ebp
11cd2f: c3 ret
if ( !next_id_p )
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
next_id = information->minimum_id;
11cd30: 8b 5e 08 mov 0x8(%esi),%ebx
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
11cd33: 66 39 5e 10 cmp %bx,0x10(%esi)
11cd37: 73 d5 jae 11cd0e <_Objects_Get_next+0x2e><== ALWAYS TAKEN
11cd39: 8d 76 00 lea 0x0(%esi),%esi
{
*location_p = OBJECTS_ERROR;
11cd3c: c7 07 01 00 00 00 movl $0x1,(%edi)
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
11cd42: c7 45 00 ff ff ff ff movl $0xffffffff,0x0(%ebp)
return 0;
11cd49: 31 c0 xor %eax,%eax
}
11cd4b: 83 c4 1c add $0x1c,%esp
11cd4e: 5b pop %ebx
11cd4f: 5e pop %esi
11cd50: 5f pop %edi
11cd51: 5d pop %ebp
11cd52: c3 ret
11cd53: 90 nop
{
Objects_Control *object;
Objects_Id next_id;
if ( !information )
return NULL;
11cd54: 31 c0 xor %eax,%eax
11cd56: eb d0 jmp 11cd28 <_Objects_Get_next+0x48>
0011e4a0 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
11e4a0: 8b 54 24 04 mov 0x4(%esp),%edx
/*
* 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;
11e4a4: b8 01 00 00 00 mov $0x1,%eax
11e4a9: 2b 42 08 sub 0x8(%edx),%eax
11e4ac: 03 44 24 08 add 0x8(%esp),%eax
if ( information->maximum >= index ) {
11e4b0: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
11e4b4: 39 c8 cmp %ecx,%eax
11e4b6: 77 18 ja 11e4d0 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
11e4b8: 8b 52 1c mov 0x1c(%edx),%edx
11e4bb: 8b 04 82 mov (%edx,%eax,4),%eax
11e4be: 85 c0 test %eax,%eax
11e4c0: 74 0e je 11e4d0 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
11e4c2: 8b 54 24 0c mov 0xc(%esp),%edx
11e4c6: c7 02 00 00 00 00 movl $0x0,(%edx)
return the_object;
11e4cc: c3 ret
11e4cd: 8d 76 00 lea 0x0(%esi),%esi
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
11e4d0: 8b 44 24 0c mov 0xc(%esp),%eax
11e4d4: c7 00 01 00 00 00 movl $0x1,(%eax)
return NULL;
11e4da: 31 c0 xor %eax,%eax
}
11e4dc: c3 ret
00112a28 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
112a28: 83 ec 2c sub $0x2c,%esp
112a2b: 8b 44 24 30 mov 0x30(%esp),%eax
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
112a2f: 85 c0 test %eax,%eax
112a31: 75 41 jne 112a74 <_Objects_Id_to_name+0x4c>
112a33: a1 0c 26 14 00 mov 0x14260c,%eax
112a38: 8b 50 08 mov 0x8(%eax),%edx
112a3b: 89 d0 mov %edx,%eax
112a3d: c1 e8 18 shr $0x18,%eax
112a40: 83 e0 07 and $0x7,%eax
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
112a43: 8d 48 ff lea -0x1(%eax),%ecx
112a46: 83 f9 02 cmp $0x2,%ecx
112a49: 77 1d ja 112a68 <_Objects_Id_to_name+0x40>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
112a4b: 8b 04 85 1c 20 14 00 mov 0x14201c(,%eax,4),%eax
112a52: 85 c0 test %eax,%eax
112a54: 74 12 je 112a68 <_Objects_Id_to_name+0x40>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
112a56: 89 d1 mov %edx,%ecx
112a58: c1 e9 1b shr $0x1b,%ecx
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
112a5b: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( !information )
112a5e: 85 c0 test %eax,%eax
112a60: 74 06 je 112a68 <_Objects_Id_to_name+0x40><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
112a62: 80 78 38 00 cmpb $0x0,0x38(%eax)
112a66: 74 10 je 112a78 <_Objects_Id_to_name+0x50><== ALWAYS TAKEN
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
112a68: b8 03 00 00 00 mov $0x3,%eax
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
112a6d: 83 c4 2c add $0x2c,%esp
112a70: c3 ret
112a71: 8d 76 00 lea 0x0(%esi),%esi
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
112a74: 89 c2 mov %eax,%edx
112a76: eb c3 jmp 112a3b <_Objects_Id_to_name+0x13>
#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 );
112a78: 8d 4c 24 1c lea 0x1c(%esp),%ecx
112a7c: 89 4c 24 08 mov %ecx,0x8(%esp)
112a80: 89 54 24 04 mov %edx,0x4(%esp)
112a84: 89 04 24 mov %eax,(%esp)
112a87: e8 28 ff ff ff call 1129b4 <_Objects_Get>
if ( !the_object )
112a8c: 85 c0 test %eax,%eax
112a8e: 74 d8 je 112a68 <_Objects_Id_to_name+0x40>
return OBJECTS_INVALID_ID;
*name = the_object->name;
112a90: 8b 50 0c mov 0xc(%eax),%edx
112a93: 8b 44 24 34 mov 0x34(%esp),%eax
112a97: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
112a99: e8 56 0c 00 00 call 1136f4 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
112a9e: 31 c0 xor %eax,%eax
112aa0: eb cb jmp 112a6d <_Objects_Id_to_name+0x45>
0010d36c <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
10d36c: 55 push %ebp
10d36d: 57 push %edi
10d36e: 56 push %esi
10d36f: 53 push %ebx
10d370: 83 ec 1c sub $0x1c,%esp
10d373: 8b 7c 24 30 mov 0x30(%esp),%edi
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
10d377: 0f b7 5f 08 movzwl 0x8(%edi),%ebx
block_count = (information->maximum - index_base) /
10d37b: 0f b7 77 14 movzwl 0x14(%edi),%esi
10d37f: 0f b7 47 10 movzwl 0x10(%edi),%eax
10d383: 29 d8 sub %ebx,%eax
10d385: 31 d2 xor %edx,%edx
10d387: f7 f6 div %esi
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d389: 85 c0 test %eax,%eax
10d38b: 74 1e je 10d3ab <_Objects_Shrink_information+0x3f><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
10d38d: 8b 57 30 mov 0x30(%edi),%edx
10d390: 3b 32 cmp (%edx),%esi
10d392: 74 1f je 10d3b3 <_Objects_Shrink_information+0x47><== NEVER TAKEN
10d394: 31 c9 xor %ecx,%ecx
10d396: eb 0c jmp 10d3a4 <_Objects_Shrink_information+0x38>
* the_block - the block to remove
*
* Output parameters: NONE
*/
void _Objects_Shrink_information(
10d398: 8d 2c 8d 00 00 00 00 lea 0x0(,%ecx,4),%ebp
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
10d39f: 3b 34 8a cmp (%edx,%ecx,4),%esi
10d3a2: 74 14 je 10d3b8 <_Objects_Shrink_information+0x4c>
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
10d3a4: 01 f3 add %esi,%ebx
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d3a6: 41 inc %ecx
10d3a7: 39 c1 cmp %eax,%ecx
10d3a9: 75 ed jne 10d398 <_Objects_Shrink_information+0x2c>
return;
}
index_base += information->allocation_size;
}
}
10d3ab: 83 c4 1c add $0x1c,%esp
10d3ae: 5b pop %ebx
10d3af: 5e pop %esi
10d3b0: 5f pop %edi
10d3b1: 5d pop %ebp
10d3b2: c3 ret
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
10d3b3: 31 ed xor %ebp,%ebp <== NOT EXECUTED
10d3b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10d3b8: 8b 47 20 mov 0x20(%edi),%eax
10d3bb: eb 09 jmp 10d3c6 <_Objects_Shrink_information+0x5a>
10d3bd: 8d 76 00 lea 0x0(%esi),%esi
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d3c0: 89 f0 mov %esi,%eax
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
10d3c2: 85 f6 test %esi,%esi
10d3c4: 74 22 je 10d3e8 <_Objects_Shrink_information+0x7c>
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
10d3c6: 0f b7 50 08 movzwl 0x8(%eax),%edx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d3ca: 8b 30 mov (%eax),%esi
if ((index >= index_base) &&
10d3cc: 39 da cmp %ebx,%edx
10d3ce: 72 f0 jb 10d3c0 <_Objects_Shrink_information+0x54>
(index < (index_base + information->allocation_size))) {
10d3d0: 0f b7 4f 14 movzwl 0x14(%edi),%ecx
10d3d4: 01 d9 add %ebx,%ecx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
10d3d6: 39 ca cmp %ecx,%edx
10d3d8: 73 e6 jae 10d3c0 <_Objects_Shrink_information+0x54>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
10d3da: 89 04 24 mov %eax,(%esp)
10d3dd: e8 32 41 00 00 call 111514 <_Chain_Extract>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d3e2: 89 f0 mov %esi,%eax
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
10d3e4: 85 f6 test %esi,%esi
10d3e6: 75 de jne 10d3c6 <_Objects_Shrink_information+0x5a>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
10d3e8: 8b 47 34 mov 0x34(%edi),%eax
10d3eb: 8b 04 28 mov (%eax,%ebp,1),%eax
10d3ee: 89 04 24 mov %eax,(%esp)
10d3f1: e8 ea 18 00 00 call 10ece0 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
10d3f6: 8b 47 34 mov 0x34(%edi),%eax
10d3f9: c7 04 28 00 00 00 00 movl $0x0,(%eax,%ebp,1)
information->inactive_per_block[ block ] = 0;
10d400: 8b 47 30 mov 0x30(%edi),%eax
10d403: c7 04 28 00 00 00 00 movl $0x0,(%eax,%ebp,1)
information->inactive -= information->allocation_size;
10d40a: 8b 47 14 mov 0x14(%edi),%eax
10d40d: 66 29 47 2c sub %ax,0x2c(%edi)
return;
}
index_base += information->allocation_size;
}
}
10d411: 83 c4 1c add $0x1c,%esp
10d414: 5b pop %ebx
10d415: 5e pop %esi
10d416: 5f pop %edi
10d417: 5d pop %ebp
10d418: c3 ret
00113350 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
113350: 55 push %ebp
113351: 57 push %edi
113352: 56 push %esi
113353: 53 push %ebx
113354: 83 ec 2c sub $0x2c,%esp
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
113357: 8b 44 24 40 mov 0x40(%esp),%eax
11335b: 8b 40 08 mov 0x8(%eax),%eax
11335e: 89 c7 mov %eax,%edi
113360: c1 ef 18 shr $0x18,%edi
113363: 83 e7 07 and $0x7,%edi
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
113366: 25 ff ff 00 00 and $0xffff,%eax
11336b: c1 e0 02 shl $0x2,%eax
11336e: 89 44 24 1c mov %eax,0x1c(%esp)
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
113372: 8b 1d 90 23 13 00 mov 0x132390,%ebx
done = true;
for ( index = 1 ; index <= max ; ++index ) {
113378: 66 85 db test %bx,%bx
11337b: 75 0b jne 113388 <_POSIX_Keys_Run_destructors+0x38>
done = false;
}
}
}
}
}
11337d: 83 c4 2c add $0x2c,%esp
113380: 5b pop %ebx
113381: 5e pop %esi
113382: 5f pop %edi
113383: 5d pop %ebp
113384: c3 ret
113385: 8d 76 00 lea 0x0(%esi),%esi
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
113388: be 01 00 00 00 mov $0x1,%esi
11338d: b2 01 mov $0x1,%dl
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
11338f: 0f b7 ce movzwl %si,%ecx
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
113392: a1 9c 23 13 00 mov 0x13239c,%eax
113397: 8b 04 88 mov (%eax,%ecx,4),%eax
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
11339a: 85 c0 test %eax,%eax
11339c: 74 25 je 1133c3 <_POSIX_Keys_Run_destructors+0x73>
11339e: 8b 48 10 mov 0x10(%eax),%ecx
1133a1: 85 c9 test %ecx,%ecx
1133a3: 74 1e je 1133c3 <_POSIX_Keys_Run_destructors+0x73>
void *value = key->Values [ thread_api ][ thread_index ];
1133a5: 8b 6c 24 1c mov 0x1c(%esp),%ebp
1133a9: 03 6c b8 14 add 0x14(%eax,%edi,4),%ebp
1133ad: 8b 4d 00 mov 0x0(%ebp),%ecx
if ( value != NULL ) {
1133b0: 85 c9 test %ecx,%ecx
1133b2: 74 0f je 1133c3 <_POSIX_Keys_Run_destructors+0x73><== ALWAYS TAKEN
key->Values [ thread_api ][ thread_index ] = NULL;
1133b4: c7 45 00 00 00 00 00 movl $0x0,0x0(%ebp) <== NOT EXECUTED
(*key->destructor)( value );
1133bb: 89 0c 24 mov %ecx,(%esp) <== NOT EXECUTED
1133be: ff 50 10 call *0x10(%eax) <== NOT EXECUTED
done = false;
1133c1: 31 d2 xor %edx,%edx <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
1133c3: 46 inc %esi
1133c4: 66 39 f3 cmp %si,%bx
1133c7: 73 c6 jae 11338f <_POSIX_Keys_Run_destructors+0x3f>
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
1133c9: 84 d2 test %dl,%dl
1133cb: 74 a5 je 113372 <_POSIX_Keys_Run_destructors+0x22><== NEVER TAKEN
1133cd: eb ae jmp 11337d <_POSIX_Keys_Run_destructors+0x2d>
00110da4 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
110da4: 57 push %edi
110da5: 56 push %esi
110da6: 53 push %ebx
110da7: 83 ec 30 sub $0x30,%esp
110daa: 8b 7c 24 40 mov 0x40(%esp),%edi
110dae: 8b 74 24 4c mov 0x4c(%esp),%esi
110db2: 8a 5c 24 50 mov 0x50(%esp),%bl
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
110db6: 8d 44 24 28 lea 0x28(%esp),%eax
110dba: 89 44 24 08 mov %eax,0x8(%esp)
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
110dbe: 89 7c 24 04 mov %edi,0x4(%esp)
110dc2: c7 04 24 20 b1 13 00 movl $0x13b120,(%esp)
110dc9: e8 22 32 00 00 call 113ff0 <_Objects_Get>
switch ( location ) {
110dce: 8b 54 24 28 mov 0x28(%esp),%edx
110dd2: 85 d2 test %edx,%edx
110dd4: 74 1a je 110df0 <_POSIX_Message_queue_Receive_support+0x4c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
110dd6: e8 8d 9e 00 00 call 11ac68 <__errno>
110ddb: c7 00 09 00 00 00 movl $0x9,(%eax)
110de1: b8 ff ff ff ff mov $0xffffffff,%eax
}
110de6: 83 c4 30 add $0x30,%esp
110de9: 5b pop %ebx
110dea: 5e pop %esi
110deb: 5f pop %edi
110dec: c3 ret
110ded: 8d 76 00 lea 0x0(%esi),%esi
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
110df0: 8b 50 14 mov 0x14(%eax),%edx
110df3: 89 d1 mov %edx,%ecx
110df5: 83 e1 03 and $0x3,%ecx
110df8: 49 dec %ecx
110df9: 0f 84 c0 00 00 00 je 110ebf <_POSIX_Message_queue_Receive_support+0x11b>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
110dff: 8b 40 10 mov 0x10(%eax),%eax
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
110e02: 8b 4c 24 48 mov 0x48(%esp),%ecx
110e06: 39 48 68 cmp %ecx,0x68(%eax)
110e09: 77 75 ja 110e80 <_POSIX_Message_queue_Receive_support+0xdc>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
110e0b: c7 44 24 2c ff ff ff movl $0xffffffff,0x2c(%esp)
110e12: ff
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
110e13: 84 db test %bl,%bl
110e15: 75 59 jne 110e70 <_POSIX_Message_queue_Receive_support+0xcc>
110e17: 31 d2 xor %edx,%edx
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
110e19: 8b 4c 24 54 mov 0x54(%esp),%ecx
110e1d: 89 4c 24 14 mov %ecx,0x14(%esp)
110e21: 89 54 24 10 mov %edx,0x10(%esp)
110e25: 8d 54 24 2c lea 0x2c(%esp),%edx
110e29: 89 54 24 0c mov %edx,0xc(%esp)
110e2d: 8b 54 24 44 mov 0x44(%esp),%edx
110e31: 89 54 24 08 mov %edx,0x8(%esp)
110e35: 89 7c 24 04 mov %edi,0x4(%esp)
110e39: 83 c0 1c add $0x1c,%eax
110e3c: 89 04 24 mov %eax,(%esp)
110e3f: e8 0c 22 00 00 call 113050 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
110e44: e8 7f 3e 00 00 call 114cc8 <_Thread_Enable_dispatch>
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
110e49: 8b 15 ac b1 13 00 mov 0x13b1ac,%edx
do_wait,
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
110e4f: 85 f6 test %esi,%esi
110e51: 74 09 je 110e5c <_POSIX_Message_queue_Receive_support+0xb8><== NEVER TAKEN
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return (unsigned int) ((priority >= 0) ? priority : -priority);
110e53: 8b 42 24 mov 0x24(%edx),%eax
110e56: 85 c0 test %eax,%eax
110e58: 78 22 js 110e7c <_POSIX_Message_queue_Receive_support+0xd8>
*msg_prio = _POSIX_Message_queue_Priority_from_core(
110e5a: 89 06 mov %eax,(%esi)
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
110e5c: 8b 42 34 mov 0x34(%edx),%eax
110e5f: 85 c0 test %eax,%eax
110e61: 75 39 jne 110e9c <_POSIX_Message_queue_Receive_support+0xf8>
return length_out;
110e63: 8b 44 24 2c mov 0x2c(%esp),%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
110e67: 83 c4 30 add $0x30,%esp
110e6a: 5b pop %ebx
110e6b: 5e pop %esi
110e6c: 5f pop %edi
110e6d: c3 ret
110e6e: 66 90 xchg %ax,%ax
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
110e70: 80 e6 40 and $0x40,%dh
110e73: 0f 94 c2 sete %dl
110e76: 0f b6 d2 movzbl %dl,%edx
110e79: eb 9e jmp 110e19 <_POSIX_Message_queue_Receive_support+0x75>
110e7b: 90 nop
110e7c: f7 d8 neg %eax
110e7e: eb da jmp 110e5a <_POSIX_Message_queue_Receive_support+0xb6>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
110e80: e8 43 3e 00 00 call 114cc8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
110e85: e8 de 9d 00 00 call 11ac68 <__errno>
110e8a: c7 00 7a 00 00 00 movl $0x7a,(%eax)
110e90: b8 ff ff ff ff mov $0xffffffff,%eax
110e95: e9 4c ff ff ff jmp 110de6 <_POSIX_Message_queue_Receive_support+0x42>
110e9a: 66 90 xchg %ax,%ax
}
if ( !_Thread_Executing->Wait.return_code )
return length_out;
rtems_set_errno_and_return_minus_one(
110e9c: e8 c7 9d 00 00 call 11ac68 <__errno>
110ea1: 89 c3 mov %eax,%ebx
110ea3: a1 ac b1 13 00 mov 0x13b1ac,%eax
110ea8: 8b 40 34 mov 0x34(%eax),%eax
110eab: 89 04 24 mov %eax,(%esp)
110eae: e8 b1 02 00 00 call 111164 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
110eb3: 89 03 mov %eax,(%ebx)
110eb5: b8 ff ff ff ff mov $0xffffffff,%eax
110eba: e9 27 ff ff ff jmp 110de6 <_POSIX_Message_queue_Receive_support+0x42>
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
110ebf: e8 04 3e 00 00 call 114cc8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
110ec4: e8 9f 9d 00 00 call 11ac68 <__errno>
110ec9: c7 00 09 00 00 00 movl $0x9,(%eax)
110ecf: b8 ff ff ff ff mov $0xffffffff,%eax
110ed4: e9 0d ff ff ff jmp 110de6 <_POSIX_Message_queue_Receive_support+0x42>
00110f18 <_POSIX_Message_queue_Send_support>:
size_t msg_len,
unsigned int msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
110f18: 56 push %esi
110f19: 53 push %ebx
110f1a: 83 ec 34 sub $0x34,%esp
110f1d: 8b 74 24 40 mov 0x40(%esp),%esi
110f21: 8a 5c 24 50 mov 0x50(%esp),%bl
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
110f25: 83 7c 24 4c 20 cmpl $0x20,0x4c(%esp)
110f2a: 0f 87 bc 00 00 00 ja 110fec <_POSIX_Message_queue_Send_support+0xd4>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
110f30: 8d 44 24 2c lea 0x2c(%esp),%eax
110f34: 89 44 24 08 mov %eax,0x8(%esp)
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
110f38: 89 74 24 04 mov %esi,0x4(%esp)
110f3c: c7 04 24 20 b1 13 00 movl $0x13b120,(%esp)
110f43: e8 a8 30 00 00 call 113ff0 <_Objects_Get>
switch ( location ) {
110f48: 8b 54 24 2c mov 0x2c(%esp),%edx
110f4c: 85 d2 test %edx,%edx
110f4e: 0f 85 84 00 00 00 jne 110fd8 <_POSIX_Message_queue_Send_support+0xc0>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
110f54: 8b 50 14 mov 0x14(%eax),%edx
110f57: f6 c2 03 test $0x3,%dl
110f5a: 0f 84 a0 00 00 00 je 111000 <_POSIX_Message_queue_Send_support+0xe8><== NEVER TAKEN
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
110f60: 8b 40 10 mov 0x10(%eax),%eax
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
110f63: 84 db test %bl,%bl
110f65: 75 59 jne 110fc0 <_POSIX_Message_queue_Send_support+0xa8>
110f67: 31 d2 xor %edx,%edx
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
110f69: 8b 4c 24 54 mov 0x54(%esp),%ecx
110f6d: 89 4c 24 1c mov %ecx,0x1c(%esp)
110f71: 89 54 24 18 mov %edx,0x18(%esp)
RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core(
unsigned int priority
)
{
return (CORE_message_queue_Submit_types) priority * -1;
110f75: 8b 54 24 4c mov 0x4c(%esp),%edx
110f79: f7 da neg %edx
110f7b: 89 54 24 14 mov %edx,0x14(%esp)
110f7f: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
110f86: 00
110f87: 89 74 24 0c mov %esi,0xc(%esp)
110f8b: 8b 54 24 48 mov 0x48(%esp),%edx
110f8f: 89 54 24 08 mov %edx,0x8(%esp)
110f93: 8b 54 24 44 mov 0x44(%esp),%edx
110f97: 89 54 24 04 mov %edx,0x4(%esp)
110f9b: 83 c0 1c add $0x1c,%eax
110f9e: 89 04 24 mov %eax,(%esp)
110fa1: e8 da 21 00 00 call 113180 <_CORE_message_queue_Submit>
110fa6: 89 c3 mov %eax,%ebx
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
110fa8: e8 1b 3d 00 00 call 114cc8 <_Thread_Enable_dispatch>
* after it wakes up. The returned status is correct for
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
110fad: 83 fb 07 cmp $0x7,%ebx
110fb0: 74 1a je 110fcc <_POSIX_Message_queue_Send_support+0xb4>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
110fb2: 85 db test %ebx,%ebx
110fb4: 75 62 jne 111018 <_POSIX_Message_queue_Send_support+0x100>
return msg_status;
110fb6: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
110fb8: 83 c4 34 add $0x34,%esp
110fbb: 5b pop %ebx
110fbc: 5e pop %esi
110fbd: c3 ret
110fbe: 66 90 xchg %ax,%ax
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
110fc0: 80 e6 40 and $0x40,%dh
110fc3: 0f 94 c2 sete %dl
110fc6: 0f b6 d2 movzbl %dl,%edx
110fc9: eb 9e jmp 110f69 <_POSIX_Message_queue_Send_support+0x51>
110fcb: 90 nop
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
msg_status = _Thread_Executing->Wait.return_code;
110fcc: a1 ac b1 13 00 mov 0x13b1ac,%eax
110fd1: 8b 58 34 mov 0x34(%eax),%ebx
110fd4: eb dc jmp 110fb2 <_POSIX_Message_queue_Send_support+0x9a>
110fd6: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
110fd8: e8 8b 9c 00 00 call 11ac68 <__errno>
110fdd: c7 00 09 00 00 00 movl $0x9,(%eax)
110fe3: b8 ff ff ff ff mov $0xffffffff,%eax
110fe8: eb ce jmp 110fb8 <_POSIX_Message_queue_Send_support+0xa0>
110fea: 66 90 xchg %ax,%ax
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
110fec: e8 77 9c 00 00 call 11ac68 <__errno>
110ff1: c7 00 16 00 00 00 movl $0x16,(%eax)
110ff7: b8 ff ff ff ff mov $0xffffffff,%eax
110ffc: eb ba jmp 110fb8 <_POSIX_Message_queue_Send_support+0xa0>
110ffe: 66 90 xchg %ax,%ax
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
111000: e8 c3 3c 00 00 call 114cc8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
111005: e8 5e 9c 00 00 call 11ac68 <__errno>
11100a: c7 00 09 00 00 00 movl $0x9,(%eax)
111010: b8 ff ff ff ff mov $0xffffffff,%eax
111015: eb a1 jmp 110fb8 <_POSIX_Message_queue_Send_support+0xa0>
111017: 90 nop
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
111018: e8 4b 9c 00 00 call 11ac68 <__errno>
11101d: 89 c6 mov %eax,%esi
11101f: 89 1c 24 mov %ebx,(%esp)
111022: e8 3d 01 00 00 call 111164 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
111027: 89 06 mov %eax,(%esi)
111029: b8 ff ff ff ff mov $0xffffffff,%eax
11102e: eb 88 jmp 110fb8 <_POSIX_Message_queue_Send_support+0xa0>
00112b48 <_POSIX_Semaphore_Create_support>:
size_t name_len,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
112b48: 56 push %esi
112b49: 53 push %ebx
112b4a: 83 ec 14 sub $0x14,%esp
112b4d: 8b 74 24 20 mov 0x20(%esp),%esi
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
112b51: 8b 44 24 28 mov 0x28(%esp),%eax
112b55: 85 c0 test %eax,%eax
112b57: 0f 85 c3 00 00 00 jne 112c20 <_POSIX_Semaphore_Create_support+0xd8>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
112b5d: a1 64 60 13 00 mov 0x136064,%eax
112b62: 40 inc %eax
112b63: a3 64 60 13 00 mov %eax,0x136064
return _Thread_Dispatch_disable_level;
112b68: a1 64 60 13 00 mov 0x136064,%eax
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
112b6d: c7 04 24 80 63 13 00 movl $0x136380,(%esp)
112b74: e8 63 bd ff ff call 10e8dc <_Objects_Allocate>
112b79: 89 c3 mov %eax,%ebx
rtems_set_errno_and_return_minus_one( ENOSYS );
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
112b7b: 85 c0 test %eax,%eax
112b7d: 0f 84 af 00 00 00 je 112c32 <_POSIX_Semaphore_Create_support+0xea>
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
if ( name_arg != NULL ) {
112b83: 85 f6 test %esi,%esi
112b85: 74 7d je 112c04 <_POSIX_Semaphore_Create_support+0xbc>
name = _Workspace_String_duplicate( name_arg, name_len );
112b87: 8b 44 24 24 mov 0x24(%esp),%eax
112b8b: 89 44 24 04 mov %eax,0x4(%esp)
112b8f: 89 34 24 mov %esi,(%esp)
112b92: e8 f5 15 00 00 call 11418c <_Workspace_String_duplicate>
112b97: 89 c6 mov %eax,%esi
if ( !name ) {
112b99: 85 c0 test %eax,%eax
112b9b: 0f 84 a8 00 00 00 je 112c49 <_POSIX_Semaphore_Create_support+0x101><== NEVER TAKEN
}
} else {
name = NULL;
}
the_semaphore->process_shared = pshared;
112ba1: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( name ) {
the_semaphore->named = true;
112ba8: c6 43 14 01 movb $0x1,0x14(%ebx)
the_semaphore->open_count = 1;
112bac: c7 43 18 01 00 00 00 movl $0x1,0x18(%ebx)
the_semaphore->linked = true;
112bb3: c6 43 15 01 movb $0x1,0x15(%ebx)
* blocking tasks on this semaphore should be. It could somehow
* be derived from the current scheduling policy. One
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
112bb7: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
112bbe: c7 43 5c ff ff ff ff movl $0xffffffff,0x5c(%ebx)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
112bc5: 8b 44 24 2c mov 0x2c(%esp),%eax
112bc9: 89 44 24 08 mov %eax,0x8(%esp)
the_semaphore->named = false;
the_semaphore->open_count = 0;
the_semaphore->linked = false;
}
the_sem_attr = &the_semaphore->Semaphore.Attributes;
112bcd: 8d 43 5c lea 0x5c(%ebx),%eax
112bd0: 89 44 24 04 mov %eax,0x4(%esp)
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
112bd4: 8d 43 1c lea 0x1c(%ebx),%eax
112bd7: 89 04 24 mov %eax,(%esp)
112bda: e8 9d b7 ff ff call 10e37c <_CORE_semaphore_Initialize>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
112bdf: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
112be3: a1 9c 63 13 00 mov 0x13639c,%eax
112be8: 89 1c 90 mov %ebx,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
112beb: 89 73 0c mov %esi,0xc(%ebx)
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name
);
*the_sem = the_semaphore;
112bee: 8b 44 24 30 mov 0x30(%esp),%eax
112bf2: 89 18 mov %ebx,(%eax)
_Thread_Enable_dispatch();
112bf4: e8 bf ce ff ff call 10fab8 <_Thread_Enable_dispatch>
return 0;
112bf9: 31 c0 xor %eax,%eax
}
112bfb: 83 c4 14 add $0x14,%esp
112bfe: 5b pop %ebx
112bff: 5e pop %esi
112c00: c3 ret
112c01: 8d 76 00 lea 0x0(%esi),%esi
}
} else {
name = NULL;
}
the_semaphore->process_shared = pshared;
112c04: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
if ( name ) {
the_semaphore->named = true;
the_semaphore->open_count = 1;
the_semaphore->linked = true;
} else {
the_semaphore->named = false;
112c0b: c6 40 14 00 movb $0x0,0x14(%eax)
the_semaphore->open_count = 0;
112c0f: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_semaphore->linked = false;
112c16: c6 40 15 00 movb $0x0,0x15(%eax)
_POSIX_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
} else {
name = NULL;
112c1a: 31 f6 xor %esi,%esi
112c1c: eb 99 jmp 112bb7 <_POSIX_Semaphore_Create_support+0x6f>
112c1e: 66 90 xchg %ax,%ax
CORE_semaphore_Attributes *the_sem_attr;
char *name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
rtems_set_errno_and_return_minus_one( ENOSYS );
112c20: e8 eb 2d 00 00 call 115a10 <__errno>
112c25: c7 00 58 00 00 00 movl $0x58,(%eax)
112c2b: b8 ff ff ff ff mov $0xffffffff,%eax
112c30: eb c9 jmp 112bfb <_POSIX_Semaphore_Create_support+0xb3>
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
112c32: e8 81 ce ff ff call 10fab8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
112c37: e8 d4 2d 00 00 call 115a10 <__errno>
112c3c: c7 00 1c 00 00 00 movl $0x1c,(%eax)
112c42: b8 ff ff ff ff mov $0xffffffff,%eax
112c47: eb b2 jmp 112bfb <_POSIX_Semaphore_Create_support+0xb3>
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
112c49: 89 5c 24 04 mov %ebx,0x4(%esp) <== NOT EXECUTED
112c4d: c7 04 24 80 63 13 00 movl $0x136380,(%esp) <== NOT EXECUTED
112c54: e8 ff bf ff ff call 10ec58 <_Objects_Free> <== NOT EXECUTED
*/
if ( name_arg != NULL ) {
name = _Workspace_String_duplicate( name_arg, name_len );
if ( !name ) {
_POSIX_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
112c59: e8 5a ce ff ff call 10fab8 <_Thread_Enable_dispatch><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
112c5e: e8 ad 2d 00 00 call 115a10 <__errno> <== NOT EXECUTED
112c63: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
112c69: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
112c6e: eb 8b jmp 112bfb <_POSIX_Semaphore_Create_support+0xb3><== NOT EXECUTED
001106ac <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
1106ac: 83 ec 1c sub $0x1c,%esp
1106af: 8b 54 24 20 mov 0x20(%esp),%edx
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
1106b3: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
1106b9: 8b 88 d8 00 00 00 mov 0xd8(%eax),%ecx
1106bf: 85 c9 test %ecx,%ecx
1106c1: 75 09 jne 1106cc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x20><== NEVER TAKEN
1106c3: 83 b8 dc 00 00 00 01 cmpl $0x1,0xdc(%eax)
1106ca: 74 08 je 1106d4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
1106cc: 83 c4 1c add $0x1c,%esp
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
1106cf: e9 bc d8 ff ff jmp 10df90 <_Thread_Enable_dispatch>
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
1106d4: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax
1106da: 85 c0 test %eax,%eax
1106dc: 74 ee je 1106cc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x20>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
1106de: a1 84 16 13 00 mov 0x131684,%eax
1106e3: 48 dec %eax
1106e4: a3 84 16 13 00 mov %eax,0x131684
return _Thread_Dispatch_disable_level;
1106e9: a1 84 16 13 00 mov 0x131684,%eax
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
1106ee: c7 44 24 04 ff ff ff movl $0xffffffff,0x4(%esp)
1106f5: ff
1106f6: 89 14 24 mov %edx,(%esp)
1106f9: e8 8e 07 00 00 call 110e8c <_POSIX_Thread_Exit>
} else
_Thread_Enable_dispatch();
}
1106fe: 83 c4 1c add $0x1c,%esp
110701: c3 ret
00111ad4 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
111ad4: 56 push %esi
111ad5: 53 push %ebx
111ad6: 83 ec 14 sub $0x14,%esp
111ad9: 8b 5c 24 24 mov 0x24(%esp),%ebx
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
111add: 8b 03 mov (%ebx),%eax
111adf: 89 04 24 mov %eax,(%esp)
111ae2: e8 d1 ff ff ff call 111ab8 <_POSIX_Priority_Is_valid>
111ae7: 84 c0 test %al,%al
111ae9: 75 0d jne 111af8 <_POSIX_Thread_Translate_sched_param+0x24><== ALWAYS TAKEN
return EINVAL;
111aeb: b8 16 00 00 00 mov $0x16,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
111af0: 83 c4 14 add $0x14,%esp
111af3: 5b pop %ebx
111af4: 5e pop %esi
111af5: c3 ret
111af6: 66 90 xchg %ax,%ax
)
{
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
111af8: 8b 44 24 28 mov 0x28(%esp),%eax
111afc: c7 00 00 00 00 00 movl $0x0,(%eax)
*budget_callout = NULL;
111b02: 8b 44 24 2c mov 0x2c(%esp),%eax
111b06: c7 00 00 00 00 00 movl $0x0,(%eax)
if ( policy == SCHED_OTHER ) {
111b0c: 8b 44 24 20 mov 0x20(%esp),%eax
111b10: 85 c0 test %eax,%eax
111b12: 0f 84 88 00 00 00 je 111ba0 <_POSIX_Thread_Translate_sched_param+0xcc>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
111b18: 83 7c 24 20 01 cmpl $0x1,0x20(%esp)
111b1d: 0f 84 91 00 00 00 je 111bb4 <_POSIX_Thread_Translate_sched_param+0xe0>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
111b23: 83 7c 24 20 02 cmpl $0x2,0x20(%esp)
111b28: 0f 84 8e 00 00 00 je 111bbc <_POSIX_Thread_Translate_sched_param+0xe8>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
111b2e: 83 7c 24 20 04 cmpl $0x4,0x20(%esp)
111b33: 75 b6 jne 111aeb <_POSIX_Thread_Translate_sched_param+0x17>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
111b35: 8b 73 08 mov 0x8(%ebx),%esi
111b38: 85 f6 test %esi,%esi
111b3a: 75 07 jne 111b43 <_POSIX_Thread_Translate_sched_param+0x6f>
111b3c: 8b 4b 0c mov 0xc(%ebx),%ecx
111b3f: 85 c9 test %ecx,%ecx
111b41: 74 a8 je 111aeb <_POSIX_Thread_Translate_sched_param+0x17>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
111b43: 8b 53 10 mov 0x10(%ebx),%edx
111b46: 85 d2 test %edx,%edx
111b48: 75 07 jne 111b51 <_POSIX_Thread_Translate_sched_param+0x7d>
111b4a: 8b 43 14 mov 0x14(%ebx),%eax
111b4d: 85 c0 test %eax,%eax
111b4f: 74 9a je 111aeb <_POSIX_Thread_Translate_sched_param+0x17>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
111b51: 8d 43 08 lea 0x8(%ebx),%eax
111b54: 89 04 24 mov %eax,(%esp)
111b57: e8 60 dc ff ff call 10f7bc <_Timespec_To_ticks>
111b5c: 89 c6 mov %eax,%esi
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
111b5e: 8d 43 10 lea 0x10(%ebx),%eax
111b61: 89 04 24 mov %eax,(%esp)
111b64: e8 53 dc ff ff call 10f7bc <_Timespec_To_ticks>
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
111b69: 39 c6 cmp %eax,%esi
111b6b: 0f 82 7a ff ff ff jb 111aeb <_POSIX_Thread_Translate_sched_param+0x17>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
111b71: 8b 43 04 mov 0x4(%ebx),%eax
111b74: 89 04 24 mov %eax,(%esp)
111b77: e8 3c ff ff ff call 111ab8 <_POSIX_Priority_Is_valid>
111b7c: 84 c0 test %al,%al
111b7e: 0f 84 67 ff ff ff je 111aeb <_POSIX_Thread_Translate_sched_param+0x17>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
111b84: 8b 44 24 28 mov 0x28(%esp),%eax
111b88: c7 00 03 00 00 00 movl $0x3,(%eax)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
111b8e: 8b 44 24 2c mov 0x2c(%esp),%eax
111b92: c7 00 40 c0 10 00 movl $0x10c040,(%eax)
return 0;
111b98: 31 c0 xor %eax,%eax
111b9a: e9 51 ff ff ff jmp 111af0 <_POSIX_Thread_Translate_sched_param+0x1c>
111b9f: 90 nop
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
111ba0: 8b 44 24 28 mov 0x28(%esp),%eax
111ba4: c7 00 01 00 00 00 movl $0x1,(%eax)
return 0;
111baa: 31 c0 xor %eax,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
111bac: 83 c4 14 add $0x14,%esp
111baf: 5b pop %ebx
111bb0: 5e pop %esi
111bb1: c3 ret
111bb2: 66 90 xchg %ax,%ax
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
111bb4: 31 c0 xor %eax,%eax
111bb6: e9 35 ff ff ff jmp 111af0 <_POSIX_Thread_Translate_sched_param+0x1c>
111bbb: 90 nop
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
111bbc: 8b 44 24 28 mov 0x28(%esp),%eax
111bc0: c7 00 02 00 00 00 movl $0x2,(%eax)
return 0;
111bc6: 31 c0 xor %eax,%eax
111bc8: e9 23 ff ff ff jmp 111af0 <_POSIX_Thread_Translate_sched_param+0x1c>
001109b8 <_POSIX_Threads_Delete_extension>:
*/
static void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
1109b8: 55 push %ebp
1109b9: 57 push %edi
1109ba: 56 push %esi
1109bb: 53 push %ebx
1109bc: 83 ec 1c sub $0x1c,%esp
1109bf: 8b 7c 24 34 mov 0x34(%esp),%edi
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
1109c3: 8b af e8 00 00 00 mov 0xe8(%edi),%ebp
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
1109c9: 89 3c 24 mov %edi,(%esp)
1109cc: e8 1f 29 00 00 call 1132f0 <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
1109d1: 89 3c 24 mov %edi,(%esp)
1109d4: e8 77 29 00 00 call 113350 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
1109d9: 8b 77 28 mov 0x28(%edi),%esi
1109dc: 8d 5d 44 lea 0x44(%ebp),%ebx
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
1109df: eb 08 jmp 1109e9 <_POSIX_Threads_Delete_extension+0x31>
1109e1: 8d 76 00 lea 0x0(%esi),%esi
*(void **)the_thread->Wait.return_argument = value_ptr;
1109e4: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
1109e7: 89 30 mov %esi,(%eax) <== NOT EXECUTED
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
1109e9: 89 1c 24 mov %ebx,(%esp)
1109ec: e8 fb d7 ff ff call 10e1ec <_Thread_queue_Dequeue>
1109f1: 85 c0 test %eax,%eax
1109f3: 75 ef jne 1109e4 <_POSIX_Threads_Delete_extension+0x2c><== NEVER TAKEN
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
1109f5: 83 bd 84 00 00 00 04 cmpl $0x4,0x84(%ebp)
1109fc: 74 1a je 110a18 <_POSIX_Threads_Delete_extension+0x60>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
1109fe: c7 87 e8 00 00 00 00 movl $0x0,0xe8(%edi)
110a05: 00 00 00
_Workspace_Free( api );
110a08: 89 6c 24 30 mov %ebp,0x30(%esp)
}
110a0c: 83 c4 1c add $0x1c,%esp
110a0f: 5b pop %ebx
110a10: 5e pop %esi
110a11: 5f pop %edi
110a12: 5d pop %ebp
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
_Workspace_Free( api );
110a13: e9 c8 e2 ff ff jmp 10ece0 <_Workspace_Free>
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
110a18: 8d 85 a8 00 00 00 lea 0xa8(%ebp),%eax
110a1e: 89 04 24 mov %eax,(%esp)
110a21: e8 3a e1 ff ff call 10eb60 <_Watchdog_Remove>
110a26: eb d6 jmp 1109fe <_POSIX_Threads_Delete_extension+0x46>
0010bd44 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
10bd44: 55 push %ebp
10bd45: 57 push %edi
10bd46: 56 push %esi
10bd47: 53 push %ebx
10bd48: 83 ec 7c sub $0x7c,%esp
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
10bd4b: 8b 35 14 ee 12 00 mov 0x12ee14,%esi
maximum = Configuration_POSIX_API.number_of_initialization_threads;
10bd51: a1 10 ee 12 00 mov 0x12ee10,%eax
10bd56: 89 44 24 1c mov %eax,0x1c(%esp)
if ( !user_threads || maximum == 0 )
10bd5a: 85 f6 test %esi,%esi
10bd5c: 74 5d je 10bdbb <_POSIX_Threads_Initialize_user_threads_body+0x77><== NEVER TAKEN
10bd5e: 85 c0 test %eax,%eax
10bd60: 74 59 je 10bdbb <_POSIX_Threads_Initialize_user_threads_body+0x77><== NEVER TAKEN
10bd62: 31 ff xor %edi,%edi
10bd64: 8d 5c 24 30 lea 0x30(%esp),%ebx
10bd68: 8d 6c 24 2c lea 0x2c(%esp),%ebp
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
10bd6c: 89 1c 24 mov %ebx,(%esp)
10bd6f: e8 5c 5e 00 00 call 111bd0 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
10bd74: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
10bd7b: 00
10bd7c: 89 1c 24 mov %ebx,(%esp)
10bd7f: e8 74 5e 00 00 call 111bf8 <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
10bd84: 8b 46 04 mov 0x4(%esi),%eax
10bd87: 89 44 24 04 mov %eax,0x4(%esp)
10bd8b: 89 1c 24 mov %ebx,(%esp)
10bd8e: e8 95 5e 00 00 call 111c28 <pthread_attr_setstacksize>
status = pthread_create(
10bd93: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10bd9a: 00
10bd9b: 8b 06 mov (%esi),%eax
10bd9d: 89 44 24 08 mov %eax,0x8(%esp)
&thread_id,
&attr,
10bda1: 89 5c 24 04 mov %ebx,0x4(%esp)
*/
(void) pthread_attr_init( &attr );
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
status = pthread_create(
10bda5: 89 2c 24 mov %ebp,(%esp)
10bda8: e8 cb fb ff ff call 10b978 <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
10bdad: 85 c0 test %eax,%eax
10bdaf: 75 12 jne 10bdc3 <_POSIX_Threads_Initialize_user_threads_body+0x7f>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
10bdb1: 47 inc %edi
10bdb2: 83 c6 08 add $0x8,%esi
10bdb5: 3b 7c 24 1c cmp 0x1c(%esp),%edi
10bdb9: 75 b1 jne 10bd6c <_POSIX_Threads_Initialize_user_threads_body+0x28><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
10bdbb: 83 c4 7c add $0x7c,%esp
10bdbe: 5b pop %ebx
10bdbf: 5e pop %esi
10bdc0: 5f pop %edi
10bdc1: 5d pop %ebp
10bdc2: c3 ret
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
10bdc3: 89 44 24 08 mov %eax,0x8(%esp)
10bdc7: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10bdce: 00
10bdcf: c7 04 24 02 00 00 00 movl $0x2,(%esp)
10bdd6: e8 45 1e 00 00 call 10dc20 <_Internal_error_Occurred>
00110b68 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
110b68: 56 push %esi
110b69: 53 push %ebx
110b6a: 83 ec 14 sub $0x14,%esp
110b6d: 8b 74 24 24 mov 0x24(%esp),%esi
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
110b71: 8b 9e e8 00 00 00 mov 0xe8(%esi),%ebx
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
110b77: 8d 83 98 00 00 00 lea 0x98(%ebx),%eax
110b7d: 89 04 24 mov %eax,(%esp)
110b80: e8 b7 15 00 00 call 11213c <_Timespec_To_ticks>
the_thread->cpu_time_budget = ticks;
110b85: 89 46 74 mov %eax,0x74(%esi)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
110b88: 0f b6 05 4c da 12 00 movzbl 0x12da4c,%eax
110b8f: 2b 83 88 00 00 00 sub 0x88(%ebx),%eax
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
110b95: 89 46 18 mov %eax,0x18(%esi)
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
110b98: 8b 56 1c mov 0x1c(%esi),%edx
110b9b: 85 d2 test %edx,%edx
110b9d: 75 05 jne 110ba4 <_POSIX_Threads_Sporadic_budget_TSR+0x3c><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
110b9f: 39 46 14 cmp %eax,0x14(%esi)
110ba2: 77 30 ja 110bd4 <_POSIX_Threads_Sporadic_budget_TSR+0x6c>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
110ba4: 8d 83 90 00 00 00 lea 0x90(%ebx),%eax
110baa: 89 04 24 mov %eax,(%esp)
110bad: e8 8a 15 00 00 call 11213c <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
110bb2: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
110bb8: 81 c3 a8 00 00 00 add $0xa8,%ebx
110bbe: 89 5c 24 24 mov %ebx,0x24(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
110bc2: c7 44 24 20 e8 1f 13 movl $0x131fe8,0x20(%esp)
110bc9: 00
}
110bca: 83 c4 14 add $0x14,%esp
110bcd: 5b pop %ebx
110bce: 5e pop %esi
110bcf: e9 70 de ff ff jmp 10ea44 <_Watchdog_Insert>
if ( the_thread->resource_count == 0 ) {
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
110bd4: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
110bdb: 00
110bdc: 89 44 24 04 mov %eax,0x4(%esp)
110be0: 89 34 24 mov %esi,(%esp)
110be3: e8 d0 cd ff ff call 10d9b8 <_Thread_Change_priority>
110be8: eb ba jmp 110ba4 <_POSIX_Threads_Sporadic_budget_TSR+0x3c>
00110bec <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
110bec: 83 ec 1c sub $0x1c,%esp
110bef: 8b 44 24 20 mov 0x20(%esp),%eax
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
110bf3: 8b 88 e8 00 00 00 mov 0xe8(%eax),%ecx
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
110bf9: c7 40 74 ff ff ff ff movl $0xffffffff,0x74(%eax)
110c00: 0f b6 15 4c da 12 00 movzbl 0x12da4c,%edx
110c07: 2b 91 8c 00 00 00 sub 0x8c(%ecx),%edx
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
110c0d: 89 50 18 mov %edx,0x18(%eax)
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
110c10: 8b 48 1c mov 0x1c(%eax),%ecx
110c13: 85 c9 test %ecx,%ecx
110c15: 75 05 jne 110c1c <_POSIX_Threads_Sporadic_budget_callout+0x30><== NEVER TAKEN
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
110c17: 39 50 14 cmp %edx,0x14(%eax)
110c1a: 72 04 jb 110c20 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN
#if 0
printk( "lower priority\n" );
#endif
}
}
}
110c1c: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
110c1f: c3 ret <== NOT EXECUTED
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
110c20: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
110c27: 00
110c28: 89 54 24 04 mov %edx,0x4(%esp)
110c2c: 89 04 24 mov %eax,(%esp)
110c2f: e8 84 cd ff ff call 10d9b8 <_Thread_Change_priority>
#if 0
printk( "lower priority\n" );
#endif
}
}
}
110c34: 83 c4 1c add $0x1c,%esp
110c37: c3 ret
001132f0 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
1132f0: 57 push %edi
1132f1: 56 push %esi
1132f2: 53 push %ebx
1132f3: 83 ec 10 sub $0x10,%esp
POSIX_Cancel_Handler_control *handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
1132f6: 8b 44 24 20 mov 0x20(%esp),%eax
1132fa: 8b b8 e8 00 00 00 mov 0xe8(%eax),%edi
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
113300: c7 87 d8 00 00 00 01 movl $0x1,0xd8(%edi)
113307: 00 00 00
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11330a: 8d b7 e8 00 00 00 lea 0xe8(%edi),%esi
while ( !_Chain_Is_empty( handler_stack ) ) {
113310: 39 b7 e4 00 00 00 cmp %esi,0xe4(%edi)
113316: 74 2e je 113346 <_POSIX_Threads_cancel_run+0x56>
_ISR_Disable( level );
113318: 9c pushf
113319: fa cli
11331a: 59 pop %ecx
handler = (POSIX_Cancel_Handler_control *)
11331b: 8b 9f ec 00 00 00 mov 0xec(%edi),%ebx
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
113321: 8b 13 mov (%ebx),%edx
previous = the_node->previous;
113323: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
113326: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
113329: 89 10 mov %edx,(%eax)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
11332b: 51 push %ecx
11332c: 9d popf
(*handler->routine)( handler->arg );
11332d: 8b 43 0c mov 0xc(%ebx),%eax
113330: 89 04 24 mov %eax,(%esp)
113333: ff 53 08 call *0x8(%ebx)
_Workspace_Free( handler );
113336: 89 1c 24 mov %ebx,(%esp)
113339: e8 a2 b9 ff ff call 10ece0 <_Workspace_Free>
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
11333e: 39 b7 e4 00 00 00 cmp %esi,0xe4(%edi)
113344: 75 d2 jne 113318 <_POSIX_Threads_cancel_run+0x28><== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
113346: 83 c4 10 add $0x10,%esp
113349: 5b pop %ebx
11334a: 5e pop %esi
11334b: 5f pop %edi
11334c: c3 ret
0010b754 <_POSIX_Timer_TSR>:
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
10b754: 57 push %edi
10b755: 56 push %esi
10b756: 53 push %ebx
10b757: 83 ec 30 sub $0x30,%esp
10b75a: 8b 5c 24 44 mov 0x44(%esp),%ebx
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
10b75e: ff 43 68 incl 0x68(%ebx)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
10b761: 8b 53 54 mov 0x54(%ebx),%edx
10b764: 85 d2 test %edx,%edx
10b766: 75 2c jne 10b794 <_POSIX_Timer_TSR+0x40>
10b768: 8b 43 58 mov 0x58(%ebx),%eax
10b76b: 85 c0 test %eax,%eax
10b76d: 75 25 jne 10b794 <_POSIX_Timer_TSR+0x40> <== ALWAYS TAKEN
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10b76f: c6 43 3c 04 movb $0x4,0x3c(%ebx) <== NOT EXECUTED
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
10b773: 8b 43 44 mov 0x44(%ebx),%eax
10b776: 89 44 24 04 mov %eax,0x4(%esp)
10b77a: 8b 43 38 mov 0x38(%ebx),%eax
10b77d: 89 04 24 mov %eax,(%esp)
10b780: e8 b3 58 00 00 call 111038 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
10b785: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
}
10b78c: 83 c4 30 add $0x30,%esp
10b78f: 5b pop %ebx
10b790: 5e pop %esi
10b791: 5f pop %edi
10b792: c3 ret
10b793: 90 nop
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
10b794: 89 5c 24 10 mov %ebx,0x10(%esp)
10b798: c7 44 24 0c 54 b7 10 movl $0x10b754,0xc(%esp)
10b79f: 00
10b7a0: 8b 43 08 mov 0x8(%ebx),%eax
10b7a3: 89 44 24 08 mov %eax,0x8(%esp)
10b7a7: 8b 43 64 mov 0x64(%ebx),%eax
10b7aa: 89 44 24 04 mov %eax,0x4(%esp)
10b7ae: 8d 43 10 lea 0x10(%ebx),%eax
10b7b1: 89 04 24 mov %eax,(%esp)
10b7b4: e8 07 5d 00 00 call 1114c0 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
10b7b9: 84 c0 test %al,%al
10b7bb: 74 cf je 10b78c <_POSIX_Timer_TSR+0x38> <== NEVER TAKEN
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
10b7bd: 8d 44 24 28 lea 0x28(%esp),%eax
10b7c1: 89 04 24 mov %eax,(%esp)
10b7c4: e8 97 16 00 00 call 10ce60 <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
10b7c9: 8b 74 24 28 mov 0x28(%esp),%esi
10b7cd: 8b 7c 24 2c mov 0x2c(%esp),%edi
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
10b7d1: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b7d8: 3b
10b7d9: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b7e0: 00
10b7e1: 89 34 24 mov %esi,(%esp)
10b7e4: 89 7c 24 04 mov %edi,0x4(%esp)
10b7e8: e8 d7 51 01 00 call 1209c4 <__divdi3>
10b7ed: 89 43 6c mov %eax,0x6c(%ebx)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
10b7f0: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b7f7: 3b
10b7f8: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b7ff: 00
10b800: 89 34 24 mov %esi,(%esp)
10b803: 89 7c 24 04 mov %edi,0x4(%esp)
10b807: e8 0c 53 01 00 call 120b18 <__moddi3>
10b80c: 89 43 70 mov %eax,0x70(%ebx)
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10b80f: c6 43 3c 03 movb $0x3,0x3c(%ebx)
10b813: e9 5b ff ff ff jmp 10b773 <_POSIX_Timer_TSR+0x1f>
001133d0 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
1133d0: 55 push %ebp
1133d1: 57 push %edi
1133d2: 56 push %esi
1133d3: 53 push %ebx
1133d4: 83 ec 7c sub $0x7c,%esp
1133d7: 8b ac 24 94 00 00 00 mov 0x94(%esp),%ebp
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
1133de: c7 44 24 10 01 00 00 movl $0x1,0x10(%esp)
1133e5: 00
1133e6: 0f b6 84 24 98 00 00 movzbl 0x98(%esp),%eax
1133ed: 00
1133ee: 89 44 24 0c mov %eax,0xc(%esp)
1133f2: 8d 5c 24 3c lea 0x3c(%esp),%ebx
1133f6: 89 5c 24 08 mov %ebx,0x8(%esp)
1133fa: 89 6c 24 04 mov %ebp,0x4(%esp)
1133fe: 8b 94 24 90 00 00 00 mov 0x90(%esp),%edx
113405: 89 14 24 mov %edx,(%esp)
113408: e8 bb 00 00 00 call 1134c8 <_POSIX_signals_Clear_signals>
11340d: 84 c0 test %al,%al
11340f: 0f 84 a7 00 00 00 je 1134bc <_POSIX_signals_Check_signal+0xec>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
113415: 8d 44 6d 00 lea 0x0(%ebp,%ebp,2),%eax
113419: c1 e0 02 shl $0x2,%eax
11341c: 8b 90 48 25 13 00 mov 0x132548(%eax),%edx
113422: 83 fa 01 cmp $0x1,%edx
113425: 0f 84 91 00 00 00 je 1134bc <_POSIX_signals_Check_signal+0xec><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
11342b: 8b 8c 24 90 00 00 00 mov 0x90(%esp),%ecx
113432: 8b 89 d0 00 00 00 mov 0xd0(%ecx),%ecx
113438: 89 4c 24 2c mov %ecx,0x2c(%esp)
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
11343c: 0b 88 44 25 13 00 or 0x132544(%eax),%ecx
113442: 8b b4 24 90 00 00 00 mov 0x90(%esp),%esi
113449: 89 8e d0 00 00 00 mov %ecx,0xd0(%esi)
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
11344f: 8d 74 24 48 lea 0x48(%esp),%esi
113453: 89 74 24 28 mov %esi,0x28(%esp)
113457: 8b 35 cc 24 13 00 mov 0x1324cc,%esi
11345d: 83 c6 20 add $0x20,%esi
113460: b9 0a 00 00 00 mov $0xa,%ecx
113465: 8b 7c 24 28 mov 0x28(%esp),%edi
113469: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
11346b: 83 b8 40 25 13 00 02 cmpl $0x2,0x132540(%eax)
113472: 74 34 je 1134a8 <_POSIX_signals_Check_signal+0xd8>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
113474: 89 2c 24 mov %ebp,(%esp)
113477: ff d2 call *%edx
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
113479: 8b 3d cc 24 13 00 mov 0x1324cc,%edi
11347f: 83 c7 20 add $0x20,%edi
113482: b9 0a 00 00 00 mov $0xa,%ecx
113487: 8b 74 24 28 mov 0x28(%esp),%esi
11348b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
11348d: 8b 44 24 2c mov 0x2c(%esp),%eax
113491: 8b 94 24 90 00 00 00 mov 0x90(%esp),%edx
113498: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
return true;
11349e: b0 01 mov $0x1,%al
}
1134a0: 83 c4 7c add $0x7c,%esp
1134a3: 5b pop %ebx
1134a4: 5e pop %esi
1134a5: 5f pop %edi
1134a6: 5d pop %ebp
1134a7: c3 ret
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
1134a8: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
1134af: 00
1134b0: 89 5c 24 04 mov %ebx,0x4(%esp)
1134b4: 89 2c 24 mov %ebp,(%esp)
1134b7: ff d2 call *%edx
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
1134b9: eb be jmp 113479 <_POSIX_signals_Check_signal+0xa9>
1134bb: 90 nop
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
is_global, true ) )
return false;
1134bc: 31 c0 xor %eax,%eax
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
}
1134be: 83 c4 7c add $0x7c,%esp
1134c1: 5b pop %ebx
1134c2: 5e pop %esi
1134c3: 5f pop %edi
1134c4: 5d pop %ebp
1134c5: c3 ret
00113b78 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
113b78: 53 push %ebx
113b79: 8b 44 24 08 mov 0x8(%esp),%eax
113b7d: 8d 48 ff lea -0x1(%eax),%ecx
113b80: ba 01 00 00 00 mov $0x1,%edx
113b85: d3 e2 shl %cl,%edx
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
113b87: 9c pushf
113b88: fa cli
113b89: 59 pop %ecx
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
113b8a: 8d 04 40 lea (%eax,%eax,2),%eax
113b8d: c1 e0 02 shl $0x2,%eax
113b90: 83 b8 40 25 13 00 02 cmpl $0x2,0x132540(%eax)
113b97: 74 0f je 113ba8 <_POSIX_signals_Clear_process_signals+0x30>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
113b99: f7 d2 not %edx
113b9b: 21 15 48 27 13 00 and %edx,0x132748
}
_ISR_Enable( level );
113ba1: 51 push %ecx
113ba2: 9d popf
}
113ba3: 5b pop %ebx
113ba4: c3 ret
113ba5: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
113ba8: 8d 98 64 27 13 00 lea 0x132764(%eax),%ebx
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
113bae: 39 98 60 27 13 00 cmp %ebx,0x132760(%eax)
113bb4: 75 eb jne 113ba1 <_POSIX_signals_Clear_process_signals+0x29><== NEVER TAKEN
113bb6: eb e1 jmp 113b99 <_POSIX_signals_Clear_process_signals+0x21>
0010c45c <_POSIX_signals_Get_lowest>:
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
sigset_t set
)
{
10c45c: 56 push %esi
10c45d: 53 push %ebx
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10c45e: ba 1b 00 00 00 mov $0x1b,%edx
10c463: bb 01 00 00 00 mov $0x1,%ebx
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
10c468: 8d 4a ff lea -0x1(%edx),%ecx
10c46b: 89 de mov %ebx,%esi
10c46d: d3 e6 shl %cl,%esi
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10c46f: 85 c6 test %eax,%esi
10c471: 75 22 jne 10c495 <_POSIX_signals_Get_lowest+0x39><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10c473: 42 inc %edx
10c474: 83 fa 20 cmp $0x20,%edx
10c477: 75 ef jne 10c468 <_POSIX_signals_Get_lowest+0xc>
10c479: b2 01 mov $0x1,%dl
10c47b: bb 01 00 00 00 mov $0x1,%ebx
10c480: eb 08 jmp 10c48a <_POSIX_signals_Get_lowest+0x2e>
10c482: 66 90 xchg %ax,%ax
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10c484: 42 inc %edx
10c485: 83 fa 1b cmp $0x1b,%edx
10c488: 74 0b je 10c495 <_POSIX_signals_Get_lowest+0x39><== NEVER TAKEN
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
10c48a: 8d 4a ff lea -0x1(%edx),%ecx
10c48d: 89 de mov %ebx,%esi
10c48f: d3 e6 shl %cl,%esi
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10c491: 85 c6 test %eax,%esi
10c493: 74 ef je 10c484 <_POSIX_signals_Get_lowest+0x28>
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
10c495: 89 d0 mov %edx,%eax
10c497: 5b pop %ebx
10c498: 5e pop %esi
10c499: c3 ret
00120974 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
120974: 57 push %edi
120975: 56 push %esi
120976: 53 push %ebx
120977: 83 ec 10 sub $0x10,%esp
12097a: 8b 5c 24 20 mov 0x20(%esp),%ebx
12097e: 8b 74 24 24 mov 0x24(%esp),%esi
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
120982: 8b bb e8 00 00 00 mov 0xe8(%ebx),%edi
120988: 8d 4e ff lea -0x1(%esi),%ecx
12098b: b8 01 00 00 00 mov $0x1,%eax
120990: d3 e0 shl %cl,%eax
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
120992: 8b 53 10 mov 0x10(%ebx),%edx
120995: 89 d1 mov %edx,%ecx
120997: 81 e1 00 80 00 10 and $0x10008000,%ecx
12099d: 81 f9 00 80 00 10 cmp $0x10008000,%ecx
1209a3: 74 73 je 120a18 <_POSIX_signals_Unblock_thread+0xa4>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
1209a5: 8b 8f d0 00 00 00 mov 0xd0(%edi),%ecx
1209ab: f7 d1 not %ecx
1209ad: 85 c8 test %ecx,%eax
1209af: 74 5b je 120a0c <_POSIX_signals_Unblock_thread+0x98>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
1209b1: f7 c2 00 00 00 10 test $0x10000000,%edx
1209b7: 74 37 je 1209f0 <_POSIX_signals_Unblock_thread+0x7c>
the_thread->Wait.return_code = EINTR;
1209b9: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
1209c0: f7 c2 e0 be 03 00 test $0x3bee0,%edx
1209c6: 0f 85 94 00 00 00 jne 120a60 <_POSIX_signals_Unblock_thread+0xec>
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
1209cc: 83 e2 08 and $0x8,%edx
1209cf: 74 3b je 120a0c <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
1209d1: 8d 43 48 lea 0x48(%ebx),%eax
1209d4: 89 04 24 mov %eax,(%esp)
1209d7: e8 84 e1 fe ff call 10eb60 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
1209dc: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
1209e3: 10
1209e4: 89 1c 24 mov %ebx,(%esp)
1209e7: e8 94 d0 fe ff call 10da80 <_Thread_Clear_state>
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
1209ec: 31 c0 xor %eax,%eax
1209ee: eb 1e jmp 120a0e <_POSIX_signals_Unblock_thread+0x9a>
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
1209f0: 85 d2 test %edx,%edx
1209f2: 75 18 jne 120a0c <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
1209f4: a1 c8 24 13 00 mov 0x1324c8,%eax
1209f9: 85 c0 test %eax,%eax
1209fb: 74 0f je 120a0c <_POSIX_signals_Unblock_thread+0x98>
1209fd: 3b 1d cc 24 13 00 cmp 0x1324cc,%ebx
120a03: 75 07 jne 120a0c <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
120a05: c6 05 d8 24 13 00 01 movb $0x1,0x1324d8
}
}
return false;
120a0c: 31 c0 xor %eax,%eax
}
120a0e: 83 c4 10 add $0x10,%esp
120a11: 5b pop %ebx
120a12: 5e pop %esi
120a13: 5f pop %edi
120a14: c3 ret
120a15: 8d 76 00 lea 0x0(%esi),%esi
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
120a18: 85 43 30 test %eax,0x30(%ebx)
120a1b: 74 33 je 120a50 <_POSIX_signals_Unblock_thread+0xdc>
the_thread->Wait.return_code = EINTR;
120a1d: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
120a24: 8b 43 28 mov 0x28(%ebx),%eax
if ( !info ) {
120a27: 8b 54 24 28 mov 0x28(%esp),%edx
120a2b: 85 d2 test %edx,%edx
120a2d: 74 3d je 120a6c <_POSIX_signals_Unblock_thread+0xf8>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
120a2f: b9 03 00 00 00 mov $0x3,%ecx
120a34: 89 c7 mov %eax,%edi
120a36: 8b 74 24 28 mov 0x28(%esp),%esi
120a3a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_Thread_queue_Extract_with_proxy( the_thread );
120a3c: 89 1c 24 mov %ebx,(%esp)
120a3f: e8 c0 da fe ff call 10e504 <_Thread_queue_Extract_with_proxy>
return true;
120a44: b0 01 mov $0x1,%al
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
120a46: 83 c4 10 add $0x10,%esp
120a49: 5b pop %ebx
120a4a: 5e pop %esi
120a4b: 5f pop %edi
120a4c: c3 ret
120a4d: 8d 76 00 lea 0x0(%esi),%esi
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
120a50: 8b 97 d0 00 00 00 mov 0xd0(%edi),%edx
120a56: f7 d2 not %edx
120a58: 85 d0 test %edx,%eax
120a5a: 75 c1 jne 120a1d <_POSIX_signals_Unblock_thread+0xa9>
120a5c: eb ae jmp 120a0c <_POSIX_signals_Unblock_thread+0x98>
120a5e: 66 90 xchg %ax,%ax
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
120a60: 89 1c 24 mov %ebx,(%esp)
120a63: e8 9c da fe ff call 10e504 <_Thread_queue_Extract_with_proxy>
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
120a68: 31 c0 xor %eax,%eax
120a6a: eb a2 jmp 120a0e <_POSIX_signals_Unblock_thread+0x9a>
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
120a6c: 89 30 mov %esi,(%eax)
the_info->si_code = SI_USER;
120a6e: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_info->si_value.sival_int = 0;
120a75: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
120a7c: eb be jmp 120a3c <_POSIX_signals_Unblock_thread+0xc8>
0010e170 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
10e170: 55 push %ebp
10e171: 57 push %edi
10e172: 56 push %esi
10e173: 53 push %ebx
10e174: 83 ec 1c sub $0x1c,%esp
10e177: 8b 6c 24 30 mov 0x30(%esp),%ebp
10e17b: 8b 74 24 34 mov 0x34(%esp),%esi
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
10e17f: 85 f6 test %esi,%esi
10e181: 0f 84 ae 00 00 00 je 10e235 <_RBTree_Extract_unprotected+0xc5>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
10e187: 39 75 08 cmp %esi,0x8(%ebp)
10e18a: 0f 84 d8 00 00 00 je 10e268 <_RBTree_Extract_unprotected+0xf8>
the_rbtree->first[RBT_LEFT] = next;
}
/* 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]) {
10e190: 39 75 0c cmp %esi,0xc(%ebp)
10e193: 0f 84 e7 00 00 00 je 10e280 <_RBTree_Extract_unprotected+0x110>
* 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]) {
10e199: 8b 5e 04 mov 0x4(%esi),%ebx
10e19c: 85 db test %ebx,%ebx
10e19e: 0f 84 00 01 00 00 je 10e2a4 <_RBTree_Extract_unprotected+0x134>
10e1a4: 8b 7e 08 mov 0x8(%esi),%edi
10e1a7: 85 ff test %edi,%edi
10e1a9: 75 07 jne 10e1b2 <_RBTree_Extract_unprotected+0x42>
10e1ab: e9 9d 00 00 00 jmp 10e24d <_RBTree_Extract_unprotected+0xdd>
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
10e1b0: 89 c3 mov %eax,%ebx
10e1b2: 8b 43 08 mov 0x8(%ebx),%eax
10e1b5: 85 c0 test %eax,%eax
10e1b7: 75 f7 jne 10e1b0 <_RBTree_Extract_unprotected+0x40>
* 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];
10e1b9: 8b 7b 04 mov 0x4(%ebx),%edi
if(leaf) {
10e1bc: 85 ff test %edi,%edi
10e1be: 0f 84 d4 00 00 00 je 10e298 <_RBTree_Extract_unprotected+0x128>
leaf->parent = target->parent;
10e1c4: 8b 03 mov (%ebx),%eax
10e1c6: 89 07 mov %eax,(%edi)
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
10e1c8: 8b 53 0c mov 0xc(%ebx),%edx
dir = target != target->parent->child[0];
10e1cb: 8b 03 mov (%ebx),%eax
10e1cd: 31 c9 xor %ecx,%ecx
10e1cf: 3b 58 04 cmp 0x4(%eax),%ebx
10e1d2: 0f 95 c1 setne %cl
target->parent->child[dir] = leaf;
10e1d5: 89 7c 88 04 mov %edi,0x4(%eax,%ecx,4)
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
10e1d9: 8b 06 mov (%esi),%eax
10e1db: 31 c9 xor %ecx,%ecx
10e1dd: 39 70 04 cmp %esi,0x4(%eax)
10e1e0: 0f 95 c1 setne %cl
the_node->parent->child[dir] = target;
10e1e3: 89 5c 88 04 mov %ebx,0x4(%eax,%ecx,4)
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
10e1e7: 8b 46 08 mov 0x8(%esi),%eax
10e1ea: 89 43 08 mov %eax,0x8(%ebx)
if (the_node->child[RBT_RIGHT])
10e1ed: 8b 46 08 mov 0x8(%esi),%eax
10e1f0: 85 c0 test %eax,%eax
10e1f2: 74 02 je 10e1f6 <_RBTree_Extract_unprotected+0x86><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
10e1f4: 89 18 mov %ebx,(%eax)
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
10e1f6: 8b 46 04 mov 0x4(%esi),%eax
10e1f9: 89 43 04 mov %eax,0x4(%ebx)
if (the_node->child[RBT_LEFT])
10e1fc: 8b 46 04 mov 0x4(%esi),%eax
10e1ff: 85 c0 test %eax,%eax
10e201: 74 02 je 10e205 <_RBTree_Extract_unprotected+0x95>
the_node->child[RBT_LEFT]->parent = target;
10e203: 89 18 mov %ebx,(%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;
10e205: 8b 06 mov (%esi),%eax
10e207: 89 03 mov %eax,(%ebx)
target->color = the_node->color;
10e209: 8b 46 0c mov 0xc(%esi),%eax
10e20c: 89 43 0c mov %eax,0xc(%ebx)
/* 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 */
10e20f: 85 d2 test %edx,%edx
10e211: 74 2d je 10e240 <_RBTree_Extract_unprotected+0xd0>
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
10e213: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
10e21a: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
10e221: c7 06 00 00 00 00 movl $0x0,(%esi)
/* 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;
10e227: 8b 45 04 mov 0x4(%ebp),%eax
10e22a: 85 c0 test %eax,%eax
10e22c: 74 07 je 10e235 <_RBTree_Extract_unprotected+0xc5>
10e22e: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
}
10e235: 83 c4 1c add $0x1c,%esp
10e238: 5b pop %ebx
10e239: 5e pop %esi
10e23a: 5f pop %edi
10e23b: 5d pop %ebp
10e23c: c3 ret
10e23d: 8d 76 00 lea 0x0(%esi),%esi
* 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 */
if (leaf) {
10e240: 85 ff test %edi,%edi
10e242: 74 cf je 10e213 <_RBTree_Extract_unprotected+0xa3>
leaf->color = RBT_BLACK; /* case 2 */
10e244: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
10e24b: eb c6 jmp 10e213 <_RBTree_Extract_unprotected+0xa3>
* 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]) {
10e24d: 89 df mov %ebx,%edi
* 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;
10e24f: 8b 06 mov (%esi),%eax
10e251: 89 07 mov %eax,(%edi)
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
10e253: 8b 56 0c mov 0xc(%esi),%edx
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
10e256: 8b 06 mov (%esi),%eax
10e258: 31 c9 xor %ecx,%ecx
10e25a: 39 70 04 cmp %esi,0x4(%eax)
10e25d: 0f 95 c1 setne %cl
the_node->parent->child[dir] = leaf;
10e260: 89 7c 88 04 mov %edi,0x4(%eax,%ecx,4)
10e264: eb a9 jmp 10e20f <_RBTree_Extract_unprotected+0x9f>
10e266: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_RIGHT );
10e268: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10e26f: 00
10e270: 89 34 24 mov %esi,(%esp)
10e273: e8 00 03 00 00 call 10e578 <_RBTree_Next_unprotected>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
RBTree_Node *next;
next = _RBTree_Successor_unprotected(the_node);
the_rbtree->first[RBT_LEFT] = next;
10e278: 89 45 08 mov %eax,0x8(%ebp)
10e27b: e9 10 ff ff ff jmp 10e190 <_RBTree_Extract_unprotected+0x20>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_LEFT );
10e280: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10e287: 00
10e288: 89 34 24 mov %esi,(%esp)
10e28b: e8 e8 02 00 00 call 10e578 <_RBTree_Next_unprotected>
/* 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]) {
RBTree_Node *previous;
previous = _RBTree_Predecessor_unprotected(the_node);
the_rbtree->first[RBT_RIGHT] = previous;
10e290: 89 45 0c mov %eax,0xc(%ebp)
10e293: e9 01 ff ff ff jmp 10e199 <_RBTree_Extract_unprotected+0x29>
leaf = target->child[RBT_LEFT];
if(leaf) {
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
10e298: 89 d8 mov %ebx,%eax
10e29a: e8 95 fc ff ff call 10df34 <_RBTree_Extract_validate_unprotected>
10e29f: e9 24 ff ff ff jmp 10e1c8 <_RBTree_Extract_unprotected+0x58>
* 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];
10e2a4: 8b 7e 08 mov 0x8(%esi),%edi
if( leaf ) {
10e2a7: 85 ff test %edi,%edi
10e2a9: 75 a4 jne 10e24f <_RBTree_Extract_unprotected+0xdf>
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
10e2ab: 89 f0 mov %esi,%eax
10e2ad: e8 82 fc ff ff call 10df34 <_RBTree_Extract_validate_unprotected>
10e2b2: eb 9f jmp 10e253 <_RBTree_Extract_unprotected+0xe3>
0010df34 <_RBTree_Extract_validate_unprotected>:
)
{
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
10df34: 8b 10 mov (%eax),%edx
if(!parent->parent) return;
10df36: 8b 0a mov (%edx),%ecx
10df38: 85 c9 test %ecx,%ecx
10df3a: 0f 84 8f 00 00 00 je 10dfcf <_RBTree_Extract_validate_unprotected+0x9b>
* of the extract operation.
*/
static void _RBTree_Extract_validate_unprotected(
RBTree_Node *the_node
)
{
10df40: 55 push %ebp
10df41: 57 push %edi
10df42: 56 push %esi
10df43: 53 push %ebx
10df44: 83 ec 08 sub $0x8,%esp
{
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])
10df47: 8b 4a 04 mov 0x4(%edx),%ecx
10df4a: 39 c8 cmp %ecx,%eax
10df4c: 75 68 jne 10dfb6 <_RBTree_Extract_validate_unprotected+0x82>
return the_node->parent->child[RBT_RIGHT];
10df4e: 8b 4a 08 mov 0x8(%edx),%ecx
10df51: eb 63 jmp 10dfb6 <_RBTree_Extract_validate_unprotected+0x82>
10df53: 90 nop
if(!parent->parent) return;
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
10df54: 8b 1a mov (%edx),%ebx
10df56: 85 db test %ebx,%ebx
10df58: 74 62 je 10dfbc <_RBTree_Extract_validate_unprotected+0x88>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10df5a: 85 c9 test %ecx,%ecx
10df5c: 74 0a je 10df68 <_RBTree_Extract_validate_unprotected+0x34><== NEVER TAKEN
10df5e: 83 79 0c 01 cmpl $0x1,0xc(%ecx)
10df62: 0f 84 18 01 00 00 je 10e080 <_RBTree_Extract_validate_unprotected+0x14c>
_RBTree_Rotate(parent, dir);
sibling = parent->child[_RBTree_Opposite_direction(dir)];
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
10df68: 8b 59 08 mov 0x8(%ecx),%ebx
10df6b: 85 db test %ebx,%ebx
10df6d: 74 06 je 10df75 <_RBTree_Extract_validate_unprotected+0x41>
10df6f: 83 7b 0c 01 cmpl $0x1,0xc(%ebx)
10df73: 74 5b je 10dfd0 <_RBTree_Extract_validate_unprotected+0x9c>
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
10df75: 8b 59 04 mov 0x4(%ecx),%ebx
10df78: 85 db test %ebx,%ebx
10df7a: 74 06 je 10df82 <_RBTree_Extract_validate_unprotected+0x4e>
10df7c: 83 7b 0c 01 cmpl $0x1,0xc(%ebx)
10df80: 74 4e je 10dfd0 <_RBTree_Extract_validate_unprotected+0x9c>
sibling->color = RBT_RED;
10df82: c7 41 0c 01 00 00 00 movl $0x1,0xc(%ecx)
10df89: 83 7a 0c 01 cmpl $0x1,0xc(%edx)
10df8d: 0f 84 d1 01 00 00 je 10e164 <_RBTree_Extract_validate_unprotected+0x230>
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
10df93: 8b 1a mov (%edx),%ebx
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
10df95: 85 db test %ebx,%ebx
10df97: 0f 84 3b 01 00 00 je 10e0d8 <_RBTree_Extract_validate_unprotected+0x1a4><== NEVER TAKEN
if(!(the_node->parent->parent)) return NULL;
10df9d: 8b 3b mov (%ebx),%edi
10df9f: 85 ff test %edi,%edi
10dfa1: 0f 84 31 01 00 00 je 10e0d8 <_RBTree_Extract_validate_unprotected+0x1a4>
if(the_node == the_node->parent->child[RBT_LEFT])
10dfa7: 8b 4b 04 mov 0x4(%ebx),%ecx
10dfaa: 39 ca cmp %ecx,%edx
10dfac: 0f 84 2e 01 00 00 je 10e0e0 <_RBTree_Extract_validate_unprotected+0x1ac>
10dfb2: 89 d0 mov %edx,%eax
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
10dfb4: 89 da mov %ebx,%edx
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10dfb6: 83 78 0c 01 cmpl $0x1,0xc(%eax)
10dfba: 75 98 jne 10df54 <_RBTree_Extract_validate_unprotected+0x20>
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
10dfbc: 8b 10 mov (%eax),%edx
10dfbe: 8b 32 mov (%edx),%esi
10dfc0: 85 f6 test %esi,%esi
10dfc2: 0f 84 8e 01 00 00 je 10e156 <_RBTree_Extract_validate_unprotected+0x222>
}
10dfc8: 83 c4 08 add $0x8,%esp
10dfcb: 5b pop %ebx
10dfcc: 5e pop %esi
10dfcd: 5f pop %edi
10dfce: 5d pop %ebp
10dfcf: c3 ret
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
10dfd0: 3b 42 04 cmp 0x4(%edx),%eax
10dfd3: 0f 95 c3 setne %bl
10dfd6: 89 dd mov %ebx,%ebp
10dfd8: 0f b6 f3 movzbl %bl,%esi
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10dfdb: 83 f3 01 xor $0x1,%ebx
10dfde: 0f b6 db movzbl %bl,%ebx
10dfe1: 89 1c 24 mov %ebx,(%esp)
if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) {
10dfe4: 8b 7c 99 04 mov 0x4(%ecx,%ebx,4),%edi
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10dfe8: 85 ff test %edi,%edi
10dfea: 74 0a je 10dff6 <_RBTree_Extract_validate_unprotected+0xc2>
10dfec: 83 7f 0c 01 cmpl $0x1,0xc(%edi)
10dff0: 0f 84 f9 00 00 00 je 10e0ef <_RBTree_Extract_validate_unprotected+0x1bb>
sibling->color = RBT_RED;
10dff6: c7 41 0c 01 00 00 00 movl $0x1,0xc(%ecx)
sibling->child[dir]->color = RBT_BLACK;
10dffd: 8b 7c b1 04 mov 0x4(%ecx,%esi,4),%edi
10e001: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10e008: 89 eb mov %ebp,%ebx
10e00a: 0f b6 eb movzbl %bl,%ebp
10e00d: 89 6c 24 04 mov %ebp,0x4(%esp)
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e011: 8b 6c a9 04 mov 0x4(%ecx,%ebp,4),%ebp
10e015: 85 ed test %ebp,%ebp
10e017: 74 36 je 10e04f <_RBTree_Extract_validate_unprotected+0x11b><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e019: 8b 3c 24 mov (%esp),%edi
10e01c: 8b 5c bd 04 mov 0x4(%ebp,%edi,4),%ebx
10e020: 8b 7c 24 04 mov 0x4(%esp),%edi
10e024: 89 5c b9 04 mov %ebx,0x4(%ecx,%edi,4)
if (c->child[dir])
10e028: 8b 1c 24 mov (%esp),%ebx
10e02b: 8b 7c 9d 04 mov 0x4(%ebp,%ebx,4),%edi
10e02f: 85 ff test %edi,%edi
10e031: 74 02 je 10e035 <_RBTree_Extract_validate_unprotected+0x101>
c->child[dir]->parent = the_node;
10e033: 89 0f mov %ecx,(%edi)
c->child[dir] = the_node;
10e035: 8b 3c 24 mov (%esp),%edi
10e038: 89 4c bd 04 mov %ecx,0x4(%ebp,%edi,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e03c: 8b 39 mov (%ecx),%edi
10e03e: 31 db xor %ebx,%ebx
10e040: 3b 4f 04 cmp 0x4(%edi),%ecx
10e043: 0f 95 c3 setne %bl
10e046: 89 6c 9f 04 mov %ebp,0x4(%edi,%ebx,4)
c->parent = the_node->parent;
10e04a: 89 7d 00 mov %edi,0x0(%ebp)
the_node->parent = c;
10e04d: 89 29 mov %ebp,(%ecx)
_RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir));
sibling = parent->child[_RBTree_Opposite_direction(dir)];
10e04f: 8b 3c 24 mov (%esp),%edi
10e052: 8b 7c ba 04 mov 0x4(%edx,%edi,4),%edi
10e056: 89 7c 24 04 mov %edi,0x4(%esp)
10e05a: 8b 2c 24 mov (%esp),%ebp
10e05d: 8b 4c af 04 mov 0x4(%edi,%ebp,4),%ecx
}
sibling->color = parent->color;
10e061: 8b 7a 0c mov 0xc(%edx),%edi
10e064: 8b 5c 24 04 mov 0x4(%esp),%ebx
10e068: 89 7b 0c mov %edi,0xc(%ebx)
parent->color = RBT_BLACK;
10e06b: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
10e072: c7 41 0c 00 00 00 00 movl $0x0,0xc(%ecx)
10e079: e9 95 00 00 00 jmp 10e113 <_RBTree_Extract_validate_unprotected+0x1df>
10e07e: 66 90 xchg %ax,%ax
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
10e080: c7 42 0c 01 00 00 00 movl $0x1,0xc(%edx)
sibling->color = RBT_BLACK;
10e087: c7 41 0c 00 00 00 00 movl $0x0,0xc(%ecx)
dir = the_node != parent->child[0];
10e08e: 39 42 04 cmp %eax,0x4(%edx)
10e091: 0f 95 c3 setne %bl
10e094: 0f b6 f3 movzbl %bl,%esi
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10e097: 83 f3 01 xor $0x1,%ebx
10e09a: 0f b6 eb movzbl %bl,%ebp
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e09d: 8b 4c aa 04 mov 0x4(%edx,%ebp,4),%ecx
10e0a1: 85 c9 test %ecx,%ecx
10e0a3: 74 43 je 10e0e8 <_RBTree_Extract_validate_unprotected+0x1b4><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e0a5: 8b 7c b1 04 mov 0x4(%ecx,%esi,4),%edi
10e0a9: 89 7c aa 04 mov %edi,0x4(%edx,%ebp,4)
if (c->child[dir])
10e0ad: 8b 7c b1 04 mov 0x4(%ecx,%esi,4),%edi
10e0b1: 85 ff test %edi,%edi
10e0b3: 74 02 je 10e0b7 <_RBTree_Extract_validate_unprotected+0x183><== NEVER TAKEN
c->child[dir]->parent = the_node;
10e0b5: 89 17 mov %edx,(%edi)
c->child[dir] = the_node;
10e0b7: 89 54 b1 04 mov %edx,0x4(%ecx,%esi,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e0bb: 8b 32 mov (%edx),%esi
10e0bd: 31 db xor %ebx,%ebx
10e0bf: 3b 56 04 cmp 0x4(%esi),%edx
10e0c2: 0f 95 c3 setne %bl
10e0c5: 89 df mov %ebx,%edi
10e0c7: 89 4c be 04 mov %ecx,0x4(%esi,%edi,4)
c->parent = the_node->parent;
10e0cb: 89 31 mov %esi,(%ecx)
the_node->parent = c;
10e0cd: 89 0a mov %ecx,(%edx)
10e0cf: 8b 4c aa 04 mov 0x4(%edx,%ebp,4),%ecx
10e0d3: e9 90 fe ff ff jmp 10df68 <_RBTree_Extract_validate_unprotected+0x34>
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
10e0d8: 31 c9 xor %ecx,%ecx
10e0da: e9 d3 fe ff ff jmp 10dfb2 <_RBTree_Extract_validate_unprotected+0x7e>
10e0df: 90 nop
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
10e0e0: 8b 4b 08 mov 0x8(%ebx),%ecx
10e0e3: e9 ca fe ff ff jmp 10dfb2 <_RBTree_Extract_validate_unprotected+0x7e>
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e0e8: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
10e0ea: e9 79 fe ff ff jmp 10df68 <_RBTree_Extract_validate_unprotected+0x34><== NOT EXECUTED
10e0ef: 8b 6c 9a 04 mov 0x4(%edx,%ebx,4),%ebp
10e0f3: 89 6c 24 04 mov %ebp,0x4(%esp)
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir));
sibling = parent->child[_RBTree_Opposite_direction(dir)];
}
sibling->color = parent->color;
10e0f7: 8b 5a 0c mov 0xc(%edx),%ebx
10e0fa: 89 59 0c mov %ebx,0xc(%ecx)
parent->color = RBT_BLACK;
10e0fd: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
10e104: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
10e10b: 85 ed test %ebp,%ebp
10e10d: 0f 84 a9 fe ff ff je 10dfbc <_RBTree_Extract_validate_unprotected+0x88><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e113: 8b 7c 24 04 mov 0x4(%esp),%edi
10e117: 8b 4c b7 04 mov 0x4(%edi,%esi,4),%ecx
10e11b: 8b 2c 24 mov (%esp),%ebp
10e11e: 89 4c aa 04 mov %ecx,0x4(%edx,%ebp,4)
if (c->child[dir])
10e122: 8b 4c b7 04 mov 0x4(%edi,%esi,4),%ecx
10e126: 85 c9 test %ecx,%ecx
10e128: 74 02 je 10e12c <_RBTree_Extract_validate_unprotected+0x1f8>
c->child[dir]->parent = the_node;
10e12a: 89 11 mov %edx,(%ecx)
c->child[dir] = the_node;
10e12c: 8b 4c 24 04 mov 0x4(%esp),%ecx
10e130: 89 54 b1 04 mov %edx,0x4(%ecx,%esi,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e134: 8b 0a mov (%edx),%ecx
10e136: 31 db xor %ebx,%ebx
10e138: 3b 51 04 cmp 0x4(%ecx),%edx
10e13b: 0f 95 c3 setne %bl
10e13e: 8b 74 24 04 mov 0x4(%esp),%esi
10e142: 89 74 99 04 mov %esi,0x4(%ecx,%ebx,4)
c->parent = the_node->parent;
10e146: 89 0e mov %ecx,(%esi)
the_node->parent = c;
10e148: 89 32 mov %esi,(%edx)
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
10e14a: 8b 10 mov (%eax),%edx
10e14c: 8b 32 mov (%edx),%esi
10e14e: 85 f6 test %esi,%esi
10e150: 0f 85 72 fe ff ff jne 10dfc8 <_RBTree_Extract_validate_unprotected+0x94><== ALWAYS TAKEN
10e156: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
10e15d: e9 66 fe ff ff jmp 10dfc8 <_RBTree_Extract_validate_unprotected+0x94>
10e162: 66 90 xchg %ax,%ax
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
10e164: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
break;
10e16b: e9 4c fe ff ff jmp 10dfbc <_RBTree_Extract_validate_unprotected+0x88>
0010e834 <_RBTree_Find>:
RBTree_Node *_RBTree_Find(
RBTree_Control *the_rbtree,
RBTree_Node *search_node
)
{
10e834: 55 push %ebp
10e835: 57 push %edi
10e836: 56 push %esi
10e837: 53 push %ebx
10e838: 83 ec 2c sub $0x2c,%esp
10e83b: 8b 5c 24 40 mov 0x40(%esp),%ebx
10e83f: 8b 74 24 44 mov 0x44(%esp),%esi
ISR_Level level;
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
10e843: 9c pushf
10e844: fa cli
10e845: 8f 44 24 1c popl 0x1c(%esp)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
10e849: 8b 6b 04 mov 0x4(%ebx),%ebp
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10e84c: 31 ff xor %edi,%edi
10e84e: 85 ed test %ebp,%ebp
10e850: 74 28 je 10e87a <_RBTree_Find+0x46> <== NEVER TAKEN
10e852: 66 90 xchg %ax,%ax
compare_result = the_rbtree->compare_function(the_node, iter_node);
10e854: 89 6c 24 04 mov %ebp,0x4(%esp)
10e858: 89 34 24 mov %esi,(%esp)
10e85b: ff 53 10 call *0x10(%ebx)
if ( _RBTree_Is_equal( compare_result ) ) {
10e85e: 85 c0 test %eax,%eax
10e860: 75 08 jne 10e86a <_RBTree_Find+0x36>
found = iter_node;
if ( the_rbtree->is_unique )
10e862: 89 ef mov %ebp,%edi
10e864: 80 7b 14 00 cmpb $0x0,0x14(%ebx)
10e868: 75 10 jne 10e87a <_RBTree_Find+0x46>
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
10e86a: 85 c0 test %eax,%eax
10e86c: 0f 9f c0 setg %al
10e86f: 0f b6 c0 movzbl %al,%eax
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
10e872: 8b 6c 85 04 mov 0x4(%ebp,%eax,4),%ebp
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10e876: 85 ed test %ebp,%ebp
10e878: 75 da jne 10e854 <_RBTree_Find+0x20>
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
10e87a: ff 74 24 1c pushl 0x1c(%esp)
10e87e: 9d popf
return return_node;
}
10e87f: 89 f8 mov %edi,%eax
10e881: 83 c4 2c add $0x2c,%esp
10e884: 5b pop %ebx
10e885: 5e pop %esi
10e886: 5f pop %edi
10e887: 5d pop %ebp
10e888: c3 ret
0010eb7c <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
10eb7c: 55 push %ebp
10eb7d: 57 push %edi
10eb7e: 56 push %esi
10eb7f: 53 push %ebx
10eb80: 83 ec 1c sub $0x1c,%esp
10eb83: 8b 7c 24 30 mov 0x30(%esp),%edi
10eb87: 8b 5c 24 3c mov 0x3c(%esp),%ebx
10eb8b: 8b 6c 24 40 mov 0x40(%esp),%ebp
10eb8f: 8b 44 24 44 mov 0x44(%esp),%eax
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
10eb93: 85 ff test %edi,%edi
10eb95: 74 3e je 10ebd5 <_RBTree_Initialize+0x59><== NEVER TAKEN
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
10eb97: c7 07 00 00 00 00 movl $0x0,(%edi)
the_rbtree->root = NULL;
10eb9d: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
the_rbtree->first[0] = NULL;
10eba4: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
the_rbtree->first[1] = NULL;
10ebab: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
the_rbtree->compare_function = compare_function;
10ebb2: 8b 54 24 34 mov 0x34(%esp),%edx
10ebb6: 89 57 10 mov %edx,0x10(%edi)
the_rbtree->is_unique = is_unique;
10ebb9: 88 47 14 mov %al,0x14(%edi)
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
10ebbc: 85 db test %ebx,%ebx
10ebbe: 74 15 je 10ebd5 <_RBTree_Initialize+0x59><== NEVER TAKEN
10ebc0: 8b 74 24 38 mov 0x38(%esp),%esi
_RBTree_Insert_unprotected(the_rbtree, next);
10ebc4: 89 74 24 04 mov %esi,0x4(%esp)
10ebc8: 89 3c 24 mov %edi,(%esp)
10ebcb: e8 e8 fc ff ff call 10e8b8 <_RBTree_Insert_unprotected>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _RBTree_Initialize(
10ebd0: 01 ee add %ebp,%esi
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
10ebd2: 4b dec %ebx
10ebd3: 75 ef jne 10ebc4 <_RBTree_Initialize+0x48>
_RBTree_Insert_unprotected(the_rbtree, next);
next = (RBTree_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
}
10ebd5: 83 c4 1c add $0x1c,%esp
10ebd8: 5b pop %ebx
10ebd9: 5e pop %esi
10ebda: 5f pop %edi
10ebdb: 5d pop %ebp
10ebdc: c3 ret
0010e2d8 <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
10e2d8: 55 push %ebp
10e2d9: 57 push %edi
10e2da: 56 push %esi
10e2db: 53 push %ebx
10e2dc: 83 ec 2c sub $0x2c,%esp
10e2df: 8b 6c 24 40 mov 0x40(%esp),%ebp
10e2e3: 8b 5c 24 44 mov 0x44(%esp),%ebx
if(!the_node) return (RBTree_Node*)-1;
10e2e7: 85 db test %ebx,%ebx
10e2e9: 0f 84 c5 01 00 00 je 10e4b4 <_RBTree_Insert_unprotected+0x1dc>
RBTree_Node *iter_node = the_rbtree->root;
10e2ef: 8b 7d 04 mov 0x4(%ebp),%edi
int compare_result;
if (!iter_node) { /* special case: first node inserted */
10e2f2: 85 ff test %edi,%edi
10e2f4: 75 08 jne 10e2fe <_RBTree_Insert_unprotected+0x26>
10e2f6: e9 d6 01 00 00 jmp 10e4d1 <_RBTree_Insert_unprotected+0x1f9>
10e2fb: 90 nop
(dir && _RBTree_Is_greater(compare_result)) ) {
the_rbtree->first[dir] = the_node;
}
break;
} else {
iter_node = iter_node->child[dir];
10e2fc: 89 d7 mov %edx,%edi
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);
10e2fe: 89 7c 24 04 mov %edi,0x4(%esp)
10e302: 89 1c 24 mov %ebx,(%esp)
10e305: ff 55 10 call *0x10(%ebp)
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
10e308: 80 7d 14 00 cmpb $0x0,0x14(%ebp)
10e30c: 74 08 je 10e316 <_RBTree_Insert_unprotected+0x3e>
10e30e: 85 c0 test %eax,%eax
10e310: 0f 84 b2 01 00 00 je 10e4c8 <_RBTree_Insert_unprotected+0x1f0>
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
10e316: f7 d0 not %eax
10e318: c1 e8 1f shr $0x1f,%eax
if (!iter_node->child[dir]) {
10e31b: 8b 54 87 04 mov 0x4(%edi,%eax,4),%edx
10e31f: 85 d2 test %edx,%edx
10e321: 75 d9 jne 10e2fc <_RBTree_Insert_unprotected+0x24>
10e323: 89 54 24 1c mov %edx,0x1c(%esp)
10e327: 89 c6 mov %eax,%esi
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
10e329: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10e330: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
the_node->color = RBT_RED;
10e337: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx)
iter_node->child[dir] = the_node;
10e33e: 89 5c 87 04 mov %ebx,0x4(%edi,%eax,4)
the_node->parent = iter_node;
10e342: 89 3b mov %edi,(%ebx)
/* update min/max */
compare_result = the_rbtree->compare_function(
10e344: 8b 44 85 08 mov 0x8(%ebp,%eax,4),%eax
10e348: 89 44 24 04 mov %eax,0x4(%esp)
10e34c: 89 1c 24 mov %ebx,(%esp)
10e34f: ff 55 10 call *0x10(%ebp)
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
10e352: 85 f6 test %esi,%esi
10e354: 75 2e jne 10e384 <_RBTree_Insert_unprotected+0xac>
10e356: 85 c0 test %eax,%eax
10e358: 78 2e js 10e388 <_RBTree_Insert_unprotected+0xb0>
}
the_node->parent->color = RBT_BLACK;
g->color = RBT_RED;
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
10e35a: 89 5c 24 18 mov %ebx,0x18(%esp)
_ISR_Disable( level );
return_node = _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
return return_node;
}
10e35e: 8b 54 24 18 mov 0x18(%esp),%edx
10e362: 8b 02 mov (%edx),%eax
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
10e364: 8b 10 mov (%eax),%edx
10e366: 89 d1 mov %edx,%ecx
10e368: 85 d2 test %edx,%edx
10e36a: 0f 84 03 01 00 00 je 10e473 <_RBTree_Insert_unprotected+0x19b>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10e370: 83 78 0c 01 cmpl $0x1,0xc(%eax)
10e374: 74 1a je 10e390 <_RBTree_Insert_unprotected+0xb8>
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
10e376: 8b 44 24 1c mov 0x1c(%esp),%eax
10e37a: 83 c4 2c add $0x2c,%esp
10e37d: 5b pop %ebx
10e37e: 5e pop %esi
10e37f: 5f pop %edi
10e380: 5d pop %ebp
10e381: c3 ret
10e382: 66 90 xchg %ax,%ax
compare_result = the_rbtree->compare_function(
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
(dir && _RBTree_Is_greater(compare_result)) ) {
10e384: 85 c0 test %eax,%eax
10e386: 7e d2 jle 10e35a <_RBTree_Insert_unprotected+0x82>
the_rbtree->first[dir] = the_node;
10e388: 89 5c b5 08 mov %ebx,0x8(%ebp,%esi,4)
10e38c: eb cc jmp 10e35a <_RBTree_Insert_unprotected+0x82>
10e38e: 66 90 xchg %ax,%ax
)
{
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;
10e390: 8b 1a mov (%edx),%ebx
10e392: 85 db test %ebx,%ebx
10e394: 8b 72 04 mov 0x4(%edx),%esi
10e397: 74 18 je 10e3b1 <_RBTree_Insert_unprotected+0xd9><== 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])
10e399: 39 f0 cmp %esi,%eax
10e39b: 0f 84 0b 01 00 00 je 10e4ac <_RBTree_Insert_unprotected+0x1d4>
10e3a1: 89 f7 mov %esi,%edi
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10e3a3: 85 ff test %edi,%edi
10e3a5: 74 0a je 10e3b1 <_RBTree_Insert_unprotected+0xd9>
10e3a7: 83 7f 0c 01 cmpl $0x1,0xc(%edi)
10e3ab: 0f 84 db 00 00 00 je 10e48c <_RBTree_Insert_unprotected+0x1b4>
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];
RBTree_Direction pdir = the_node->parent != g->child[0];
10e3b1: 31 db xor %ebx,%ebx
10e3b3: 39 f0 cmp %esi,%eax
10e3b5: 0f 95 c3 setne %bl
10e3b8: 89 de mov %ebx,%esi
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];
10e3ba: 8b 5c 24 18 mov 0x18(%esp),%ebx
10e3be: 3b 58 04 cmp 0x4(%eax),%ebx
10e3c1: 0f 95 c3 setne %bl
10e3c4: 0f b6 db movzbl %bl,%ebx
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
10e3c7: 39 f3 cmp %esi,%ebx
10e3c9: 74 46 je 10e411 <_RBTree_Insert_unprotected+0x139>
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10e3cb: 89 f3 mov %esi,%ebx
10e3cd: 83 f3 01 xor $0x1,%ebx
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e3d0: 8b 7c 98 04 mov 0x4(%eax,%ebx,4),%edi
10e3d4: 85 ff test %edi,%edi
10e3d6: 74 2b je 10e403 <_RBTree_Insert_unprotected+0x12b><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e3d8: 8b 6c b7 04 mov 0x4(%edi,%esi,4),%ebp
10e3dc: 89 6c 98 04 mov %ebp,0x4(%eax,%ebx,4)
if (c->child[dir])
10e3e0: 8b 6c b7 04 mov 0x4(%edi,%esi,4),%ebp
10e3e4: 85 ed test %ebp,%ebp
10e3e6: 74 05 je 10e3ed <_RBTree_Insert_unprotected+0x115>
c->child[dir]->parent = the_node;
10e3e8: 89 45 00 mov %eax,0x0(%ebp)
10e3eb: 8b 10 mov (%eax),%edx
c->child[dir] = the_node;
10e3ed: 89 44 b7 04 mov %eax,0x4(%edi,%esi,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e3f1: 31 db xor %ebx,%ebx
10e3f3: 3b 42 04 cmp 0x4(%edx),%eax
10e3f6: 0f 95 c3 setne %bl
10e3f9: 89 dd mov %ebx,%ebp
10e3fb: 89 7c aa 04 mov %edi,0x4(%edx,%ebp,4)
c->parent = the_node->parent;
10e3ff: 89 17 mov %edx,(%edi)
the_node->parent = c;
10e401: 89 38 mov %edi,(%eax)
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
10e403: 8b 44 24 18 mov 0x18(%esp),%eax
10e407: 8b 44 b0 04 mov 0x4(%eax,%esi,4),%eax
10e40b: 89 44 24 18 mov %eax,0x18(%esp)
10e40f: 8b 00 mov (%eax),%eax
}
the_node->parent->color = RBT_BLACK;
10e411: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
g->color = RBT_RED;
10e418: c7 41 0c 01 00 00 00 movl $0x1,0xc(%ecx)
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
10e41f: ba 01 00 00 00 mov $0x1,%edx
10e424: 29 f2 sub %esi,%edx
10e426: 89 d6 mov %edx,%esi
10e428: 83 f6 01 xor $0x1,%esi
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e42b: 8b 44 b1 04 mov 0x4(%ecx,%esi,4),%eax
10e42f: 85 c0 test %eax,%eax
10e431: 0f 84 27 ff ff ff je 10e35e <_RBTree_Insert_unprotected+0x86><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e437: 8b 7c 90 04 mov 0x4(%eax,%edx,4),%edi
10e43b: 89 7c b1 04 mov %edi,0x4(%ecx,%esi,4)
if (c->child[dir])
10e43f: 8b 74 90 04 mov 0x4(%eax,%edx,4),%esi
10e443: 85 f6 test %esi,%esi
10e445: 74 02 je 10e449 <_RBTree_Insert_unprotected+0x171>
c->child[dir]->parent = the_node;
10e447: 89 0e mov %ecx,(%esi)
c->child[dir] = the_node;
10e449: 89 4c 90 04 mov %ecx,0x4(%eax,%edx,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e44d: 8b 11 mov (%ecx),%edx
10e44f: 31 db xor %ebx,%ebx
10e451: 3b 4a 04 cmp 0x4(%edx),%ecx
10e454: 0f 95 c3 setne %bl
10e457: 89 de mov %ebx,%esi
10e459: 89 44 b2 04 mov %eax,0x4(%edx,%esi,4)
c->parent = the_node->parent;
10e45d: 89 10 mov %edx,(%eax)
the_node->parent = c;
10e45f: 89 01 mov %eax,(%ecx)
_ISR_Disable( level );
return_node = _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
return return_node;
}
10e461: 8b 54 24 18 mov 0x18(%esp),%edx
10e465: 8b 02 mov (%edx),%eax
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
10e467: 8b 10 mov (%eax),%edx
10e469: 89 d1 mov %edx,%ecx
10e46b: 85 d2 test %edx,%edx
10e46d: 0f 85 fd fe ff ff jne 10e370 <_RBTree_Insert_unprotected+0x98><== ALWAYS TAKEN
10e473: 8b 5c 24 18 mov 0x18(%esp),%ebx
/* 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;
10e477: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
10e47e: 8b 44 24 1c mov 0x1c(%esp),%eax
10e482: 83 c4 2c add $0x2c,%esp
10e485: 5b pop %ebx
10e486: 5e pop %esi
10e487: 5f pop %edi
10e488: 5d pop %ebp
10e489: c3 ret
10e48a: 66 90 xchg %ax,%ax
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)) {
the_node->parent->color = RBT_BLACK;
10e48c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
u->color = RBT_BLACK;
10e493: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
g->color = RBT_RED;
10e49a: c7 42 0c 01 00 00 00 movl $0x1,0xc(%edx)
10e4a1: 89 54 24 18 mov %edx,0x18(%esp)
10e4a5: e9 b4 fe ff ff jmp 10e35e <_RBTree_Insert_unprotected+0x86>
10e4aa: 66 90 xchg %ax,%ax
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])
return the_node->parent->child[RBT_RIGHT];
10e4ac: 8b 7a 08 mov 0x8(%edx),%edi
10e4af: e9 ef fe ff ff jmp 10e3a3 <_RBTree_Insert_unprotected+0xcb>
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
if(!the_node) return (RBTree_Node*)-1;
10e4b4: c7 44 24 1c ff ff ff movl $0xffffffff,0x1c(%esp)
10e4bb: ff
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
10e4bc: 8b 44 24 1c mov 0x1c(%esp),%eax
10e4c0: 83 c4 2c add $0x2c,%esp
10e4c3: 5b pop %ebx
10e4c4: 5e pop %esi
10e4c5: 5f pop %edi
10e4c6: 5d pop %ebp
10e4c7: c3 ret
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);
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
10e4c8: 89 7c 24 1c mov %edi,0x1c(%esp)
10e4cc: e9 a5 fe ff ff jmp 10e376 <_RBTree_Insert_unprotected+0x9e>
RBTree_Node *iter_node = the_rbtree->root;
int compare_result;
if (!iter_node) { /* special case: first node inserted */
the_node->color = RBT_BLACK;
10e4d1: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_rbtree->root = the_node;
10e4d8: 89 5d 04 mov %ebx,0x4(%ebp)
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
10e4db: 89 5d 0c mov %ebx,0xc(%ebp)
10e4de: 89 5d 08 mov %ebx,0x8(%ebp)
the_node->parent = (RBTree_Node *) the_rbtree;
10e4e1: 89 2b mov %ebp,(%ebx)
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
10e4e3: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10e4ea: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
} /* while(iter_node) */
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
10e4f1: c7 44 24 1c 00 00 00 movl $0x0,0x1c(%esp)
10e4f8: 00
10e4f9: e9 78 fe ff ff jmp 10e376 <_RBTree_Insert_unprotected+0x9e>
0010e524 <_RBTree_Iterate_unprotected>:
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
10e524: 55 push %ebp
10e525: 57 push %edi
10e526: 56 push %esi
10e527: 53 push %ebx
10e528: 83 ec 1c sub $0x1c,%esp
10e52b: 8b 74 24 34 mov 0x34(%esp),%esi
10e52f: 8b 6c 24 38 mov 0x38(%esp),%ebp
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10e533: 31 d2 xor %edx,%edx
10e535: 85 f6 test %esi,%esi
10e537: 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];
10e53a: 8b 44 24 30 mov 0x30(%esp),%eax
10e53e: 8b 5c 90 08 mov 0x8(%eax,%edx,4),%ebx
10e542: 66 90 xchg %ax,%ax
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
10e544: 85 db test %ebx,%ebx
10e546: 74 27 je 10e56f <_RBTree_Iterate_unprotected+0x4b>
stop = (*visitor)( current, dir, visitor_arg );
10e548: 8b 44 24 3c mov 0x3c(%esp),%eax
10e54c: 89 44 24 08 mov %eax,0x8(%esp)
10e550: 89 74 24 04 mov %esi,0x4(%esp)
10e554: 89 1c 24 mov %ebx,(%esp)
10e557: ff d5 call *%ebp
10e559: 89 c7 mov %eax,%edi
current = _RBTree_Next_unprotected( current, dir );
10e55b: 89 74 24 04 mov %esi,0x4(%esp)
10e55f: 89 1c 24 mov %ebx,(%esp)
10e562: e8 11 00 00 00 call 10e578 <_RBTree_Next_unprotected>
10e567: 89 c3 mov %eax,%ebx
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
10e569: 89 f8 mov %edi,%eax
10e56b: 84 c0 test %al,%al
10e56d: 74 d5 je 10e544 <_RBTree_Iterate_unprotected+0x20><== ALWAYS TAKEN
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
}
}
10e56f: 83 c4 1c add $0x1c,%esp
10e572: 5b pop %ebx
10e573: 5e pop %esi
10e574: 5f pop %edi
10e575: 5d pop %ebp
10e576: c3 ret
0010bda0 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
10bda0: 55 push %ebp
10bda1: 57 push %edi
10bda2: 56 push %esi
10bda3: 53 push %ebx
10bda4: 83 ec 3c sub $0x3c,%esp
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
10bda7: 8b 1d 8c da 12 00 mov 0x12da8c,%ebx
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
10bdad: 8b 3d 88 da 12 00 mov 0x12da88,%edi
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
10bdb3: 85 db test %ebx,%ebx
10bdb5: 74 61 je 10be18 <_RTEMS_tasks_Initialize_user_tasks_body+0x78>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10bdb7: 85 ff test %edi,%edi
10bdb9: 74 5d je 10be18 <_RTEMS_tasks_Initialize_user_tasks_body+0x78><== NEVER TAKEN
10bdbb: 31 f6 xor %esi,%esi
10bdbd: 8d 6c 24 2c lea 0x2c(%esp),%ebp
10bdc1: 8d 76 00 lea 0x0(%esi),%esi
return_value = rtems_task_create(
10bdc4: 89 6c 24 14 mov %ebp,0x14(%esp)
10bdc8: 8b 43 0c mov 0xc(%ebx),%eax
10bdcb: 89 44 24 10 mov %eax,0x10(%esp)
10bdcf: 8b 43 14 mov 0x14(%ebx),%eax
10bdd2: 89 44 24 0c mov %eax,0xc(%esp)
10bdd6: 8b 43 04 mov 0x4(%ebx),%eax
10bdd9: 89 44 24 08 mov %eax,0x8(%esp)
10bddd: 8b 43 08 mov 0x8(%ebx),%eax
10bde0: 89 44 24 04 mov %eax,0x4(%esp)
10bde4: 8b 03 mov (%ebx),%eax
10bde6: 89 04 24 mov %eax,(%esp)
10bde9: e8 5a fd ff ff call 10bb48 <rtems_task_create>
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
10bdee: 85 c0 test %eax,%eax
10bdf0: 75 2e jne 10be20 <_RTEMS_tasks_Initialize_user_tasks_body+0x80>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
10bdf2: 8b 43 18 mov 0x18(%ebx),%eax
10bdf5: 89 44 24 08 mov %eax,0x8(%esp)
10bdf9: 8b 43 10 mov 0x10(%ebx),%eax
10bdfc: 89 44 24 04 mov %eax,0x4(%esp)
10be00: 8b 44 24 2c mov 0x2c(%esp),%eax
10be04: 89 04 24 mov %eax,(%esp)
10be07: e8 2c 00 00 00 call 10be38 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
10be0c: 85 c0 test %eax,%eax
10be0e: 75 10 jne 10be20 <_RTEMS_tasks_Initialize_user_tasks_body+0x80>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10be10: 46 inc %esi
10be11: 83 c3 1c add $0x1c,%ebx
10be14: 39 fe cmp %edi,%esi
10be16: 75 ac jne 10bdc4 <_RTEMS_tasks_Initialize_user_tasks_body+0x24><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
10be18: 83 c4 3c add $0x3c,%esp
10be1b: 5b pop %ebx
10be1c: 5e pop %esi
10be1d: 5f pop %edi
10be1e: 5d pop %ebp
10be1f: c3 ret
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
10be20: 89 44 24 08 mov %eax,0x8(%esp)
10be24: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10be2b: 00
10be2c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10be33: e8 d4 0d 00 00 call 10cc0c <_Internal_error_Occurred>
00111258 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
111258: 8b 44 24 04 mov 0x4(%esp),%eax
11125c: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax
while (tvp) {
111262: 85 c0 test %eax,%eax
111264: 74 15 je 11127b <_RTEMS_tasks_Switch_extension+0x23>
111266: 66 90 xchg %ax,%ax
tvp->tval = *tvp->ptr;
111268: 8b 50 04 mov 0x4(%eax),%edx
11126b: 8b 0a mov (%edx),%ecx
11126d: 89 48 0c mov %ecx,0xc(%eax)
*tvp->ptr = tvp->gval;
111270: 8b 48 08 mov 0x8(%eax),%ecx
111273: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
111275: 8b 00 mov (%eax),%eax
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
111277: 85 c0 test %eax,%eax
111279: 75 ed jne 111268 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
11127b: 8b 44 24 08 mov 0x8(%esp),%eax
11127f: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax
while (tvp) {
111285: 85 c0 test %eax,%eax
111287: 74 17 je 1112a0 <_RTEMS_tasks_Switch_extension+0x48>
111289: 8d 76 00 lea 0x0(%esi),%esi
tvp->gval = *tvp->ptr;
11128c: 8b 50 04 mov 0x4(%eax),%edx
11128f: 8b 0a mov (%edx),%ecx
111291: 89 48 08 mov %ecx,0x8(%eax)
*tvp->ptr = tvp->tval;
111294: 8b 48 0c mov 0xc(%eax),%ecx
111297: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
111299: 8b 00 mov (%eax),%eax
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
11129b: 85 c0 test %eax,%eax
11129d: 75 ed jne 11128c <_RTEMS_tasks_Switch_extension+0x34><== NEVER TAKEN
11129f: c3 ret
1112a0: c3 ret
001382b0 <_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
)
{
1382b0: 55 push %ebp
1382b1: 57 push %edi
1382b2: 56 push %esi
1382b3: 53 push %ebx
1382b4: 83 ec 2c sub $0x2c,%esp
1382b7: 8b 74 24 40 mov 0x40(%esp),%esi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
1382bb: 8b 7e 40 mov 0x40(%esi),%edi
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
1382be: 8d 44 24 18 lea 0x18(%esp),%eax
1382c2: 89 04 24 mov %eax,(%esp)
1382c5: e8 e2 b8 fd ff call 113bac <_TOD_Get_uptime>
_Timestamp_Subtract(
1382ca: 8b 44 24 18 mov 0x18(%esp),%eax
1382ce: 8b 54 24 1c mov 0x1c(%esp),%edx
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
1382d2: 89 c1 mov %eax,%ecx
1382d4: 89 d3 mov %edx,%ebx
1382d6: 2b 4e 4c sub 0x4c(%esi),%ecx
1382d9: 1b 5e 50 sbb 0x50(%esi),%ebx
1382dc: 8b 6c 24 44 mov 0x44(%esp),%ebp
1382e0: 89 4d 00 mov %ecx,0x0(%ebp)
1382e3: 89 5d 04 mov %ebx,0x4(%ebp)
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
1382e6: 8b 8f 80 00 00 00 mov 0x80(%edi),%ecx
1382ec: 8b 9f 84 00 00 00 mov 0x84(%edi),%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
1382f2: 39 3d 2c c4 17 00 cmp %edi,0x17c42c
1382f8: 74 0a je 138304 <_Rate_monotonic_Get_status+0x54>
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
1382fa: b0 01 mov $0x1,%al
}
1382fc: 83 c4 2c add $0x2c,%esp
1382ff: 5b pop %ebx
138300: 5e pop %esi
138301: 5f pop %edi
138302: 5d pop %ebp
138303: c3 ret
138304: 2b 05 3c c4 17 00 sub 0x17c43c,%eax
13830a: 1b 15 40 c4 17 00 sbb 0x17c440,%edx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
138310: 01 c8 add %ecx,%eax
138312: 11 da adc %ebx,%edx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
138314: 8b 4e 44 mov 0x44(%esi),%ecx
138317: 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))
13831a: 39 d3 cmp %edx,%ebx
13831c: 7f 06 jg 138324 <_Rate_monotonic_Get_status+0x74><== NEVER TAKEN
13831e: 7c 08 jl 138328 <_Rate_monotonic_Get_status+0x78>
138320: 39 c1 cmp %eax,%ecx
138322: 76 04 jbe 138328 <_Rate_monotonic_Get_status+0x78>
return false;
138324: 31 c0 xor %eax,%eax
138326: eb d4 jmp 1382fc <_Rate_monotonic_Get_status+0x4c>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
138328: 29 c8 sub %ecx,%eax
13832a: 19 da sbb %ebx,%edx
13832c: 8b 4c 24 48 mov 0x48(%esp),%ecx
138330: 89 01 mov %eax,(%ecx)
138332: 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;
138335: b0 01 mov $0x1,%al
}
138337: 83 c4 2c add $0x2c,%esp
13833a: 5b pop %ebx
13833b: 5e pop %esi
13833c: 5f pop %edi
13833d: 5d pop %ebp
13833e: c3 ret
00138640 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
138640: 83 ec 3c sub $0x3c,%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 );
138643: 8d 44 24 2c lea 0x2c(%esp),%eax
138647: 89 44 24 08 mov %eax,0x8(%esp)
13864b: 8b 44 24 40 mov 0x40(%esp),%eax
13864f: 89 44 24 04 mov %eax,0x4(%esp)
138653: c7 04 24 60 ca 17 00 movl $0x17ca60,(%esp)
13865a: e8 49 48 fd ff call 10cea8 <_Objects_Get>
switch ( location ) {
13865f: 8b 54 24 2c mov 0x2c(%esp),%edx
138663: 85 d2 test %edx,%edx
138665: 75 2e jne 138695 <_Rate_monotonic_Timeout+0x55><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
138667: 8b 50 40 mov 0x40(%eax),%edx
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
13866a: f6 42 11 40 testb $0x40,0x11(%edx)
13866e: 74 08 je 138678 <_Rate_monotonic_Timeout+0x38>
138670: 8b 48 08 mov 0x8(%eax),%ecx
138673: 39 4a 20 cmp %ecx,0x20(%edx)
138676: 74 58 je 1386d0 <_Rate_monotonic_Timeout+0x90>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
138678: 83 78 38 01 cmpl $0x1,0x38(%eax)
13867c: 74 1e je 13869c <_Rate_monotonic_Timeout+0x5c>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
13867e: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
138685: a1 a4 be 17 00 mov 0x17bea4,%eax
13868a: 48 dec %eax
13868b: a3 a4 be 17 00 mov %eax,0x17bea4
return _Thread_Dispatch_disable_level;
138690: a1 a4 be 17 00 mov 0x17bea4,%eax
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
138695: 83 c4 3c add $0x3c,%esp
138698: c3 ret
138699: 8d 76 00 lea 0x0(%esi),%esi
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
13869c: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax)
_Rate_monotonic_Initiate_statistics( the_period );
1386a3: 89 04 24 mov %eax,(%esp)
1386a6: 89 44 24 1c mov %eax,0x1c(%esp)
1386aa: e8 71 fd ff ff call 138420 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
1386af: 8b 44 24 1c mov 0x1c(%esp),%eax
1386b3: 8b 50 3c mov 0x3c(%eax),%edx
1386b6: 89 50 1c mov %edx,0x1c(%eax)
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
1386b9: 83 c0 10 add $0x10,%eax
1386bc: 89 44 24 04 mov %eax,0x4(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
1386c0: c7 04 24 48 bf 17 00 movl $0x17bf48,(%esp)
1386c7: e8 40 60 fd ff call 10e70c <_Watchdog_Insert>
1386cc: eb b7 jmp 138685 <_Rate_monotonic_Timeout+0x45>
1386ce: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
1386d0: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
1386d7: 10
1386d8: 89 14 24 mov %edx,(%esp)
1386db: 89 44 24 1c mov %eax,0x1c(%esp)
1386df: e8 64 50 fd ff call 10d748 <_Thread_Clear_state>
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
1386e4: 8b 44 24 1c mov 0x1c(%esp),%eax
1386e8: 89 04 24 mov %eax,(%esp)
1386eb: eb bd jmp 1386aa <_Rate_monotonic_Timeout+0x6a>
00138340 <_Rate_monotonic_Update_statistics>:
}
static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
138340: 56 push %esi
138341: 53 push %ebx
138342: 83 ec 24 sub $0x24,%esp
138345: 89 c6 mov %eax,%esi
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
138347: ff 40 54 incl 0x54(%eax)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
13834a: 83 78 38 04 cmpl $0x4,0x38(%eax)
13834e: 0f 84 a0 00 00 00 je 1383f4 <_Rate_monotonic_Update_statistics+0xb4>
/*
* Grab status for time statistics.
*/
valid_status =
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
138354: 8d 44 24 10 lea 0x10(%esp),%eax
138358: 89 44 24 08 mov %eax,0x8(%esp)
13835c: 8d 44 24 18 lea 0x18(%esp),%eax
138360: 89 44 24 04 mov %eax,0x4(%esp)
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
138364: 89 34 24 mov %esi,(%esp)
138367: e8 44 ff ff ff call 1382b0 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
13836c: 84 c0 test %al,%al
13836e: 74 3c je 1383ac <_Rate_monotonic_Update_statistics+0x6c>
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
138370: 8b 4c 24 10 mov 0x10(%esp),%ecx
138374: 8b 5c 24 14 mov 0x14(%esp),%ebx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
138378: 01 4e 6c add %ecx,0x6c(%esi)
13837b: 11 5e 70 adc %ebx,0x70(%esi)
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
13837e: 3b 5e 60 cmp 0x60(%esi),%ebx
138381: 7e 59 jle 1383dc <_Rate_monotonic_Update_statistics+0x9c><== ALWAYS TAKEN
stats->min_cpu_time = executed;
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
138383: 3b 5e 68 cmp 0x68(%esi),%ebx
138386: 7d 61 jge 1383e9 <_Rate_monotonic_Update_statistics+0xa9><== ALWAYS TAKEN
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
138388: 8b 4c 24 18 mov 0x18(%esp),%ecx
13838c: 8b 5c 24 1c mov 0x1c(%esp),%ebx
138390: 01 8e 84 00 00 00 add %ecx,0x84(%esi)
138396: 11 9e 88 00 00 00 adc %ebx,0x88(%esi)
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
13839c: 3b 5e 78 cmp 0x78(%esi),%ebx
13839f: 7e 27 jle 1383c8 <_Rate_monotonic_Update_statistics+0x88><== ALWAYS TAKEN
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
1383a1: 3b 9e 80 00 00 00 cmp 0x80(%esi),%ebx
1383a7: 7d 0b jge 1383b4 <_Rate_monotonic_Update_statistics+0x74>
1383a9: 8d 76 00 lea 0x0(%esi),%esi
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
1383ac: 83 c4 24 add $0x24,%esp
1383af: 5b pop %ebx
1383b0: 5e pop %esi
1383b1: c3 ret
1383b2: 66 90 xchg %ax,%ax
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
1383b4: 7e 62 jle 138418 <_Rate_monotonic_Update_statistics+0xd8><== ALWAYS TAKEN
stats->max_wall_time = since_last_period;
1383b6: 89 4e 7c mov %ecx,0x7c(%esi)
1383b9: 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
}
1383bf: 83 c4 24 add $0x24,%esp
1383c2: 5b pop %ebx
1383c3: 5e pop %esi
1383c4: c3 ret
1383c5: 8d 76 00 lea 0x0(%esi),%esi
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
1383c8: 7d 46 jge 138410 <_Rate_monotonic_Update_statistics+0xd0>
stats->min_wall_time = since_last_period;
1383ca: 89 4e 74 mov %ecx,0x74(%esi)
1383cd: 89 5e 78 mov %ebx,0x78(%esi)
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
1383d0: 3b 9e 80 00 00 00 cmp 0x80(%esi),%ebx
1383d6: 7c d4 jl 1383ac <_Rate_monotonic_Update_statistics+0x6c>
1383d8: eb da jmp 1383b4 <_Rate_monotonic_Update_statistics+0x74>
1383da: 66 90 xchg %ax,%ax
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
1383dc: 7d 26 jge 138404 <_Rate_monotonic_Update_statistics+0xc4>
stats->min_cpu_time = executed;
1383de: 89 4e 5c mov %ecx,0x5c(%esi)
1383e1: 89 5e 60 mov %ebx,0x60(%esi)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
1383e4: 3b 5e 68 cmp 0x68(%esi),%ebx
1383e7: 7c 9f jl 138388 <_Rate_monotonic_Update_statistics+0x48><== NEVER TAKEN
1383e9: 7e 11 jle 1383fc <_Rate_monotonic_Update_statistics+0xbc><== ALWAYS TAKEN
stats->max_cpu_time = executed;
1383eb: 89 4e 64 mov %ecx,0x64(%esi)
1383ee: 89 5e 68 mov %ebx,0x68(%esi)
1383f1: eb 95 jmp 138388 <_Rate_monotonic_Update_statistics+0x48>
1383f3: 90 nop
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
1383f4: ff 40 58 incl 0x58(%eax)
1383f7: e9 58 ff ff ff jmp 138354 <_Rate_monotonic_Update_statistics+0x14>
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
stats->min_cpu_time = executed;
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
1383fc: 3b 4e 64 cmp 0x64(%esi),%ecx
1383ff: 76 87 jbe 138388 <_Rate_monotonic_Update_statistics+0x48>
138401: eb e8 jmp 1383eb <_Rate_monotonic_Update_statistics+0xab>
138403: 90 nop
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
138404: 3b 4e 5c cmp 0x5c(%esi),%ecx
138407: 0f 83 76 ff ff ff jae 138383 <_Rate_monotonic_Update_statistics+0x43>
13840d: eb cf jmp 1383de <_Rate_monotonic_Update_statistics+0x9e>
13840f: 90 nop
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
138410: 3b 4e 74 cmp 0x74(%esi),%ecx
138413: 73 8c jae 1383a1 <_Rate_monotonic_Update_statistics+0x61>
138415: eb b3 jmp 1383ca <_Rate_monotonic_Update_statistics+0x8a>
138417: 90 nop
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
138418: 3b 4e 7c cmp 0x7c(%esi),%ecx
13841b: 76 8f jbe 1383ac <_Rate_monotonic_Update_statistics+0x6c>
13841d: eb 97 jmp 1383b6 <_Rate_monotonic_Update_statistics+0x76>
0010de10 <_Scheduler_CBS_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
10de10: 53 push %ebx
10de11: 83 ec 18 sub $0x18,%esp
10de14: 8b 5c 24 20 mov 0x20(%esp),%ebx
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
10de18: c7 04 24 1c 00 00 00 movl $0x1c,(%esp)
10de1f: e8 b0 17 00 00 call 10f5d4 <_Workspace_Allocate>
if ( sched ) {
10de24: 85 c0 test %eax,%eax
10de26: 74 16 je 10de3e <_Scheduler_CBS_Allocate+0x2e><== NEVER TAKEN
the_thread->scheduler_info = sched;
10de28: 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;
10de2e: 89 18 mov %ebx,(%eax)
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
10de30: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax)
schinfo->cbs_server = NULL;
10de37: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
}
return sched;
}
10de3e: 83 c4 18 add $0x18,%esp
10de41: 5b pop %ebx
10de42: c3 ret
0010f430 <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
10f430: 53 push %ebx
10f431: 83 ec 28 sub $0x28,%esp
10f434: 8b 5c 24 30 mov 0x30(%esp),%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;
10f438: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
if ( the_thread->real_priority != new_priority )
10f43e: 39 43 18 cmp %eax,0x18(%ebx)
10f441: 74 03 je 10f446 <_Scheduler_CBS_Budget_callout+0x16><== NEVER TAKEN
the_thread->real_priority = new_priority;
10f443: 89 43 18 mov %eax,0x18(%ebx)
if ( the_thread->current_priority != new_priority )
10f446: 39 43 14 cmp %eax,0x14(%ebx)
10f449: 74 14 je 10f45f <_Scheduler_CBS_Budget_callout+0x2f><== NEVER TAKEN
_Thread_Change_priority(the_thread, new_priority, true);
10f44b: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10f452: 00
10f453: 89 44 24 04 mov %eax,0x4(%esp)
10f457: 89 1c 24 mov %ebx,(%esp)
10f45a: e8 e9 04 00 00 call 10f948 <_Thread_Change_priority>
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
10f45f: 8b 9b 88 00 00 00 mov 0x88(%ebx),%ebx
if ( sched_info->cbs_server->cbs_budget_overrun ) {
10f465: 8b 43 18 mov 0x18(%ebx),%eax
10f468: 8b 50 0c mov 0xc(%eax),%edx
10f46b: 85 d2 test %edx,%edx
10f46d: 74 1f je 10f48e <_Scheduler_CBS_Budget_callout+0x5e><== NEVER TAKEN
_Scheduler_CBS_Get_server_id(
10f46f: 8d 54 24 1c lea 0x1c(%esp),%edx
10f473: 89 54 24 04 mov %edx,0x4(%esp)
10f477: 8b 00 mov (%eax),%eax
10f479: 89 04 24 mov %eax,(%esp)
10f47c: e8 73 ff ff ff call 10f3f4 <_Scheduler_CBS_Get_server_id>
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
10f481: 8b 43 18 mov 0x18(%ebx),%eax
10f484: 8b 54 24 1c mov 0x1c(%esp),%edx
10f488: 89 14 24 mov %edx,(%esp)
10f48b: ff 50 0c call *0xc(%eax)
}
}
10f48e: 83 c4 28 add $0x28,%esp
10f491: 5b pop %ebx
10f492: c3 ret
0010f058 <_Scheduler_CBS_Cleanup>:
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Cleanup (void)
{
10f058: 53 push %ebx
10f059: 83 ec 18 sub $0x18,%esp
10f05c: a1 24 62 13 00 mov 0x136224,%eax
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f061: 8b 0d fc 17 13 00 mov 0x1317fc,%ecx
10f067: 31 db xor %ebx,%ebx
10f069: 85 c9 test %ecx,%ecx
10f06b: 74 20 je 10f08d <_Scheduler_CBS_Cleanup+0x35><== NEVER TAKEN
10f06d: 8d 76 00 lea 0x0(%esi),%esi
if ( _Scheduler_CBS_Server_list[ i ] )
10f070: 8b 14 98 mov (%eax,%ebx,4),%edx
10f073: 85 d2 test %edx,%edx
10f075: 74 0d je 10f084 <_Scheduler_CBS_Cleanup+0x2c>
_Scheduler_CBS_Destroy_server( i );
10f077: 89 1c 24 mov %ebx,(%esp)
10f07a: e8 d1 00 00 00 call 10f150 <_Scheduler_CBS_Destroy_server>
10f07f: a1 24 62 13 00 mov 0x136224,%eax
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f084: 43 inc %ebx
10f085: 39 1d fc 17 13 00 cmp %ebx,0x1317fc
10f08b: 77 e3 ja 10f070 <_Scheduler_CBS_Cleanup+0x18>
if ( _Scheduler_CBS_Server_list[ i ] )
_Scheduler_CBS_Destroy_server( i );
}
_Workspace_Free( _Scheduler_CBS_Server_list );
10f08d: 89 04 24 mov %eax,(%esp)
10f090: e8 db 1b 00 00 call 110c70 <_Workspace_Free>
return SCHEDULER_CBS_OK;
}
10f095: 31 c0 xor %eax,%eax
10f097: 83 c4 18 add $0x18,%esp
10f09a: 5b pop %ebx
10f09b: c3 ret
0010f09c <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
10f09c: 57 push %edi
10f09d: 56 push %esi
10f09e: 53 push %ebx
10f09f: 83 ec 10 sub $0x10,%esp
10f0a2: 8b 74 24 20 mov 0x20(%esp),%esi
10f0a6: 8b 5c 24 28 mov 0x28(%esp),%ebx
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
10f0aa: 8b 46 04 mov 0x4(%esi),%eax
10f0ad: 85 c0 test %eax,%eax
10f0af: 0f 8e 8d 00 00 00 jle 10f142 <_Scheduler_CBS_Create_server+0xa6>
10f0b5: 8b 06 mov (%esi),%eax
10f0b7: 85 c0 test %eax,%eax
10f0b9: 0f 8e 83 00 00 00 jle 10f142 <_Scheduler_CBS_Create_server+0xa6>
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++ ) {
10f0bf: 8b 0d fc 17 13 00 mov 0x1317fc,%ecx
10f0c5: 85 c9 test %ecx,%ecx
10f0c7: 74 1f je 10f0e8 <_Scheduler_CBS_Create_server+0x4c><== NEVER TAKEN
if ( !_Scheduler_CBS_Server_list[i] )
10f0c9: 8b 15 24 62 13 00 mov 0x136224,%edx
10f0cf: 8b 02 mov (%edx),%eax
10f0d1: 85 c0 test %eax,%eax
10f0d3: 74 67 je 10f13c <_Scheduler_CBS_Create_server+0xa0>
10f0d5: 31 c0 xor %eax,%eax
10f0d7: eb 0a jmp 10f0e3 <_Scheduler_CBS_Create_server+0x47>
10f0d9: 8d 76 00 lea 0x0(%esi),%esi
10f0dc: 8b 3c 82 mov (%edx,%eax,4),%edi
10f0df: 85 ff test %edi,%edi
10f0e1: 74 11 je 10f0f4 <_Scheduler_CBS_Create_server+0x58>
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++ ) {
10f0e3: 40 inc %eax
10f0e4: 39 c8 cmp %ecx,%eax
10f0e6: 75 f4 jne 10f0dc <_Scheduler_CBS_Create_server+0x40>
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
10f0e8: b8 e6 ff ff ff mov $0xffffffe6,%eax
the_server->parameters = *params;
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
10f0ed: 83 c4 10 add $0x10,%esp
10f0f0: 5b pop %ebx
10f0f1: 5e pop %esi
10f0f2: 5f pop %edi
10f0f3: c3 ret
10f0f4: 8d 3c 85 00 00 00 00 lea 0x0(,%eax,4),%edi
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
10f0fb: 89 03 mov %eax,(%ebx)
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
10f0fd: 01 d7 add %edx,%edi
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
10f0ff: c7 04 24 10 00 00 00 movl $0x10,(%esp)
10f106: e8 39 1b 00 00 call 110c44 <_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 *)
10f10b: 89 07 mov %eax,(%edi)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
10f10d: 8b 13 mov (%ebx),%edx
10f10f: a1 24 62 13 00 mov 0x136224,%eax
10f114: 8b 0c 90 mov (%eax,%edx,4),%ecx
if ( !the_server )
10f117: 85 c9 test %ecx,%ecx
10f119: 74 2e je 10f149 <_Scheduler_CBS_Create_server+0xad><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
10f11b: 8b 06 mov (%esi),%eax
10f11d: 8b 56 04 mov 0x4(%esi),%edx
10f120: 89 41 04 mov %eax,0x4(%ecx)
10f123: 89 51 08 mov %edx,0x8(%ecx)
the_server->task_id = -1;
10f126: c7 01 ff ff ff ff movl $0xffffffff,(%ecx)
the_server->cbs_budget_overrun = budget_overrun_callback;
10f12c: 8b 44 24 24 mov 0x24(%esp),%eax
10f130: 89 41 0c mov %eax,0xc(%ecx)
return SCHEDULER_CBS_OK;
10f133: 31 c0 xor %eax,%eax
}
10f135: 83 c4 10 add $0x10,%esp
10f138: 5b pop %ebx
10f139: 5e pop %esi
10f13a: 5f pop %edi
10f13b: c3 ret
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++ ) {
if ( !_Scheduler_CBS_Server_list[i] )
10f13c: 31 ff xor %edi,%edi
10f13e: 31 c0 xor %eax,%eax
10f140: eb b9 jmp 10f0fb <_Scheduler_CBS_Create_server+0x5f>
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;
10f142: b8 ee ff ff ff mov $0xffffffee,%eax
10f147: eb a4 jmp 10f0ed <_Scheduler_CBS_Create_server+0x51>
*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;
10f149: b8 ef ff ff ff mov $0xffffffef,%eax <== NOT EXECUTED
10f14e: eb 9d jmp 10f0ed <_Scheduler_CBS_Create_server+0x51><== NOT EXECUTED
0010f1c8 <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
10f1c8: 56 push %esi
10f1c9: 53 push %ebx
10f1ca: 83 ec 34 sub $0x34,%esp
10f1cd: 8b 74 24 40 mov 0x40(%esp),%esi
10f1d1: 8b 5c 24 44 mov 0x44(%esp),%ebx
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
10f1d5: 8d 44 24 2c lea 0x2c(%esp),%eax
10f1d9: 89 44 24 04 mov %eax,0x4(%esp)
10f1dd: 89 1c 24 mov %ebx,(%esp)
10f1e0: e8 ef 0b 00 00 call 10fdd4 <_Thread_Get>
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
10f1e5: 85 c0 test %eax,%eax
10f1e7: 74 5f je 10f248 <_Scheduler_CBS_Detach_thread+0x80>
_Thread_Enable_dispatch();
10f1e9: 89 44 24 1c mov %eax,0x1c(%esp)
10f1ed: e8 c2 0b 00 00 call 10fdb4 <_Thread_Enable_dispatch>
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
10f1f2: 3b 35 fc 17 13 00 cmp 0x1317fc,%esi
10f1f8: 8b 44 24 1c mov 0x1c(%esp),%eax
10f1fc: 73 4a jae 10f248 <_Scheduler_CBS_Detach_thread+0x80>
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] )
10f1fe: 8b 15 24 62 13 00 mov 0x136224,%edx
10f204: 8b 14 b2 mov (%edx,%esi,4),%edx
10f207: 85 d2 test %edx,%edx
10f209: 74 48 je 10f253 <_Scheduler_CBS_Detach_thread+0x8b>
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
10f20b: 39 1a cmp %ebx,(%edx)
10f20d: 75 39 jne 10f248 <_Scheduler_CBS_Detach_thread+0x80><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
10f20f: c7 02 ff ff ff ff movl $0xffffffff,(%edx)
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
10f215: 8b 90 88 00 00 00 mov 0x88(%eax),%edx
10f21b: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
10f222: 8b 90 a0 00 00 00 mov 0xa0(%eax),%edx
10f228: 89 50 78 mov %edx,0x78(%eax)
the_thread->budget_callout = the_thread->Start.budget_callout;
10f22b: 8b 90 a4 00 00 00 mov 0xa4(%eax),%edx
10f231: 89 50 7c mov %edx,0x7c(%eax)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
10f234: 8a 90 9c 00 00 00 mov 0x9c(%eax),%dl
10f23a: 88 50 70 mov %dl,0x70(%eax)
return SCHEDULER_CBS_OK;
10f23d: 31 c0 xor %eax,%eax
}
10f23f: 83 c4 34 add $0x34,%esp
10f242: 5b pop %ebx
10f243: 5e pop %esi
10f244: c3 ret
10f245: 8d 76 00 lea 0x0(%esi),%esi
if ( the_thread ) {
_Thread_Enable_dispatch();
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10f248: 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;
}
10f24d: 83 c4 34 add $0x34,%esp
10f250: 5b pop %ebx
10f251: 5e pop %esi
10f252: c3 ret
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;
10f253: b8 e7 ff ff ff mov $0xffffffe7,%eax
10f258: eb e5 jmp 10f23f <_Scheduler_CBS_Detach_thread+0x77>
0010f3f4 <_Scheduler_CBS_Get_server_id>:
int _Scheduler_CBS_Get_server_id (
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
10f3f4: 56 push %esi
10f3f5: 53 push %ebx
10f3f6: 8b 74 24 0c mov 0xc(%esp),%esi
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f3fa: 8b 0d fc 17 13 00 mov 0x1317fc,%ecx
10f400: 85 c9 test %ecx,%ecx
10f402: 74 18 je 10f41c <_Scheduler_CBS_Get_server_id+0x28><== NEVER TAKEN
10f404: 8b 1d 24 62 13 00 mov 0x136224,%ebx
10f40a: 31 c0 xor %eax,%eax
if ( _Scheduler_CBS_Server_list[i] &&
10f40c: 8b 14 83 mov (%ebx,%eax,4),%edx
10f40f: 85 d2 test %edx,%edx
10f411: 74 04 je 10f417 <_Scheduler_CBS_Get_server_id+0x23>
10f413: 39 32 cmp %esi,(%edx)
10f415: 74 0d je 10f424 <_Scheduler_CBS_Get_server_id+0x30>
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f417: 40 inc %eax
10f418: 39 c8 cmp %ecx,%eax
10f41a: 75 f0 jne 10f40c <_Scheduler_CBS_Get_server_id+0x18>
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
return SCHEDULER_CBS_OK;
}
}
return SCHEDULER_CBS_ERROR_NOSERVER;
10f41c: b8 e7 ff ff ff mov $0xffffffe7,%eax
}
10f421: 5b pop %ebx
10f422: 5e pop %esi
10f423: c3 ret
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[i] &&
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
10f424: 8b 54 24 10 mov 0x10(%esp),%edx
10f428: 89 02 mov %eax,(%edx)
return SCHEDULER_CBS_OK;
10f42a: 31 c0 xor %eax,%eax
}
}
return SCHEDULER_CBS_ERROR_NOSERVER;
}
10f42c: 5b pop %ebx
10f42d: 5e pop %esi
10f42e: c3 ret
0010f494 <_Scheduler_CBS_Initialize>:
int _Scheduler_CBS_Initialize(void)
{
10f494: 83 ec 1c sub $0x1c,%esp
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
10f497: a1 fc 17 13 00 mov 0x1317fc,%eax
10f49c: c1 e0 02 shl $0x2,%eax
10f49f: 89 04 24 mov %eax,(%esp)
10f4a2: e8 9d 17 00 00 call 110c44 <_Workspace_Allocate>
10f4a7: a3 24 62 13 00 mov %eax,0x136224
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
10f4ac: 85 c0 test %eax,%eax
10f4ae: 74 27 je 10f4d7 <_Scheduler_CBS_Initialize+0x43><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
10f4b0: 8b 0d fc 17 13 00 mov 0x1317fc,%ecx
10f4b6: 31 d2 xor %edx,%edx
10f4b8: 85 c9 test %ecx,%ecx
10f4ba: 75 09 jne 10f4c5 <_Scheduler_CBS_Initialize+0x31><== ALWAYS TAKEN
10f4bc: eb 13 jmp 10f4d1 <_Scheduler_CBS_Initialize+0x3d><== NOT EXECUTED
10f4be: 66 90 xchg %ax,%ax <== NOT EXECUTED
10f4c0: a1 24 62 13 00 mov 0x136224,%eax
_Scheduler_CBS_Server_list[i] = NULL;
10f4c5: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,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++) {
10f4cc: 42 inc %edx
10f4cd: 39 ca cmp %ecx,%edx
10f4cf: 75 ef jne 10f4c0 <_Scheduler_CBS_Initialize+0x2c>
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
10f4d1: 31 c0 xor %eax,%eax
}
10f4d3: 83 c4 1c add $0x1c,%esp
10f4d6: c3 ret
{
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;
10f4d7: b8 ef ff ff ff mov $0xffffffef,%eax <== NOT EXECUTED
10f4dc: eb f5 jmp 10f4d3 <_Scheduler_CBS_Initialize+0x3f><== NOT EXECUTED
0010de44 <_Scheduler_CBS_Release_job>:
void _Scheduler_CBS_Release_job(
Thread_Control *the_thread,
uint32_t deadline
)
{
10de44: 83 ec 1c sub $0x1c,%esp
10de47: 8b 44 24 20 mov 0x20(%esp),%eax
10de4b: 8b 54 24 24 mov 0x24(%esp),%edx
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;
10de4f: 8b 88 88 00 00 00 mov 0x88(%eax),%ecx
)
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
10de55: 8b 49 18 mov 0x18(%ecx),%ecx
(Scheduler_CBS_Server *) sched_info->cbs_server;
if (deadline) {
10de58: 85 d2 test %edx,%edx
10de5a: 74 34 je 10de90 <_Scheduler_CBS_Release_job+0x4c>
/* Initializing or shifting deadline. */
if (serv_info)
10de5c: 85 c9 test %ecx,%ecx
10de5e: 74 3c je 10de9c <_Scheduler_CBS_Release_job+0x58>
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
10de60: 8b 15 e4 3c 13 00 mov 0x133ce4,%edx
10de66: 03 51 04 add 0x4(%ecx),%edx
10de69: 81 e2 ff ff ff 7f and $0x7fffffff,%edx
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
the_thread->cpu_time_budget = serv_info->parameters.budget;
10de6f: 8b 49 08 mov 0x8(%ecx),%ecx
10de72: 89 48 74 mov %ecx,0x74(%eax)
the_thread->real_priority = new_priority;
10de75: 89 50 18 mov %edx,0x18(%eax)
_Thread_Change_priority(the_thread, new_priority, true);
10de78: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10de7f: 00
10de80: 89 54 24 04 mov %edx,0x4(%esp)
10de84: 89 04 24 mov %eax,(%esp)
10de87: e8 dc 03 00 00 call 10e268 <_Thread_Change_priority>
}
10de8c: 83 c4 1c add $0x1c,%esp
10de8f: c3 ret
new_priority = (_Watchdog_Ticks_since_boot + deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
10de90: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx
}
/* Budget replenishment for the next job. */
if (serv_info)
10de96: 85 c9 test %ecx,%ecx
10de98: 75 d5 jne 10de6f <_Scheduler_CBS_Release_job+0x2b><== ALWAYS TAKEN
10de9a: eb d9 jmp 10de75 <_Scheduler_CBS_Release_job+0x31><== NOT EXECUTED
/* Initializing or shifting deadline. */
if (serv_info)
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
10de9c: 8b 0d e4 3c 13 00 mov 0x133ce4,%ecx
10dea2: 01 ca add %ecx,%edx
10dea4: 81 e2 ff ff ff 7f and $0x7fffffff,%edx
10deaa: eb c9 jmp 10de75 <_Scheduler_CBS_Release_job+0x31>
0010deac <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
10deac: 56 push %esi
10dead: 53 push %ebx
10deae: 83 ec 14 sub $0x14,%esp
10deb1: 8b 5c 24 20 mov 0x20(%esp),%ebx
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
10deb5: 89 1c 24 mov %ebx,(%esp)
10deb8: e8 e3 00 00 00 call 10dfa0 <_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;
10debd: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10dec3: 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) {
10dec6: 85 c0 test %eax,%eax
10dec8: 74 46 je 10df10 <_Scheduler_CBS_Unblock+0x64>
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 -
10deca: 8b 4b 18 mov 0x18(%ebx),%ecx
10decd: 8b 15 e4 3c 13 00 mov 0x133ce4,%edx
10ded3: 89 ce mov %ecx,%esi
10ded5: 29 d6 sub %edx,%esi
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
10ded7: 8b 50 04 mov 0x4(%eax),%edx
10deda: 0f af d6 imul %esi,%edx
10dedd: 8b 40 08 mov 0x8(%eax),%eax
10dee0: 0f af 43 74 imul 0x74(%ebx),%eax
10dee4: 39 c2 cmp %eax,%edx
10dee6: 7e 28 jle 10df10 <_Scheduler_CBS_Unblock+0x64>
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
10dee8: 8b 93 ac 00 00 00 mov 0xac(%ebx),%edx
if ( the_thread->real_priority != new_priority )
10deee: 39 d1 cmp %edx,%ecx
10def0: 74 03 je 10def5 <_Scheduler_CBS_Unblock+0x49>
the_thread->real_priority = new_priority;
10def2: 89 53 18 mov %edx,0x18(%ebx)
if ( the_thread->current_priority != new_priority )
10def5: 8b 43 14 mov 0x14(%ebx),%eax
10def8: 39 d0 cmp %edx,%eax
10defa: 74 17 je 10df13 <_Scheduler_CBS_Unblock+0x67>
_Thread_Change_priority(the_thread, new_priority, true);
10defc: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10df03: 00
10df04: 89 54 24 04 mov %edx,0x4(%esp)
10df08: 89 1c 24 mov %ebx,(%esp)
10df0b: e8 58 03 00 00 call 10e268 <_Thread_Change_priority>
10df10: 8b 43 14 mov 0x14(%ebx),%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,
10df13: 8b 15 70 41 13 00 mov 0x134170,%edx
10df19: 8b 52 14 mov 0x14(%edx),%edx
10df1c: 89 54 24 04 mov %edx,0x4(%esp)
10df20: 89 04 24 mov %eax,(%esp)
10df23: ff 15 90 f7 12 00 call *0x12f790
10df29: 85 c0 test %eax,%eax
10df2b: 7e 18 jle 10df45 <_Scheduler_CBS_Unblock+0x99>
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
10df2d: 89 1d 70 41 13 00 mov %ebx,0x134170
if ( _Thread_Executing->is_preemptible ||
10df33: a1 6c 41 13 00 mov 0x13416c,%eax
10df38: 80 78 70 00 cmpb $0x0,0x70(%eax)
10df3c: 74 0e je 10df4c <_Scheduler_CBS_Unblock+0xa0>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10df3e: c6 05 78 41 13 00 01 movb $0x1,0x134178
}
}
10df45: 83 c4 14 add $0x14,%esp
10df48: 5b pop %ebx
10df49: 5e pop %esi
10df4a: c3 ret
10df4b: 90 nop
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
10df4c: 8b 43 14 mov 0x14(%ebx),%eax
10df4f: 85 c0 test %eax,%eax
10df51: 74 eb je 10df3e <_Scheduler_CBS_Unblock+0x92><== NEVER TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
10df53: 83 c4 14 add $0x14,%esp
10df56: 5b pop %ebx
10df57: 5e pop %esi
10df58: c3 ret
0010de10 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
10de10: 53 push %ebx
10de11: 83 ec 18 sub $0x18,%esp
10de14: 8b 5c 24 20 mov 0x20(%esp),%ebx
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
10de18: c7 04 24 18 00 00 00 movl $0x18,(%esp)
10de1f: e8 34 17 00 00 call 10f558 <_Workspace_Allocate>
if ( sched ) {
10de24: 85 c0 test %eax,%eax
10de26: 74 0f je 10de37 <_Scheduler_EDF_Allocate+0x27><== NEVER TAKEN
the_thread->scheduler_info = sched;
10de28: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
10de2e: 89 18 mov %ebx,(%eax)
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
10de30: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax)
}
return sched;
}
10de37: 83 c4 18 add $0x18,%esp
10de3a: 5b pop %ebx
10de3b: c3 ret
0010dfe4 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
10dfe4: 53 push %ebx
10dfe5: 83 ec 18 sub $0x18,%esp
10dfe8: 8b 5c 24 20 mov 0x20(%esp),%ebx
_Scheduler_EDF_Enqueue(the_thread);
10dfec: 89 1c 24 mov %ebx,(%esp)
10dfef: e8 8c fe ff ff call 10de80 <_Scheduler_EDF_Enqueue>
10dff4: 8b 43 14 mov 0x14(%ebx),%eax
10dff7: 89 44 24 04 mov %eax,0x4(%esp)
* 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(
10dffb: a1 f0 40 13 00 mov 0x1340f0,%eax
10e000: 8b 40 14 mov 0x14(%eax),%eax
10e003: 89 04 24 mov %eax,(%esp)
10e006: ff 15 10 f7 12 00 call *0x12f710
10e00c: 85 c0 test %eax,%eax
10e00e: 78 08 js 10e018 <_Scheduler_EDF_Unblock+0x34>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
10e010: 83 c4 18 add $0x18,%esp
10e013: 5b pop %ebx
10e014: c3 ret
10e015: 8d 76 00 lea 0x0(%esi),%esi
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
10e018: 89 1d f0 40 13 00 mov %ebx,0x1340f0
if ( _Thread_Executing->is_preemptible ||
10e01e: a1 ec 40 13 00 mov 0x1340ec,%eax
10e023: 80 78 70 00 cmpb $0x0,0x70(%eax)
10e027: 74 0f je 10e038 <_Scheduler_EDF_Unblock+0x54>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10e029: c6 05 f8 40 13 00 01 movb $0x1,0x1340f8
}
}
10e030: 83 c4 18 add $0x18,%esp
10e033: 5b pop %ebx
10e034: c3 ret
10e035: 8d 76 00 lea 0x0(%esi),%esi
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
10e038: 8b 43 14 mov 0x14(%ebx),%eax
10e03b: 85 c0 test %eax,%eax
10e03d: 75 d1 jne 10e010 <_Scheduler_EDF_Unblock+0x2c><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10e03f: c6 05 f8 40 13 00 01 movb $0x1,0x1340f8 <== NOT EXECUTED
10e046: eb e8 jmp 10e030 <_Scheduler_EDF_Unblock+0x4c><== NOT EXECUTED
0010d57c <_Scheduler_priority_Block>:
#include <rtems/score/thread.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
)
{
10d57c: 53 push %ebx
10d57d: 8b 44 24 08 mov 0x8(%esp),%eax
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
10d581: 8b 88 88 00 00 00 mov 0x88(%eax),%ecx
ready = sched_info->ready_chain;
10d587: 8b 11 mov (%ecx),%edx
if ( _Chain_Has_only_one_node( ready ) ) {
10d589: 8b 5a 08 mov 0x8(%edx),%ebx
10d58c: 39 1a cmp %ebx,(%edx)
10d58e: 74 28 je 10d5b8 <_Scheduler_priority_Block+0x3c>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10d590: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
10d592: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
10d595: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
10d598: 89 0a mov %ecx,(%edx)
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
10d59a: 3b 05 d0 24 13 00 cmp 0x1324d0,%eax
10d5a0: 74 4a je 10d5ec <_Scheduler_priority_Block+0x70>
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
10d5a2: 3b 05 cc 24 13 00 cmp 0x1324cc,%eax
10d5a8: 74 02 je 10d5ac <_Scheduler_priority_Block+0x30>
_Thread_Dispatch_necessary = true;
}
10d5aa: 5b pop %ebx
10d5ab: c3 ret
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
10d5ac: c6 05 d8 24 13 00 01 movb $0x1,0x1324d8
}
10d5b3: 5b pop %ebx
10d5b4: c3 ret
10d5b5: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10d5b8: 8d 5a 04 lea 0x4(%edx),%ebx
10d5bb: 89 1a mov %ebx,(%edx)
head->next = tail;
head->previous = NULL;
10d5bd: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
tail->previous = head;
10d5c4: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
10d5c7: 8b 59 04 mov 0x4(%ecx),%ebx
10d5ca: 66 8b 13 mov (%ebx),%dx
10d5cd: 66 23 51 0e and 0xe(%ecx),%dx
10d5d1: 66 89 13 mov %dx,(%ebx)
if ( *the_priority_map->minor == 0 )
10d5d4: 66 85 d2 test %dx,%dx
10d5d7: 75 c1 jne 10d59a <_Scheduler_priority_Block+0x1e>
_Priority_Major_bit_map &= the_priority_map->block_major;
10d5d9: 66 8b 15 00 25 13 00 mov 0x132500,%dx
10d5e0: 23 51 0c and 0xc(%ecx),%edx
10d5e3: 66 89 15 00 25 13 00 mov %dx,0x132500
10d5ea: eb ae jmp 10d59a <_Scheduler_priority_Block+0x1e>
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10d5ec: 66 8b 1d 00 25 13 00 mov 0x132500,%bx
10d5f3: 31 d2 xor %edx,%edx
10d5f5: 89 d1 mov %edx,%ecx
10d5f7: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d5fb: 0f b7 c9 movzwl %cx,%ecx
10d5fe: 66 8b 9c 09 20 25 13 mov 0x132520(%ecx,%ecx,1),%bx
10d605: 00
10d606: 66 0f bc d3 bsf %bx,%dx
return (_Priority_Bits_index( major ) << 4) +
10d60a: c1 e1 04 shl $0x4,%ecx
10d60d: 0f b7 d2 movzwl %dx,%edx
10d610: 01 ca add %ecx,%edx
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10d612: 8d 0c 52 lea (%edx,%edx,2),%ecx
10d615: 8b 15 20 db 12 00 mov 0x12db20,%edx
10d61b: 8d 0c 8a lea (%edx,%ecx,4),%ecx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10d61e: 8b 11 mov (%ecx),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d620: 83 c1 04 add $0x4,%ecx
10d623: 39 ca cmp %ecx,%edx
10d625: 74 0b je 10d632 <_Scheduler_priority_Block+0xb6><== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d627: 89 15 d0 24 13 00 mov %edx,0x1324d0
10d62d: e9 70 ff ff ff jmp 10d5a2 <_Scheduler_priority_Block+0x26>
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10d632: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d634: eb f1 jmp 10d627 <_Scheduler_priority_Block+0xab><== NOT EXECUTED
0010d794 <_Scheduler_priority_Schedule>:
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10d794: 66 8b 0d 00 25 13 00 mov 0x132500,%cx
10d79b: 31 c0 xor %eax,%eax
10d79d: 89 c2 mov %eax,%edx
10d79f: 66 0f bc d1 bsf %cx,%dx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d7a3: 0f b7 d2 movzwl %dx,%edx
10d7a6: 66 8b 8c 12 20 25 13 mov 0x132520(%edx,%edx,1),%cx
10d7ad: 00
10d7ae: 66 0f bc c1 bsf %cx,%ax
return (_Priority_Bits_index( major ) << 4) +
10d7b2: c1 e2 04 shl $0x4,%edx
10d7b5: 0f b7 c0 movzwl %ax,%eax
10d7b8: 01 d0 add %edx,%eax
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10d7ba: 8d 14 40 lea (%eax,%eax,2),%edx
10d7bd: a1 20 db 12 00 mov 0x12db20,%eax
10d7c2: 8d 14 90 lea (%eax,%edx,4),%edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10d7c5: 8b 02 mov (%edx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d7c7: 83 c2 04 add $0x4,%edx
10d7ca: 39 d0 cmp %edx,%eax
10d7cc: 74 06 je 10d7d4 <_Scheduler_priority_Schedule+0x40><== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d7ce: a3 d0 24 13 00 mov %eax,0x1324d0
10d7d3: c3 ret
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10d7d4: 31 c0 xor %eax,%eax
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d7d6: a3 d0 24 13 00 mov %eax,0x1324d0 <== NOT EXECUTED
10d7db: c3 ret <== NOT EXECUTED
0010d7dc <_Scheduler_priority_Tick>:
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
10d7dc: 53 push %ebx
10d7dd: 83 ec 18 sub $0x18,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10d7e0: 8b 1d cc 24 13 00 mov 0x1324cc,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10d7e6: 80 7b 70 00 cmpb $0x0,0x70(%ebx)
10d7ea: 74 1c je 10d808 <_Scheduler_priority_Tick+0x2c>
return;
if ( !_States_Is_ready( executing->current_state ) )
10d7ec: 8b 43 10 mov 0x10(%ebx),%eax
10d7ef: 85 c0 test %eax,%eax
10d7f1: 75 15 jne 10d808 <_Scheduler_priority_Tick+0x2c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10d7f3: 8b 43 78 mov 0x78(%ebx),%eax
10d7f6: 83 f8 01 cmp $0x1,%eax
10d7f9: 72 0d jb 10d808 <_Scheduler_priority_Tick+0x2c>
10d7fb: 83 f8 02 cmp $0x2,%eax
10d7fe: 76 20 jbe 10d820 <_Scheduler_priority_Tick+0x44>
10d800: 83 f8 03 cmp $0x3,%eax
10d803: 74 0b je 10d810 <_Scheduler_priority_Tick+0x34><== ALWAYS TAKEN
10d805: 8d 76 00 lea 0x0(%esi),%esi
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
10d808: 83 c4 18 add $0x18,%esp
10d80b: 5b pop %ebx
10d80c: c3 ret
10d80d: 8d 76 00 lea 0x0(%esi),%esi
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
10d810: ff 4b 74 decl 0x74(%ebx)
10d813: 75 f3 jne 10d808 <_Scheduler_priority_Tick+0x2c>
(*executing->budget_callout)( executing );
10d815: 89 1c 24 mov %ebx,(%esp)
10d818: ff 53 7c call *0x7c(%ebx)
10d81b: eb eb jmp 10d808 <_Scheduler_priority_Tick+0x2c>
10d81d: 8d 76 00 lea 0x0(%esi),%esi
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
10d820: 8b 43 74 mov 0x74(%ebx),%eax
10d823: 48 dec %eax
10d824: 89 43 74 mov %eax,0x74(%ebx)
10d827: 85 c0 test %eax,%eax
10d829: 7f dd jg 10d808 <_Scheduler_priority_Tick+0x2c>
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
10d82b: ff 15 2c db 12 00 call *0x12db2c
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Scheduler_Yield();
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10d831: a1 18 1f 13 00 mov 0x131f18,%eax
10d836: 89 43 74 mov %eax,0x74(%ebx)
10d839: eb cd jmp 10d808 <_Scheduler_priority_Tick+0x2c>
0010df60 <_Scheduler_simple_Ready_queue_enqueue_first>:
#include <rtems/score/schedulersimple.h>
void _Scheduler_simple_Ready_queue_enqueue_first(
Thread_Control *the_thread
)
{
10df60: 8b 4c 24 04 mov 0x4(%esp),%ecx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10df64: a1 80 ec 12 00 mov 0x12ec80,%eax
10df69: 8b 00 mov (%eax),%eax
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
10df6b: 8b 51 14 mov 0x14(%ecx),%edx
10df6e: 39 50 14 cmp %edx,0x14(%eax)
10df71: 73 08 jae 10df7b <_Scheduler_simple_Ready_queue_enqueue_first+0x1b>
10df73: 90 nop
* Do NOT need to check for end of chain because there is always
* at least one task on the ready chain -- the IDLE task. It can
* never block, should never attempt to obtain a semaphore or mutex,
* and thus will always be there.
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
10df74: 8b 00 mov (%eax),%eax
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
10df76: 39 50 14 cmp %edx,0x14(%eax)
10df79: 72 f9 jb 10df74 <_Scheduler_simple_Ready_queue_enqueue_first+0x14><== NEVER TAKEN
current = (Thread_Control *)current->Object.Node.previous;
10df7b: 8b 40 04 mov 0x4(%eax),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10df7e: 89 41 04 mov %eax,0x4(%ecx)
before_node = after_node->next;
10df81: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10df83: 89 08 mov %ecx,(%eax)
the_node->next = before_node;
10df85: 89 11 mov %edx,(%ecx)
before_node->previous = the_node;
10df87: 89 4a 04 mov %ecx,0x4(%edx)
10df8a: c3 ret
0010c4d8 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10c4d8: 8b 4c 24 04 mov 0x4(%esp),%ecx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10c4dc: b8 40 42 0f 00 mov $0xf4240,%eax
10c4e1: 31 d2 xor %edx,%edx
10c4e3: f7 35 90 f1 12 00 divl 0x12f190
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10c4e9: 85 c9 test %ecx,%ecx
10c4eb: 74 47 je 10c534 <_TOD_Validate+0x5c> <== NEVER TAKEN
10c4ed: 3b 41 18 cmp 0x18(%ecx),%eax
10c4f0: 76 42 jbe 10c534 <_TOD_Validate+0x5c>
(the_tod->ticks >= ticks_per_second) ||
10c4f2: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10c4f6: 77 3c ja 10c534 <_TOD_Validate+0x5c>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10c4f8: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10c4fc: 77 36 ja 10c534 <_TOD_Validate+0x5c>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10c4fe: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10c502: 77 30 ja 10c534 <_TOD_Validate+0x5c>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10c504: 8b 41 04 mov 0x4(%ecx),%eax
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
10c507: 85 c0 test %eax,%eax
10c509: 74 29 je 10c534 <_TOD_Validate+0x5c> <== NEVER TAKEN
(the_tod->month == 0) ||
10c50b: 83 f8 0c cmp $0xc,%eax
10c50e: 77 24 ja 10c534 <_TOD_Validate+0x5c>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10c510: 8b 11 mov (%ecx),%edx
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
10c512: 81 fa c3 07 00 00 cmp $0x7c3,%edx
10c518: 76 1a jbe 10c534 <_TOD_Validate+0x5c>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10c51a: 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) ||
10c51d: 85 c9 test %ecx,%ecx
10c51f: 74 13 je 10c534 <_TOD_Validate+0x5c> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10c521: 83 e2 03 and $0x3,%edx
10c524: 75 11 jne 10c537 <_TOD_Validate+0x5f>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10c526: 8b 04 85 14 4d 12 00 mov 0x124d14(,%eax,4),%eax
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
if ( the_tod->day > days_in_month )
10c52d: 39 c8 cmp %ecx,%eax
10c52f: 0f 93 c0 setae %al
10c532: c3 ret
10c533: 90 nop
(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;
10c534: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10c536: c3 ret
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10c537: 8b 04 85 e0 4c 12 00 mov 0x124ce0(,%eax,4),%eax
10c53e: eb ed jmp 10c52d <_TOD_Validate+0x55>
0010d9b8 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10d9b8: 57 push %edi
10d9b9: 56 push %esi
10d9ba: 53 push %ebx
10d9bb: 83 ec 20 sub $0x20,%esp
10d9be: 8b 5c 24 30 mov 0x30(%esp),%ebx
10d9c2: 8b 7c 24 34 mov 0x34(%esp),%edi
10d9c6: 8a 44 24 38 mov 0x38(%esp),%al
10d9ca: 88 44 24 1f mov %al,0x1f(%esp)
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
10d9ce: 8b 73 10 mov 0x10(%ebx),%esi
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
10d9d1: 89 1c 24 mov %ebx,(%esp)
10d9d4: e8 cf 0c 00 00 call 10e6a8 <_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 )
10d9d9: 39 7b 14 cmp %edi,0x14(%ebx)
10d9dc: 74 0c je 10d9ea <_Thread_Change_priority+0x32>
_Thread_Set_priority( the_thread, new_priority );
10d9de: 89 7c 24 04 mov %edi,0x4(%esp)
10d9e2: 89 1c 24 mov %ebx,(%esp)
10d9e5: e8 72 0c 00 00 call 10e65c <_Thread_Set_priority>
_ISR_Disable( level );
10d9ea: 9c pushf
10d9eb: fa cli
10d9ec: 5f pop %edi
/*
* 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;
10d9ed: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10d9f0: 83 f8 04 cmp $0x4,%eax
10d9f3: 74 23 je 10da18 <_Thread_Change_priority+0x60>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10d9f5: 83 e6 04 and $0x4,%esi
10d9f8: 74 12 je 10da0c <_Thread_Change_priority+0x54><== ALWAYS TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10d9fa: 57 push %edi
10d9fb: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10d9fc: a9 e0 be 03 00 test $0x3bee0,%eax
10da01: 75 5d jne 10da60 <_Thread_Change_priority+0xa8>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10da03: 83 c4 20 add $0x20,%esp
10da06: 5b pop %ebx
10da07: 5e pop %esi
10da08: 5f pop %edi
10da09: c3 ret
10da0a: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10da0c: 89 c2 mov %eax,%edx
10da0e: 83 e2 fb and $0xfffffffb,%edx
10da11: 89 53 10 mov %edx,0x10(%ebx)
10da14: eb e4 jmp 10d9fa <_Thread_Change_priority+0x42>
10da16: 66 90 xchg %ax,%ax
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10da18: 83 e6 04 and $0x4,%esi
10da1b: 75 17 jne 10da34 <_Thread_Change_priority+0x7c><== 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 );
10da1d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( prepend_it )
10da24: 80 7c 24 1f 00 cmpb $0x0,0x1f(%esp)
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
10da29: 89 1c 24 mov %ebx,(%esp)
10da2c: 74 4a je 10da78 <_Thread_Change_priority+0xc0>
10da2e: ff 15 48 db 12 00 call *0x12db48
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
10da34: 57 push %edi
10da35: 9d popf
10da36: 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();
10da37: ff 15 28 db 12 00 call *0x12db28
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10da3d: a1 cc 24 13 00 mov 0x1324cc,%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() &&
10da42: 3b 05 d0 24 13 00 cmp 0x1324d0,%eax
10da48: 74 0d je 10da57 <_Thread_Change_priority+0x9f>
10da4a: 80 78 70 00 cmpb $0x0,0x70(%eax)
10da4e: 74 07 je 10da57 <_Thread_Change_priority+0x9f>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10da50: c6 05 d8 24 13 00 01 movb $0x1,0x1324d8
_ISR_Enable( level );
10da57: 57 push %edi
10da58: 9d popf
}
10da59: 83 c4 20 add $0x20,%esp
10da5c: 5b pop %ebx
10da5d: 5e pop %esi
10da5e: 5f pop %edi
10da5f: c3 ret
/* 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 );
10da60: 89 5c 24 34 mov %ebx,0x34(%esp)
10da64: 8b 43 44 mov 0x44(%ebx),%eax
10da67: 89 44 24 30 mov %eax,0x30(%esp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10da6b: 83 c4 20 add $0x20,%esp
10da6e: 5b pop %ebx
10da6f: 5e pop %esi
10da70: 5f pop %edi
/* 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 );
10da71: e9 3e 0b 00 00 jmp 10e5b4 <_Thread_queue_Requeue>
10da76: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
10da78: ff 15 44 db 12 00 call *0x12db44
10da7e: eb b4 jmp 10da34 <_Thread_Change_priority+0x7c>
0010dc7c <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10dc7c: 83 ec 2c sub $0x2c,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10dc7f: 8d 44 24 1c lea 0x1c(%esp),%eax
10dc83: 89 44 24 04 mov %eax,0x4(%esp)
10dc87: 8b 44 24 30 mov 0x30(%esp),%eax
10dc8b: 89 04 24 mov %eax,(%esp)
10dc8e: e8 b1 01 00 00 call 10de44 <_Thread_Get>
switch ( location ) {
10dc93: 8b 54 24 1c mov 0x1c(%esp),%edx
10dc97: 85 d2 test %edx,%edx
10dc99: 75 20 jne 10dcbb <_Thread_Delay_ended+0x3f><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10dc9b: c7 44 24 04 18 00 00 movl $0x10000018,0x4(%esp)
10dca2: 10
10dca3: 89 04 24 mov %eax,(%esp)
10dca6: e8 d5 fd ff ff call 10da80 <_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--;
10dcab: a1 44 1f 13 00 mov 0x131f44,%eax
10dcb0: 48 dec %eax
10dcb1: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
10dcb6: a1 44 1f 13 00 mov 0x131f44,%eax
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10dcbb: 83 c4 2c add $0x2c,%esp
10dcbe: c3 ret
0010dcc0 <_Thread_Dispatch>:
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10dcc0: 55 push %ebp
10dcc1: 57 push %edi
10dcc2: 56 push %esi
10dcc3: 53 push %ebx
10dcc4: 83 ec 2c sub $0x2c,%esp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10dcc7: a1 44 1f 13 00 mov 0x131f44,%eax
10dccc: 40 inc %eax
10dccd: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
10dcd2: a1 44 1f 13 00 mov 0x131f44,%eax
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
10dcd7: 8b 35 cc 24 13 00 mov 0x1324cc,%esi
_ISR_Disable( level );
10dcdd: 9c pushf
10dcde: fa cli
10dcdf: 58 pop %eax
while ( _Thread_Dispatch_necessary == true ) {
10dce0: 8a 15 d8 24 13 00 mov 0x1324d8,%dl
10dce6: 84 d2 test %dl,%dl
10dce8: 0f 84 16 01 00 00 je 10de04 <_Thread_Dispatch+0x144>
heir = _Thread_Heir;
10dcee: 8b 2d d0 24 13 00 mov 0x1324d0,%ebp
_Thread_Dispatch_necessary = false;
10dcf4: c6 05 d8 24 13 00 00 movb $0x0,0x1324d8
_Thread_Executing = heir;
10dcfb: 89 2d cc 24 13 00 mov %ebp,0x1324cc
/*
* 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 )
10dd01: 39 ee cmp %ebp,%esi
10dd03: 0f 84 fb 00 00 00 je 10de04 <_Thread_Dispatch+0x144>
10dd09: 8d 7c 24 18 lea 0x18(%esp),%edi
10dd0d: e9 da 00 00 00 jmp 10ddec <_Thread_Dispatch+0x12c>
10dd12: 66 90 xchg %ax,%ax
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
10dd14: 50 push %eax
10dd15: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10dd16: 89 3c 24 mov %edi,(%esp)
10dd19: e8 9e 3c 00 00 call 1119bc <_TOD_Get_uptime>
_Timestamp_Subtract(
10dd1e: 8b 44 24 18 mov 0x18(%esp),%eax
10dd22: 8b 54 24 1c mov 0x1c(%esp),%edx
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
10dd26: 89 c1 mov %eax,%ecx
10dd28: 89 d3 mov %edx,%ebx
10dd2a: 2b 0d dc 24 13 00 sub 0x1324dc,%ecx
10dd30: 1b 1d e0 24 13 00 sbb 0x1324e0,%ebx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
10dd36: 01 8e 80 00 00 00 add %ecx,0x80(%esi)
10dd3c: 11 9e 84 00 00 00 adc %ebx,0x84(%esi)
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
10dd42: a3 dc 24 13 00 mov %eax,0x1324dc
10dd47: 89 15 e0 24 13 00 mov %edx,0x1324e0
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10dd4d: a1 bc 1f 13 00 mov 0x131fbc,%eax
10dd52: 85 c0 test %eax,%eax
10dd54: 74 10 je 10dd66 <_Thread_Dispatch+0xa6> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10dd56: 8b 10 mov (%eax),%edx
10dd58: 89 96 e0 00 00 00 mov %edx,0xe0(%esi)
*_Thread_libc_reent = heir->libc_reent;
10dd5e: 8b 95 e0 00 00 00 mov 0xe0(%ebp),%edx
10dd64: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10dd66: 89 6c 24 04 mov %ebp,0x4(%esp)
10dd6a: 89 34 24 mov %esi,(%esp)
10dd6d: e8 9a 0c 00 00 call 10ea0c <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10dd72: 81 c5 c4 00 00 00 add $0xc4,%ebp
10dd78: 89 6c 24 04 mov %ebp,0x4(%esp)
10dd7c: 8d 86 c4 00 00 00 lea 0xc4(%esi),%eax
10dd82: 89 04 24 mov %eax,(%esp)
10dd85: e8 c6 0f 00 00 call 10ed50 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10dd8a: 8b 86 dc 00 00 00 mov 0xdc(%esi),%eax
10dd90: 85 c0 test %eax,%eax
10dd92: 74 2e je 10ddc2 <_Thread_Dispatch+0x102>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
10dd94: a1 b8 1f 13 00 mov 0x131fb8,%eax
10dd99: 39 c6 cmp %eax,%esi
10dd9b: 74 25 je 10ddc2 <_Thread_Dispatch+0x102>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10dd9d: 85 c0 test %eax,%eax
10dd9f: 74 0d je 10ddae <_Thread_Dispatch+0xee>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10dda1: 05 dc 00 00 00 add $0xdc,%eax
10dda6: 89 04 24 mov %eax,(%esp)
10dda9: e8 d6 0f 00 00 call 10ed84 <_CPU_Context_save_fp>
_Context_Restore_fp( &executing->fp_context );
10ddae: 8d 86 dc 00 00 00 lea 0xdc(%esi),%eax
10ddb4: 89 04 24 mov %eax,(%esp)
10ddb7: e8 d2 0f 00 00 call 10ed8e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10ddbc: 89 35 b8 1f 13 00 mov %esi,0x131fb8
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10ddc2: 8b 35 cc 24 13 00 mov 0x1324cc,%esi
_ISR_Disable( level );
10ddc8: 9c pushf
10ddc9: fa cli
10ddca: 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 ) {
10ddcb: 8a 15 d8 24 13 00 mov 0x1324d8,%dl
10ddd1: 84 d2 test %dl,%dl
10ddd3: 74 2f je 10de04 <_Thread_Dispatch+0x144>
heir = _Thread_Heir;
10ddd5: 8b 2d d0 24 13 00 mov 0x1324d0,%ebp
_Thread_Dispatch_necessary = false;
10dddb: c6 05 d8 24 13 00 00 movb $0x0,0x1324d8
_Thread_Executing = heir;
10dde2: 89 2d cc 24 13 00 mov %ebp,0x1324cc
/*
* 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 )
10dde8: 39 f5 cmp %esi,%ebp
10ddea: 74 18 je 10de04 <_Thread_Dispatch+0x144><== NEVER TAKEN
*/
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
10ddec: 83 7d 78 01 cmpl $0x1,0x78(%ebp)
10ddf0: 0f 85 1e ff ff ff jne 10dd14 <_Thread_Dispatch+0x54>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10ddf6: 8b 15 18 1f 13 00 mov 0x131f18,%edx
10ddfc: 89 55 74 mov %edx,0x74(%ebp)
10ddff: e9 10 ff ff ff jmp 10dd14 <_Thread_Dispatch+0x54>
_ISR_Disable( level );
}
post_switch:
_ISR_Enable( level );
10de04: 50 push %eax
10de05: 9d popf
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10de06: a1 44 1f 13 00 mov 0x131f44,%eax
10de0b: 48 dec %eax
10de0c: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
10de11: a1 44 1f 13 00 mov 0x131f44,%eax
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
10de16: e8 6d e4 ff ff call 10c288 <_API_extensions_Run_postswitch>
}
10de1b: 83 c4 2c add $0x2c,%esp
10de1e: 5b pop %ebx
10de1f: 5e pop %esi
10de20: 5f pop %edi
10de21: 5d pop %ebp
10de22: c3 ret
00113a0c <_Thread_Handler>:
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
113a0c: 53 push %ebx
113a0d: 83 ec 28 sub $0x28,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
113a10: 8b 1d cc 24 13 00 mov 0x1324cc,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
113a16: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
_ISR_Set_level(level);
113a1c: 85 c0 test %eax,%eax
113a1e: 0f 84 80 00 00 00 je 113aa4 <_Thread_Handler+0x98>
113a24: fa cli
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
113a25: a0 f4 1b 13 00 mov 0x131bf4,%al
113a2a: 88 44 24 1f mov %al,0x1f(%esp)
doneConstructors = true;
113a2e: c6 05 f4 1b 13 00 01 movb $0x1,0x131bf4
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
113a35: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
113a3b: 85 c0 test %eax,%eax
113a3d: 74 20 je 113a5f <_Thread_Handler+0x53>
#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 );
113a3f: a1 b8 1f 13 00 mov 0x131fb8,%eax
113a44: 39 c3 cmp %eax,%ebx
113a46: 74 17 je 113a5f <_Thread_Handler+0x53>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
113a48: 85 c0 test %eax,%eax
113a4a: 74 0d je 113a59 <_Thread_Handler+0x4d>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
113a4c: 05 dc 00 00 00 add $0xdc,%eax
113a51: 89 04 24 mov %eax,(%esp)
113a54: e8 2b b3 ff ff call 10ed84 <_CPU_Context_save_fp>
_Thread_Allocated_fp = executing;
113a59: 89 1d b8 1f 13 00 mov %ebx,0x131fb8
/*
* 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 );
113a5f: 89 1c 24 mov %ebx,(%esp)
113a62: e8 29 ae ff ff call 10e890 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
113a67: e8 b8 a3 ff ff call 10de24 <_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) */ {
113a6c: 80 7c 24 1f 00 cmpb $0x0,0x1f(%esp)
113a71: 74 37 je 113aaa <_Thread_Handler+0x9e>
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
113a73: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax
113a79: 85 c0 test %eax,%eax
113a7b: 74 34 je 113ab1 <_Thread_Handler+0xa5>
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
113a7d: 48 dec %eax
113a7e: 74 45 je 113ac5 <_Thread_Handler+0xb9> <== ALWAYS TAKEN
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
113a80: 89 1c 24 mov %ebx,(%esp)
113a83: e8 3c ae ff ff call 10e8c4 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
113a88: c7 44 24 08 05 00 00 movl $0x5,0x8(%esp)
113a8f: 00
113a90: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
113a97: 00
113a98: c7 04 24 00 00 00 00 movl $0x0,(%esp)
113a9f: e8 68 91 ff ff call 10cc0c <_Internal_error_Occurred>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
_ISR_Set_level(level);
113aa4: fb sti
113aa5: e9 7b ff ff ff jmp 113a25 <_Thread_Handler+0x19>
* _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) */ {
INIT_NAME ();
113aaa: e8 29 d1 00 00 call 120bd8 <__start_set_sysctl_set>
113aaf: eb c2 jmp 113a73 <_Thread_Handler+0x67>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
113ab1: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax
113ab7: 89 04 24 mov %eax,(%esp)
113aba: ff 93 8c 00 00 00 call *0x8c(%ebx)
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
113ac0: 89 43 28 mov %eax,0x28(%ebx)
113ac3: eb bb jmp 113a80 <_Thread_Handler+0x74>
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
113ac5: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax
113acb: 89 04 24 mov %eax,(%esp)
113ace: ff 93 8c 00 00 00 call *0x8c(%ebx)
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
113ad4: 89 43 28 mov %eax,0x28(%ebx)
113ad7: eb a7 jmp 113a80 <_Thread_Handler+0x74>
0010e11c <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
10e11c: 56 push %esi
10e11d: 53 push %ebx
10e11e: 83 ec 24 sub $0x24,%esp
uint32_t ticks_per_timeslice =
10e121: 8b 1d 18 da 12 00 mov 0x12da18,%ebx
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
10e127: 8b 35 0c da 12 00 mov 0x12da0c,%esi
rtems_configuration_get_maximum_extensions();
rtems_stack_allocate_init_hook stack_allocate_init_hook =
10e12d: a1 28 da 12 00 mov 0x12da28,%eax
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
10e132: 8b 0d 2c da 12 00 mov 0x12da2c,%ecx
10e138: 85 c9 test %ecx,%ecx
10e13a: 0f 84 90 00 00 00 je 10e1d0 <_Thread_Handler_initialization+0xb4>
10e140: 8b 15 30 da 12 00 mov 0x12da30,%edx
10e146: 85 d2 test %edx,%edx
10e148: 0f 84 82 00 00 00 je 10e1d0 <_Thread_Handler_initialization+0xb4><== NEVER TAKEN
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
10e14e: 85 c0 test %eax,%eax
10e150: 74 0b je 10e15d <_Thread_Handler_initialization+0x41>
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
10e152: 8b 15 08 da 12 00 mov 0x12da08,%edx
10e158: 89 14 24 mov %edx,(%esp)
10e15b: ff d0 call *%eax
_Thread_Dispatch_necessary = false;
10e15d: c6 05 d8 24 13 00 00 movb $0x0,0x1324d8
_Thread_Executing = NULL;
10e164: c7 05 cc 24 13 00 00 movl $0x0,0x1324cc
10e16b: 00 00 00
_Thread_Heir = NULL;
10e16e: c7 05 d0 24 13 00 00 movl $0x0,0x1324d0
10e175: 00 00 00
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
10e178: c7 05 b8 1f 13 00 00 movl $0x0,0x131fb8
10e17f: 00 00 00
#endif
_Thread_Maximum_extensions = maximum_extensions;
10e182: 89 35 c0 1f 13 00 mov %esi,0x131fc0
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
10e188: 89 1d 18 1f 13 00 mov %ebx,0x131f18
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
10e18e: c7 44 24 18 08 00 00 movl $0x8,0x18(%esp)
10e195: 00
10e196: c7 44 24 14 00 00 00 movl $0x0,0x14(%esp)
10e19d: 00
10e19e: c7 44 24 10 f4 00 00 movl $0xf4,0x10(%esp)
10e1a5: 00
10e1a6: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
10e1ad: 00
10e1ae: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10e1b5: 00
10e1b6: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10e1bd: 00
10e1be: c7 04 24 60 20 13 00 movl $0x132060,(%esp)
10e1c5: e8 0a f0 ff ff call 10d1d4 <_Objects_Initialize_information>
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
10e1ca: 83 c4 24 add $0x24,%esp
10e1cd: 5b pop %ebx
10e1ce: 5e pop %esi
10e1cf: c3 ret
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
10e1d0: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp)
10e1d7: 00
10e1d8: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10e1df: 00
10e1e0: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10e1e7: e8 20 ea ff ff call 10cc0c <_Internal_error_Occurred>
0010dec4 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10dec4: 55 push %ebp
10dec5: 57 push %edi
10dec6: 56 push %esi
10dec7: 53 push %ebx
10dec8: 83 ec 2c sub $0x2c,%esp
10decb: 8b 5c 24 44 mov 0x44(%esp),%ebx
10decf: 8b 44 24 48 mov 0x48(%esp),%eax
10ded3: 8a 54 24 50 mov 0x50(%esp),%dl
10ded7: 8a 4c 24 58 mov 0x58(%esp),%cl
10dedb: 88 4c 24 1f mov %cl,0x1f(%esp)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10dedf: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10dee6: 00 00 00
10dee9: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
10def0: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10def3: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
10defa: 00 00 00
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
10defd: 85 c0 test %eax,%eax
10deff: 0f 84 d0 01 00 00 je 10e0d5 <_Thread_Initialize+0x211>
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
10df05: c6 83 b0 00 00 00 00 movb $0x0,0xb0(%ebx)
10df0c: 8b 4c 24 4c mov 0x4c(%esp),%ecx
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10df10: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
the_stack->size = size;
10df16: 89 8b b4 00 00 00 mov %ecx,0xb4(%ebx)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10df1c: 84 d2 test %dl,%dl
10df1e: 0f 85 50 01 00 00 jne 10e074 <_Thread_Initialize+0x1b0>
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10df24: 31 f6 xor %esi,%esi
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10df26: 89 b3 dc 00 00 00 mov %esi,0xdc(%ebx)
the_thread->Start.fp_context = fp_area;
10df2c: 89 b3 bc 00 00 00 mov %esi,0xbc(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10df32: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10df39: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10df40: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10df47: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10df4e: a1 c0 1f 13 00 mov 0x131fc0,%eax
10df53: 85 c0 test %eax,%eax
10df55: 0f 85 35 01 00 00 jne 10e090 <_Thread_Initialize+0x1cc>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10df5b: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx)
10df62: 00 00 00
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10df65: 31 ff xor %edi,%edi
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10df67: 8a 54 24 1f mov 0x1f(%esp),%dl
10df6b: 88 93 9c 00 00 00 mov %dl,0x9c(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10df71: 8b 4c 24 5c mov 0x5c(%esp),%ecx
10df75: 89 8b a0 00 00 00 mov %ecx,0xa0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10df7b: 8b 44 24 60 mov 0x60(%esp),%eax
10df7f: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
switch ( budget_algorithm ) {
10df85: 83 f9 02 cmp $0x2,%ecx
10df88: 75 08 jne 10df92 <_Thread_Initialize+0xce>
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10df8a: a1 18 1f 13 00 mov 0x131f18,%eax
10df8f: 89 43 74 mov %eax,0x74(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10df92: 8b 44 24 64 mov 0x64(%esp),%eax
10df96: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
the_thread->current_state = STATES_DORMANT;
10df9c: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10dfa3: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10dfaa: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10dfb1: 8b 54 24 54 mov 0x54(%esp),%edx
10dfb5: 89 53 18 mov %edx,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10dfb8: 89 93 ac 00 00 00 mov %edx,0xac(%ebx)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
10dfbe: 89 1c 24 mov %ebx,(%esp)
10dfc1: ff 15 38 db 12 00 call *0x12db38
10dfc7: 89 c5 mov %eax,%ebp
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
10dfc9: 85 c0 test %eax,%eax
10dfcb: 74 45 je 10e012 <_Thread_Initialize+0x14e>
goto failed;
_Thread_Set_priority( the_thread, priority );
10dfcd: 8b 4c 24 54 mov 0x54(%esp),%ecx
10dfd1: 89 4c 24 04 mov %ecx,0x4(%esp)
10dfd5: 89 1c 24 mov %ebx,(%esp)
10dfd8: e8 7f 06 00 00 call 10e65c <_Thread_Set_priority>
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
10dfdd: c7 83 80 00 00 00 00 movl $0x0,0x80(%ebx)
10dfe4: 00 00 00
10dfe7: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10dfee: 00 00 00
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10dff1: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10dff5: 8b 44 24 40 mov 0x40(%esp),%eax
10dff9: 8b 40 1c mov 0x1c(%eax),%eax
10dffc: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10dfff: 8b 44 24 68 mov 0x68(%esp),%eax
10e003: 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 );
10e006: 89 1c 24 mov %ebx,(%esp)
10e009: e8 3a 09 00 00 call 10e948 <_User_extensions_Thread_create>
if ( extension_status )
10e00e: 84 c0 test %al,%al
10e010: 75 56 jne 10e068 <_Thread_Initialize+0x1a4>
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
10e012: 8b 83 e0 00 00 00 mov 0xe0(%ebx),%eax
10e018: 89 04 24 mov %eax,(%esp)
10e01b: e8 c0 0c 00 00 call 10ece0 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
10e020: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax
10e026: 89 04 24 mov %eax,(%esp)
10e029: e8 b2 0c 00 00 call 10ece0 <_Workspace_Free>
10e02e: 8b 83 e8 00 00 00 mov 0xe8(%ebx),%eax
10e034: 89 04 24 mov %eax,(%esp)
10e037: e8 a4 0c 00 00 call 10ece0 <_Workspace_Free>
_Workspace_Free( extensions_area );
10e03c: 89 3c 24 mov %edi,(%esp)
10e03f: e8 9c 0c 00 00 call 10ece0 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
10e044: 89 34 24 mov %esi,(%esp)
10e047: e8 94 0c 00 00 call 10ece0 <_Workspace_Free>
#endif
_Workspace_Free( sched );
10e04c: 89 2c 24 mov %ebp,(%esp)
10e04f: e8 8c 0c 00 00 call 10ece0 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
10e054: 89 1c 24 mov %ebx,(%esp)
10e057: e8 b0 06 00 00 call 10e70c <_Thread_Stack_Free>
return false;
10e05c: 31 c0 xor %eax,%eax
}
10e05e: 83 c4 2c add $0x2c,%esp
10e061: 5b pop %ebx
10e062: 5e pop %esi
10e063: 5f pop %edi
10e064: 5d pop %ebp
10e065: c3 ret
10e066: 66 90 xchg %ax,%ax
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
10e068: b0 01 mov $0x1,%al
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10e06a: 83 c4 2c add $0x2c,%esp
10e06d: 5b pop %ebx
10e06e: 5e pop %esi
10e06f: 5f pop %edi
10e070: 5d pop %ebp
10e071: c3 ret
10e072: 66 90 xchg %ax,%ax
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10e074: c7 04 24 6c 00 00 00 movl $0x6c,(%esp)
10e07b: e8 34 0c 00 00 call 10ecb4 <_Workspace_Allocate>
10e080: 89 c6 mov %eax,%esi
if ( !fp_area )
10e082: 85 c0 test %eax,%eax
10e084: 0f 85 9c fe ff ff jne 10df26 <_Thread_Initialize+0x62>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10e08a: 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;
10e08c: 31 ed xor %ebp,%ebp
10e08e: eb 82 jmp 10e012 <_Thread_Initialize+0x14e>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
10e090: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10e097: 89 04 24 mov %eax,(%esp)
10e09a: e8 15 0c 00 00 call 10ecb4 <_Workspace_Allocate>
10e09f: 89 c7 mov %eax,%edi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10e0a1: 85 c0 test %eax,%eax
10e0a3: 74 6d je 10e112 <_Thread_Initialize+0x24e>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10e0a5: 89 83 ec 00 00 00 mov %eax,0xec(%ebx)
10e0ab: 8b 2d c0 1f 13 00 mov 0x131fc0,%ebp
10e0b1: 89 c1 mov %eax,%ecx
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10e0b3: 31 c0 xor %eax,%eax
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10e0b5: 31 d2 xor %edx,%edx
10e0b7: eb 09 jmp 10e0c2 <_Thread_Initialize+0x1fe>
10e0b9: 8d 76 00 lea 0x0(%esi),%esi
10e0bc: 8b 8b ec 00 00 00 mov 0xec(%ebx),%ecx
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
10e0c2: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%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++ )
10e0c9: 42 inc %edx
10e0ca: 89 d0 mov %edx,%eax
10e0cc: 39 ea cmp %ebp,%edx
10e0ce: 76 ec jbe 10e0bc <_Thread_Initialize+0x1f8>
10e0d0: e9 92 fe ff ff jmp 10df67 <_Thread_Initialize+0xa3>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10e0d5: 8b 44 24 4c mov 0x4c(%esp),%eax
10e0d9: 89 44 24 04 mov %eax,0x4(%esp)
10e0dd: 89 1c 24 mov %ebx,(%esp)
10e0e0: 88 54 24 18 mov %dl,0x18(%esp)
10e0e4: e8 eb 05 00 00 call 10e6d4 <_Thread_Stack_Allocate>
10e0e9: 89 c1 mov %eax,%ecx
if ( !actual_stack_size || actual_stack_size < stack_size )
10e0eb: 85 c0 test %eax,%eax
10e0ed: 8a 54 24 18 mov 0x18(%esp),%dl
10e0f1: 74 18 je 10e10b <_Thread_Initialize+0x247>
10e0f3: 39 44 24 4c cmp %eax,0x4c(%esp)
10e0f7: 77 12 ja 10e10b <_Thread_Initialize+0x247><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
10e0f9: 8b 83 c0 00 00 00 mov 0xc0(%ebx),%eax
the_thread->Start.core_allocated_stack = true;
10e0ff: c6 83 b0 00 00 00 01 movb $0x1,0xb0(%ebx)
10e106: e9 05 fe ff ff jmp 10df10 <_Thread_Initialize+0x4c>
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
10e10b: 31 c0 xor %eax,%eax
10e10d: e9 4c ff ff ff jmp 10e05e <_Thread_Initialize+0x19a>
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;
10e112: 31 ed xor %ebp,%ebp
10e114: e9 f9 fe ff ff jmp 10e012 <_Thread_Initialize+0x14e>
0010e70c <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
10e70c: 8b 44 24 04 mov 0x4(%esp),%eax
rtems_stack_free_hook stack_free_hook =
10e710: 8b 15 30 da 12 00 mov 0x12da30,%edx
#if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
10e716: 80 b8 b0 00 00 00 00 cmpb $0x0,0xb0(%eax)
10e71d: 75 01 jne 10e720 <_Thread_Stack_Free+0x14><== ALWAYS TAKEN
10e71f: c3 ret <== NOT EXECUTED
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
(*stack_free_hook)( the_thread->Start.Initial_stack.area );
10e720: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax
10e726: 89 44 24 04 mov %eax,0x4(%esp)
10e72a: ff e2 jmp *%edx
0010e5b4 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10e5b4: 56 push %esi
10e5b5: 53 push %ebx
10e5b6: 83 ec 24 sub $0x24,%esp
10e5b9: 8b 5c 24 30 mov 0x30(%esp),%ebx
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
10e5bd: 85 db test %ebx,%ebx
10e5bf: 74 06 je 10e5c7 <_Thread_queue_Requeue+0x13><== 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 ) {
10e5c1: 83 7b 34 01 cmpl $0x1,0x34(%ebx)
10e5c5: 74 09 je 10e5d0 <_Thread_queue_Requeue+0x1c><== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
10e5c7: 83 c4 24 add $0x24,%esp <== NOT EXECUTED
10e5ca: 5b pop %ebx <== NOT EXECUTED
10e5cb: 5e pop %esi <== NOT EXECUTED
10e5cc: c3 ret <== NOT EXECUTED
10e5cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10e5d0: 9c pushf
10e5d1: fa cli
10e5d2: 5e pop %esi
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10e5d3: 8b 44 24 34 mov 0x34(%esp),%eax
10e5d7: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10e5de: 75 08 jne 10e5e8 <_Thread_queue_Requeue+0x34><== ALWAYS TAKEN
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
10e5e0: 56 push %esi
10e5e1: 9d popf
}
}
10e5e2: 83 c4 24 add $0x24,%esp
10e5e5: 5b pop %ebx
10e5e6: 5e pop %esi
10e5e7: c3 ret
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10e5e8: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
10e5ef: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10e5f6: 00
10e5f7: 89 44 24 04 mov %eax,0x4(%esp)
10e5fb: 89 1c 24 mov %ebx,(%esp)
10e5fe: e8 25 3a 00 00 call 112028 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10e603: 8d 44 24 1c lea 0x1c(%esp),%eax
10e607: 89 44 24 08 mov %eax,0x8(%esp)
10e60b: 8b 44 24 34 mov 0x34(%esp),%eax
10e60f: 89 44 24 04 mov %eax,0x4(%esp)
10e613: 89 1c 24 mov %ebx,(%esp)
10e616: e8 81 fd ff ff call 10e39c <_Thread_queue_Enqueue_priority>
10e61b: eb c3 jmp 10e5e0 <_Thread_queue_Requeue+0x2c>
0010e620 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10e620: 83 ec 2c sub $0x2c,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10e623: 8d 44 24 1c lea 0x1c(%esp),%eax
10e627: 89 44 24 04 mov %eax,0x4(%esp)
10e62b: 8b 44 24 30 mov 0x30(%esp),%eax
10e62f: 89 04 24 mov %eax,(%esp)
10e632: e8 0d f8 ff ff call 10de44 <_Thread_Get>
switch ( location ) {
10e637: 8b 54 24 1c mov 0x1c(%esp),%edx
10e63b: 85 d2 test %edx,%edx
10e63d: 75 18 jne 10e657 <_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 );
10e63f: 89 04 24 mov %eax,(%esp)
10e642: e8 8d 3a 00 00 call 1120d4 <_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--;
10e647: a1 44 1f 13 00 mov 0x131f44,%eax
10e64c: 48 dec %eax
10e64d: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
10e652: a1 44 1f 13 00 mov 0x131f44,%eax
_Thread_Unnest_dispatch();
break;
}
}
10e657: 83 c4 2c add $0x2c,%esp
10e65a: c3 ret
0011bf68 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
11bf68: 55 push %ebp
11bf69: 57 push %edi
11bf6a: 56 push %esi
11bf6b: 53 push %ebx
11bf6c: 83 ec 5c sub $0x5c,%esp
11bf6f: 8b 5c 24 70 mov 0x70(%esp),%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
11bf73: 8d 4c 24 3c lea 0x3c(%esp),%ecx
11bf77: 89 4c 24 20 mov %ecx,0x20(%esp)
11bf7b: 89 4c 24 38 mov %ecx,0x38(%esp)
head->previous = NULL;
11bf7f: c7 44 24 3c 00 00 00 movl $0x0,0x3c(%esp)
11bf86: 00
tail->previous = head;
11bf87: 8d 44 24 38 lea 0x38(%esp),%eax
11bf8b: 89 44 24 40 mov %eax,0x40(%esp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
11bf8f: 8d 7c 24 44 lea 0x44(%esp),%edi
11bf93: 8d 4c 24 48 lea 0x48(%esp),%ecx
11bf97: 89 4c 24 24 mov %ecx,0x24(%esp)
11bf9b: 89 4c 24 44 mov %ecx,0x44(%esp)
head->previous = NULL;
11bf9f: c7 44 24 48 00 00 00 movl $0x0,0x48(%esp)
11bfa6: 00
tail->previous = head;
11bfa7: 89 7c 24 4c mov %edi,0x4c(%esp)
11bfab: 8d 6b 30 lea 0x30(%ebx),%ebp
11bfae: 8d 73 68 lea 0x68(%ebx),%esi
11bfb1: 8d 4b 08 lea 0x8(%ebx),%ecx
11bfb4: 89 4c 24 28 mov %ecx,0x28(%esp)
11bfb8: 8d 4b 40 lea 0x40(%ebx),%ecx
11bfbb: 89 4c 24 2c mov %ecx,0x2c(%esp)
{
/*
* 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;
11bfbf: 8d 44 24 38 lea 0x38(%esp),%eax
11bfc3: 89 43 78 mov %eax,0x78(%ebx)
11bfc6: 66 90 xchg %ax,%ax
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
11bfc8: a1 c4 eb 14 00 mov 0x14ebc4,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
11bfcd: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
11bfd0: 89 43 3c mov %eax,0x3c(%ebx)
_Chain_Initialize_empty( &insert_chain );
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
11bfd3: 89 7c 24 08 mov %edi,0x8(%esp)
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
11bfd7: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11bfd9: 89 44 24 04 mov %eax,0x4(%esp)
11bfdd: 89 2c 24 mov %ebp,(%esp)
11bfe0: e8 17 3f 00 00 call 11fefc <_Watchdog_Adjust_to_chain>
11bfe5: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
11bfec: 3b
11bfed: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
11bff4: 00
11bff5: a1 80 ea 14 00 mov 0x14ea80,%eax
11bffa: 8b 15 84 ea 14 00 mov 0x14ea84,%edx
11c000: 89 04 24 mov %eax,(%esp)
11c003: 89 54 24 04 mov %edx,0x4(%esp)
11c007: e8 38 4f 01 00 call 130f44 <__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;
11c00c: 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 ) {
11c00f: 39 d0 cmp %edx,%eax
11c011: 0f 87 89 00 00 00 ja 11c0a0 <_Timer_server_Body+0x138>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
11c017: 73 1e jae 11c037 <_Timer_server_Body+0xcf>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
11c019: 29 c2 sub %eax,%edx
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
11c01b: 89 54 24 08 mov %edx,0x8(%esp)
11c01f: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
11c026: 00
11c027: 89 34 24 mov %esi,(%esp)
11c02a: 89 44 24 1c mov %eax,0x1c(%esp)
11c02e: e8 59 3e 00 00 call 11fe8c <_Watchdog_Adjust>
11c033: 8b 44 24 1c mov 0x1c(%esp),%eax
}
watchdogs->last_snapshot = snapshot;
11c037: 89 43 74 mov %eax,0x74(%ebx)
11c03a: 66 90 xchg %ax,%ax
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
11c03c: 8b 43 78 mov 0x78(%ebx),%eax
11c03f: 89 04 24 mov %eax,(%esp)
11c042: e8 e1 08 00 00 call 11c928 <_Chain_Get>
if ( timer == NULL ) {
11c047: 85 c0 test %eax,%eax
11c049: 74 2d je 11c078 <_Timer_server_Body+0x110><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
11c04b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
11c04e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
11c051: 74 39 je 11c08c <_Timer_server_Body+0x124><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
11c053: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
11c056: 75 e4 jne 11c03c <_Timer_server_Body+0xd4><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
11c058: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
11c05b: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
11c05f: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
11c062: e8 1d 3f 00 00 call 11ff84 <_Watchdog_Insert> <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
11c067: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
11c06a: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
11c06d: e8 b6 08 00 00 call 11c928 <_Chain_Get> <== NOT EXECUTED
if ( timer == NULL ) {
11c072: 85 c0 test %eax,%eax <== NOT EXECUTED
11c074: 75 d5 jne 11c04b <_Timer_server_Body+0xe3><== NOT EXECUTED
11c076: 66 90 xchg %ax,%ax <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
11c078: 9c pushf
11c079: fa cli
11c07a: 58 pop %eax
if ( _Chain_Is_empty( insert_chain ) ) {
11c07b: 8b 4c 24 20 mov 0x20(%esp),%ecx
11c07f: 39 4c 24 38 cmp %ecx,0x38(%esp)
11c083: 74 3c je 11c0c1 <_Timer_server_Body+0x159><== ALWAYS TAKEN
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
11c085: 50 push %eax <== NOT EXECUTED
11c086: 9d popf <== NOT EXECUTED
11c087: e9 3c ff ff ff jmp 11bfc8 <_Timer_server_Body+0x60><== NOT EXECUTED
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
11c08c: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
11c08f: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
11c093: 89 2c 24 mov %ebp,(%esp) <== NOT EXECUTED
11c096: e8 e9 3e 00 00 call 11ff84 <_Watchdog_Insert> <== NOT EXECUTED
11c09b: eb 9f jmp 11c03c <_Timer_server_Body+0xd4><== NOT EXECUTED
11c09d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Chain_Initialize_empty( &insert_chain );
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
11c0a0: 89 7c 24 08 mov %edi,0x8(%esp)
if ( snapshot > last_snapshot ) {
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
11c0a4: 89 c1 mov %eax,%ecx
11c0a6: 29 d1 sub %edx,%ecx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11c0a8: 89 4c 24 04 mov %ecx,0x4(%esp)
11c0ac: 89 34 24 mov %esi,(%esp)
11c0af: 89 44 24 1c mov %eax,0x1c(%esp)
11c0b3: e8 44 3e 00 00 call 11fefc <_Watchdog_Adjust_to_chain>
11c0b8: 8b 44 24 1c mov 0x1c(%esp),%eax
11c0bc: e9 76 ff ff ff jmp 11c037 <_Timer_server_Body+0xcf>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
11c0c1: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
11c0c8: 50 push %eax
11c0c9: 9d popf
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
11c0ca: 8b 4c 24 24 mov 0x24(%esp),%ecx
11c0ce: 39 4c 24 44 cmp %ecx,0x44(%esp)
11c0d2: 75 26 jne 11c0fa <_Timer_server_Body+0x192>
11c0d4: eb 38 jmp 11c10e <_Timer_server_Body+0x1a6>
11c0d6: 66 90 xchg %ax,%ax
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
11c0d8: 8b 10 mov (%eax),%edx
head->next = new_first;
11c0da: 89 54 24 44 mov %edx,0x44(%esp)
new_first->previous = head;
11c0de: 89 7a 04 mov %edi,0x4(%edx)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
11c0e1: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
11c0e8: 51 push %ecx
11c0e9: 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 );
11c0ea: 8b 50 24 mov 0x24(%eax),%edx
11c0ed: 89 54 24 04 mov %edx,0x4(%esp)
11c0f1: 8b 50 20 mov 0x20(%eax),%edx
11c0f4: 89 14 24 mov %edx,(%esp)
11c0f7: ff 50 1c call *0x1c(%eax)
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
11c0fa: 9c pushf
11c0fb: fa cli
11c0fc: 59 pop %ecx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
11c0fd: 8b 44 24 44 mov 0x44(%esp),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
11c101: 3b 44 24 24 cmp 0x24(%esp),%eax
11c105: 75 d1 jne 11c0d8 <_Timer_server_Body+0x170>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
11c107: 51 push %ecx
11c108: 9d popf
11c109: e9 b1 fe ff ff jmp 11bfbf <_Timer_server_Body+0x57>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
11c10e: c6 43 7c 00 movb $0x0,0x7c(%ebx)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
11c112: a1 c4 ea 14 00 mov 0x14eac4,%eax
11c117: 40 inc %eax
11c118: a3 c4 ea 14 00 mov %eax,0x14eac4
return _Thread_Dispatch_disable_level;
11c11d: a1 c4 ea 14 00 mov 0x14eac4,%eax
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
11c122: c7 44 24 04 08 00 00 movl $0x8,0x4(%esp)
11c129: 00
11c12a: 8b 03 mov (%ebx),%eax
11c12c: 89 04 24 mov %eax,(%esp)
11c12f: e8 44 39 00 00 call 11fa78 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
11c134: 89 d8 mov %ebx,%eax
11c136: e8 3d fc ff ff call 11bd78 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
11c13b: 89 d8 mov %ebx,%eax
11c13d: e8 7e fc ff ff call 11bdc0 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
11c142: e8 5d 30 00 00 call 11f1a4 <_Thread_Enable_dispatch>
ts->active = true;
11c147: 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 );
11c14b: 8b 4c 24 28 mov 0x28(%esp),%ecx
11c14f: 89 0c 24 mov %ecx,(%esp)
11c152: e8 49 3f 00 00 call 1200a0 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
11c157: 8b 4c 24 2c mov 0x2c(%esp),%ecx
11c15b: 89 0c 24 mov %ecx,(%esp)
11c15e: e8 3d 3f 00 00 call 1200a0 <_Watchdog_Remove>
11c163: e9 57 fe ff ff jmp 11bfbf <_Timer_server_Body+0x57>
0011be08 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
11be08: 55 push %ebp
11be09: 57 push %edi
11be0a: 56 push %esi
11be0b: 53 push %ebx
11be0c: 83 ec 2c sub $0x2c,%esp
11be0f: 8b 5c 24 40 mov 0x40(%esp),%ebx
11be13: 8b 74 24 44 mov 0x44(%esp),%esi
if ( ts->insert_chain == NULL ) {
11be17: 8b 43 78 mov 0x78(%ebx),%eax
11be1a: 85 c0 test %eax,%eax
11be1c: 74 1a je 11be38 <_Timer_server_Schedule_operation_method+0x30><== ALWAYS TAKEN
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
11be1e: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
11be21: 89 74 24 44 mov %esi,0x44(%esp) <== NOT EXECUTED
11be25: 89 44 24 40 mov %eax,0x40(%esp) <== NOT EXECUTED
}
}
11be29: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
11be2c: 5b pop %ebx <== NOT EXECUTED
11be2d: 5e pop %esi <== NOT EXECUTED
11be2e: 5f pop %edi <== NOT EXECUTED
11be2f: 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 );
11be30: e9 cf 0a 00 00 jmp 11c904 <_Chain_Append> <== NOT EXECUTED
11be35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
11be38: a1 c4 ea 14 00 mov 0x14eac4,%eax
11be3d: 40 inc %eax
11be3e: a3 c4 ea 14 00 mov %eax,0x14eac4
return _Thread_Dispatch_disable_level;
11be43: a1 c4 ea 14 00 mov 0x14eac4,%eax
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
11be48: 8b 46 38 mov 0x38(%esi),%eax
11be4b: 83 f8 01 cmp $0x1,%eax
11be4e: 0f 84 a8 00 00 00 je 11befc <_Timer_server_Schedule_operation_method+0xf4>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
11be54: 83 f8 03 cmp $0x3,%eax
11be57: 74 0f je 11be68 <_Timer_server_Schedule_operation_method+0x60>
* 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 );
}
}
11be59: 83 c4 2c add $0x2c,%esp
11be5c: 5b pop %ebx
11be5d: 5e pop %esi
11be5e: 5f pop %edi
11be5f: 5d pop %ebp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
11be60: e9 3f 33 00 00 jmp 11f1a4 <_Thread_Enable_dispatch>
11be65: 8d 76 00 lea 0x0(%esi),%esi
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
11be68: 9c pushf
11be69: fa cli
11be6a: 5f pop %edi
11be6b: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
11be72: 3b
11be73: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
11be7a: 00
11be7b: a1 80 ea 14 00 mov 0x14ea80,%eax
11be80: 8b 15 84 ea 14 00 mov 0x14ea84,%edx
11be86: 89 04 24 mov %eax,(%esp)
11be89: 89 54 24 04 mov %edx,0x4(%esp)
11be8d: e8 b2 50 01 00 call 130f44 <__divdi3>
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
11be92: 8b 53 74 mov 0x74(%ebx),%edx
11be95: 89 54 24 1c mov %edx,0x1c(%esp)
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
11be99: 8b 53 68 mov 0x68(%ebx),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11be9c: 8d 6b 6c lea 0x6c(%ebx),%ebp
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
11be9f: 39 ea cmp %ebp,%edx
11bea1: 74 28 je 11becb <_Timer_server_Schedule_operation_method+0xc3>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
11bea3: 8b 6a 10 mov 0x10(%edx),%ebp
if ( snapshot > last_snapshot ) {
11bea6: 3b 44 24 1c cmp 0x1c(%esp),%eax
11beaa: 0f 86 a4 00 00 00 jbe 11bf54 <_Timer_server_Schedule_operation_method+0x14c>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
11beb0: 89 c1 mov %eax,%ecx
11beb2: 2b 4c 24 1c sub 0x1c(%esp),%ecx
11beb6: 89 4c 24 1c mov %ecx,0x1c(%esp)
if (delta_interval > delta) {
11beba: 39 cd cmp %ecx,%ebp
11bebc: 0f 86 9f 00 00 00 jbe 11bf61 <_Timer_server_Schedule_operation_method+0x159><== NEVER TAKEN
delta_interval -= delta;
11bec2: 89 e9 mov %ebp,%ecx
11bec4: 2b 4c 24 1c sub 0x1c(%esp),%ecx
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
11bec8: 89 4a 10 mov %ecx,0x10(%edx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
11becb: 89 43 74 mov %eax,0x74(%ebx)
_ISR_Enable( level );
11bece: 57 push %edi
11becf: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
11bed0: 83 c6 10 add $0x10,%esi
11bed3: 89 74 24 04 mov %esi,0x4(%esp)
11bed7: 8d 43 68 lea 0x68(%ebx),%eax
11beda: 89 04 24 mov %eax,(%esp)
11bedd: e8 a2 40 00 00 call 11ff84 <_Watchdog_Insert>
if ( !ts->active ) {
11bee2: 8a 43 7c mov 0x7c(%ebx),%al
11bee5: 84 c0 test %al,%al
11bee7: 0f 85 6c ff ff ff jne 11be59 <_Timer_server_Schedule_operation_method+0x51>
_Timer_server_Reset_tod_system_watchdog( ts );
11beed: 89 d8 mov %ebx,%eax
11beef: e8 cc fe ff ff call 11bdc0 <_Timer_server_Reset_tod_system_watchdog>
11bef4: e9 60 ff ff ff jmp 11be59 <_Timer_server_Schedule_operation_method+0x51>
11bef9: 8d 76 00 lea 0x0(%esi),%esi
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
11befc: 9c pushf
11befd: fa cli
11befe: 5d pop %ebp
snapshot = _Watchdog_Ticks_since_boot;
11beff: 8b 15 c4 eb 14 00 mov 0x14ebc4,%edx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
11bf05: 8b 7b 3c mov 0x3c(%ebx),%edi
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
11bf08: 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 );
11bf0b: 8d 4b 34 lea 0x34(%ebx),%ecx
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
11bf0e: 39 c8 cmp %ecx,%eax
11bf10: 74 10 je 11bf22 <_Timer_server_Schedule_operation_method+0x11a>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
11bf12: 89 d1 mov %edx,%ecx
11bf14: 29 f9 sub %edi,%ecx
delta_interval = first_watchdog->delta_interval;
11bf16: 8b 78 10 mov 0x10(%eax),%edi
if (delta_interval > delta) {
11bf19: 39 f9 cmp %edi,%ecx
11bf1b: 73 33 jae 11bf50 <_Timer_server_Schedule_operation_method+0x148>
delta_interval -= delta;
11bf1d: 29 cf sub %ecx,%edi
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
11bf1f: 89 78 10 mov %edi,0x10(%eax)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
11bf22: 89 53 3c mov %edx,0x3c(%ebx)
_ISR_Enable( level );
11bf25: 55 push %ebp
11bf26: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
11bf27: 83 c6 10 add $0x10,%esi
11bf2a: 89 74 24 04 mov %esi,0x4(%esp)
11bf2e: 8d 43 30 lea 0x30(%ebx),%eax
11bf31: 89 04 24 mov %eax,(%esp)
11bf34: e8 4b 40 00 00 call 11ff84 <_Watchdog_Insert>
if ( !ts->active ) {
11bf39: 8a 43 7c mov 0x7c(%ebx),%al
11bf3c: 84 c0 test %al,%al
11bf3e: 0f 85 15 ff ff ff jne 11be59 <_Timer_server_Schedule_operation_method+0x51>
_Timer_server_Reset_interval_system_watchdog( ts );
11bf44: 89 d8 mov %ebx,%eax
11bf46: e8 2d fe ff ff call 11bd78 <_Timer_server_Reset_interval_system_watchdog>
11bf4b: e9 09 ff ff ff jmp 11be59 <_Timer_server_Schedule_operation_method+0x51>
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
11bf50: 31 ff xor %edi,%edi
11bf52: eb cb jmp 11bf1f <_Timer_server_Schedule_operation_method+0x117>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
11bf54: 8b 4c 24 1c mov 0x1c(%esp),%ecx
11bf58: 01 e9 add %ebp,%ecx
delta_interval += delta;
11bf5a: 29 c1 sub %eax,%ecx
11bf5c: e9 67 ff ff ff jmp 11bec8 <_Timer_server_Schedule_operation_method+0xc0>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
11bf61: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
11bf63: e9 60 ff ff ff jmp 11bec8 <_Timer_server_Schedule_operation_method+0xc0><== NOT EXECUTED
00110374 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
110374: 56 push %esi
110375: 53 push %ebx
110376: 8b 74 24 0c mov 0xc(%esp),%esi
11037a: 8b 4c 24 10 mov 0x10(%esp),%ecx
uint32_t seconds = add->tv_sec;
11037e: 8b 01 mov (%ecx),%eax
/* Add the basics */
time->tv_sec += add->tv_sec;
110380: 01 06 add %eax,(%esi)
time->tv_nsec += add->tv_nsec;
110382: 8b 56 04 mov 0x4(%esi),%edx
110385: 03 51 04 add 0x4(%ecx),%edx
110388: 89 56 04 mov %edx,0x4(%esi)
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
11038b: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx
110391: 76 1c jbe 1103af <_Timespec_Add_to+0x3b>
110393: 8b 0e mov (%esi),%ecx
110395: 41 inc %ecx
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
110396: 29 c1 sub %eax,%ecx
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
110398: 81 ea 00 ca 9a 3b sub $0x3b9aca00,%edx
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
11039e: 8d 1c 01 lea (%ecx,%eax,1),%ebx
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
time->tv_sec++;
seconds++;
1103a1: 40 inc %eax
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
1103a2: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx
1103a8: 77 ee ja 110398 <_Timespec_Add_to+0x24> <== NEVER TAKEN
1103aa: 89 56 04 mov %edx,0x4(%esi)
1103ad: 89 1e mov %ebx,(%esi)
time->tv_sec++;
seconds++;
}
return seconds;
}
1103af: 5b pop %ebx
1103b0: 5e pop %esi
1103b1: c3 ret
0010fe48 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
10fe48: 57 push %edi
10fe49: 56 push %esi
10fe4a: 53 push %ebx
10fe4b: 83 ec 10 sub $0x10,%esp
10fe4e: 8b 54 24 20 mov 0x20(%esp),%edx
10fe52: 8b 44 24 24 mov 0x24(%esp),%eax
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
10fe56: 8b 18 mov (%eax),%ebx
10fe58: 8b 48 04 mov 0x4(%eax),%ecx
10fe5b: 89 c8 mov %ecx,%eax
10fe5d: 09 d8 or %ebx,%eax
10fe5f: 74 73 je 10fed4 <_Timestamp64_Divide+0x8c><== NEVER TAKEN
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
10fe61: 69 72 04 a0 86 01 00 imul $0x186a0,0x4(%edx),%esi
10fe68: b8 a0 86 01 00 mov $0x186a0,%eax
10fe6d: f7 22 mull (%edx)
10fe6f: 01 f2 add %esi,%edx
10fe71: 89 5c 24 08 mov %ebx,0x8(%esp)
10fe75: 89 4c 24 0c mov %ecx,0xc(%esp)
10fe79: 89 04 24 mov %eax,(%esp)
10fe7c: 89 54 24 04 mov %edx,0x4(%esp)
10fe80: e8 23 1c 01 00 call 121aa8 <__divdi3>
10fe85: 89 c6 mov %eax,%esi
10fe87: 89 d7 mov %edx,%edi
*_ival_percentage = answer / 1000;
10fe89: c7 44 24 08 e8 03 00 movl $0x3e8,0x8(%esp)
10fe90: 00
10fe91: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10fe98: 00
10fe99: 89 04 24 mov %eax,(%esp)
10fe9c: 89 54 24 04 mov %edx,0x4(%esp)
10fea0: e8 03 1c 01 00 call 121aa8 <__divdi3>
10fea5: 8b 4c 24 28 mov 0x28(%esp),%ecx
10fea9: 89 01 mov %eax,(%ecx)
*_fval_percentage = answer % 1000;
10feab: c7 44 24 08 e8 03 00 movl $0x3e8,0x8(%esp)
10feb2: 00
10feb3: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10feba: 00
10febb: 89 34 24 mov %esi,(%esp)
10febe: 89 7c 24 04 mov %edi,0x4(%esp)
10fec2: e8 35 1d 01 00 call 121bfc <__moddi3>
10fec7: 8b 4c 24 2c mov 0x2c(%esp),%ecx
10fecb: 89 01 mov %eax,(%ecx)
}
10fecd: 83 c4 10 add $0x10,%esp
10fed0: 5b pop %ebx
10fed1: 5e pop %esi
10fed2: 5f pop %edi
10fed3: c3 ret
)
{
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
*_ival_percentage = 0;
10fed4: 8b 4c 24 28 mov 0x28(%esp),%ecx <== NOT EXECUTED
10fed8: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED
*_fval_percentage = 0;
10fede: 8b 4c 24 2c mov 0x2c(%esp),%ecx <== NOT EXECUTED
10fee2: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED
answer = (*_lhs * 100000) / *_rhs;
*_ival_percentage = answer / 1000;
*_fval_percentage = answer % 1000;
}
10fee8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10feeb: 5b pop %ebx <== NOT EXECUTED
10feec: 5e pop %esi <== NOT EXECUTED
10feed: 5f pop %edi <== NOT EXECUTED
10feee: c3 ret <== NOT EXECUTED
0010e8fc <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10e8fc: 55 push %ebp
10e8fd: 57 push %edi
10e8fe: 56 push %esi
10e8ff: 53 push %ebx
10e900: 83 ec 1c sub $0x1c,%esp
10e903: 8b 74 24 30 mov 0x30(%esp),%esi
10e907: 8b 7c 24 38 mov 0x38(%esp),%edi
10e90b: 8a 44 24 34 mov 0x34(%esp),%al
10e90f: 8b 1d 34 21 13 00 mov 0x132134,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e915: 81 fb 2c 21 13 00 cmp $0x13212c,%ebx
10e91b: 74 22 je 10e93f <_User_extensions_Fatal+0x43><== NEVER TAKEN
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10e91d: 0f b6 e8 movzbl %al,%ebp
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
10e920: 8b 43 30 mov 0x30(%ebx),%eax
10e923: 85 c0 test %eax,%eax
10e925: 74 0d je 10e934 <_User_extensions_Fatal+0x38>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10e927: 89 7c 24 08 mov %edi,0x8(%esp)
10e92b: 89 6c 24 04 mov %ebp,0x4(%esp)
10e92f: 89 34 24 mov %esi,(%esp)
10e932: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e934: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e937: 81 fb 2c 21 13 00 cmp $0x13212c,%ebx
10e93d: 75 e1 jne 10e920 <_User_extensions_Fatal+0x24>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e93f: 83 c4 1c add $0x1c,%esp
10e942: 5b pop %ebx
10e943: 5e pop %esi
10e944: 5f pop %edi
10e945: 5d pop %ebp
10e946: c3 ret
0010e7e0 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10e7e0: 55 push %ebp
10e7e1: 57 push %edi
10e7e2: 56 push %esi
10e7e3: 53 push %ebx
10e7e4: 83 ec 2c sub $0x2c,%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;
10e7e7: 8b 15 44 da 12 00 mov 0x12da44,%edx
10e7ed: 89 54 24 1c mov %edx,0x1c(%esp)
initial_extensions = Configuration.User_extension_table;
10e7f1: 8b 2d 48 da 12 00 mov 0x12da48,%ebp
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10e7f7: c7 05 2c 21 13 00 30 movl $0x132130,0x13212c
10e7fe: 21 13 00
head->previous = NULL;
10e801: c7 05 30 21 13 00 00 movl $0x0,0x132130
10e808: 00 00 00
tail->previous = head;
10e80b: c7 05 34 21 13 00 2c movl $0x13212c,0x132134
10e812: 21 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10e815: c7 05 48 1f 13 00 4c movl $0x131f4c,0x131f48
10e81c: 1f 13 00
head->previous = NULL;
10e81f: c7 05 4c 1f 13 00 00 movl $0x0,0x131f4c
10e826: 00 00 00
tail->previous = head;
10e829: c7 05 50 1f 13 00 48 movl $0x131f48,0x131f50
10e830: 1f 13 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10e833: 85 ed test %ebp,%ebp
10e835: 74 4e je 10e885 <_User_extensions_Handler_initialization+0xa5><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10e837: 8d 04 52 lea (%edx,%edx,2),%eax
10e83a: 8d 34 82 lea (%edx,%eax,4),%esi
10e83d: c1 e6 02 shl $0x2,%esi
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
10e840: 89 34 24 mov %esi,(%esp)
10e843: e8 b4 04 00 00 call 10ecfc <_Workspace_Allocate_or_fatal_error>
10e848: 89 c3 mov %eax,%ebx
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10e84a: 31 c0 xor %eax,%eax
10e84c: 89 df mov %ebx,%edi
10e84e: 89 f1 mov %esi,%ecx
10e850: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e852: 8b 44 24 1c mov 0x1c(%esp),%eax
10e856: 85 c0 test %eax,%eax
10e858: 74 2b je 10e885 <_User_extensions_Handler_initialization+0xa5><== NEVER TAKEN
10e85a: 89 6c 24 18 mov %ebp,0x18(%esp)
10e85e: 31 ed xor %ebp,%ebp
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10e860: 8d 7b 14 lea 0x14(%ebx),%edi
10e863: 8b 74 24 18 mov 0x18(%esp),%esi
10e867: b9 08 00 00 00 mov $0x8,%ecx
10e86c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10e86e: 89 1c 24 mov %ebx,(%esp)
10e871: e8 06 39 00 00 call 11217c <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10e876: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e879: 45 inc %ebp
10e87a: 83 44 24 18 20 addl $0x20,0x18(%esp)
10e87f: 3b 6c 24 1c cmp 0x1c(%esp),%ebp
10e883: 75 db jne 10e860 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10e885: 83 c4 2c add $0x2c,%esp
10e888: 5b pop %ebx
10e889: 5e pop %esi
10e88a: 5f pop %edi
10e88b: 5d pop %ebp
10e88c: c3 ret
0010e890 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
10e890: 56 push %esi
10e891: 53 push %ebx
10e892: 83 ec 14 sub $0x14,%esp
10e895: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10e899: 8b 1d 2c 21 13 00 mov 0x13212c,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e89f: 81 fb 30 21 13 00 cmp $0x132130,%ebx
10e8a5: 74 17 je 10e8be <_User_extensions_Thread_begin+0x2e><== NEVER TAKEN
10e8a7: 90 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
10e8a8: 8b 43 28 mov 0x28(%ebx),%eax
10e8ab: 85 c0 test %eax,%eax
10e8ad: 74 05 je 10e8b4 <_User_extensions_Thread_begin+0x24>
(*the_extension->Callouts.thread_begin)( executing );
10e8af: 89 34 24 mov %esi,(%esp)
10e8b2: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e8b4: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e8b6: 81 fb 30 21 13 00 cmp $0x132130,%ebx
10e8bc: 75 ea jne 10e8a8 <_User_extensions_Thread_begin+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
10e8be: 83 c4 14 add $0x14,%esp
10e8c1: 5b pop %ebx
10e8c2: 5e pop %esi
10e8c3: c3 ret
0010e948 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
10e948: 56 push %esi
10e949: 53 push %ebx
10e94a: 83 ec 14 sub $0x14,%esp
10e94d: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10e951: 8b 1d 2c 21 13 00 mov 0x13212c,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
10e957: 81 fb 30 21 13 00 cmp $0x132130,%ebx
10e95d: 74 25 je 10e984 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
10e95f: 90 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
10e960: 8b 43 14 mov 0x14(%ebx),%eax
10e963: 85 c0 test %eax,%eax
10e965: 74 13 je 10e97a <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
10e967: 89 74 24 04 mov %esi,0x4(%esp)
10e96b: 8b 15 cc 24 13 00 mov 0x1324cc,%edx
10e971: 89 14 24 mov %edx,(%esp)
10e974: ff d0 call *%eax
_Thread_Executing,
the_thread
);
if ( !status )
10e976: 84 c0 test %al,%al
10e978: 74 0c je 10e986 <_User_extensions_Thread_create+0x3e>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e97a: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
10e97c: 81 fb 30 21 13 00 cmp $0x132130,%ebx
10e982: 75 dc jne 10e960 <_User_extensions_Thread_create+0x18>
if ( !status )
return false;
}
}
return true;
10e984: b0 01 mov $0x1,%al
}
10e986: 83 c4 14 add $0x14,%esp
10e989: 5b pop %ebx
10e98a: 5e pop %esi
10e98b: c3 ret
0010e98c <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
10e98c: 56 push %esi
10e98d: 53 push %ebx
10e98e: 83 ec 14 sub $0x14,%esp
10e991: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
10e995: 8b 1d 34 21 13 00 mov 0x132134,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e99b: 81 fb 2c 21 13 00 cmp $0x13212c,%ebx
10e9a1: 74 22 je 10e9c5 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN
10e9a3: 90 nop
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
10e9a4: 8b 43 20 mov 0x20(%ebx),%eax
10e9a7: 85 c0 test %eax,%eax
10e9a9: 74 0f je 10e9ba <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
10e9ab: 89 74 24 04 mov %esi,0x4(%esp)
10e9af: 8b 15 cc 24 13 00 mov 0x1324cc,%edx
10e9b5: 89 14 24 mov %edx,(%esp)
10e9b8: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e9ba: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e9bd: 81 fb 2c 21 13 00 cmp $0x13212c,%ebx
10e9c3: 75 df jne 10e9a4 <_User_extensions_Thread_delete+0x18>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10e9c5: 83 c4 14 add $0x14,%esp
10e9c8: 5b pop %ebx
10e9c9: 5e pop %esi
10e9ca: c3 ret
0010e8c4 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10e8c4: 56 push %esi
10e8c5: 53 push %ebx
10e8c6: 83 ec 14 sub $0x14,%esp
10e8c9: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
10e8cd: 8b 1d 34 21 13 00 mov 0x132134,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e8d3: 81 fb 2c 21 13 00 cmp $0x13212c,%ebx
10e8d9: 74 18 je 10e8f3 <_User_extensions_Thread_exitted+0x2f><== NEVER TAKEN
10e8db: 90 nop
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
10e8dc: 8b 43 2c mov 0x2c(%ebx),%eax
10e8df: 85 c0 test %eax,%eax
10e8e1: 74 05 je 10e8e8 <_User_extensions_Thread_exitted+0x24>
(*the_extension->Callouts.thread_exitted)( executing );
10e8e3: 89 34 24 mov %esi,(%esp)
10e8e6: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e8e8: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e8eb: 81 fb 2c 21 13 00 cmp $0x13212c,%ebx
10e8f1: 75 e9 jne 10e8dc <_User_extensions_Thread_exitted+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
10e8f3: 83 c4 14 add $0x14,%esp
10e8f6: 5b pop %ebx
10e8f7: 5e pop %esi
10e8f8: c3 ret
0010f1cc <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
10f1cc: 56 push %esi
10f1cd: 53 push %ebx
10f1ce: 83 ec 14 sub $0x14,%esp
10f1d1: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10f1d5: 8b 1d ac 2c 13 00 mov 0x132cac,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10f1db: 81 fb b0 2c 13 00 cmp $0x132cb0,%ebx
10f1e1: 74 21 je 10f204 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
10f1e3: 90 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
10f1e4: 8b 43 1c mov 0x1c(%ebx),%eax
10f1e7: 85 c0 test %eax,%eax
10f1e9: 74 0f je 10f1fa <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
10f1eb: 89 74 24 04 mov %esi,0x4(%esp)
10f1ef: 8b 15 4c 30 13 00 mov 0x13304c,%edx
10f1f5: 89 14 24 mov %edx,(%esp)
10f1f8: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10f1fa: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10f1fc: 81 fb b0 2c 13 00 cmp $0x132cb0,%ebx
10f202: 75 e0 jne 10f1e4 <_User_extensions_Thread_restart+0x18>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10f204: 83 c4 14 add $0x14,%esp
10f207: 5b pop %ebx
10f208: 5e pop %esi
10f209: c3 ret
0010e9cc <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
10e9cc: 56 push %esi
10e9cd: 53 push %ebx
10e9ce: 83 ec 14 sub $0x14,%esp
10e9d1: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10e9d5: 8b 1d 2c 21 13 00 mov 0x13212c,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e9db: 81 fb 30 21 13 00 cmp $0x132130,%ebx
10e9e1: 74 21 je 10ea04 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
10e9e3: 90 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
10e9e4: 8b 43 18 mov 0x18(%ebx),%eax
10e9e7: 85 c0 test %eax,%eax
10e9e9: 74 0f je 10e9fa <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
10e9eb: 89 74 24 04 mov %esi,0x4(%esp)
10e9ef: 8b 15 cc 24 13 00 mov 0x1324cc,%edx
10e9f5: 89 14 24 mov %edx,(%esp)
10e9f8: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e9fa: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e9fc: 81 fb 30 21 13 00 cmp $0x132130,%ebx
10ea02: 75 e0 jne 10e9e4 <_User_extensions_Thread_start+0x18>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10ea04: 83 c4 14 add $0x14,%esp
10ea07: 5b pop %ebx
10ea08: 5e pop %esi
10ea09: c3 ret
0010ea0c <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
10ea0c: 57 push %edi
10ea0d: 56 push %esi
10ea0e: 53 push %ebx
10ea0f: 83 ec 10 sub $0x10,%esp
10ea12: 8b 7c 24 20 mov 0x20(%esp),%edi
10ea16: 8b 74 24 24 mov 0x24(%esp),%esi
10ea1a: 8b 1d 48 1f 13 00 mov 0x131f48,%ebx
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
10ea20: 81 fb 4c 1f 13 00 cmp $0x131f4c,%ebx
10ea26: 74 14 je 10ea3c <_User_extensions_Thread_switch+0x30><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
10ea28: 89 74 24 04 mov %esi,0x4(%esp)
10ea2c: 89 3c 24 mov %edi,(%esp)
10ea2f: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
10ea32: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
10ea34: 81 fb 4c 1f 13 00 cmp $0x131f4c,%ebx
10ea3a: 75 ec jne 10ea28 <_User_extensions_Thread_switch+0x1c>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10ea3c: 83 c4 10 add $0x10,%esp
10ea3f: 5b pop %ebx
10ea40: 5e pop %esi
10ea41: 5f pop %edi
10ea42: c3 ret
00110190 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
110190: 57 push %edi
110191: 56 push %esi
110192: 53 push %ebx
110193: 83 ec 10 sub $0x10,%esp
110196: 8b 74 24 20 mov 0x20(%esp),%esi
11019a: 8b 4c 24 24 mov 0x24(%esp),%ecx
11019e: 8b 5c 24 28 mov 0x28(%esp),%ebx
ISR_Level level;
_ISR_Disable( level );
1101a2: 9c pushf
1101a3: fa cli
1101a4: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
1101a5: 8b 06 mov (%esi),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
1101a7: 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 ) ) {
1101aa: 39 f8 cmp %edi,%eax
1101ac: 74 39 je 1101e7 <_Watchdog_Adjust+0x57>
switch ( direction ) {
1101ae: 85 c9 test %ecx,%ecx
1101b0: 75 3e jne 1101f0 <_Watchdog_Adjust+0x60>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
1101b2: 85 db test %ebx,%ebx
1101b4: 74 31 je 1101e7 <_Watchdog_Adjust+0x57> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
1101b6: 8b 48 10 mov 0x10(%eax),%ecx
1101b9: 39 cb cmp %ecx,%ebx
1101bb: 73 0e jae 1101cb <_Watchdog_Adjust+0x3b> <== ALWAYS TAKEN
1101bd: eb 39 jmp 1101f8 <_Watchdog_Adjust+0x68> <== NOT EXECUTED
1101bf: 90 nop <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
1101c0: 85 db test %ebx,%ebx
1101c2: 74 23 je 1101e7 <_Watchdog_Adjust+0x57> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
1101c4: 8b 48 10 mov 0x10(%eax),%ecx
1101c7: 39 d9 cmp %ebx,%ecx
1101c9: 77 2d ja 1101f8 <_Watchdog_Adjust+0x68>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
1101cb: 29 cb sub %ecx,%ebx
_Watchdog_First( header )->delta_interval = 1;
1101cd: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax)
_ISR_Enable( level );
1101d4: 52 push %edx
1101d5: 9d popf
_Watchdog_Tickle( header );
1101d6: 89 34 24 mov %esi,(%esp)
1101d9: e8 aa 01 00 00 call 110388 <_Watchdog_Tickle>
_ISR_Disable( level );
1101de: 9c pushf
1101df: fa cli
1101e0: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
1101e1: 8b 06 mov (%esi),%eax
if ( _Chain_Is_empty( header ) )
1101e3: 39 c7 cmp %eax,%edi
1101e5: 75 d9 jne 1101c0 <_Watchdog_Adjust+0x30>
}
break;
}
}
_ISR_Enable( level );
1101e7: 52 push %edx
1101e8: 9d popf
}
1101e9: 83 c4 10 add $0x10,%esp
1101ec: 5b pop %ebx
1101ed: 5e pop %esi
1101ee: 5f pop %edi
1101ef: c3 ret
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
1101f0: 49 dec %ecx
1101f1: 75 f4 jne 1101e7 <_Watchdog_Adjust+0x57> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
1101f3: 01 58 10 add %ebx,0x10(%eax)
break;
1101f6: eb ef jmp 1101e7 <_Watchdog_Adjust+0x57>
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
1101f8: 29 d9 sub %ebx,%ecx
1101fa: 89 48 10 mov %ecx,0x10(%eax)
break;
1101fd: eb e8 jmp 1101e7 <_Watchdog_Adjust+0x57>
0010eb60 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10eb60: 56 push %esi
10eb61: 53 push %ebx
10eb62: 8b 54 24 0c mov 0xc(%esp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10eb66: 9c pushf
10eb67: fa cli
10eb68: 59 pop %ecx
previous_state = the_watchdog->state;
10eb69: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10eb6c: 83 f8 01 cmp $0x1,%eax
10eb6f: 74 4f je 10ebc0 <_Watchdog_Remove+0x60>
10eb71: 73 11 jae 10eb84 <_Watchdog_Remove+0x24>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10eb73: 8b 1d 44 20 13 00 mov 0x132044,%ebx
10eb79: 89 5a 18 mov %ebx,0x18(%edx)
_ISR_Enable( level );
10eb7c: 51 push %ecx
10eb7d: 9d popf
return( previous_state );
}
10eb7e: 5b pop %ebx
10eb7f: 5e pop %esi
10eb80: c3 ret
10eb81: 8d 76 00 lea 0x0(%esi),%esi
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
10eb84: 83 f8 03 cmp $0x3,%eax
10eb87: 77 ea ja 10eb73 <_Watchdog_Remove+0x13> <== NEVER TAKEN
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10eb89: 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 );
}
10eb90: 8b 1a mov (%edx),%ebx
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10eb92: 8b 33 mov (%ebx),%esi
10eb94: 85 f6 test %esi,%esi
10eb96: 74 06 je 10eb9e <_Watchdog_Remove+0x3e>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10eb98: 8b 72 10 mov 0x10(%edx),%esi
10eb9b: 01 73 10 add %esi,0x10(%ebx)
if ( _Watchdog_Sync_count )
10eb9e: 8b 35 40 20 13 00 mov 0x132040,%esi
10eba4: 85 f6 test %esi,%esi
10eba6: 74 0c je 10ebb4 <_Watchdog_Remove+0x54>
_Watchdog_Sync_level = _ISR_Nest_level;
10eba8: 8b 35 c8 24 13 00 mov 0x1324c8,%esi
10ebae: 89 35 d4 1f 13 00 mov %esi,0x131fd4
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10ebb4: 8b 72 04 mov 0x4(%edx),%esi
next->previous = previous;
10ebb7: 89 73 04 mov %esi,0x4(%ebx)
previous->next = next;
10ebba: 89 1e mov %ebx,(%esi)
10ebbc: eb b5 jmp 10eb73 <_Watchdog_Remove+0x13>
10ebbe: 66 90 xchg %ax,%ax
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
10ebc0: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10ebc7: eb aa jmp 10eb73 <_Watchdog_Remove+0x13>
0010fb6c <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10fb6c: 55 push %ebp
10fb6d: 57 push %edi
10fb6e: 56 push %esi
10fb6f: 53 push %ebx
10fb70: 83 ec 1c sub $0x1c,%esp
10fb73: 8b 7c 24 30 mov 0x30(%esp),%edi
10fb77: 8b 74 24 34 mov 0x34(%esp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10fb7b: 9c pushf
10fb7c: fa cli
10fb7d: 5d pop %ebp
printk( "Watchdog Chain: %s %p\n", name, header );
10fb7e: 89 74 24 08 mov %esi,0x8(%esp)
10fb82: 89 7c 24 04 mov %edi,0x4(%esp)
10fb86: c7 04 24 eb 46 12 00 movl $0x1246eb,(%esp)
10fb8d: e8 86 95 ff ff call 109118 <printk>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10fb92: 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 );
10fb94: 83 c6 04 add $0x4,%esi
if ( !_Chain_Is_empty( header ) ) {
10fb97: 39 f3 cmp %esi,%ebx
10fb99: 74 31 je 10fbcc <_Watchdog_Report_chain+0x60>
10fb9b: 90 nop
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10fb9c: 89 5c 24 04 mov %ebx,0x4(%esp)
10fba0: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10fba7: e8 30 00 00 00 call 10fbdc <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
10fbac: 8b 1b mov (%ebx),%ebx
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
10fbae: 39 f3 cmp %esi,%ebx
10fbb0: 75 ea jne 10fb9c <_Watchdog_Report_chain+0x30><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10fbb2: 89 7c 24 04 mov %edi,0x4(%esp)
10fbb6: c7 04 24 02 47 12 00 movl $0x124702,(%esp)
10fbbd: e8 56 95 ff ff call 109118 <printk>
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
10fbc2: 55 push %ebp
10fbc3: 9d popf
}
10fbc4: 83 c4 1c add $0x1c,%esp
10fbc7: 5b pop %ebx
10fbc8: 5e pop %esi
10fbc9: 5f pop %edi
10fbca: 5d pop %ebp
10fbcb: c3 ret
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
10fbcc: c7 04 24 11 47 12 00 movl $0x124711,(%esp)
10fbd3: e8 40 95 ff ff call 109118 <printk>
10fbd8: eb e8 jmp 10fbc2 <_Watchdog_Report_chain+0x56>
0010ebcc <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
10ebcc: 55 push %ebp
10ebcd: 57 push %edi
10ebce: 56 push %esi
10ebcf: 53 push %ebx
10ebd0: 83 ec 1c sub $0x1c,%esp
10ebd3: 8b 7c 24 30 mov 0x30(%esp),%edi
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
10ebd7: 9c pushf
10ebd8: fa cli
10ebd9: 5e pop %esi
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10ebda: 8b 1f mov (%edi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10ebdc: 8d 6f 04 lea 0x4(%edi),%ebp
if ( _Chain_Is_empty( header ) )
10ebdf: 39 eb cmp %ebp,%ebx
10ebe1: 74 11 je 10ebf4 <_Watchdog_Tickle+0x28>
* 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) {
10ebe3: 8b 43 10 mov 0x10(%ebx),%eax
10ebe6: 85 c0 test %eax,%eax
10ebe8: 74 34 je 10ec1e <_Watchdog_Tickle+0x52>
the_watchdog->delta_interval--;
10ebea: 48 dec %eax
10ebeb: 89 43 10 mov %eax,0x10(%ebx)
if ( the_watchdog->delta_interval != 0 )
10ebee: 85 c0 test %eax,%eax
10ebf0: 74 2c je 10ec1e <_Watchdog_Tickle+0x52>
10ebf2: 66 90 xchg %ax,%ax
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
10ebf4: 56 push %esi
10ebf5: 9d popf
}
10ebf6: 83 c4 1c add $0x1c,%esp
10ebf9: 5b pop %ebx
10ebfa: 5e pop %esi
10ebfb: 5f pop %edi
10ebfc: 5d pop %ebp
10ebfd: c3 ret
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
10ebfe: 8b 43 24 mov 0x24(%ebx),%eax
10ec01: 89 44 24 04 mov %eax,0x4(%esp)
10ec05: 8b 43 20 mov 0x20(%ebx),%eax
10ec08: 89 04 24 mov %eax,(%esp)
10ec0b: ff 53 1c call *0x1c(%ebx)
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
10ec0e: 9c pushf
10ec0f: fa cli
10ec10: 5e pop %esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10ec11: 8b 1f mov (%edi),%ebx
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
10ec13: 39 dd cmp %ebx,%ebp
10ec15: 74 dd je 10ebf4 <_Watchdog_Tickle+0x28>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
10ec17: 8b 43 10 mov 0x10(%ebx),%eax
10ec1a: 85 c0 test %eax,%eax
10ec1c: 75 d6 jne 10ebf4 <_Watchdog_Tickle+0x28>
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
10ec1e: 89 1c 24 mov %ebx,(%esp)
10ec21: e8 3a ff ff ff call 10eb60 <_Watchdog_Remove>
_ISR_Enable( level );
10ec26: 56 push %esi
10ec27: 9d popf
switch( watchdog_state ) {
10ec28: 83 f8 02 cmp $0x2,%eax
10ec2b: 75 e1 jne 10ec0e <_Watchdog_Tickle+0x42> <== NEVER TAKEN
10ec2d: eb cf jmp 10ebfe <_Watchdog_Tickle+0x32>
0010ec30 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
10ec30: 57 push %edi
10ec31: 53 push %ebx
10ec32: 83 ec 14 sub $0x14,%esp
uintptr_t memory_available = 0;
void *starting_address = rtems_configuration_get_work_space_start();
10ec35: 8b 15 00 da 12 00 mov 0x12da00,%edx
uintptr_t size = rtems_configuration_get_work_space_size();
10ec3b: a1 04 da 12 00 mov 0x12da04,%eax
10ec40: 80 3d 36 da 12 00 00 cmpb $0x0,0x12da36
10ec47: 75 37 jne 10ec80 <_Workspace_Handler_initialization+0x50><== NEVER TAKEN
10ec49: 8b 1d 08 da 12 00 mov 0x12da08,%ebx
10ec4f: 01 c3 add %eax,%ebx
if ( rtems_configuration_get_do_zero_of_workspace() )
10ec51: 80 3d 34 da 12 00 00 cmpb $0x0,0x12da34
10ec58: 75 33 jne 10ec8d <_Workspace_Handler_initialization+0x5d>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
10ec5a: c7 44 24 0c 04 00 00 movl $0x4,0xc(%esp)
10ec61: 00
10ec62: 89 5c 24 08 mov %ebx,0x8(%esp)
10ec66: 89 54 24 04 mov %edx,0x4(%esp)
10ec6a: c7 04 24 60 1f 13 00 movl $0x131f60,(%esp)
10ec71: e8 8e dd ff ff call 10ca04 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
10ec76: 85 c0 test %eax,%eax
10ec78: 74 1d je 10ec97 <_Workspace_Handler_initialization+0x67>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
10ec7a: 83 c4 14 add $0x14,%esp
10ec7d: 5b pop %ebx
10ec7e: 5f pop %edi
10ec7f: c3 ret
*/
void _Workspace_Handler_initialization(void)
{
uintptr_t memory_available = 0;
void *starting_address = rtems_configuration_get_work_space_start();
uintptr_t size = rtems_configuration_get_work_space_size();
10ec80: 31 db xor %ebx,%ebx
10ec82: 01 c3 add %eax,%ebx
if ( rtems_configuration_get_do_zero_of_workspace() )
10ec84: 80 3d 34 da 12 00 00 cmpb $0x0,0x12da34
10ec8b: 74 cd je 10ec5a <_Workspace_Handler_initialization+0x2a>
memset( starting_address, 0, size );
10ec8d: 31 c0 xor %eax,%eax
10ec8f: 89 d7 mov %edx,%edi
10ec91: 89 d9 mov %ebx,%ecx
10ec93: f3 aa rep stos %al,%es:(%edi)
10ec95: eb c3 jmp 10ec5a <_Workspace_Handler_initialization+0x2a>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
10ec97: c7 44 24 08 02 00 00 movl $0x2,0x8(%esp)
10ec9e: 00
10ec9f: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10eca6: 00
10eca7: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10ecae: e8 59 df ff ff call 10cc0c <_Internal_error_Occurred>
0010582c <_lstat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
10582c: 8b 44 24 08 mov 0x8(%esp),%eax <== NOT EXECUTED
return _STAT_NAME( path, buf );
105830: 8b 54 24 0c mov 0xc(%esp),%edx <== NOT EXECUTED
105834: 89 54 24 08 mov %edx,0x8(%esp) <== NOT EXECUTED
105838: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
10583c: e9 93 ff ff ff jmp 1057d4 <lstat> <== NOT EXECUTED
001089f4 <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
1089f4: 8b 44 24 08 mov 0x8(%esp),%eax <== NOT EXECUTED
return _STAT_NAME( path, buf );
1089f8: 8b 54 24 0c mov 0xc(%esp),%edx <== NOT EXECUTED
1089fc: 89 54 24 08 mov %edx,0x8(%esp) <== NOT EXECUTED
108a00: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
108a04: e9 93 ff ff ff jmp 10899c <stat> <== NOT EXECUTED
0010b7e0 <adjtime>:
int adjtime(
const struct timeval *delta,
struct timeval *olddelta
)
{
10b7e0: 55 push %ebp
10b7e1: 57 push %edi
10b7e2: 56 push %esi
10b7e3: 53 push %ebx
10b7e4: 83 ec 3c sub $0x3c,%esp
10b7e7: 8b 6c 24 50 mov 0x50(%esp),%ebp
10b7eb: 8b 74 24 54 mov 0x54(%esp),%esi
long adjustment;
/*
* Simple validations
*/
if ( !delta )
10b7ef: 85 ed test %ebp,%ebp
10b7f1: 0f 84 3f 01 00 00 je 10b936 <adjtime+0x156>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
10b7f7: 8b 55 04 mov 0x4(%ebp),%edx
10b7fa: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx
10b800: 0f 87 30 01 00 00 ja 10b936 <adjtime+0x156>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
10b806: 85 f6 test %esi,%esi
10b808: 74 10 je 10b81a <adjtime+0x3a>
olddelta->tv_sec = 0;
10b80a: c7 06 00 00 00 00 movl $0x0,(%esi)
olddelta->tv_usec = 0;
10b810: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
10b817: 8b 55 04 mov 0x4(%ebp),%edx
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
10b81a: 8b 45 00 mov 0x0(%ebp),%eax
10b81d: 8d 04 80 lea (%eax,%eax,4),%eax
10b820: 8d 04 80 lea (%eax,%eax,4),%eax
10b823: 8d 04 80 lea (%eax,%eax,4),%eax
10b826: 8d 04 80 lea (%eax,%eax,4),%eax
10b829: 8d 04 80 lea (%eax,%eax,4),%eax
10b82c: 8d 04 80 lea (%eax,%eax,4),%eax
10b82f: c1 e0 06 shl $0x6,%eax
adjustment += delta->tv_usec;
10b832: 01 d0 add %edx,%eax
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
10b834: 3b 05 b0 f2 12 00 cmp 0x12f2b0,%eax
10b83a: 73 0c jae 10b848 <adjtime+0x68>
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
10b83c: 31 c0 xor %eax,%eax
}
10b83e: 83 c4 3c add $0x3c,%esp
10b841: 5b pop %ebx
10b842: 5e pop %esi
10b843: 5f pop %edi
10b844: 5d pop %ebp
10b845: c3 ret
10b846: 66 90 xchg %ax,%ax
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10b848: a1 04 39 13 00 mov 0x133904,%eax
10b84d: 40 inc %eax
10b84e: a3 04 39 13 00 mov %eax,0x133904
return _Thread_Dispatch_disable_level;
10b853: a1 04 39 13 00 mov 0x133904,%eax
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
10b858: 8d 7c 24 28 lea 0x28(%esp),%edi
10b85c: 89 3c 24 mov %edi,(%esp)
10b85f: e8 30 18 00 00 call 10d094 <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
10b864: 8b 44 24 28 mov 0x28(%esp),%eax
10b868: 8b 54 24 2c mov 0x2c(%esp),%edx
10b86c: 89 44 24 18 mov %eax,0x18(%esp)
10b870: 89 54 24 1c mov %edx,0x1c(%esp)
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
10b874: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b87b: 3b
10b87c: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b883: 00
10b884: 89 04 24 mov %eax,(%esp)
10b887: 89 54 24 04 mov %edx,0x4(%esp)
10b88b: e8 9c 57 01 00 call 12102c <__divdi3>
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
10b890: 8b 5d 00 mov 0x0(%ebp),%ebx
10b893: 01 c3 add %eax,%ebx
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
10b895: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b89c: 3b
10b89d: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b8a4: 00
10b8a5: 8b 44 24 18 mov 0x18(%esp),%eax
10b8a9: 8b 54 24 1c mov 0x1c(%esp),%edx
10b8ad: 89 04 24 mov %eax,(%esp)
10b8b0: 89 54 24 04 mov %edx,0x4(%esp)
10b8b4: e8 c7 58 01 00 call 121180 <__moddi3>
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
10b8b9: 8b 55 04 mov 0x4(%ebp),%edx
10b8bc: 8d 14 92 lea (%edx,%edx,4),%edx
10b8bf: 8d 14 92 lea (%edx,%edx,4),%edx
10b8c2: 8d 14 92 lea (%edx,%edx,4),%edx
10b8c5: 8d 0c d0 lea (%eax,%edx,8),%ecx
int _EXFUN(setitimer, (int __which, const struct itimerval *__value,
struct itimerval *__ovalue));
#if defined(__rtems__)
/* BSD function used by RTEMS code */
int _EXFUN(adjtime,(const struct timeval *, struct timeval *));
10b8c8: 8d 43 01 lea 0x1(%ebx),%eax
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10b8cb: 81 f9 ff c9 9a 3b cmp $0x3b9ac9ff,%ecx
10b8d1: 76 12 jbe 10b8e5 <adjtime+0x105>
10b8d3: 90 nop
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
10b8d4: 81 e9 00 ca 9a 3b sub $0x3b9aca00,%ecx
ts.tv_sec++;
10b8da: 89 c3 mov %eax,%ebx
10b8dc: 40 inc %eax
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10b8dd: 81 f9 ff c9 9a 3b cmp $0x3b9ac9ff,%ecx
10b8e3: 77 ef ja 10b8d4 <adjtime+0xf4> <== NEVER TAKEN
10b8e5: 4b dec %ebx
10b8e6: 66 90 xchg %ax,%ax
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
10b8e8: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx
ts.tv_sec--;
10b8ee: 89 d8 mov %ebx,%eax
10b8f0: 4b dec %ebx
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
10b8f1: 81 f9 00 36 65 c4 cmp $0xc4653600,%ecx
10b8f7: 76 ef jbe 10b8e8 <adjtime+0x108>
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
10b8f9: 89 cb mov %ecx,%ebx
10b8fb: c1 fb 1f sar $0x1f,%ebx
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
10b8fe: ba 00 ca 9a 3b mov $0x3b9aca00,%edx
10b903: f7 ea imul %edx
10b905: 01 c1 add %eax,%ecx
10b907: 11 d3 adc %edx,%ebx
10b909: 89 4c 24 28 mov %ecx,0x28(%esp)
10b90d: 89 5c 24 2c mov %ebx,0x2c(%esp)
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
10b911: 89 3c 24 mov %edi,(%esp)
10b914: e8 d7 17 00 00 call 10d0f0 <_TOD_Set_with_timestamp>
ts.tv_sec--;
}
_TOD_Set( &ts );
_Thread_Enable_dispatch();
10b919: e8 16 2e 00 00 call 10e734 <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
10b91e: 85 f6 test %esi,%esi
10b920: 0f 84 16 ff ff ff je 10b83c <adjtime+0x5c>
*olddelta = *delta;
10b926: 8b 45 00 mov 0x0(%ebp),%eax
10b929: 8b 55 04 mov 0x4(%ebp),%edx
10b92c: 89 06 mov %eax,(%esi)
10b92e: 89 56 04 mov %edx,0x4(%esi)
10b931: e9 06 ff ff ff jmp 10b83c <adjtime+0x5c>
*/
if ( !delta )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
10b936: e8 e9 8c 00 00 call 114624 <__errno>
10b93b: c7 00 16 00 00 00 movl $0x16,(%eax)
10b941: b8 ff ff ff ff mov $0xffffffff,%eax
10b946: e9 f3 fe ff ff jmp 10b83e <adjtime+0x5e>
0010b8e4 <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
10b8e4: 57 push %edi
10b8e5: 56 push %esi
10b8e6: 53 push %ebx
10b8e7: 83 ec 10 sub $0x10,%esp
10b8ea: 8b 74 24 20 mov 0x20(%esp),%esi
10b8ee: 8b 5c 24 24 mov 0x24(%esp),%ebx
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
10b8f2: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10b8f9: e8 a2 12 00 00 call 10cba0 <pthread_mutex_lock>
if (fcntl (fildes, F_GETFD) < 0) {
10b8fe: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10b905: 00
10b906: 89 34 24 mov %esi,(%esp)
10b909: e8 0a 68 00 00 call 112118 <fcntl>
10b90e: 85 c0 test %eax,%eax
10b910: 0f 88 b6 01 00 00 js 10bacc <aio_cancel+0x1e8>
pthread_mutex_unlock(&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EBADF);
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
10b916: 85 db test %ebx,%ebx
10b918: 0f 84 ea 00 00 00 je 10ba08 <aio_cancel+0x124>
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
10b91e: 8b 3b mov (%ebx),%edi
10b920: 39 f7 cmp %esi,%edi
10b922: 0f 85 bc 00 00 00 jne 10b9e4 <aio_cancel+0x100>
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
10b928: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10b92f: 00
10b930: 89 7c 24 04 mov %edi,0x4(%esp)
10b934: c7 04 24 c8 4d 13 00 movl $0x134dc8,(%esp)
10b93b: e8 84 06 00 00 call 10bfc4 <rtems_aio_search_fd>
10b940: 89 c6 mov %eax,%esi
if (r_chain == NULL) {
10b942: 85 c0 test %eax,%eax
10b944: 74 3a je 10b980 <aio_cancel+0x9c>
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
10b946: 8d 78 1c lea 0x1c(%eax),%edi
10b949: 89 3c 24 mov %edi,(%esp)
10b94c: e8 4f 12 00 00 call 10cba0 <pthread_mutex_lock>
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
10b951: 89 5c 24 04 mov %ebx,0x4(%esp)
10b955: 83 c6 08 add $0x8,%esi
10b958: 89 34 24 mov %esi,(%esp)
10b95b: e8 5c 07 00 00 call 10c0bc <rtems_aio_remove_req>
10b960: 89 c3 mov %eax,%ebx
pthread_mutex_unlock (&r_chain->mutex);
10b962: 89 3c 24 mov %edi,(%esp)
10b965: e8 da 12 00 00 call 10cc44 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
10b96a: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10b971: e8 ce 12 00 00 call 10cc44 <pthread_mutex_unlock>
return result;
}
return AIO_ALLDONE;
}
10b976: 89 d8 mov %ebx,%eax
10b978: 83 c4 10 add $0x10,%esp
10b97b: 5b pop %ebx
10b97c: 5e pop %esi
10b97d: 5f pop %edi
10b97e: c3 ret
10b97f: 90 nop
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
10b980: 81 3d d4 4d 13 00 d8 cmpl $0x134dd8,0x134dd4
10b987: 4d 13 00
10b98a: 74 44 je 10b9d0 <aio_cancel+0xec> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
10b98c: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10b993: 00
10b994: 89 7c 24 04 mov %edi,0x4(%esp)
10b998: c7 04 24 d4 4d 13 00 movl $0x134dd4,(%esp)
10b99f: e8 20 06 00 00 call 10bfc4 <rtems_aio_search_fd>
if (r_chain == NULL) {
10b9a4: 85 c0 test %eax,%eax
10b9a6: 74 3c je 10b9e4 <aio_cancel+0x100>
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
10b9a8: 89 5c 24 04 mov %ebx,0x4(%esp)
10b9ac: 83 c0 08 add $0x8,%eax
10b9af: 89 04 24 mov %eax,(%esp)
10b9b2: e8 05 07 00 00 call 10c0bc <rtems_aio_remove_req>
10b9b7: 89 c3 mov %eax,%ebx
pthread_mutex_unlock (&aio_request_queue.mutex);
10b9b9: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10b9c0: e8 7f 12 00 00 call 10cc44 <pthread_mutex_unlock>
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
10b9c5: 89 d8 mov %ebx,%eax
10b9c7: 83 c4 10 add $0x10,%esp
10b9ca: 5b pop %ebx
10b9cb: 5e pop %esi
10b9cc: 5f pop %edi
10b9cd: c3 ret
10b9ce: 66 90 xchg %ax,%ax
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock(&aio_request_queue.mutex);
10b9d0: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10b9d7: e8 68 12 00 00 call 10cc44 <pthread_mutex_unlock>
return AIO_ALLDONE;
10b9dc: bb 02 00 00 00 mov $0x2,%ebx
10b9e1: eb 93 jmp 10b976 <aio_cancel+0x92>
10b9e3: 90 nop
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock (&aio_request_queue.mutex);
10b9e4: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10b9eb: e8 54 12 00 00 call 10cc44 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
10b9f0: e8 c3 a4 00 00 call 115eb8 <__errno>
10b9f5: c7 00 16 00 00 00 movl $0x16,(%eax)
10b9fb: bb ff ff ff ff mov $0xffffffff,%ebx
10ba00: e9 71 ff ff ff jmp 10b976 <aio_cancel+0x92>
10ba05: 8d 76 00 lea 0x0(%esi),%esi
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
10ba08: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10ba0f: 00
10ba10: 89 74 24 04 mov %esi,0x4(%esp)
10ba14: c7 04 24 c8 4d 13 00 movl $0x134dc8,(%esp)
10ba1b: e8 a4 05 00 00 call 10bfc4 <rtems_aio_search_fd>
10ba20: 89 c3 mov %eax,%ebx
if (r_chain == NULL) {
10ba22: 85 c0 test %eax,%eax
10ba24: 74 36 je 10ba5c <aio_cancel+0x178>
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
10ba26: 8d 70 1c lea 0x1c(%eax),%esi
10ba29: 89 34 24 mov %esi,(%esp)
10ba2c: e8 6f 11 00 00 call 10cba0 <pthread_mutex_lock>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10ba31: 89 1c 24 mov %ebx,(%esp)
10ba34: e8 43 2c 00 00 call 10e67c <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
10ba39: 89 1c 24 mov %ebx,(%esp)
10ba3c: e8 37 06 00 00 call 10c078 <rtems_aio_remove_fd>
pthread_mutex_unlock (&r_chain->mutex);
10ba41: 89 34 24 mov %esi,(%esp)
10ba44: e8 fb 11 00 00 call 10cc44 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
10ba49: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10ba50: e8 ef 11 00 00 call 10cc44 <pthread_mutex_unlock>
return AIO_CANCELED;
10ba55: 31 db xor %ebx,%ebx
10ba57: e9 1a ff ff ff jmp 10b976 <aio_cancel+0x92>
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
10ba5c: 81 3d d4 4d 13 00 d8 cmpl $0x134dd8,0x134dd4
10ba63: 4d 13 00
10ba66: 0f 84 64 ff ff ff je 10b9d0 <aio_cancel+0xec> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
10ba6c: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10ba73: 00
10ba74: 89 74 24 04 mov %esi,0x4(%esp)
10ba78: c7 04 24 d4 4d 13 00 movl $0x134dd4,(%esp)
10ba7f: e8 40 05 00 00 call 10bfc4 <rtems_aio_search_fd>
10ba84: 89 c3 mov %eax,%ebx
if (r_chain == NULL) {
10ba86: 85 c0 test %eax,%eax
10ba88: 0f 84 42 ff ff ff je 10b9d0 <aio_cancel+0xec>
10ba8e: 89 04 24 mov %eax,(%esp)
10ba91: e8 e6 2b 00 00 call 10e67c <_Chain_Extract>
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
10ba96: 89 1c 24 mov %ebx,(%esp)
10ba99: e8 da 05 00 00 call 10c078 <rtems_aio_remove_fd>
pthread_mutex_destroy (&r_chain->mutex);
10ba9e: 8d 73 1c lea 0x1c(%ebx),%esi
10baa1: 89 34 24 mov %esi,(%esp)
10baa4: e8 4f 0e 00 00 call 10c8f8 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->mutex);
10baa9: 89 34 24 mov %esi,(%esp)
10baac: e8 cf 0a 00 00 call 10c580 <pthread_cond_destroy>
free (r_chain);
10bab1: 89 1c 24 mov %ebx,(%esp)
10bab4: e8 b7 c2 ff ff call 107d70 <free>
pthread_mutex_unlock (&aio_request_queue.mutex);
10bab9: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10bac0: e8 7f 11 00 00 call 10cc44 <pthread_mutex_unlock>
return AIO_CANCELED;
10bac5: 31 db xor %ebx,%ebx
10bac7: e9 aa fe ff ff jmp 10b976 <aio_cancel+0x92>
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
if (fcntl (fildes, F_GETFD) < 0) {
pthread_mutex_unlock(&aio_request_queue.mutex);
10bacc: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10bad3: e8 6c 11 00 00 call 10cc44 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
10bad8: e8 db a3 00 00 call 115eb8 <__errno>
10badd: c7 00 09 00 00 00 movl $0x9,(%eax)
10bae3: bb ff ff ff ff mov $0xffffffff,%ebx
10bae8: e9 89 fe ff ff jmp 10b976 <aio_cancel+0x92>
0010baf8 <aio_fsync>:
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
10baf8: 53 push %ebx
10baf9: 83 ec 18 sub $0x18,%esp
10bafc: 8b 5c 24 24 mov 0x24(%esp),%ebx
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
10bb00: 81 7c 24 20 00 20 00 cmpl $0x2000,0x20(%esp)
10bb07: 00
10bb08: 75 42 jne 10bb4c <aio_fsync+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10bb0a: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
10bb11: 00
10bb12: 8b 03 mov (%ebx),%eax
10bb14: 89 04 24 mov %eax,(%esp)
10bb17: e8 fc 65 00 00 call 112118 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10bb1c: 83 e0 03 and $0x3,%eax
10bb1f: 48 dec %eax
10bb20: 83 f8 01 cmp $0x1,%eax
10bb23: 77 4b ja 10bb70 <aio_fsync+0x78>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
10bb25: c7 04 24 18 00 00 00 movl $0x18,(%esp)
10bb2c: e8 83 c6 ff ff call 1081b4 <malloc>
if (req == NULL)
10bb31: 85 c0 test %eax,%eax
10bb33: 74 56 je 10bb8b <aio_fsync+0x93> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
10bb35: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_SYNC;
10bb38: c7 43 2c 03 00 00 00 movl $0x3,0x2c(%ebx)
return rtems_aio_enqueue (req);
10bb3f: 89 44 24 20 mov %eax,0x20(%esp)
}
10bb43: 83 c4 18 add $0x18,%esp
10bb46: 5b pop %ebx
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
10bb47: e9 d0 05 00 00 jmp 10c11c <rtems_aio_enqueue>
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10bb4c: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10bb53: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10bb5a: e8 59 a3 00 00 call 115eb8 <__errno>
10bb5f: c7 00 16 00 00 00 movl $0x16,(%eax)
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
10bb65: b8 ff ff ff ff mov $0xffffffff,%eax
10bb6a: 83 c4 18 add $0x18,%esp
10bb6d: 5b pop %ebx
10bb6e: c3 ret
10bb6f: 90 nop
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10bb70: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10bb77: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10bb7e: e8 35 a3 00 00 call 115eb8 <__errno>
10bb83: c7 00 09 00 00 00 movl $0x9,(%eax)
10bb89: eb da jmp 10bb65 <aio_fsync+0x6d>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10bb8b: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10bb92: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10bb99: e8 1a a3 00 00 call 115eb8 <__errno> <== NOT EXECUTED
10bb9e: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10bba4: eb bf jmp 10bb65 <aio_fsync+0x6d> <== NOT EXECUTED
0010c348 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
10c348: 53 push %ebx
10c349: 83 ec 18 sub $0x18,%esp
10c34c: 8b 5c 24 20 mov 0x20(%esp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10c350: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
10c357: 00
10c358: 8b 03 mov (%ebx),%eax
10c35a: 89 04 24 mov %eax,(%esp)
10c35d: e8 b6 5d 00 00 call 112118 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10c362: 83 e0 03 and $0x3,%eax
10c365: 74 05 je 10c36c <aio_read+0x24> <== NEVER TAKEN
10c367: 83 f8 02 cmp $0x2,%eax
10c36a: 75 38 jne 10c3a4 <aio_read+0x5c>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10c36c: 8b 53 14 mov 0x14(%ebx),%edx
10c36f: 85 d2 test %edx,%edx
10c371: 75 55 jne 10c3c8 <aio_read+0x80>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10c373: 8b 43 08 mov 0x8(%ebx),%eax
10c376: 85 c0 test %eax,%eax
10c378: 78 4e js 10c3c8 <aio_read+0x80>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
10c37a: c7 04 24 18 00 00 00 movl $0x18,(%esp)
10c381: e8 2e be ff ff call 1081b4 <malloc>
if (req == NULL)
10c386: 85 c0 test %eax,%eax
10c388: 74 59 je 10c3e3 <aio_read+0x9b> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
10c38a: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_READ;
10c38d: c7 43 2c 01 00 00 00 movl $0x1,0x2c(%ebx)
return rtems_aio_enqueue (req);
10c394: 89 44 24 20 mov %eax,0x20(%esp)
}
10c398: 83 c4 18 add $0x18,%esp
10c39b: 5b pop %ebx
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
10c39c: e9 7b fd ff ff jmp 10c11c <rtems_aio_enqueue>
10c3a1: 8d 76 00 lea 0x0(%esi),%esi
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10c3a4: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10c3ab: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c3b2: e8 01 9b 00 00 call 115eb8 <__errno>
10c3b7: c7 00 09 00 00 00 movl $0x9,(%eax)
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
10c3bd: b8 ff ff ff ff mov $0xffffffff,%eax
10c3c2: 83 c4 18 add $0x18,%esp
10c3c5: 5b pop %ebx
10c3c6: c3 ret
10c3c7: 90 nop
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10c3c8: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10c3cf: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c3d6: e8 dd 9a 00 00 call 115eb8 <__errno>
10c3db: c7 00 16 00 00 00 movl $0x16,(%eax)
10c3e1: eb da jmp 10c3bd <aio_read+0x75>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10c3e3: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10c3ea: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10c3f1: e8 c2 9a 00 00 call 115eb8 <__errno> <== NOT EXECUTED
10c3f6: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10c3fc: eb bf jmp 10c3bd <aio_read+0x75> <== NOT EXECUTED
0010c408 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
10c408: 53 push %ebx
10c409: 83 ec 18 sub $0x18,%esp
10c40c: 8b 5c 24 20 mov 0x20(%esp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10c410: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
10c417: 00
10c418: 8b 03 mov (%ebx),%eax
10c41a: 89 04 24 mov %eax,(%esp)
10c41d: e8 f6 5c 00 00 call 112118 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10c422: 83 e0 03 and $0x3,%eax
10c425: 48 dec %eax
10c426: 83 f8 01 cmp $0x1,%eax
10c429: 77 35 ja 10c460 <aio_write+0x58>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10c42b: 8b 53 14 mov 0x14(%ebx),%edx
10c42e: 85 d2 test %edx,%edx
10c430: 75 52 jne 10c484 <aio_write+0x7c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10c432: 8b 43 08 mov 0x8(%ebx),%eax
10c435: 85 c0 test %eax,%eax
10c437: 78 4b js 10c484 <aio_write+0x7c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
10c439: c7 04 24 18 00 00 00 movl $0x18,(%esp)
10c440: e8 6f bd ff ff call 1081b4 <malloc>
if (req == NULL)
10c445: 85 c0 test %eax,%eax
10c447: 74 56 je 10c49f <aio_write+0x97> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
10c449: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_WRITE;
10c44c: c7 43 2c 02 00 00 00 movl $0x2,0x2c(%ebx)
return rtems_aio_enqueue (req);
10c453: 89 44 24 20 mov %eax,0x20(%esp)
}
10c457: 83 c4 18 add $0x18,%esp
10c45a: 5b pop %ebx
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
10c45b: e9 bc fc ff ff jmp 10c11c <rtems_aio_enqueue>
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10c460: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10c467: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c46e: e8 45 9a 00 00 call 115eb8 <__errno>
10c473: c7 00 09 00 00 00 movl $0x9,(%eax)
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
10c479: b8 ff ff ff ff mov $0xffffffff,%eax
10c47e: 83 c4 18 add $0x18,%esp
10c481: 5b pop %ebx
10c482: c3 ret
10c483: 90 nop
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10c484: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10c48b: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c492: e8 21 9a 00 00 call 115eb8 <__errno>
10c497: c7 00 16 00 00 00 movl $0x16,(%eax)
10c49d: eb da jmp 10c479 <aio_write+0x71>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10c49f: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10c4a6: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10c4ad: e8 06 9a 00 00 call 115eb8 <__errno> <== NOT EXECUTED
10c4b2: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10c4b8: eb bf jmp 10c479 <aio_write+0x71> <== NOT EXECUTED
0010c890 <check_and_merge>:
rtems_chain_control *free_chain,
rtems_rbtree_control *chunk_tree,
rtems_rbheap_chunk *a,
rtems_rbheap_chunk *b
)
{
10c890: 57 push %edi
10c891: 56 push %esi
10c892: 53 push %ebx
10c893: 83 ec 10 sub $0x10,%esp
10c896: 8b 5c 24 20 mov 0x20(%esp),%ebx
if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) {
10c89a: 83 fb f8 cmp $0xfffffff8,%ebx
10c89d: 74 37 je 10c8d6 <check_and_merge+0x46>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10c89f: 8b 33 mov (%ebx),%esi
10c8a1: 85 f6 test %esi,%esi
10c8a3: 74 47 je 10c8ec <check_and_merge+0x5c>
if (b->begin < a->begin) {
10c8a5: 8b 79 18 mov 0x18(%ecx),%edi
10c8a8: 39 7b 18 cmp %edi,0x18(%ebx)
10c8ab: 72 33 jb 10c8e0 <check_and_merge+0x50>
a = b;
b = t;
}
a->size += b->size;
10c8ad: 8b 7b 1c mov 0x1c(%ebx),%edi
10c8b0: 01 79 1c add %edi,0x1c(%ecx)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10c8b3: 8b 4b 04 mov 0x4(%ebx),%ecx
next->previous = previous;
10c8b6: 89 4e 04 mov %ecx,0x4(%esi)
previous->next = next;
10c8b9: 89 31 mov %esi,(%ecx)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10c8bb: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10c8be: 8b 08 mov (%eax),%ecx
after_node->next = the_node;
10c8c0: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10c8c2: 89 0b mov %ecx,(%ebx)
before_node->previous = the_node;
10c8c4: 89 59 04 mov %ebx,0x4(%ecx)
rtems_chain_extract_unprotected(&b->chain_node);
add_to_chain(free_chain, b);
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
10c8c7: 83 c3 08 add $0x8,%ebx
10c8ca: 89 5c 24 04 mov %ebx,0x4(%esp)
10c8ce: 89 14 24 mov %edx,(%esp)
10c8d1: e8 9a 18 00 00 call 10e170 <_RBTree_Extract_unprotected>
}
}
10c8d6: 83 c4 10 add $0x10,%esp
10c8d9: 5b pop %ebx
10c8da: 5e pop %esi
10c8db: 5f pop %edi
10c8dc: c3 ret
10c8dd: 8d 76 00 lea 0x0(%esi),%esi
10c8e0: 8b 31 mov (%ecx),%esi
rtems_rbheap_chunk *a,
rtems_rbheap_chunk *b
)
{
if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) {
if (b->begin < a->begin) {
10c8e2: 89 cf mov %ecx,%edi
10c8e4: 89 d9 mov %ebx,%ecx
10c8e6: 89 fb mov %edi,%ebx
10c8e8: eb c3 jmp 10c8ad <check_and_merge+0x1d>
10c8ea: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10c8ec: 8b 7b 04 mov 0x4(%ebx),%edi
10c8ef: 85 ff test %edi,%edi
10c8f1: 75 b2 jne 10c8a5 <check_and_merge+0x15> <== NEVER TAKEN
10c8f3: eb e1 jmp 10c8d6 <check_and_merge+0x46>
00105470 <chroot>:
#include <unistd.h>
#include <rtems/libio_.h>
int chroot( const char *path )
{
105470: 56 push %esi
105471: 53 push %ebx
105472: 81 ec 84 00 00 00 sub $0x84,%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(
105478: c7 44 24 10 00 b7 12 movl $0x12b700,0x10(%esp)
10547f: 00
105480: c7 44 24 0c 04 b7 12 movl $0x12b704,0xc(%esp)
105487: 00
105488: c7 44 24 08 19 00 00 movl $0x19,0x8(%esp)
10548f: 00
105490: 8b 84 24 90 00 00 00 mov 0x90(%esp),%eax
105497: 89 44 24 04 mov %eax,0x4(%esp)
10549b: 8d 74 24 48 lea 0x48(%esp),%esi
10549f: 89 34 24 mov %esi,(%esp)
1054a2: e8 e5 13 00 00 call 10688c <rtems_filesystem_eval_path_start_with_root_and_current>
1054a7: 8d 44 24 60 lea 0x60(%esp),%eax
1054ab: 89 44 24 04 mov %eax,0x4(%esp)
eval_flags,
&rtems_global_user_env.root_directory,
&rtems_global_user_env.current_directory
);
rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc );
1054af: 8d 5c 24 30 lea 0x30(%esp),%ebx
1054b3: 89 1c 24 mov %ebx,(%esp)
1054b6: e8 f5 17 00 00 call 106cb0 <rtems_filesystem_location_copy_and_detach>
new_current_loc = rtems_filesystem_location_transform_to_global( &loc );
1054bb: 89 1c 24 mov %ebx,(%esp)
1054be: e8 89 19 00 00 call 106e4c <rtems_filesystem_location_transform_to_global>
1054c3: 89 44 24 2c mov %eax,0x2c(%esp)
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
1054c7: 81 78 10 20 01 12 00 cmpl $0x120120,0x10(%eax)
1054ce: 74 3a je 10550a <chroot+0x9a>
rtems_filesystem_global_location_t *new_root_loc =
rtems_filesystem_global_location_obtain( &new_current_loc );
1054d0: 8d 44 24 2c lea 0x2c(%esp),%eax
1054d4: 89 04 24 mov %eax,(%esp)
);
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 =
1054d7: e8 e8 18 00 00 call 106dc4 <rtems_filesystem_global_location_obtain>
1054dc: 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)(
1054de: 8b 40 14 mov 0x14(%eax),%eax
1054e1: 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 =
1054e4: 89 1c 24 mov %ebx,(%esp)
1054e7: 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 ) {
1054ea: 85 c0 test %eax,%eax
1054ec: 74 3e je 10552c <chroot+0xbc>
static inline void rtems_filesystem_location_error(
const rtems_filesystem_location_info_t *loc,
int eno
)
{
if ( !rtems_filesystem_location_is_null( loc ) ) {
1054ee: 81 7b 10 20 01 12 00 cmpl $0x120120,0x10(%ebx)
1054f5: 74 0b je 105502 <chroot+0x92> <== NEVER TAKEN
errno = eno;
1054f7: e8 7c 7c 00 00 call 10d178 <__errno>
1054fc: c7 00 14 00 00 00 movl $0x14,(%eax)
rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR );
rv = -1;
}
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_root_loc );
105502: 89 1c 24 mov %ebx,(%esp)
105505: e8 62 18 00 00 call 106d6c <rtems_filesystem_global_location_release>
}
} else {
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
10550a: 89 34 24 mov %esi,(%esp)
10550d: e8 a2 14 00 00 call 1069b4 <rtems_filesystem_eval_path_cleanup>
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_current_loc );
105512: 8b 44 24 2c mov 0x2c(%esp),%eax
105516: 89 04 24 mov %eax,(%esp)
105519: e8 4e 18 00 00 call 106d6c <rtems_filesystem_global_location_release>
10551e: b8 ff ff ff ff mov $0xffffffff,%eax
}
return rv;
}
105523: 81 c4 84 00 00 00 add $0x84,%esp
105529: 5b pop %ebx
10552a: 5e pop %esi
10552b: c3 ret
(*new_root_loc->location.mt_entry->ops->node_type_h)(
&new_root_loc->location
);
if ( type == RTEMS_FILESYSTEM_DIRECTORY ) {
sc = rtems_libio_set_private_env();
10552c: e8 f3 0c 00 00 call 106224 <rtems_libio_set_private_env>
if (sc == RTEMS_SUCCESSFUL) {
105531: 85 c0 test %eax,%eax
105533: 74 13 je 105548 <chroot+0xd8>
rtems_filesystem_global_location_assign(
&rtems_filesystem_current,
new_current_loc
);
} else {
if (sc != RTEMS_UNSATISFIED) {
105535: 83 f8 0d cmp $0xd,%eax
105538: 74 c8 je 105502 <chroot+0x92> <== NEVER TAKEN
errno = ENOMEM;
10553a: e8 39 7c 00 00 call 10d178 <__errno>
10553f: c7 00 0c 00 00 00 movl $0xc,(%eax)
105545: eb bb jmp 105502 <chroot+0x92>
105547: 90 nop
);
if ( type == RTEMS_FILESYSTEM_DIRECTORY ) {
sc = rtems_libio_set_private_env();
if (sc == RTEMS_SUCCESSFUL) {
rtems_filesystem_global_location_assign(
105548: 89 5c 24 04 mov %ebx,0x4(%esp)
10554c: a1 e0 b6 12 00 mov 0x12b6e0,%eax
105551: 83 c0 04 add $0x4,%eax
105554: 89 04 24 mov %eax,(%esp)
105557: e8 4c 18 00 00 call 106da8 <rtems_filesystem_global_location_assign>
&rtems_filesystem_root,
new_root_loc
);
rtems_filesystem_global_location_assign(
10555c: 8b 44 24 2c mov 0x2c(%esp),%eax
105560: 89 44 24 04 mov %eax,0x4(%esp)
105564: a1 e0 b6 12 00 mov 0x12b6e0,%eax
105569: 89 04 24 mov %eax,(%esp)
10556c: e8 37 18 00 00 call 106da8 <rtems_filesystem_global_location_assign>
}
} else {
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
105571: 89 34 24 mov %esi,(%esp)
105574: e8 3b 14 00 00 call 1069b4 <rtems_filesystem_eval_path_cleanup>
105579: 31 c0 xor %eax,%eax
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_current_loc );
}
return rv;
}
10557b: 81 c4 84 00 00 00 add $0x84,%esp
105581: 5b pop %ebx
105582: 5e pop %esi
105583: c3 ret
0010b600 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
10b600: 57 push %edi
10b601: 56 push %esi
10b602: 53 push %ebx
10b603: 83 ec 20 sub $0x20,%esp
10b606: 8b 44 24 30 mov 0x30(%esp),%eax
10b60a: 8b 5c 24 34 mov 0x34(%esp),%ebx
if ( !tp )
10b60e: 85 db test %ebx,%ebx
10b610: 74 14 je 10b626 <clock_gettime+0x26>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10b612: 83 f8 01 cmp $0x1,%eax
10b615: 74 55 je 10b66c <clock_gettime+0x6c>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
10b617: 83 f8 04 cmp $0x4,%eax
10b61a: 74 3c je 10b658 <clock_gettime+0x58> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
10b61c: 83 f8 02 cmp $0x2,%eax
10b61f: 74 37 je 10b658 <clock_gettime+0x58>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
10b621: 83 f8 03 cmp $0x3,%eax
10b624: 74 1a je 10b640 <clock_gettime+0x40>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10b626: e8 f9 94 00 00 call 114b24 <__errno>
10b62b: c7 00 16 00 00 00 movl $0x16,(%eax)
10b631: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10b636: 83 c4 20 add $0x20,%esp
10b639: 5b pop %ebx
10b63a: 5e pop %esi
10b63b: 5f pop %edi
10b63c: c3 ret
10b63d: 8d 76 00 lea 0x0(%esi),%esi
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
10b640: e8 df 94 00 00 call 114b24 <__errno>
10b645: c7 00 58 00 00 00 movl $0x58,(%eax)
10b64b: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b650: 83 c4 20 add $0x20,%esp
10b653: 5b pop %ebx
10b654: 5e pop %esi
10b655: 5f pop %edi
10b656: c3 ret
10b657: 90 nop
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
_TOD_Get_uptime_as_timespec( tp );
10b658: 89 1c 24 mov %ebx,(%esp)
10b65b: e8 ec 1e 00 00 call 10d54c <_TOD_Get_uptime_as_timespec>
return 0;
10b660: 31 c0 xor %eax,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b662: 83 c4 20 add $0x20,%esp
10b665: 5b pop %ebx
10b666: 5e pop %esi
10b667: 5f pop %edi
10b668: c3 ret
10b669: 8d 76 00 lea 0x0(%esi),%esi
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
10b66c: 8d 44 24 18 lea 0x18(%esp),%eax
10b670: 89 04 24 mov %eax,(%esp)
10b673: e8 a8 1e 00 00 call 10d520 <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
10b678: 8b 74 24 18 mov 0x18(%esp),%esi
10b67c: 8b 7c 24 1c mov 0x1c(%esp),%edi
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
10b680: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b687: 3b
10b688: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b68f: 00
10b690: 89 34 24 mov %esi,(%esp)
10b693: 89 7c 24 04 mov %edi,0x4(%esp)
10b697: e8 98 65 01 00 call 121c34 <__divdi3>
10b69c: 89 03 mov %eax,(%ebx)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
10b69e: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b6a5: 3b
10b6a6: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b6ad: 00
10b6ae: 89 34 24 mov %esi,(%esp)
10b6b1: 89 7c 24 04 mov %edi,0x4(%esp)
10b6b5: e8 ce 66 01 00 call 121d88 <__moddi3>
10b6ba: 89 43 04 mov %eax,0x4(%ebx)
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
return 0;
10b6bd: 31 c0 xor %eax,%eax
10b6bf: e9 72 ff ff ff jmp 10b636 <clock_gettime+0x36>
0012af18 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
12af18: 56 push %esi
12af19: 53 push %ebx
12af1a: 83 ec 24 sub $0x24,%esp
12af1d: 8b 44 24 30 mov 0x30(%esp),%eax
12af21: 8b 54 24 34 mov 0x34(%esp),%edx
if ( !tp )
12af25: 85 d2 test %edx,%edx
12af27: 74 0f je 12af38 <clock_settime+0x20> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
12af29: 83 f8 01 cmp $0x1,%eax
12af2c: 74 22 je 12af50 <clock_settime+0x38>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
12af2e: 83 f8 02 cmp $0x2,%eax
12af31: 74 6d je 12afa0 <clock_settime+0x88>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
12af33: 83 f8 03 cmp $0x3,%eax
12af36: 74 68 je 12afa0 <clock_settime+0x88>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
12af38: e8 53 12 01 00 call 13c190 <__errno>
12af3d: c7 00 16 00 00 00 movl $0x16,(%eax)
12af43: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
12af48: 83 c4 24 add $0x24,%esp
12af4b: 5b pop %ebx
12af4c: 5e pop %esi
12af4d: c3 ret
12af4e: 66 90 xchg %ax,%ax
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
12af50: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx)
12af56: 76 e0 jbe 12af38 <clock_settime+0x20>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
12af58: a1 a4 be 17 00 mov 0x17bea4,%eax
12af5d: 40 inc %eax
12af5e: a3 a4 be 17 00 mov %eax,0x17bea4
return _Thread_Dispatch_disable_level;
12af63: a1 a4 be 17 00 mov 0x17bea4,%eax
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
12af68: 8b 32 mov (%edx),%esi
12af6a: 8b 4a 04 mov 0x4(%edx),%ecx
12af6d: 89 cb mov %ecx,%ebx
12af6f: c1 fb 1f sar $0x1f,%ebx
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
12af72: b8 00 ca 9a 3b mov $0x3b9aca00,%eax
12af77: f7 ee imul %esi
12af79: 01 c1 add %eax,%ecx
12af7b: 11 d3 adc %edx,%ebx
12af7d: 89 4c 24 18 mov %ecx,0x18(%esp)
12af81: 89 5c 24 1c mov %ebx,0x1c(%esp)
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
12af85: 8d 44 24 18 lea 0x18(%esp),%eax
12af89: 89 04 24 mov %eax,(%esp)
12af8c: e8 03 11 00 00 call 12c094 <_TOD_Set_with_timestamp>
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
12af91: e8 56 2b fe ff call 10daec <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
12af96: 31 c0 xor %eax,%eax
}
12af98: 83 c4 24 add $0x24,%esp
12af9b: 5b pop %ebx
12af9c: 5e pop %esi
12af9d: c3 ret
12af9e: 66 90 xchg %ax,%ax
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
12afa0: e8 eb 11 01 00 call 13c190 <__errno>
12afa5: c7 00 58 00 00 00 movl $0x58,(%eax)
12afab: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
12afb0: 83 c4 24 add $0x24,%esp
12afb3: 5b pop %ebx
12afb4: 5e pop %esi
12afb5: c3 ret
001095cc <drainOutput.part.0>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
1095cc: 53 push %ebx
1095cd: 83 ec 18 sub $0x18,%esp
1095d0: 89 c3 mov %eax,%ebx
1095d2: eb 2e jmp 109602 <drainOutput.part.0+0x36>
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;
1095d4: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
1095db: 00 00 00
rtems_interrupt_enable (level);
1095de: 50 push %eax
1095df: 9d popf
sc = rtems_semaphore_obtain(
1095e0: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
1095e7: 00
1095e8: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1095ef: 00
1095f0: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
1095f6: 89 04 24 mov %eax,(%esp)
1095f9: e8 7e 23 00 00 call 10b97c <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1095fe: 85 c0 test %eax,%eax
109600: 75 1a jne 10961c <drainOutput.part.0+0x50><== NEVER TAKEN
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
109602: 9c pushf
109603: fa cli
109604: 58 pop %eax
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
109605: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
10960b: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
109611: 39 d1 cmp %edx,%ecx
109613: 75 bf jne 1095d4 <drainOutput.part.0+0x8>
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);
109615: 50 push %eax
109616: 9d popf
}
}
109617: 83 c4 18 add $0x18,%esp
10961a: 5b pop %ebx
10961b: c3 ret
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
10961c: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10961f: e8 90 2a 00 00 call 10c0b4 <rtems_fatal_error_occurred><== NOT EXECUTED
00107ef4 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
107ef4: 57 push %edi
107ef5: 56 push %esi
107ef6: 53 push %ebx
107ef7: 83 ec 60 sub $0x60,%esp
107efa: 8b 74 24 70 mov 0x70(%esp),%esi
107efe: 8b 7c 24 74 mov 0x74(%esp),%edi
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
107f02: 8d 5c 24 18 lea 0x18(%esp),%ebx
107f06: 89 5c 24 04 mov %ebx,0x4(%esp)
107f0a: 89 34 24 mov %esi,(%esp)
107f0d: e8 fe 05 00 00 call 108510 <fstat>
if ( status == -1 )
107f12: 40 inc %eax
107f13: 74 2b je 107f40 <dup2+0x4c>
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
107f15: 89 5c 24 04 mov %ebx,0x4(%esp)
107f19: 89 3c 24 mov %edi,(%esp)
107f1c: e8 ef 05 00 00 call 108510 <fstat>
if ( status == -1 )
107f21: 40 inc %eax
107f22: 74 1c je 107f40 <dup2+0x4c> <== NEVER TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
107f24: 89 7c 24 08 mov %edi,0x8(%esp)
107f28: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
107f2f: 00
107f30: 89 34 24 mov %esi,(%esp)
107f33: e8 50 02 00 00 call 108188 <fcntl>
}
107f38: 83 c4 60 add $0x60,%esp
107f3b: 5b pop %ebx
107f3c: 5e pop %esi
107f3d: 5f pop %edi
107f3e: c3 ret
107f3f: 90 nop
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
if ( status == -1 )
return -1;
107f40: b8 ff ff ff ff mov $0xffffffff,%eax
107f45: eb f1 jmp 107f38 <dup2+0x44>
0010a2dc <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
10a2dc: 53 push %ebx
10a2dd: 83 ec 38 sub $0x38,%esp
if ((tty->termios.c_lflag & ECHOCTL) &&
10a2e0: f6 42 3d 02 testb $0x2,0x3d(%edx)
10a2e4: 74 1a je 10a300 <echo+0x24> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
10a2e6: 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) &&
10a2e9: 8b 1d e8 fc 12 00 mov 0x12fce8,%ebx
10a2ef: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1)
10a2f4: 74 0a je 10a300 <echo+0x24>
iscntrl(c) && (c != '\t') && (c != '\n')) {
10a2f6: 3c 09 cmp $0x9,%al
10a2f8: 74 06 je 10a300 <echo+0x24>
10a2fa: 3c 0a cmp $0xa,%al
10a2fc: 75 12 jne 10a310 <echo+0x34>
10a2fe: 66 90 xchg %ax,%ax
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
10a300: 0f b6 c0 movzbl %al,%eax
10a303: e8 88 fe ff ff call 10a190 <oproc>
}
}
10a308: 83 c4 38 add $0x38,%esp
10a30b: 5b pop %ebx
10a30c: c3 ret
10a30d: 8d 76 00 lea 0x0(%esi),%esi
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
10a310: c6 44 24 2e 5e movb $0x5e,0x2e(%esp)
echobuf[1] = c ^ 0x40;
10a315: 83 f0 40 xor $0x40,%eax
10a318: 88 44 24 2f mov %al,0x2f(%esp)
rtems_termios_puts (echobuf, 2, tty);
10a31c: 89 54 24 08 mov %edx,0x8(%esp)
10a320: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
10a327: 00
10a328: 8d 44 24 2e lea 0x2e(%esp),%eax
10a32c: 89 04 24 mov %eax,(%esp)
10a32f: 89 54 24 1c mov %edx,0x1c(%esp)
10a333: e8 14 fd ff ff call 10a04c <rtems_termios_puts>
tty->column += 2;
10a338: 8b 54 24 1c mov 0x1c(%esp),%edx
10a33c: 83 42 28 02 addl $0x2,0x28(%edx)
} else {
oproc (c, tty);
}
}
10a340: 83 c4 38 add $0x38,%esp
10a343: 5b pop %ebx
10a344: c3 ret
00129fac <endgrent>:
void endgrent(void)
{
if (group_fp != NULL)
129fac: a1 68 b8 17 00 mov 0x17b868,%eax
129fb1: 85 c0 test %eax,%eax
129fb3: 74 0e je 129fc3 <endgrent+0x17> <== NEVER TAKEN
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
129fb5: 83 ec 1c sub $0x1c,%esp
if (group_fp != NULL)
fclose(group_fp);
129fb8: 89 04 24 mov %eax,(%esp)
129fbb: e8 ec 22 01 00 call 13c2ac <fclose>
}
129fc0: 83 c4 1c add $0x1c,%esp
129fc3: c3 ret
00129e40 <endpwent>:
void endpwent(void)
{
if (passwd_fp != NULL)
129e40: a1 88 b7 17 00 mov 0x17b788,%eax
129e45: 85 c0 test %eax,%eax
129e47: 74 0e je 129e57 <endpwent+0x17> <== NEVER TAKEN
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
129e49: 83 ec 1c sub $0x1c,%esp
if (passwd_fp != NULL)
fclose(passwd_fp);
129e4c: 89 04 24 mov %eax,(%esp)
129e4f: e8 58 24 01 00 call 13c2ac <fclose>
}
129e54: 83 c4 1c add $0x1c,%esp
129e57: c3 ret
0010a348 <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)
10a348: 55 push %ebp
10a349: 57 push %edi
10a34a: 56 push %esi
10a34b: 53 push %ebx
10a34c: 83 ec 2c sub $0x2c,%esp
10a34f: 89 c5 mov %eax,%ebp
10a351: 89 d7 mov %edx,%edi
10a353: eb 13 jmp 10a368 <erase.part.2+0x20>
10a355: 8d 76 00 lea 0x0(%esi),%esi
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
10a358: 80 e6 02 and $0x2,%dh <== NOT EXECUTED
10a35b: 0f 85 0f 01 00 00 jne 10a470 <erase.part.2+0x128> <== NOT EXECUTED
10a361: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
10a364: 85 ff test %edi,%edi
10a366: 74 60 je 10a3c8 <erase.part.2+0x80> <== NEVER TAKEN
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
10a368: 8b 4d 20 mov 0x20(%ebp),%ecx
10a36b: 85 c9 test %ecx,%ecx
10a36d: 74 59 je 10a3c8 <erase.part.2+0x80>
unsigned char c = tty->cbuf[--tty->ccount];
10a36f: 8b 75 1c mov 0x1c(%ebp),%esi
10a372: 49 dec %ecx
10a373: 89 4d 20 mov %ecx,0x20(%ebp)
10a376: 0f b6 04 0e movzbl (%esi,%ecx,1),%eax
if (tty->termios.c_lflag & ECHO) {
10a37a: 8b 55 3c mov 0x3c(%ebp),%edx
10a37d: f6 c2 08 test $0x8,%dl
10a380: 74 e2 je 10a364 <erase.part.2+0x1c> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
10a382: 85 ff test %edi,%edi
10a384: 75 09 jne 10a38f <erase.part.2+0x47>
10a386: f6 c2 10 test $0x10,%dl
10a389: 0f 84 cd 00 00 00 je 10a45c <erase.part.2+0x114> <== NEVER TAKEN
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
10a38f: 3c 09 cmp $0x9,%al
10a391: 74 3d je 10a3d0 <erase.part.2+0x88>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
10a393: 8d 58 01 lea 0x1(%eax),%ebx
10a396: a1 e8 fc 12 00 mov 0x12fce8,%eax
10a39b: f6 04 18 20 testb $0x20,(%eax,%ebx,1)
10a39f: 75 b7 jne 10a358 <erase.part.2+0x10> <== NEVER TAKEN
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
10a3a1: 89 6c 24 08 mov %ebp,0x8(%esp)
10a3a5: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
10a3ac: 00
10a3ad: c7 04 24 3e 2a 12 00 movl $0x122a3e,(%esp)
10a3b4: e8 93 fc ff ff call 10a04c <rtems_termios_puts>
if (tty->column)
10a3b9: 8b 45 28 mov 0x28(%ebp),%eax
10a3bc: 85 c0 test %eax,%eax
10a3be: 74 a4 je 10a364 <erase.part.2+0x1c> <== NEVER TAKEN
tty->column--;
10a3c0: 48 dec %eax
10a3c1: 89 45 28 mov %eax,0x28(%ebp)
}
}
}
if (!lineFlag)
10a3c4: 85 ff test %edi,%edi
10a3c6: 75 a0 jne 10a368 <erase.part.2+0x20>
break;
}
}
10a3c8: 83 c4 2c add $0x2c,%esp
10a3cb: 5b pop %ebx
10a3cc: 5e pop %esi
10a3cd: 5f pop %edi
10a3ce: 5d pop %ebp
10a3cf: c3 ret
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
int col = tty->read_start_column;
10a3d0: 8b 5d 2c mov 0x2c(%ebp),%ebx
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
10a3d3: 85 c9 test %ecx,%ecx
10a3d5: 74 4a je 10a421 <erase.part.2+0xd9>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
10a3d7: a1 e8 fc 12 00 mov 0x12fce8,%eax
10a3dc: 89 44 24 18 mov %eax,0x18(%esp)
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
int col = tty->read_start_column;
int i = 0;
10a3e0: 31 c0 xor %eax,%eax
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)
10a3e2: 81 e2 00 02 00 00 and $0x200,%edx
10a3e8: 89 54 24 14 mov %edx,0x14(%esp)
10a3ec: 89 6c 24 1c mov %ebp,0x1c(%esp)
10a3f0: 8b 6c 24 18 mov 0x18(%esp),%ebp
10a3f4: eb 11 jmp 10a407 <erase.part.2+0xbf>
10a3f6: 66 90 xchg %ax,%ax
10a3f8: 8b 54 24 14 mov 0x14(%esp),%edx <== NOT EXECUTED
10a3fc: 85 d2 test %edx,%edx <== NOT EXECUTED
10a3fe: 74 03 je 10a403 <erase.part.2+0xbb> <== NOT EXECUTED
col += 2;
10a400: 83 c3 02 add $0x2,%ebx <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
10a403: 39 c1 cmp %eax,%ecx
10a405: 74 16 je 10a41d <erase.part.2+0xd5> <== NEVER TAKEN
c = tty->cbuf[i++];
10a407: 0f b6 14 06 movzbl (%esi,%eax,1),%edx
10a40b: 40 inc %eax
if (c == '\t') {
10a40c: 80 fa 09 cmp $0x9,%dl
10a40f: 74 43 je 10a454 <erase.part.2+0x10c>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
10a411: f6 44 15 01 20 testb $0x20,0x1(%ebp,%edx,1)
10a416: 75 e0 jne 10a3f8 <erase.part.2+0xb0> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
} else {
col++;
10a418: 43 inc %ebx
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
10a419: 39 c1 cmp %eax,%ecx
10a41b: 75 ea jne 10a407 <erase.part.2+0xbf>
10a41d: 8b 6c 24 1c mov 0x1c(%esp),%ebp
}
/*
* Back up over the tab
*/
while (tty->column > col) {
10a421: 39 5d 28 cmp %ebx,0x28(%ebp)
10a424: 0f 8e 3a ff ff ff jle 10a364 <erase.part.2+0x1c> <== NEVER TAKEN
10a42a: 66 90 xchg %ax,%ax
rtems_termios_puts ("\b", 1, tty);
10a42c: 89 6c 24 08 mov %ebp,0x8(%esp)
10a430: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10a437: 00
10a438: c7 04 24 40 2a 12 00 movl $0x122a40,(%esp)
10a43f: e8 08 fc ff ff call 10a04c <rtems_termios_puts>
tty->column--;
10a444: 8b 45 28 mov 0x28(%ebp),%eax
10a447: 48 dec %eax
10a448: 89 45 28 mov %eax,0x28(%ebp)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
10a44b: 39 d8 cmp %ebx,%eax
10a44d: 7f dd jg 10a42c <erase.part.2+0xe4>
10a44f: e9 10 ff ff ff jmp 10a364 <erase.part.2+0x1c>
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
10a454: 83 cb 07 or $0x7,%ebx
10a457: 43 inc %ebx
10a458: eb a9 jmp 10a403 <erase.part.2+0xbb>
10a45a: 66 90 xchg %ax,%ax
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);
10a45c: 0f b6 45 43 movzbl 0x43(%ebp),%eax <== NOT EXECUTED
10a460: 89 ea mov %ebp,%edx <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
10a462: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
10a465: 5b pop %ebx <== NOT EXECUTED
10a466: 5e pop %esi <== NOT EXECUTED
10a467: 5f pop %edi <== NOT EXECUTED
10a468: 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);
10a469: e9 6e fe ff ff jmp 10a2dc <echo> <== NOT EXECUTED
10a46e: 66 90 xchg %ax,%ax <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
10a470: 89 6c 24 08 mov %ebp,0x8(%esp) <== NOT EXECUTED
10a474: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp) <== NOT EXECUTED
10a47b: 00
10a47c: c7 04 24 3e 2a 12 00 movl $0x122a3e,(%esp) <== NOT EXECUTED
10a483: e8 c4 fb ff ff call 10a04c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
10a488: 8b 45 28 mov 0x28(%ebp),%eax <== NOT EXECUTED
10a48b: 85 c0 test %eax,%eax <== NOT EXECUTED
10a48d: 75 21 jne 10a4b0 <erase.part.2+0x168> <== NOT EXECUTED
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
10a48f: a1 e8 fc 12 00 mov 0x12fce8,%eax <== NOT EXECUTED
10a494: f6 04 18 20 testb $0x20,(%eax,%ebx,1) <== NOT EXECUTED
10a498: 0f 84 03 ff ff ff je 10a3a1 <erase.part.2+0x59> <== NOT EXECUTED
10a49e: f6 45 3d 02 testb $0x2,0x3d(%ebp) <== NOT EXECUTED
10a4a2: 0f 85 f9 fe ff ff jne 10a3a1 <erase.part.2+0x59> <== NOT EXECUTED
10a4a8: e9 b7 fe ff ff jmp 10a364 <erase.part.2+0x1c> <== NOT EXECUTED
10a4ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
10a4b0: 48 dec %eax <== NOT EXECUTED
10a4b1: 89 45 28 mov %eax,0x28(%ebp) <== NOT EXECUTED
10a4b4: eb d9 jmp 10a48f <erase.part.2+0x147> <== NOT EXECUTED
00108bcc <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
)
{
108bcc: 55 push %ebp
108bcd: 57 push %edi
108bce: 56 push %esi
108bcf: 53 push %ebx
108bd0: 83 ec 3c sub $0x3c,%esp
108bd3: 89 c6 mov %eax,%esi
108bd5: 89 cd mov %ecx,%ebp
memset(ctx, 0, sizeof(*ctx));
108bd7: b9 38 00 00 00 mov $0x38,%ecx
108bdc: 31 c0 xor %eax,%eax
108bde: 89 f7 mov %esi,%edi
108be0: f3 aa rep stos %al,%es:(%edi)
ctx->path = path;
108be2: 89 16 mov %edx,(%esi)
ctx->pathlen = pathlen;
108be4: 89 6e 04 mov %ebp,0x4(%esi)
ctx->flags = eval_flags;
108be7: 8b 44 24 50 mov 0x50(%esp),%eax
108beb: 89 46 10 mov %eax,0x10(%esi)
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) {
108bee: 85 ed test %ebp,%ebp
108bf0: 74 36 je 108c28 <eval_path_start+0x5c>
char c = ctx->path [0];
108bf2: 8a 1a mov (%edx),%bl
ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr);
108bf4: 8b 44 24 54 mov 0x54(%esp),%eax
108bf8: 89 04 24 mov %eax,(%esp)
108bfb: e8 9c 05 00 00 call 10919c <rtems_filesystem_global_location_obtain>
108c00: 89 46 30 mov %eax,0x30(%esi)
gid_t node_gid
);
static inline bool rtems_filesystem_is_delimiter(char c)
{
return c == '/' || c == '\\';
108c03: 80 fb 2f cmp $0x2f,%bl
108c06: 0f 84 8c 00 00 00 je 108c98 <eval_path_start+0xcc>
108c0c: 80 fb 5c cmp $0x5c,%bl
108c0f: 0f 84 83 00 00 00 je 108c98 <eval_path_start+0xcc> <== NEVER TAKEN
--ctx->pathlen;
ctx->startloc = rtems_filesystem_global_location_obtain(
&ctx->rootloc
);
} else {
ctx->startloc = rtems_filesystem_global_location_obtain(
108c15: 8b 44 24 58 mov 0x58(%esp),%eax
108c19: 89 04 24 mov %eax,(%esp)
108c1c: e8 7b 05 00 00 call 10919c <rtems_filesystem_global_location_obtain>
108c21: 89 46 34 mov %eax,0x34(%esi)
108c24: eb 3a jmp 108c60 <eval_path_start+0x94>
108c26: 66 90 xchg %ax,%ax
);
static inline rtems_filesystem_global_location_t *
rtems_filesystem_global_location_obtain_null(void)
{
rtems_filesystem_global_location_t *global_loc = NULL;
108c28: c7 44 24 2c 00 00 00 movl $0x0,0x2c(%esp)
108c2f: 00
return rtems_filesystem_global_location_obtain( &global_loc );
108c30: 8d 5c 24 2c lea 0x2c(%esp),%ebx
108c34: 89 1c 24 mov %ebx,(%esp)
108c37: e8 60 05 00 00 call 10919c <rtems_filesystem_global_location_obtain>
global_current_ptr
);
}
} else {
ctx->rootloc = rtems_filesystem_global_location_obtain_null();
108c3c: 89 46 30 mov %eax,0x30(%esi)
);
static inline rtems_filesystem_global_location_t *
rtems_filesystem_global_location_obtain_null(void)
{
rtems_filesystem_global_location_t *global_loc = NULL;
108c3f: c7 44 24 2c 00 00 00 movl $0x0,0x2c(%esp)
108c46: 00
return rtems_filesystem_global_location_obtain( &global_loc );
108c47: 89 1c 24 mov %ebx,(%esp)
108c4a: e8 4d 05 00 00 call 10919c <rtems_filesystem_global_location_obtain>
ctx->startloc = rtems_filesystem_global_location_obtain_null();
108c4f: 89 46 34 mov %eax,0x34(%esi)
errno = ENOENT;
108c52: e8 a9 af 00 00 call 113c00 <__errno>
108c57: c7 00 02 00 00 00 movl $0x2,(%eax)
108c5d: 8b 46 34 mov 0x34(%esi),%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);
}
108c60: 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 );
108c63: 8b 50 0c mov 0xc(%eax),%edx
108c66: 89 04 24 mov %eax,(%esp)
108c69: ff 12 call *(%edx)
set_startloc(ctx, global_root_ptr, global_current_ptr);
rtems_filesystem_instance_lock(&ctx->startloc->location);
rtems_filesystem_location_clone(
108c6b: 8d 46 18 lea 0x18(%esi),%eax
108c6e: 8b 56 34 mov 0x34(%esi),%edx
108c71: 89 54 24 04 mov %edx,0x4(%esp)
108c75: 89 04 24 mov %eax,(%esp)
108c78: 89 44 24 1c mov %eax,0x1c(%esp)
108c7c: e8 1f 70 00 00 call 10fca0 <rtems_filesystem_location_clone>
&ctx->currentloc,
&ctx->startloc->location
);
rtems_filesystem_eval_path_continue(ctx);
108c81: 89 34 24 mov %esi,(%esp)
108c84: e8 bf fe ff ff call 108b48 <rtems_filesystem_eval_path_continue>
108c89: 8b 44 24 1c mov 0x1c(%esp),%eax
return &ctx->currentloc;
}
108c8d: 83 c4 3c add $0x3c,%esp
108c90: 5b pop %ebx
108c91: 5e pop %esi
108c92: 5f pop %edi
108c93: 5d pop %ebp
108c94: c3 ret
108c95: 8d 76 00 lea 0x0(%esi),%esi
char c = ctx->path [0];
ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr);
if (rtems_filesystem_is_delimiter(c)) {
++ctx->path;
108c98: ff 06 incl (%esi)
--ctx->pathlen;
108c9a: ff 4e 04 decl 0x4(%esi)
ctx->startloc = rtems_filesystem_global_location_obtain(
&ctx->rootloc
108c9d: 8d 46 30 lea 0x30(%esi),%eax
108ca0: 89 04 24 mov %eax,(%esp)
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(
108ca3: e8 f4 04 00 00 call 10919c <rtems_filesystem_global_location_obtain>
108ca8: 89 46 34 mov %eax,0x34(%esi)
108cab: eb b3 jmp 108c60 <eval_path_start+0x94>
00137b50 <fchdir>:
#include <unistd.h>
#include <rtems/libio_.h>
int fchdir( int fd )
{
137b50: 56 push %esi
137b51: 53 push %ebx
137b52: 81 ec 84 00 00 00 sub $0x84,%esp
137b58: 8b 84 24 90 00 00 00 mov 0x90(%esp),%eax
int rv = 0;
rtems_libio_t *iop;
struct stat st;
rtems_filesystem_location_info_t loc;
st.st_mode = 0;
137b5f: c7 44 24 44 00 00 00 movl $0x0,0x44(%esp)
137b66: 00
st.st_uid = 0;
137b67: 66 c7 44 24 4a 00 00 movw $0x0,0x4a(%esp)
st.st_gid = 0;
137b6e: 66 c7 44 24 4c 00 00 movw $0x0,0x4c(%esp)
rtems_libio_check_fd( fd );
137b75: 3b 05 c0 42 17 00 cmp 0x1742c0,%eax
137b7b: 0f 83 c7 00 00 00 jae 137c48 <fchdir+0xf8>
iop = rtems_libio_iop( fd );
137b81: 8d 1c 40 lea (%eax,%eax,2),%ebx
137b84: c1 e3 04 shl $0x4,%ebx
137b87: 03 1d 74 bd 17 00 add 0x17bd74,%ebx
rtems_libio_check_is_open( iop );
137b8d: f6 43 0d 01 testb $0x1,0xd(%ebx)
137b91: 0f 84 b1 00 00 00 je 137c48 <fchdir+0xf8>
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
137b97: 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 );
137b9a: 8b 50 0c mov 0xc(%eax),%edx
137b9d: 89 04 24 mov %eax,(%esp)
137ba0: 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 );
137ba2: 8d 73 10 lea 0x10(%ebx),%esi
137ba5: 8b 43 20 mov 0x20(%ebx),%eax
137ba8: 8d 54 24 38 lea 0x38(%esp),%edx
137bac: 89 54 24 04 mov %edx,0x4(%esp)
137bb0: 89 34 24 mov %esi,(%esp)
137bb3: ff 50 18 call *0x18(%eax)
if ( rv == 0 ) {
137bb6: 85 c0 test %eax,%eax
137bb8: 74 1e je 137bd8 <fchdir+0x88> <== ALWAYS TAKEN
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
137bba: 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 );
137bbd: 8b 4a 0c mov 0xc(%edx),%ecx
137bc0: 89 14 24 mov %edx,(%esp)
137bc3: 89 44 24 1c mov %eax,0x1c(%esp)
137bc7: ff 51 04 call *0x4(%ecx)
137bca: 8b 44 24 1c mov 0x1c(%esp),%eax
137bce: 81 c4 84 00 00 00 add $0x84,%esp
137bd4: 5b pop %ebx
137bd5: 5e pop %esi
137bd6: c3 ret
137bd7: 90 nop
rtems_libio_check_is_open( iop );
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st );
if ( rv == 0 ) {
bool access_ok = rtems_filesystem_check_access(
137bd8: 0f b7 44 24 4c movzwl 0x4c(%esp),%eax
137bdd: 89 44 24 0c mov %eax,0xc(%esp)
137be1: 0f b7 44 24 4a movzwl 0x4a(%esp),%eax
137be6: 89 44 24 08 mov %eax,0x8(%esp)
137bea: 8b 44 24 44 mov 0x44(%esp),%eax
137bee: 89 44 24 04 mov %eax,0x4(%esp)
137bf2: c7 04 24 01 00 00 00 movl $0x1,(%esp)
137bf9: e8 e6 a7 fd ff call 1123e4 <rtems_filesystem_check_access>
st.st_mode,
st.st_uid,
st.st_gid
);
if ( access_ok ) {
137bfe: 84 c0 test %al,%al
137c00: 74 2e je 137c30 <fchdir+0xe0>
rtems_filesystem_location_clone( &loc, &iop->pathinfo );
137c02: 89 74 24 04 mov %esi,0x4(%esp)
137c06: 8d 74 24 20 lea 0x20(%esp),%esi
137c0a: 89 34 24 mov %esi,(%esp)
137c0d: e8 76 a2 fd ff call 111e88 <rtems_filesystem_location_clone>
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
137c12: 8b 43 24 mov 0x24(%ebx),%eax
137c15: 8b 50 0c mov 0xc(%eax),%edx
137c18: 89 04 24 mov %eax,(%esp)
137c1b: ff 52 04 call *0x4(%edx)
}
}
rtems_filesystem_instance_unlock( &iop->pathinfo );
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
137c1e: 89 34 24 mov %esi,(%esp)
137c21: e8 ce 15 ff ff call 1291f4 <rtems_filesystem_chdir>
}
return rv;
}
137c26: 81 c4 84 00 00 00 add $0x84,%esp
137c2c: 5b pop %ebx
137c2d: 5e pop %esi
137c2e: c3 ret
137c2f: 90 nop
);
if ( access_ok ) {
rtems_filesystem_location_clone( &loc, &iop->pathinfo );
} else {
errno = EACCES;
137c30: e8 5b 45 00 00 call 13c190 <__errno>
137c35: c7 00 0d 00 00 00 movl $0xd,(%eax)
rv = -1;
137c3b: b8 ff ff ff ff mov $0xffffffff,%eax
137c40: e9 75 ff ff ff jmp 137bba <fchdir+0x6a>
137c45: 8d 76 00 lea 0x0(%esi),%esi
st.st_uid = 0;
st.st_gid = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
137c48: e8 43 45 00 00 call 13c190 <__errno>
137c4d: c7 00 09 00 00 00 movl $0x9,(%eax)
137c53: b8 ff ff ff ff mov $0xffffffff,%eax
137c58: e9 71 ff ff ff jmp 137bce <fchdir+0x7e>
001294f4 <fchmod>:
#include <sys/stat.h>
#include <rtems/libio_.h>
int fchmod( int fd, mode_t mode )
{
1294f4: 53 push %ebx
1294f5: 83 ec 28 sub $0x28,%esp
1294f8: 8b 44 24 30 mov 0x30(%esp),%eax
int rv;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1294fc: 3b 05 c0 42 17 00 cmp 0x1742c0,%eax
129502: 73 68 jae 12956c <fchmod+0x78>
iop = rtems_libio_iop( fd );
129504: 8d 1c 40 lea (%eax,%eax,2),%ebx
129507: c1 e3 04 shl $0x4,%ebx
12950a: 03 1d 74 bd 17 00 add 0x17bd74,%ebx
rtems_libio_check_is_open(iop);
129510: f6 43 0d 01 testb $0x1,0xd(%ebx)
129514: 74 56 je 12956c <fchmod+0x78>
if (iop->pathinfo.mt_entry->writeable) {
129516: 8b 43 24 mov 0x24(%ebx),%eax
129519: 80 78 29 00 cmpb $0x0,0x29(%eax)
12951d: 75 15 jne 129534 <fchmod+0x40> <== ALWAYS TAKEN
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;
12951f: e8 6c 2c 01 00 call 13c190 <__errno> <== NOT EXECUTED
129524: c7 00 1e 00 00 00 movl $0x1e,(%eax) <== NOT EXECUTED
rv = -1;
12952a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
}
return rv;
}
12952f: 83 c4 28 add $0x28,%esp
129532: 5b pop %ebx
129533: c3 ret
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 );
129534: 8b 50 0c mov 0xc(%eax),%edx
129537: 89 04 24 mov %eax,(%esp)
12953a: ff 12 call *(%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->fchmod_h)( &iop->pathinfo, mode );
12953c: 8b 43 24 mov 0x24(%ebx),%eax
12953f: 8b 40 0c mov 0xc(%eax),%eax
129542: 8b 54 24 34 mov 0x34(%esp),%edx
129546: 89 54 24 04 mov %edx,0x4(%esp)
12954a: 8d 53 10 lea 0x10(%ebx),%edx
12954d: 89 14 24 mov %edx,(%esp)
129550: ff 50 20 call *0x20(%eax)
errno = EROFS;
rv = -1;
}
return rv;
}
129553: 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 );
129556: 8b 4a 0c mov 0xc(%edx),%ecx
129559: 89 14 24 mov %edx,(%esp)
12955c: 89 44 24 1c mov %eax,0x1c(%esp)
129560: ff 51 04 call *0x4(%ecx)
129563: 8b 44 24 1c mov 0x1c(%esp),%eax
129567: 83 c4 28 add $0x28,%esp
12956a: 5b pop %ebx
12956b: c3 ret
int rv;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
12956c: e8 1f 2c 01 00 call 13c190 <__errno>
129571: c7 00 09 00 00 00 movl $0x9,(%eax)
129577: b8 ff ff ff ff mov $0xffffffff,%eax
12957c: eb b1 jmp 12952f <fchmod+0x3b>
00129580 <fchown>:
#include <unistd.h>
#include <rtems/libio_.h>
int fchown( int fd, uid_t owner, gid_t group )
{
129580: 57 push %edi
129581: 56 push %esi
129582: 53 push %ebx
129583: 83 ec 20 sub $0x20,%esp
129586: 8b 44 24 30 mov 0x30(%esp),%eax
12958a: 0f b7 74 24 34 movzwl 0x34(%esp),%esi
12958f: 0f b7 7c 24 38 movzwl 0x38(%esp),%edi
int rv = 0;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
129594: 3b 05 c0 42 17 00 cmp 0x1742c0,%eax
12959a: 73 70 jae 12960c <fchown+0x8c>
iop = rtems_libio_iop( fd );
12959c: 8d 1c 40 lea (%eax,%eax,2),%ebx
12959f: c1 e3 04 shl $0x4,%ebx
1295a2: 03 1d 74 bd 17 00 add 0x17bd74,%ebx
rtems_libio_check_is_open(iop);
1295a8: f6 43 0d 01 testb $0x1,0xd(%ebx)
1295ac: 74 5e je 12960c <fchown+0x8c>
if (iop->pathinfo.mt_entry->writeable) {
1295ae: 8b 43 24 mov 0x24(%ebx),%eax
1295b1: 80 78 29 00 cmpb $0x0,0x29(%eax)
1295b5: 75 19 jne 1295d0 <fchown+0x50> <== ALWAYS TAKEN
owner,
group
);
rtems_filesystem_instance_unlock( &iop->pathinfo );
} else {
errno = EROFS;
1295b7: e8 d4 2b 01 00 call 13c190 <__errno> <== NOT EXECUTED
1295bc: c7 00 1e 00 00 00 movl $0x1e,(%eax) <== NOT EXECUTED
rv = -1;
1295c2: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
}
return rv;
}
1295c7: 83 c4 20 add $0x20,%esp
1295ca: 5b pop %ebx
1295cb: 5e pop %esi
1295cc: 5f pop %edi
1295cd: c3 ret
1295ce: 66 90 xchg %ax,%ax
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 );
1295d0: 8b 50 0c mov 0xc(%eax),%edx
1295d3: 89 04 24 mov %eax,(%esp)
1295d6: ff 12 call *(%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)(
1295d8: 8b 43 24 mov 0x24(%ebx),%eax
1295db: 8b 40 0c mov 0xc(%eax),%eax
1295de: 89 7c 24 08 mov %edi,0x8(%esp)
1295e2: 89 74 24 04 mov %esi,0x4(%esp)
&iop->pathinfo,
1295e6: 8d 53 10 lea 0x10(%ebx),%edx
1295e9: 89 14 24 mov %edx,(%esp)
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)(
1295ec: ff 50 24 call *0x24(%eax)
errno = EROFS;
rv = -1;
}
return rv;
}
1295ef: 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 );
1295f2: 8b 4a 0c mov 0xc(%edx),%ecx
1295f5: 89 14 24 mov %edx,(%esp)
1295f8: 89 44 24 1c mov %eax,0x1c(%esp)
1295fc: ff 51 04 call *0x4(%ecx)
1295ff: 8b 44 24 1c mov 0x1c(%esp),%eax
129603: 83 c4 20 add $0x20,%esp
129606: 5b pop %ebx
129607: 5e pop %esi
129608: 5f pop %edi
129609: c3 ret
12960a: 66 90 xchg %ax,%ax
int rv = 0;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
12960c: e8 7f 2b 01 00 call 13c190 <__errno>
129611: c7 00 09 00 00 00 movl $0x9,(%eax)
129617: b8 ff ff ff ff mov $0xffffffff,%eax
12961c: eb a9 jmp 1295c7 <fchown+0x47>
00133230 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
133230: 55 push %ebp
133231: 57 push %edi
133232: 56 push %esi
133233: 53 push %ebx
133234: 83 ec 2c sub $0x2c,%esp
133237: 8b 44 24 40 mov 0x40(%esp),%eax
13323b: 8b 7c 24 44 mov 0x44(%esp),%edi
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
13323f: 3b 05 00 7b 14 00 cmp 0x147b00,%eax
133245: 0f 83 91 01 00 00 jae 1333dc <fcntl+0x1ac>
iop = rtems_libio_iop( fd );
13324b: 8d 1c 40 lea (%eax,%eax,2),%ebx
13324e: c1 e3 04 shl $0x4,%ebx
133251: 03 1d 34 bf 15 00 add 0x15bf34,%ebx
rtems_libio_check_is_open(iop);
133257: 8b 73 0c mov 0xc(%ebx),%esi
13325a: f7 c6 00 01 00 00 test $0x100,%esi
133260: 0f 84 76 01 00 00 je 1333dc <fcntl+0x1ac> <== NEVER TAKEN
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
133266: 83 ff 09 cmp $0x9,%edi
133269: 76 0d jbe 133278 <fcntl+0x48>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
13326b: e8 94 2c ff ff call 125f04 <__errno>
133270: c7 00 16 00 00 00 movl $0x16,(%eax)
133276: eb 13 jmp 13328b <fcntl+0x5b>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
133278: ff 24 bd 04 aa 13 00 jmp *0x13aa04(,%edi,4)
13327f: 90 nop
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
133280: e8 7f 2c ff ff call 125f04 <__errno>
133285: c7 00 86 00 00 00 movl $0x86,(%eax)
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
13328b: be ff ff ff ff mov $0xffffffff,%esi
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
133290: 89 f0 mov %esi,%eax
133292: 83 c4 2c add $0x2c,%esp
133295: 5b pop %ebx
133296: 5e pop %esi
133297: 5f pop %edi
133298: 5d pop %ebp
133299: c3 ret
13329a: 66 90 xchg %ax,%ax
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
13329c: 8b 44 24 48 mov 0x48(%esp),%eax
1332a0: 89 04 24 mov %eax,(%esp)
1332a3: e8 64 91 fd ff call 10c40c <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
1332a8: 25 01 02 00 00 and $0x201,%eax
1332ad: 8b 53 0c mov 0xc(%ebx),%edx
1332b0: 81 e2 fe fd ff ff and $0xfffffdfe,%edx
1332b6: 09 d0 or %edx,%eax
1332b8: 89 43 0c mov %eax,0xc(%ebx)
{
rtems_libio_t *iop;
int fd2;
int flags;
int mask;
int ret = 0;
1332bb: 31 f6 xor %esi,%esi
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd );
1332bd: 8b 43 20 mov 0x20(%ebx),%eax
1332c0: 89 7c 24 04 mov %edi,0x4(%esp)
1332c4: 89 1c 24 mov %ebx,(%esp)
1332c7: ff 50 28 call *0x28(%eax)
1332ca: 89 c3 mov %eax,%ebx
if (err) {
1332cc: 85 c0 test %eax,%eax
1332ce: 74 c0 je 133290 <fcntl+0x60> <== ALWAYS TAKEN
errno = err;
1332d0: e8 2f 2c ff ff call 125f04 <__errno> <== NOT EXECUTED
1332d5: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
ret = -1;
1332d7: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
1332dc: 89 f0 mov %esi,%eax <== NOT EXECUTED
1332de: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
1332e1: 5b pop %ebx <== NOT EXECUTED
1332e2: 5e pop %esi <== NOT EXECUTED
1332e3: 5f pop %edi <== NOT EXECUTED
1332e4: 5d pop %ebp <== NOT EXECUTED
1332e5: c3 ret <== NOT EXECUTED
1332e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
1332e8: 89 34 24 mov %esi,(%esp)
1332eb: e8 58 91 fd ff call 10c448 <rtems_libio_to_fcntl_flags>
1332f0: 89 c6 mov %eax,%esi
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
1332f2: 85 f6 test %esi,%esi
1332f4: 79 c7 jns 1332bd <fcntl+0x8d> <== ALWAYS TAKEN
1332f6: eb 98 jmp 133290 <fcntl+0x60> <== NOT EXECUTED
* 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 ) )
1332f8: 8b 44 24 48 mov 0x48(%esp),%eax
1332fc: 85 c0 test %eax,%eax
1332fe: 0f 84 c8 00 00 00 je 1333cc <fcntl+0x19c>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
133304: 81 ce 00 08 00 00 or $0x800,%esi
13330a: 89 73 0c mov %esi,0xc(%ebx)
{
rtems_libio_t *iop;
int fd2;
int flags;
int mask;
int ret = 0;
13330d: 31 f6 xor %esi,%esi
13330f: eb ac jmp 1332bd <fcntl+0x8d>
133311: 8d 76 00 lea 0x0(%esi),%esi
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);
133314: c1 ee 0b shr $0xb,%esi
133317: 83 e6 01 and $0x1,%esi
13331a: eb a1 jmp 1332bd <fcntl+0x8d>
/*
* FIXME: We ignore the start value fd2 for the file descriptor search. This
* is not POSIX conform.
*/
rtems_libio_t *diop = rtems_libio_allocate();
13331c: e8 67 91 fd ff call 10c488 <rtems_libio_allocate>
133321: 89 c5 mov %eax,%ebp
if (diop != NULL) {
133323: 85 c0 test %eax,%eax
133325: 0f 84 60 ff ff ff je 13328b <fcntl+0x5b>
int oflag = rtems_libio_to_fcntl_flags( iop->flags );
13332b: 8b 43 0c mov 0xc(%ebx),%eax
13332e: 89 04 24 mov %eax,(%esp)
133331: e8 12 91 fd ff call 10c448 <rtems_libio_to_fcntl_flags>
133336: 89 c6 mov %eax,%esi
oflag &= ~O_CREAT;
133338: 81 e6 ff fd ff ff and $0xfffffdff,%esi
diop->flags |= rtems_libio_fcntl_flags( oflag );
13333e: 8b 45 0c mov 0xc(%ebp),%eax
133341: 89 44 24 1c mov %eax,0x1c(%esp)
133345: 89 34 24 mov %esi,(%esp)
133348: e8 bf 90 fd ff call 10c40c <rtems_libio_fcntl_flags>
13334d: 0b 44 24 1c or 0x1c(%esp),%eax
133351: 89 45 0c mov %eax,0xc(%ebp)
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
}
133354: 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 );
133357: 8b 48 0c mov 0xc(%eax),%ecx
13335a: 89 04 24 mov %eax,(%esp)
13335d: ff 11 call *(%ecx)
oflag &= ~O_CREAT;
diop->flags |= rtems_libio_fcntl_flags( oflag );
rtems_filesystem_instance_lock( &iop->pathinfo );
rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo );
13335f: 8d 43 10 lea 0x10(%ebx),%eax
133362: 89 44 24 04 mov %eax,0x4(%esp)
133366: 8d 45 10 lea 0x10(%ebp),%eax
133369: 89 04 24 mov %eax,(%esp)
13336c: e8 8f 76 fe ff call 11aa00 <rtems_filesystem_location_clone>
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
}
133371: 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 );
133374: 8b 48 0c mov 0xc(%eax),%ecx
133377: 89 04 24 mov %eax,(%esp)
13337a: ff 51 04 call *0x4(%ecx)
/*
* 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 );
13337d: 8b 45 20 mov 0x20(%ebp),%eax
133380: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
133387: 00
133388: 89 74 24 08 mov %esi,0x8(%esp)
13338c: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
133393: 00
133394: 89 2c 24 mov %ebp,(%esp)
133397: ff 10 call *(%eax)
133399: 89 c6 mov %eax,%esi
if ( rv == 0 ) {
13339b: 85 c0 test %eax,%eax
13339d: 75 55 jne 1333f4 <fcntl+0x1c4> <== NEVER TAKEN
rv = diop - rtems_libio_iops;
13339f: 2b 2d 34 bf 15 00 sub 0x15bf34,%ebp
1333a5: c1 fd 04 sar $0x4,%ebp
1333a8: 8d 44 ad 00 lea 0x0(%ebp,%ebp,4),%eax
1333ac: 8d 44 85 00 lea 0x0(%ebp,%eax,4),%eax
1333b0: 8d 44 85 00 lea 0x0(%ebp,%eax,4),%eax
1333b4: 89 c2 mov %eax,%edx
1333b6: c1 e2 08 shl $0x8,%edx
1333b9: 01 d0 add %edx,%eax
1333bb: 89 c2 mov %eax,%edx
1333bd: c1 e2 10 shl $0x10,%edx
1333c0: 01 d0 add %edx,%eax
1333c2: 8d 74 45 00 lea 0x0(%ebp,%eax,2),%esi
1333c6: e9 27 ff ff ff jmp 1332f2 <fcntl+0xc2>
1333cb: 90 nop
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
1333cc: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi
1333d2: 89 73 0c mov %esi,0xc(%ebx)
{
rtems_libio_t *iop;
int fd2;
int flags;
int mask;
int ret = 0;
1333d5: 31 f6 xor %esi,%esi
1333d7: e9 e1 fe ff ff jmp 1332bd <fcntl+0x8d>
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
1333dc: e8 23 2b ff ff call 125f04 <__errno>
1333e1: c7 00 09 00 00 00 movl $0x9,(%eax)
1333e7: be ff ff ff ff mov $0xffffffff,%esi
1333ec: e9 9f fe ff ff jmp 133290 <fcntl+0x60>
1333f1: 8d 76 00 lea 0x0(%esi),%esi
*/
rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 );
if ( rv == 0 ) {
rv = diop - rtems_libio_iops;
} else {
rtems_libio_free( diop );
1333f4: 89 2c 24 mov %ebp,(%esp) <== NOT EXECUTED
1333f7: e8 e8 90 fd ff call 10c4e4 <rtems_libio_free> <== NOT EXECUTED
1333fc: e9 f1 fe ff ff jmp 1332f2 <fcntl+0xc2> <== NOT EXECUTED
0010ad94 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
10ad94: 83 ec 0c sub $0xc,%esp
10ad97: 8b 44 24 10 mov 0x10(%esp),%eax
long return_value;
rtems_libio_t *iop;
const rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
10ad9b: 3b 05 9c ad 12 00 cmp 0x12ad9c,%eax
10ada1: 0f 83 a1 00 00 00 jae 10ae48 <fpathconf+0xb4> <== ALWAYS TAKEN
iop = rtems_libio_iop(fd);
10ada7: 8d 04 40 lea (%eax,%eax,2),%eax <== NOT EXECUTED
10adaa: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED
10adad: 03 05 30 f0 12 00 add 0x12f030,%eax <== NOT EXECUTED
rtems_libio_check_is_open(iop);
10adb3: f6 40 0d 01 testb $0x1,0xd(%eax) <== NOT EXECUTED
10adb7: 0f 84 8b 00 00 00 je 10ae48 <fpathconf+0xb4> <== NOT EXECUTED
/*
* Now process the information request.
*/
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
10adbd: 8b 40 24 mov 0x24(%eax),%eax <== NOT EXECUTED
10adc0: 8b 40 2c mov 0x2c(%eax),%eax <== NOT EXECUTED
switch ( name ) {
10adc3: 83 7c 24 14 0b cmpl $0xb,0x14(%esp) <== NOT EXECUTED
10adc8: 76 16 jbe 10ade0 <fpathconf+0x4c> <== NOT EXECUTED
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10adca: e8 a9 23 00 00 call 10d178 <__errno> <== NOT EXECUTED
10adcf: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
10add5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10adda: 66 90 xchg %ax,%ax <== NOT EXECUTED
break;
}
return return_value;
}
10addc: 83 c4 0c add $0xc,%esp
10addf: c3 ret
* Now process the information request.
*/
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
10ade0: 8b 54 24 14 mov 0x14(%esp),%edx <== NOT EXECUTED
10ade4: ff 24 95 8c 04 12 00 jmp *0x12048c(,%edx,4) <== NOT EXECUTED
10adeb: 90 nop <== NOT EXECUTED
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
10adec: 8b 40 24 mov 0x24(%eax),%eax <== NOT EXECUTED
break;
10adef: eb eb jmp 10addc <fpathconf+0x48> <== NOT EXECUTED
10adf1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
10adf4: 8b 40 18 mov 0x18(%eax),%eax <== NOT EXECUTED
break;
10adf7: eb e3 jmp 10addc <fpathconf+0x48> <== NOT EXECUTED
10adf9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
10adfc: 8b 40 2c mov 0x2c(%eax),%eax <== NOT EXECUTED
break;
10adff: eb db jmp 10addc <fpathconf+0x48> <== NOT EXECUTED
10ae01: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
10ae04: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
break;
10ae07: eb d3 jmp 10addc <fpathconf+0x48> <== NOT EXECUTED
10ae09: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
10ae0c: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
break;
10ae0f: eb cb jmp 10addc <fpathconf+0x48> <== NOT EXECUTED
10ae11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
10ae14: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
break;
10ae17: eb c3 jmp 10addc <fpathconf+0x48> <== NOT EXECUTED
10ae19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
10ae1c: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED
break;
10ae1f: eb bb jmp 10addc <fpathconf+0x48> <== NOT EXECUTED
10ae21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
10ae24: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
break;
10ae27: eb b3 jmp 10addc <fpathconf+0x48> <== NOT EXECUTED
10ae29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
10ae2c: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
break;
10ae2f: eb ab jmp 10addc <fpathconf+0x48> <== NOT EXECUTED
10ae31: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
10ae34: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED
break;
10ae37: eb a3 jmp 10addc <fpathconf+0x48> <== NOT EXECUTED
10ae39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
10ae3c: 8b 00 mov (%eax),%eax <== NOT EXECUTED
break;
10ae3e: eb 9c jmp 10addc <fpathconf+0x48> <== NOT EXECUTED
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
10ae40: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
break;
10ae43: eb 97 jmp 10addc <fpathconf+0x48> <== NOT EXECUTED
10ae45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_libio_t *iop;
const rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
10ae48: e8 2b 23 00 00 call 10d178 <__errno>
10ae4d: c7 00 09 00 00 00 movl $0x9,(%eax)
10ae53: b8 ff ff ff ff mov $0xffffffff,%eax
10ae58: eb 82 jmp 10addc <fpathconf+0x48>
0010793c <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
10793c: 53 push %ebx
10793d: 83 ec 18 sub $0x18,%esp
107940: 8b 5c 24 20 mov 0x20(%esp),%ebx
MSBUMP(free_calls, 1);
107944: ff 05 4c 1e 13 00 incl 0x131e4c
if ( !ptr )
10794a: 85 db test %ebx,%ebx
10794c: 74 50 je 10799e <free+0x62>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
10794e: 83 3d a0 20 13 00 03 cmpl $0x3,0x1320a0
107955: 74 4d je 1079a4 <free+0x68> <== ALWAYS TAKEN
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
107957: a1 80 02 13 00 mov 0x130280,%eax
10795c: 85 c0 test %eax,%eax
10795e: 74 06 je 107966 <free+0x2a>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
107960: 89 1c 24 mov %ebx,(%esp)
107963: ff 50 08 call *0x8(%eax)
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
107966: 89 5c 24 04 mov %ebx,0x4(%esp)
10796a: a1 0c db 12 00 mov 0x12db0c,%eax
10796f: 89 04 24 mov %eax,(%esp)
107972: e8 f5 5a 00 00 call 10d46c <_Protected_heap_Free>
107977: 84 c0 test %al,%al
107979: 75 23 jne 10799e <free+0x62>
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
10797b: a1 0c db 12 00 mov 0x12db0c,%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",
107980: 8b 50 1c mov 0x1c(%eax),%edx
107983: 89 54 24 0c mov %edx,0xc(%esp)
107987: 8b 40 18 mov 0x18(%eax),%eax
10798a: 89 44 24 08 mov %eax,0x8(%esp)
10798e: 89 5c 24 04 mov %ebx,0x4(%esp)
107992: c7 04 24 28 28 12 00 movl $0x122828,(%esp)
107999: e8 ca 0e 00 00 call 108868 <printk>
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
10799e: 83 c4 18 add $0x18,%esp
1079a1: 5b pop %ebx
1079a2: c3 ret
1079a3: 90 nop
/*
* 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() ) {
1079a4: e8 83 01 00 00 call 107b2c <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()) &&
1079a9: 84 c0 test %al,%al
1079ab: 75 aa jne 107957 <free+0x1b>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
1079ad: 89 5c 24 20 mov %ebx,0x20(%esp)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
1079b1: 83 c4 18 add $0x18,%esp
1079b4: 5b pop %ebx
/*
* 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);
1079b5: e9 ce 01 00 00 jmp 107b88 <malloc_deferred_free>
001203e8 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
1203e8: 57 push %edi
1203e9: 53 push %ebx
1203ea: 53 push %ebx
1203eb: 8b 44 24 10 mov 0x10(%esp),%eax
1203ef: 8b 5c 24 14 mov 0x14(%esp),%ebx
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
1203f3: 85 db test %ebx,%ebx
1203f5: 74 51 je 120448 <fstat+0x60> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
1203f7: 3b 05 60 db 12 00 cmp 0x12db60,%eax
1203fd: 73 35 jae 120434 <fstat+0x4c>
1203ff: 8d 14 40 lea (%eax,%eax,2),%edx
120402: c1 e2 04 shl $0x4,%edx
120405: 03 15 14 1e 13 00 add 0x131e14,%edx
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
12040b: f6 42 0d 01 testb $0x1,0xd(%edx)
12040f: 74 23 je 120434 <fstat+0x4c>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
120411: b9 48 00 00 00 mov $0x48,%ecx
120416: 31 c0 xor %eax,%eax
120418: 89 df mov %ebx,%edi
12041a: f3 aa rep stos %al,%es:(%edi)
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
12041c: 8b 42 20 mov 0x20(%edx),%eax
12041f: 89 5c 24 14 mov %ebx,0x14(%esp)
120423: 83 c2 10 add $0x10,%edx
120426: 89 54 24 10 mov %edx,0x10(%esp)
12042a: 8b 40 18 mov 0x18(%eax),%eax
}
12042d: 59 pop %ecx
12042e: 5b pop %ebx
12042f: 5f pop %edi
* 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 );
120430: ff e0 jmp *%eax
120432: 66 90 xchg %ax,%ax
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
120434: e8 c7 37 ff ff call 113c00 <__errno>
120439: c7 00 09 00 00 00 movl $0x9,(%eax)
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
}
12043f: b8 ff ff ff ff mov $0xffffffff,%eax
120444: 5a pop %edx
120445: 5b pop %ebx
120446: 5f pop %edi
120447: c3 ret
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
120448: e8 b3 37 ff ff call 113c00 <__errno> <== NOT EXECUTED
12044d: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
120453: eb ea jmp 12043f <fstat+0x57> <== NOT EXECUTED
00133434 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
133434: 57 push %edi
133435: 56 push %esi
133436: 53 push %ebx
133437: 83 ec 10 sub $0x10,%esp
13343a: 8b 44 24 20 mov 0x20(%esp),%eax
13343e: 8b 74 24 24 mov 0x24(%esp),%esi
133442: 8b 7c 24 28 mov 0x28(%esp),%edi
rtems_filesystem_node_types_t type;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
133446: 3b 05 00 7b 14 00 cmp 0x147b00,%eax
13344c: 73 36 jae 133484 <getdents+0x50> <== NEVER TAKEN
13344e: 8d 1c 40 lea (%eax,%eax,2),%ebx
133451: c1 e3 04 shl $0x4,%ebx
133454: 03 1d 34 bf 15 00 add 0x15bf34,%ebx
/*
* Make sure we are working on a directory
*/
type = rtems_filesystem_node_type( &iop->pathinfo );
13345a: 8d 43 10 lea 0x10(%ebx),%eax
13345d: 89 04 24 mov %eax,(%esp)
133460: e8 eb ab fd ff call 10e050 <rtems_filesystem_node_type>
if ( type != RTEMS_FILESYSTEM_DIRECTORY )
133465: 85 c0 test %eax,%eax
133467: 75 1f jne 133488 <getdents+0x54>
/*
* 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 );
133469: 8b 43 20 mov 0x20(%ebx),%eax
13346c: 89 7c 24 28 mov %edi,0x28(%esp)
133470: 89 74 24 24 mov %esi,0x24(%esp)
133474: 89 5c 24 20 mov %ebx,0x20(%esp)
133478: 8b 40 08 mov 0x8(%eax),%eax
}
13347b: 83 c4 10 add $0x10,%esp
13347e: 5b pop %ebx
13347f: 5e pop %esi
133480: 5f pop %edi
/*
* 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 );
133481: ff e0 jmp *%eax
133483: 90 nop
rtems_filesystem_node_types_t type;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
133484: 31 db xor %ebx,%ebx <== NOT EXECUTED
133486: eb d2 jmp 13345a <getdents+0x26> <== NOT EXECUTED
/*
* 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 );
133488: e8 77 2a ff ff call 125f04 <__errno>
13348d: 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 );
}
133493: b8 ff ff ff ff mov $0xffffffff,%eax
133498: 83 c4 10 add $0x10,%esp
13349b: 5b pop %ebx
13349c: 5e pop %esi
13349d: 5f pop %edi
13349e: c3 ret
00129a8c <init_etc_passwd_group>:
void init_etc_passwd_group(void)
{
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
129a8c: 80 3d a0 b6 17 00 00 cmpb $0x0,0x17b6a0
129a93: 74 03 je 129a98 <init_etc_passwd_group+0xc>
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
129a95: c3 ret
129a96: 66 90 xchg %ax,%ax
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
129a98: 53 push %ebx
129a99: 83 ec 18 sub $0x18,%esp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
129a9c: c6 05 a0 b6 17 00 01 movb $0x1,0x17b6a0
mkdir("/etc", 0777);
129aa3: c7 44 24 04 ff 01 00 movl $0x1ff,0x4(%esp)
129aaa: 00
129aab: c7 04 24 8f c7 15 00 movl $0x15c78f,(%esp)
129ab2: e8 e9 df fd ff call 107aa0 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
129ab7: c7 44 24 04 75 81 15 movl $0x158175,0x4(%esp)
129abe: 00
129abf: c7 04 24 94 c7 15 00 movl $0x15c794,(%esp)
129ac6: e8 59 30 01 00 call 13cb24 <fopen>
129acb: 85 c0 test %eax,%eax
129acd: 74 71 je 129b40 <init_etc_passwd_group+0xb4>
fclose(fp);
129acf: 89 04 24 mov %eax,(%esp)
129ad2: e8 d5 27 01 00 call 13c2ac <fclose>
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
129ad7: c7 44 24 04 75 81 15 movl $0x158175,0x4(%esp)
129ade: 00
129adf: c7 04 24 a0 c7 15 00 movl $0x15c7a0,(%esp)
129ae6: e8 39 30 01 00 call 13cb24 <fopen>
129aeb: 85 c0 test %eax,%eax
129aed: 74 0d je 129afc <init_etc_passwd_group+0x70>
fclose(fp);
129aef: 89 04 24 mov %eax,(%esp)
129af2: e8 b5 27 01 00 call 13c2ac <fclose>
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
129af7: 83 c4 18 add $0x18,%esp
129afa: 5b pop %ebx
129afb: c3 ret
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
129afc: c7 44 24 04 50 81 15 movl $0x158150,0x4(%esp)
129b03: 00
129b04: c7 04 24 a0 c7 15 00 movl $0x15c7a0,(%esp)
129b0b: e8 14 30 01 00 call 13cb24 <fopen>
129b10: 89 c3 mov %eax,%ebx
129b12: 85 c0 test %eax,%eax
129b14: 74 e1 je 129af7 <init_etc_passwd_group+0x6b><== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
129b16: 89 44 24 0c mov %eax,0xc(%esp)
129b1a: c7 44 24 08 2a 00 00 movl $0x2a,0x8(%esp)
129b21: 00
129b22: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
129b29: 00
129b2a: c7 04 24 14 c8 15 00 movl $0x15c814,(%esp)
129b31: e8 22 43 01 00 call 13de58 <fwrite>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
129b36: 89 1c 24 mov %ebx,(%esp)
129b39: e8 6e 27 01 00 call 13c2ac <fclose>
129b3e: eb b7 jmp 129af7 <init_etc_passwd_group+0x6b>
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
129b40: c7 44 24 04 50 81 15 movl $0x158150,0x4(%esp)
129b47: 00
129b48: c7 04 24 94 c7 15 00 movl $0x15c794,(%esp)
129b4f: e8 d0 2f 01 00 call 13cb24 <fopen>
129b54: 89 c3 mov %eax,%ebx
129b56: 85 c0 test %eax,%eax
129b58: 0f 84 79 ff ff ff je 129ad7 <init_etc_passwd_group+0x4b><== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
129b5e: 89 44 24 0c mov %eax,0xc(%esp)
129b62: c7 44 24 08 66 00 00 movl $0x66,0x8(%esp)
129b69: 00
129b6a: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
129b71: 00
129b72: c7 04 24 ac c7 15 00 movl $0x15c7ac,(%esp)
129b79: e8 da 42 01 00 call 13de58 <fwrite>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
129b7e: 89 1c 24 mov %ebx,(%esp)
129b81: e8 26 27 01 00 call 13c2ac <fclose>
129b86: e9 4c ff ff ff jmp 129ad7 <init_etc_passwd_group+0x4b>
0010a4b8 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
10a4b8: 56 push %esi
10a4b9: 53 push %ebx
10a4ba: 53 push %ebx
10a4bb: 89 d6 mov %edx,%esi
10a4bd: 88 c3 mov %al,%bl
if (tty->termios.c_iflag & ISTRIP)
10a4bf: 8b 42 30 mov 0x30(%edx),%eax
10a4c2: a8 20 test $0x20,%al
10a4c4: 74 03 je 10a4c9 <iproc+0x11> <== ALWAYS TAKEN
c &= 0x7f;
10a4c6: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
10a4c9: f6 c4 02 test $0x2,%ah
10a4cc: 74 18 je 10a4e6 <iproc+0x2e>
c = tolower (c);
10a4ce: 0f b6 db movzbl %bl,%ebx
10a4d1: 8b 15 e8 fc 12 00 mov 0x12fce8,%edx
10a4d7: 8a 54 1a 01 mov 0x1(%edx,%ebx,1),%dl
10a4db: 83 e2 03 and $0x3,%edx
10a4de: fe ca dec %dl
10a4e0: 0f 84 aa 00 00 00 je 10a590 <iproc+0xd8>
if (c == '\r') {
10a4e6: 80 fb 0d cmp $0xd,%bl
10a4e9: 74 4d je 10a538 <iproc+0x80>
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
10a4eb: 80 fb 0a cmp $0xa,%bl
10a4ee: 0f 84 94 00 00 00 je 10a588 <iproc+0xd0>
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
10a4f4: 84 db test %bl,%bl
10a4f6: 75 4c jne 10a544 <iproc+0x8c> <== ALWAYS TAKEN
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
10a4f8: 8b 46 20 mov 0x20(%esi),%eax
10a4fb: 8b 15 dc fa 12 00 mov 0x12fadc,%edx
10a501: 4a dec %edx
10a502: 39 d0 cmp %edx,%eax
10a504: 73 2a jae 10a530 <iproc+0x78> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
10a506: f6 46 3c 08 testb $0x8,0x3c(%esi)
10a50a: 0f 85 88 00 00 00 jne 10a598 <iproc+0xe0> <== ALWAYS TAKEN
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
10a510: 8b 56 1c mov 0x1c(%esi),%edx
10a513: 88 1c 02 mov %bl,(%edx,%eax,1)
10a516: 40 inc %eax
10a517: 89 46 20 mov %eax,0x20(%esi)
}
return 0;
10a51a: 31 c0 xor %eax,%eax
}
10a51c: 59 pop %ecx
10a51d: 5b pop %ebx
10a51e: 5e pop %esi
10a51f: c3 ret
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
10a520: 8b 4e 20 mov 0x20(%esi),%ecx
10a523: 85 c9 test %ecx,%ecx
10a525: 74 09 je 10a530 <iproc+0x78>
10a527: 31 d2 xor %edx,%edx
10a529: 89 f0 mov %esi,%eax
10a52b: e8 18 fe ff ff call 10a348 <erase.part.2>
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
10a530: 31 c0 xor %eax,%eax
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
10a532: 59 pop %ecx
10a533: 5b pop %ebx
10a534: 5e pop %esi
10a535: c3 ret
10a536: 66 90 xchg %ax,%ax
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
10a538: a8 80 test $0x80,%al
10a53a: 75 f4 jne 10a530 <iproc+0x78> <== NEVER TAKEN
return 0;
if (tty->termios.c_iflag & ICRNL)
10a53c: f6 c4 01 test $0x1,%ah
10a53f: 74 03 je 10a544 <iproc+0x8c> <== NEVER TAKEN
c = '\n';
10a541: b3 0a mov $0xa,%bl
10a543: 90 nop
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
10a544: 8b 46 3c mov 0x3c(%esi),%eax
10a547: a8 02 test $0x2,%al
10a549: 74 ad je 10a4f8 <iproc+0x40>
if (c == tty->termios.c_cc[VERASE]) {
10a54b: 38 5e 43 cmp %bl,0x43(%esi)
10a54e: 74 d0 je 10a520 <iproc+0x68>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
10a550: 38 5e 44 cmp %bl,0x44(%esi)
10a553: 74 63 je 10a5b8 <iproc+0x100>
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
10a555: 38 5e 45 cmp %bl,0x45(%esi)
10a558: 0f 84 aa 00 00 00 je 10a608 <iproc+0x150> <== NEVER TAKEN
return 1;
} else if (c == '\n') {
10a55e: 80 fb 0a cmp $0xa,%bl
10a561: 74 7d je 10a5e0 <iproc+0x128>
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
10a563: 38 5e 4c cmp %bl,0x4c(%esi)
10a566: 74 05 je 10a56d <iproc+0xb5> <== NEVER TAKEN
10a568: 38 5e 51 cmp %bl,0x51(%esi)
10a56b: 75 8b jne 10a4f8 <iproc+0x40> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
10a56d: a8 08 test $0x8,%al <== NOT EXECUTED
10a56f: 75 3b jne 10a5ac <iproc+0xf4> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
10a571: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
10a574: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED
10a577: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED
10a57a: 40 inc %eax <== NOT EXECUTED
10a57b: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED
return 1;
10a57e: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10a583: eb 97 jmp 10a51c <iproc+0x64> <== NOT EXECUTED
10a585: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
10a588: a8 40 test $0x40,%al
10a58a: 74 b8 je 10a544 <iproc+0x8c> <== ALWAYS TAKEN
c = '\r';
10a58c: b3 0d mov $0xd,%bl <== NOT EXECUTED
10a58e: eb b4 jmp 10a544 <iproc+0x8c> <== NOT EXECUTED
{
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
10a590: 83 c3 20 add $0x20,%ebx
10a593: e9 4e ff ff ff jmp 10a4e6 <iproc+0x2e>
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
10a598: 0f b6 c3 movzbl %bl,%eax
10a59b: 89 f2 mov %esi,%edx
10a59d: e8 3a fd ff ff call 10a2dc <echo>
10a5a2: 8b 46 20 mov 0x20(%esi),%eax
10a5a5: e9 66 ff ff ff jmp 10a510 <iproc+0x58>
10a5aa: 66 90 xchg %ax,%ax
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
10a5ac: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED
10a5af: 89 f2 mov %esi,%edx <== NOT EXECUTED
10a5b1: e8 26 fd ff ff call 10a2dc <echo> <== NOT EXECUTED
10a5b6: eb b9 jmp 10a571 <iproc+0xb9> <== NOT EXECUTED
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
10a5b8: 8b 56 20 mov 0x20(%esi),%edx
10a5bb: 85 d2 test %edx,%edx
10a5bd: 0f 84 6d ff ff ff je 10a530 <iproc+0x78> <== NEVER TAKEN
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
10a5c3: a8 08 test $0x8,%al
10a5c5: 74 4b je 10a612 <iproc+0x15a> <== NEVER TAKEN
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
10a5c7: a8 10 test $0x10,%al
10a5c9: 74 55 je 10a620 <iproc+0x168> <== NEVER TAKEN
10a5cb: ba 01 00 00 00 mov $0x1,%edx
10a5d0: 89 f0 mov %esi,%eax
10a5d2: e8 71 fd ff ff call 10a348 <erase.part.2>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
10a5d7: 31 c0 xor %eax,%eax
10a5d9: e9 3e ff ff ff jmp 10a51c <iproc+0x64>
10a5de: 66 90 xchg %ax,%ax
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
10a5e0: a8 48 test $0x48,%al
10a5e2: 74 0c je 10a5f0 <iproc+0x138> <== NEVER TAKEN
echo (c, tty);
10a5e4: 89 f2 mov %esi,%edx
10a5e6: b8 0a 00 00 00 mov $0xa,%eax
10a5eb: e8 ec fc ff ff call 10a2dc <echo>
tty->cbuf[tty->ccount++] = c;
10a5f0: 8b 46 20 mov 0x20(%esi),%eax
10a5f3: 8b 56 1c mov 0x1c(%esi),%edx
10a5f6: c6 04 02 0a movb $0xa,(%edx,%eax,1)
10a5fa: 40 inc %eax
10a5fb: 89 46 20 mov %eax,0x20(%esi)
return 1;
10a5fe: b8 01 00 00 00 mov $0x1,%eax
10a603: e9 14 ff ff ff jmp 10a51c <iproc+0x64>
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
10a608: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10a60d: e9 0a ff ff ff jmp 10a51c <iproc+0x64> <== NOT EXECUTED
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
10a612: c7 46 20 00 00 00 00 movl $0x0,0x20(%esi) <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
10a619: 31 c0 xor %eax,%eax <== NOT EXECUTED
10a61b: e9 fc fe ff ff jmp 10a51c <iproc+0x64> <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
10a620: c7 46 20 00 00 00 00 movl $0x0,0x20(%esi) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
10a627: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED
10a62a: 89 f2 mov %esi,%edx <== NOT EXECUTED
10a62c: e8 ab fc ff ff call 10a2dc <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
10a631: f6 46 3c 20 testb $0x20,0x3c(%esi) <== NOT EXECUTED
10a635: 0f 84 f5 fe ff ff je 10a530 <iproc+0x78> <== NOT EXECUTED
echo ('\n', tty);
10a63b: 89 f2 mov %esi,%edx <== NOT EXECUTED
10a63d: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
10a642: e8 95 fc ff ff call 10a2dc <echo> <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
10a647: 31 c0 xor %eax,%eax <== NOT EXECUTED
10a649: e9 ce fe ff ff jmp 10a51c <iproc+0x64> <== NOT EXECUTED
001206a4 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
1206a4: 55 push %ebp
1206a5: 57 push %edi
1206a6: 56 push %esi
1206a7: 53 push %ebx
1206a8: 83 ec 4c sub $0x4c,%esp
1206ab: 8b 6c 24 64 mov 0x64(%esp),%ebp
1206af: 8b 74 24 68 mov 0x68(%esp),%esi
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
1206b3: e8 b8 fd ff ff call 120470 <getpid>
1206b8: 3b 44 24 60 cmp 0x60(%esp),%eax
1206bc: 0f 85 5e 02 00 00 jne 120920 <killinfo+0x27c>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
1206c2: 85 ed test %ebp,%ebp
1206c4: 0f 84 6b 02 00 00 je 120935 <killinfo+0x291>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
1206ca: 8d 4d ff lea -0x1(%ebp),%ecx
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
1206cd: 83 f9 1f cmp $0x1f,%ecx
1206d0: 0f 87 5f 02 00 00 ja 120935 <killinfo+0x291>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
1206d6: 8d 44 6d 00 lea 0x0(%ebp,%ebp,2),%eax
1206da: 83 3c 85 48 25 13 00 cmpl $0x1,0x132548(,%eax,4)
1206e1: 01
1206e2: 0f 84 00 02 00 00 je 1208e8 <killinfo+0x244>
/*
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
1206e8: 83 fd 08 cmp $0x8,%ebp
1206eb: 0f 84 cf 00 00 00 je 1207c0 <killinfo+0x11c>
1206f1: 83 fd 04 cmp $0x4,%ebp
1206f4: 0f 84 c6 00 00 00 je 1207c0 <killinfo+0x11c>
1206fa: 83 fd 0b cmp $0xb,%ebp
1206fd: 0f 84 bd 00 00 00 je 1207c0 <killinfo+0x11c>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
120703: bb 01 00 00 00 mov $0x1,%ebx
120708: d3 e3 shl %cl,%ebx
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
12070a: 89 6c 24 34 mov %ebp,0x34(%esp)
siginfo->si_code = SI_USER;
12070e: c7 44 24 38 01 00 00 movl $0x1,0x38(%esp)
120715: 00
if ( !value ) {
120716: 85 f6 test %esi,%esi
120718: 0f 84 d2 01 00 00 je 1208f0 <killinfo+0x24c>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
12071e: 8b 06 mov (%esi),%eax
120720: 89 44 24 3c mov %eax,0x3c(%esp)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
120724: a1 44 1f 13 00 mov 0x131f44,%eax
120729: 40 inc %eax
12072a: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
12072f: a1 44 1f 13 00 mov 0x131f44,%eax
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
120734: a1 cc 24 13 00 mov 0x1324cc,%eax
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
120739: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
12073f: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx
120745: f7 d2 not %edx
120747: 85 d3 test %edx,%ebx
120749: 75 31 jne 12077c <killinfo+0xd8>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
12074b: a1 e0 26 13 00 mov 0x1326e0,%eax
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
120750: 3d e4 26 13 00 cmp $0x1326e4,%eax
120755: 75 1a jne 120771 <killinfo+0xcd>
120757: e9 80 00 00 00 jmp 1207dc <killinfo+0x138>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
12075c: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx
120762: f7 d2 not %edx
120764: 85 d3 test %edx,%ebx
120766: 75 14 jne 12077c <killinfo+0xd8>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
120768: 8b 00 mov (%eax),%eax
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
12076a: 3d e4 26 13 00 cmp $0x1326e4,%eax
12076f: 74 6b je 1207dc <killinfo+0x138> <== ALWAYS TAKEN
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
120771: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
120777: 85 58 30 test %ebx,0x30(%eax)
12077a: 74 e0 je 12075c <killinfo+0xb8>
mask = signo_to_mask( sig );
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
12077c: 8d 54 24 34 lea 0x34(%esp),%edx
120780: 89 54 24 08 mov %edx,0x8(%esp)
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
120784: 89 6c 24 04 mov %ebp,0x4(%esp)
120788: 89 04 24 mov %eax,(%esp)
12078b: e8 e4 01 00 00 call 120974 <_POSIX_signals_Unblock_thread>
120790: 84 c0 test %al,%al
120792: 75 1c jne 1207b0 <killinfo+0x10c>
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
120794: 89 1c 24 mov %ebx,(%esp)
120797: e8 c8 01 00 00 call 120964 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
12079c: 8d 5c 6d 00 lea 0x0(%ebp,%ebp,2),%ebx
1207a0: c1 e3 02 shl $0x2,%ebx
1207a3: 83 bb 40 25 13 00 02 cmpl $0x2,0x132540(%ebx)
1207aa: 0f 84 fc 00 00 00 je 1208ac <killinfo+0x208>
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
_Thread_Enable_dispatch();
1207b0: e8 6f d6 fe ff call 10de24 <_Thread_Enable_dispatch>
return 0;
1207b5: 31 c0 xor %eax,%eax
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
1207b7: 83 c4 4c add $0x4c,%esp
1207ba: 5b pop %ebx
1207bb: 5e pop %esi
1207bc: 5f pop %edi
1207bd: 5d pop %ebp
1207be: c3 ret
1207bf: 90 nop
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
1207c0: e8 83 03 00 00 call 120b48 <pthread_self>
1207c5: 89 6c 24 04 mov %ebp,0x4(%esp)
1207c9: 89 04 24 mov %eax,(%esp)
1207cc: e8 af 02 00 00 call 120a80 <pthread_kill>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
1207d1: 83 c4 4c add $0x4c,%esp
1207d4: 5b pop %ebx
1207d5: 5e pop %esi
1207d6: 5f pop %edi
1207d7: 5d pop %ebp
1207d8: c3 ret
1207d9: 8d 76 00 lea 0x0(%esi),%esi
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
1207dc: 0f b6 05 4c da 12 00 movzbl 0x12da4c,%eax
1207e3: 40 inc %eax
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
1207e4: c7 44 24 24 00 00 00 movl $0x0,0x24(%esp)
1207eb: 00
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
1207ec: c7 44 24 20 02 00 00 movl $0x2,0x20(%esp)
1207f3: 00
1207f4: 89 5c 24 1c mov %ebx,0x1c(%esp)
1207f8: 89 6c 24 28 mov %ebp,0x28(%esp)
1207fc: 89 c5 mov %eax,%ebp
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
1207fe: 8b 54 24 20 mov 0x20(%esp),%edx
120802: 8b 04 95 1c 1f 13 00 mov 0x131f1c(,%edx,4),%eax
120809: 85 c0 test %eax,%eax
12080b: 74 70 je 12087d <killinfo+0x1d9> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
12080d: 8b 40 04 mov 0x4(%eax),%eax
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
120810: 0f b7 58 10 movzwl 0x10(%eax),%ebx
object_table = the_info->local_table;
120814: 8b 70 1c mov 0x1c(%eax),%esi
for ( index = 1 ; index <= maximum ; index++ ) {
120817: 85 db test %ebx,%ebx
120819: 74 62 je 12087d <killinfo+0x1d9>
12081b: b8 01 00 00 00 mov $0x1,%eax
120820: 89 df mov %ebx,%edi
120822: 66 90 xchg %ax,%ax
the_thread = (Thread_Control *) object_table[ index ];
120824: 8b 14 86 mov (%esi,%eax,4),%edx
if ( !the_thread )
120827: 85 d2 test %edx,%edx
120829: 74 4d je 120878 <killinfo+0x1d4>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
12082b: 8b 4a 14 mov 0x14(%edx),%ecx
12082e: 39 e9 cmp %ebp,%ecx
120830: 77 46 ja 120878 <killinfo+0x1d4>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
120832: 8b 9a e8 00 00 00 mov 0xe8(%edx),%ebx
120838: 8b 9b d0 00 00 00 mov 0xd0(%ebx),%ebx
12083e: f7 d3 not %ebx
120840: 85 5c 24 1c test %ebx,0x1c(%esp)
120844: 74 32 je 120878 <killinfo+0x1d4>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
120846: 39 e9 cmp %ebp,%ecx
120848: 72 26 jb 120870 <killinfo+0x1cc>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
12084a: 8b 5c 24 24 mov 0x24(%esp),%ebx
12084e: 85 db test %ebx,%ebx
120850: 74 26 je 120878 <killinfo+0x1d4> <== NEVER TAKEN
120852: 8b 5c 24 24 mov 0x24(%esp),%ebx
120856: 8b 5b 10 mov 0x10(%ebx),%ebx
120859: 89 5c 24 18 mov %ebx,0x18(%esp)
12085d: 85 db test %ebx,%ebx
12085f: 74 17 je 120878 <killinfo+0x1d4> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
120861: 8b 5a 10 mov 0x10(%edx),%ebx
120864: 89 5c 24 2c mov %ebx,0x2c(%esp)
120868: 85 db test %ebx,%ebx
12086a: 0f 85 90 00 00 00 jne 120900 <killinfo+0x25c>
120870: 89 cd mov %ecx,%ebp
120872: 89 54 24 24 mov %edx,0x24(%esp)
120876: 66 90 xchg %ax,%ax
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
120878: 40 inc %eax
120879: 39 c7 cmp %eax,%edi
12087b: 73 a7 jae 120824 <killinfo+0x180>
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
12087d: ff 44 24 20 incl 0x20(%esp)
120881: 83 7c 24 20 04 cmpl $0x4,0x20(%esp)
120886: 0f 85 72 ff ff ff jne 1207fe <killinfo+0x15a>
12088c: 8b 5c 24 1c mov 0x1c(%esp),%ebx
120890: 8b 6c 24 28 mov 0x28(%esp),%ebp
}
}
}
}
if ( interested ) {
120894: 8b 44 24 24 mov 0x24(%esp),%eax
120898: 85 c0 test %eax,%eax
12089a: 0f 84 f4 fe ff ff je 120794 <killinfo+0xf0>
1208a0: 8b 44 24 24 mov 0x24(%esp),%eax
1208a4: e9 d3 fe ff ff jmp 12077c <killinfo+0xd8>
1208a9: 8d 76 00 lea 0x0(%esi),%esi
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
1208ac: c7 04 24 c0 26 13 00 movl $0x1326c0,(%esp)
1208b3: e8 40 bb fe ff call 10c3f8 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
1208b8: 85 c0 test %eax,%eax
1208ba: 0f 84 8a 00 00 00 je 12094a <killinfo+0x2a6>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
1208c0: 8d 78 08 lea 0x8(%eax),%edi
1208c3: 8d 74 24 34 lea 0x34(%esp),%esi
1208c7: b9 03 00 00 00 mov $0x3,%ecx
1208cc: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
1208ce: 89 44 24 04 mov %eax,0x4(%esp)
1208d2: 81 c3 60 27 13 00 add $0x132760,%ebx
1208d8: 89 1c 24 mov %ebx,(%esp)
1208db: e8 f4 ba fe ff call 10c3d4 <_Chain_Append>
1208e0: e9 cb fe ff ff jmp 1207b0 <killinfo+0x10c>
1208e5: 8d 76 00 lea 0x0(%esi),%esi
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
1208e8: 31 c0 xor %eax,%eax
1208ea: e9 e2 fe ff ff jmp 1207d1 <killinfo+0x12d>
1208ef: 90 nop
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
1208f0: c7 44 24 3c 00 00 00 movl $0x0,0x3c(%esp)
1208f7: 00
1208f8: e9 27 fe ff ff jmp 120724 <killinfo+0x80>
1208fd: 8d 76 00 lea 0x0(%esi),%esi
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
120900: f7 44 24 18 00 00 00 testl $0x10000000,0x18(%esp)
120907: 10
120908: 0f 85 6a ff ff ff jne 120878 <killinfo+0x1d4>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
12090e: 81 e3 00 00 00 10 and $0x10000000,%ebx
120914: 0f 84 5e ff ff ff je 120878 <killinfo+0x1d4>
12091a: e9 51 ff ff ff jmp 120870 <killinfo+0x1cc>
12091f: 90 nop
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
120920: e8 db 32 ff ff call 113c00 <__errno>
120925: c7 00 03 00 00 00 movl $0x3,(%eax)
12092b: b8 ff ff ff ff mov $0xffffffff,%eax
120930: e9 9c fe ff ff jmp 1207d1 <killinfo+0x12d>
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
120935: e8 c6 32 ff ff call 113c00 <__errno>
12093a: c7 00 16 00 00 00 movl $0x16,(%eax)
120940: b8 ff ff ff ff mov $0xffffffff,%eax
120945: e9 87 fe ff ff jmp 1207d1 <killinfo+0x12d>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
12094a: e8 d5 d4 fe ff call 10de24 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
12094f: e8 ac 32 ff ff call 113c00 <__errno>
120954: c7 00 0b 00 00 00 movl $0xb,(%eax)
12095a: b8 ff ff ff ff mov $0xffffffff,%eax
12095f: e9 6d fe ff ff jmp 1207d1 <killinfo+0x12d>
001081d0 <libc_wrapup>:
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
1081d0: 83 3d a0 20 13 00 03 cmpl $0x3,0x1320a0
1081d7: 74 03 je 1081dc <libc_wrapup+0xc> <== ALWAYS TAKEN
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
}
1081d9: c3 ret <== NOT EXECUTED
1081da: 66 90 xchg %ax,%ax <== NOT EXECUTED
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
1081dc: 53 push %ebx
1081dd: 83 ec 18 sub $0x18,%esp
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
1081e0: 8b 1d c0 35 12 00 mov 0x1235c0,%ebx
1081e6: 39 1d 00 fd 12 00 cmp %ebx,0x12fd00
1081ec: 74 0e je 1081fc <libc_wrapup+0x2c>
_wrapup_reent(_global_impure_ptr);
1081ee: 89 1c 24 mov %ebx,(%esp)
1081f1: e8 5e c4 00 00 call 114654 <_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;
1081f6: 89 1d 00 fd 12 00 mov %ebx,0x12fd00
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
1081fc: 8b 43 04 mov 0x4(%ebx),%eax
1081ff: 89 04 24 mov %eax,(%esp)
108202: e8 15 bb 00 00 call 113d1c <fclose>
fclose (stdout);
108207: a1 00 fd 12 00 mov 0x12fd00,%eax
10820c: 8b 40 08 mov 0x8(%eax),%eax
10820f: 89 04 24 mov %eax,(%esp)
108212: e8 05 bb 00 00 call 113d1c <fclose>
fclose (stderr);
108217: a1 00 fd 12 00 mov 0x12fd00,%eax
10821c: 8b 40 0c mov 0xc(%eax),%eax
10821f: 89 04 24 mov %eax,(%esp)
108222: e8 f5 ba 00 00 call 113d1c <fclose>
}
108227: 83 c4 18 add $0x18,%esp
10822a: 5b pop %ebx
10822b: c3 ret
00107c50 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
107c50: 56 push %esi
107c51: 53 push %ebx
107c52: 83 ec 14 sub $0x14,%esp
107c55: 8b 74 24 20 mov 0x20(%esp),%esi
void *return_this;
MSBUMP(malloc_calls, 1);
107c59: ff 05 44 1e 13 00 incl 0x131e44
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
107c5f: e8 00 ff ff ff call 107b64 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
107c64: 85 f6 test %esi,%esi
107c66: 74 65 je 107ccd <malloc+0x7d>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
107c68: 83 3d a0 20 13 00 03 cmpl $0x3,0x1320a0
107c6f: 74 53 je 107cc4 <malloc+0x74>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
107c71: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
107c78: 00
107c79: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
107c80: 00
107c81: 89 74 24 04 mov %esi,0x4(%esp)
107c85: a1 0c db 12 00 mov 0x12db0c,%eax
107c8a: 89 04 24 mov %eax,(%esp)
107c8d: e8 8a 57 00 00 call 10d41c <_Protected_heap_Allocate_aligned_with_boundary>
107c92: 89 c3 mov %eax,%ebx
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
107c94: 85 c0 test %eax,%eax
107c96: 74 40 je 107cd8 <malloc+0x88>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
107c98: a1 78 02 13 00 mov 0x130278,%eax
107c9d: 85 c0 test %eax,%eax
107c9f: 74 09 je 107caa <malloc+0x5a>
(*rtems_malloc_dirty_helper)( return_this, size );
107ca1: 89 74 24 04 mov %esi,0x4(%esp)
107ca5: 89 1c 24 mov %ebx,(%esp)
107ca8: ff d0 call *%eax
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
107caa: a1 80 02 13 00 mov 0x130280,%eax
107caf: 85 c0 test %eax,%eax
107cb1: 74 06 je 107cb9 <malloc+0x69>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
107cb3: 89 1c 24 mov %ebx,(%esp)
107cb6: ff 50 04 call *0x4(%eax)
return return_this;
}
107cb9: 89 d8 mov %ebx,%eax
107cbb: 83 c4 14 add $0x14,%esp
107cbe: 5b pop %ebx
107cbf: 5e pop %esi
107cc0: c3 ret
107cc1: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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() )
107cc4: e8 63 fe ff ff call 107b2c <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()) &&
107cc9: 84 c0 test %al,%al
107ccb: 75 a4 jne 107c71 <malloc+0x21> <== ALWAYS TAKEN
/*
* Validate the parameters
*/
if ( !size )
return (void *) 0;
107ccd: 31 db xor %ebx,%ebx
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
107ccf: 89 d8 mov %ebx,%eax
107cd1: 83 c4 14 add $0x14,%esp
107cd4: 5b pop %ebx
107cd5: 5e pop %esi
107cd6: c3 ret
107cd7: 90 nop
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
107cd8: a1 7c 02 13 00 mov 0x13027c,%eax
107cdd: 85 c0 test %eax,%eax
107cdf: 74 0f je 107cf0 <malloc+0xa0>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
107ce1: 89 34 24 mov %esi,(%esp)
107ce4: ff 50 04 call *0x4(%eax)
if ( !return_this ) {
107ce7: 85 c0 test %eax,%eax
107ce9: 74 05 je 107cf0 <malloc+0xa0>
107ceb: 89 c3 mov %eax,%ebx
107ced: eb a9 jmp 107c98 <malloc+0x48>
107cef: 90 nop
errno = ENOMEM;
107cf0: e8 0b bf 00 00 call 113c00 <__errno>
107cf5: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
107cfb: eb bc jmp 107cb9 <malloc+0x69>
00107cd8 <malloc_sbrk_extend_and_allocate>:
}
static void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
107cd8: 56 push %esi
107cd9: 53 push %ebx
107cda: 83 ec 14 sub $0x14,%esp
107cdd: 8b 74 24 20 mov 0x20(%esp),%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;
107ce1: 8b 0d ac 22 13 00 mov 0x1322ac,%ecx
if ( sbrk_amount == 0 )
107ce7: 85 c9 test %ecx,%ecx
107ce9: 74 76 je 107d61 <malloc_sbrk_extend_and_allocate+0x89><== NEVER TAKEN
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
107ceb: 8d 04 0e lea (%esi,%ecx,1),%eax
107cee: 31 d2 xor %edx,%edx
107cf0: f7 f1 div %ecx
107cf2: 89 c3 mov %eax,%ebx
107cf4: 0f af d9 imul %ecx,%ebx
starting_address = (void *) sbrk(the_size);
107cf7: 89 1c 24 mov %ebx,(%esp)
107cfa: e8 3d 87 ff ff call 10043c <sbrk>
if ( starting_address == (void*) -1 )
107cff: 83 f8 ff cmp $0xffffffff,%eax
107d02: 74 5d je 107d61 <malloc_sbrk_extend_and_allocate+0x89>
return (void *) 0;
if ( !_Protected_heap_Extend(
107d04: 89 5c 24 08 mov %ebx,0x8(%esp)
107d08: 89 44 24 04 mov %eax,0x4(%esp)
107d0c: a1 ec dd 12 00 mov 0x12ddec,%eax
107d11: 89 04 24 mov %eax,(%esp)
107d14: e8 37 57 00 00 call 10d450 <_Protected_heap_Extend>
107d19: 84 c0 test %al,%al
107d1b: 74 2f je 107d4c <malloc_sbrk_extend_and_allocate+0x74>
sbrk(-the_size);
errno = ENOMEM;
return (void *) 0;
}
MSBUMP(space_available, the_size);
107d1d: 01 1d 80 22 13 00 add %ebx,0x132280
107d23: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
107d2a: 00
107d2b: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
107d32: 00
107d33: 89 74 24 04 mov %esi,0x4(%esp)
107d37: a1 ec dd 12 00 mov 0x12ddec,%eax
107d3c: 89 04 24 mov %eax,(%esp)
107d3f: e8 bc 56 00 00 call 10d400 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
107d44: 83 c4 14 add $0x14,%esp
107d47: 5b pop %ebx
107d48: 5e pop %esi
107d49: c3 ret
107d4a: 66 90 xchg %ax,%ax
if ( starting_address == (void*) -1 )
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
107d4c: f7 db neg %ebx
107d4e: 89 1c 24 mov %ebx,(%esp)
107d51: e8 e6 86 ff ff call 10043c <sbrk>
errno = ENOMEM;
107d56: e8 a1 c1 00 00 call 113efc <__errno>
107d5b: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
107d61: 31 c0 xor %eax,%eax
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
107d63: 83 c4 14 add $0x14,%esp
107d66: 5b pop %ebx
107d67: 5e pop %esi
107d68: c3 ret
00107d6c <malloc_sbrk_initialize>:
static void *malloc_sbrk_initialize(
void *starting_address,
size_t length
)
{
107d6c: 83 ec 1c sub $0x1c,%esp
107d6f: 8b 44 24 20 mov 0x20(%esp),%eax
107d73: 8b 54 24 24 mov 0x24(%esp),%edx
uintptr_t old_address;
uintptr_t uaddress;
RTEMS_Malloc_Sbrk_amount = length;
107d77: 89 15 ac 22 13 00 mov %edx,0x1322ac
* 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) {
107d7d: 85 c0 test %eax,%eax
107d7f: 74 07 je 107d88 <malloc_sbrk_initialize+0x1c>
}
starting_address = (void *)uaddress;
}
return starting_address;
}
107d81: 83 c4 1c add $0x1c,%esp
107d84: c3 ret
107d85: 8d 76 00 lea 0x0(%esi),%esi
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
uaddress = (uintptr_t)sbrk(length);
107d88: 89 14 24 mov %edx,(%esp)
107d8b: e8 ac 86 ff ff call 10043c <sbrk>
if (uaddress == (uintptr_t) -1) {
107d90: 83 f8 ff cmp $0xffffffff,%eax
107d93: 74 0c je 107da1 <malloc_sbrk_initialize+0x35><== ALWAYS TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
/* DOES NOT RETURN!!! */
}
if (uaddress & (CPU_HEAP_ALIGNMENT-1)) {
107d95: a8 03 test $0x3,%al <== NOT EXECUTED
107d97: 74 e8 je 107d81 <malloc_sbrk_initialize+0x15><== NOT EXECUTED
old_address = uaddress;
uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
107d99: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
107d9c: 83 e0 fc and $0xfffffffc,%eax <== NOT EXECUTED
107d9f: eb e0 jmp 107d81 <malloc_sbrk_initialize+0x15><== NOT EXECUTED
if (!starting_address) {
uaddress = (uintptr_t)sbrk(length);
if (uaddress == (uintptr_t) -1) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
107da1: c7 04 24 1a 00 00 00 movl $0x1a,(%esp)
107da8: e8 6b 43 00 00 call 10c118 <rtems_fatal_error_occurred>
00107e60 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
107e60: 55 push %ebp
107e61: 57 push %edi
107e62: 56 push %esi
107e63: 53 push %ebx
107e64: 83 ec 7c sub $0x7c,%esp
107e67: 8b b4 24 98 00 00 00 mov 0x98(%esp),%esi
int rv = 0;
if (
107e6e: 83 bc 24 9c 00 00 00 cmpl $0x1,0x9c(%esp)
107e75: 01
107e76: 0f 87 6c 02 00 00 ja 1080e8 <mount+0x288>
options == RTEMS_FILESYSTEM_READ_ONLY
|| options == RTEMS_FILESYSTEM_READ_WRITE
) {
rtems_filesystem_fsmount_me_t fsmount_me_h =
107e7c: 89 34 24 mov %esi,(%esp)
107e7f: e8 98 81 00 00 call 11001c <rtems_filesystem_get_mount_handler>
107e84: 89 c5 mov %eax,%ebp
rtems_filesystem_get_mount_handler( filesystemtype );
if ( fsmount_me_h != NULL ) {
107e86: 85 c0 test %eax,%eax
107e88: 0f 84 5a 02 00 00 je 1080e8 <mount+0x288>
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
107e8e: 8b 9c 24 94 00 00 00 mov 0x94(%esp),%ebx
107e95: 85 db test %ebx,%ebx
107e97: 0f 84 33 02 00 00 je 1080d0 <mount+0x270>
}
return rv;
}
int mount(
107e9d: 31 c0 xor %eax,%eax
107e9f: b9 ff ff ff ff mov $0xffffffff,%ecx
107ea4: 8b bc 24 94 00 00 00 mov 0x94(%esp),%edi
107eab: f2 ae repnz scas %es:(%edi),%al
107ead: f7 d1 not %ecx
107eaf: 89 4c 24 14 mov %ecx,0x14(%esp)
107eb3: 8b bc 24 94 00 00 00 mov 0x94(%esp),%edi
107eba: 89 7c 24 1c mov %edi,0x1c(%esp)
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
107ebe: bb ff ff ff ff mov $0xffffffff,%ebx
107ec3: 31 c0 xor %eax,%eax
107ec5: 89 d9 mov %ebx,%ecx
107ec7: 89 f7 mov %esi,%edi
107ec9: f2 ae repnz scas %es:(%edi),%al
107ecb: f7 d1 not %ecx
107ecd: 89 4c 24 10 mov %ecx,0x10(%esp)
107ed1: 89 ca mov %ecx,%edx
107ed3: 4a dec %edx
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
107ed4: 8b 8c 24 90 00 00 00 mov 0x90(%esp),%ecx
107edb: 85 c9 test %ecx,%ecx
107edd: 0f 84 dd 01 00 00 je 1080c0 <mount+0x260>
107ee3: 89 d9 mov %ebx,%ecx
107ee5: 8b bc 24 90 00 00 00 mov 0x90(%esp),%edi
107eec: f2 ae repnz scas %es:(%edi),%al
107eee: f7 d1 not %ecx
107ef0: 89 4c 24 18 mov %ecx,0x18(%esp)
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size
107ef4: 8b 4c 24 14 mov 0x14(%esp),%ecx
107ef8: 8d 44 11 65 lea 0x65(%ecx,%edx,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 )
107efc: 03 44 24 18 add 0x18(%esp),%eax
+ filesystemtype_size + source_size + target_size
+ sizeof( rtems_filesystem_global_location_t );
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
107f00: 89 44 24 04 mov %eax,0x4(%esp)
107f04: c7 04 24 01 00 00 00 movl $0x1,(%esp)
107f0b: e8 d8 f7 ff ff call 1076e8 <calloc>
107f10: 89 c3 mov %eax,%ebx
if ( mt_entry != NULL ) {
107f12: 85 c0 test %eax,%eax
107f14: 0f 84 8a 01 00 00 je 1080a4 <mount+0x244> <== NEVER TAKEN
rtems_filesystem_global_location_t *mt_fs_root =
107f1a: 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 );
107f1d: 8d 40 64 lea 0x64(%eax),%eax
memcpy( str, filesystemtype, filesystemtype_size );
107f20: 89 c7 mov %eax,%edi
107f22: 8b 4c 24 10 mov 0x10(%esp),%ecx
107f26: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
107f28: 89 7c 24 10 mov %edi,0x10(%esp)
mt_entry->type = str;
107f2c: 89 43 34 mov %eax,0x34(%ebx)
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
107f2f: 8b b4 24 90 00 00 00 mov 0x90(%esp),%esi
107f36: 8b 4c 24 18 mov 0x18(%esp),%ecx
107f3a: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
107f3c: 89 f8 mov %edi,%eax
mt_entry->dev = str;
107f3e: 8b 7c 24 10 mov 0x10(%esp),%edi
107f42: 89 7b 38 mov %edi,0x38(%ebx)
str += source_size;
memcpy( str, target, target_size );
107f45: 89 c7 mov %eax,%edi
107f47: 8b 74 24 1c mov 0x1c(%esp),%esi
107f4b: 8b 4c 24 14 mov 0x14(%esp),%ecx
107f4f: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
mt_entry->target = str;
107f51: 89 43 30 mov %eax,0x30(%ebx)
str += target_size;
mt_entry->mounted = true;
107f54: c6 43 28 01 movb $0x1,0x28(%ebx)
mt_entry->mt_fs_root = mt_fs_root;
107f58: 89 53 24 mov %edx,0x24(%ebx)
mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf;
107f5b: c7 43 2c 80 28 12 00 movl $0x122880,0x2c(%ebx)
mt_fs_root->location.mt_entry = mt_entry;
107f62: 89 5b 54 mov %ebx,0x54(%ebx)
mt_fs_root->reference_count = 1;
107f65: 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 );
107f6c: c7 44 24 0c 24 00 00 movl $0x24,0xc(%esp)
107f73: 00
107f74: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
107f7b: 00
107f7c: 89 54 24 04 mov %edx,0x4(%esp)
rtems_chain_initialize(
107f80: 8d 43 14 lea 0x14(%ebx),%eax
107f83: 89 04 24 mov %eax,(%esp)
107f86: e8 8d 44 00 00 call 10c418 <_Chain_Initialize>
filesystemtype,
&target_length
);
if ( mt_entry != NULL ) {
mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE;
107f8b: 8a 84 24 9c 00 00 00 mov 0x9c(%esp),%al
107f92: 88 43 29 mov %al,0x29(%ebx)
107f95: 80 63 29 01 andb $0x1,0x29(%ebx)
rv = (*fsmount_me_h)( mt_entry, data );
107f99: 8b 84 24 a0 00 00 00 mov 0xa0(%esp),%eax
107fa0: 89 44 24 04 mov %eax,0x4(%esp)
107fa4: 89 1c 24 mov %ebx,(%esp)
107fa7: ff d5 call *%ebp
107fa9: 89 c6 mov %eax,%esi
if ( rv == 0 ) {
107fab: 85 c0 test %eax,%eax
107fad: 0f 85 99 00 00 00 jne 10804c <mount+0x1ec>
if ( target != NULL ) {
107fb3: 8b 84 24 94 00 00 00 mov 0x94(%esp),%eax
107fba: 85 c0 test %eax,%eax
107fbc: 0f 84 42 01 00 00 je 108104 <mount+0x2a4>
{
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 =
107fc2: c7 44 24 08 1f 00 00 movl $0x1f,0x8(%esp)
107fc9: 00
107fca: 8b bc 24 94 00 00 00 mov 0x94(%esp),%edi
107fd1: 89 7c 24 04 mov %edi,0x4(%esp)
rtems_filesystem_eval_path_start( &ctx, target, eval_flags );
107fd5: 8d 6c 24 38 lea 0x38(%esp),%ebp
107fd9: 89 2c 24 mov %ebp,(%esp)
{
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 =
107fdc: e8 0b 0d 00 00 call 108cec <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;
107fe1: 8b 50 14 mov 0x14(%eax),%edx
return (*mt_entry->ops->are_nodes_equal_h)(
107fe4: 8b 4a 0c mov 0xc(%edx),%ecx
107fe7: 8b 52 24 mov 0x24(%edx),%edx
107fea: 89 54 24 04 mov %edx,0x4(%esp)
107fee: 89 04 24 mov %eax,(%esp)
107ff1: ff 51 10 call *0x10(%ecx)
rtems_filesystem_eval_path_start( &ctx, target, eval_flags );
if ( !rtems_filesystem_location_is_root( currentloc ) ) {
107ff4: 84 c0 test %al,%al
107ff6: 0f 85 95 01 00 00 jne 108191 <mount+0x331>
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(
107ffc: 8d 44 24 50 lea 0x50(%esp),%eax
108000: 89 44 24 04 mov %eax,0x4(%esp)
rtems_filesystem_location_info_t targetloc;
rtems_filesystem_global_location_t *mt_point_node;
rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc );
108004: 8d 74 24 20 lea 0x20(%esp),%esi
108008: 89 34 24 mov %esi,(%esp)
10800b: e8 78 10 00 00 call 109088 <rtems_filesystem_location_copy_and_detach>
mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc );
108010: 89 34 24 mov %esi,(%esp)
108013: e8 0c 12 00 00 call 109224 <rtems_filesystem_location_transform_to_global>
108018: 89 c7 mov %eax,%edi
mt_entry->mt_point_node = mt_point_node;
10801a: 89 43 20 mov %eax,0x20(%ebx)
rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry );
10801d: 8b 40 14 mov 0x14(%eax),%eax
108020: 8b 40 0c mov 0xc(%eax),%eax
108023: 89 1c 24 mov %ebx,(%esp)
108026: ff 50 30 call *0x30(%eax)
108029: 89 c6 mov %eax,%esi
if ( rv == 0 ) {
10802b: 85 c0 test %eax,%eax
10802d: 74 31 je 108060 <mount+0x200>
&rtems_filesystem_mount_table,
&mt_entry->mt_node
);
rtems_filesystem_mt_unlock();
} else {
rtems_filesystem_global_location_release( mt_point_node );
10802f: 89 3c 24 mov %edi,(%esp)
108032: e8 0d 11 00 00 call 109144 <rtems_filesystem_global_location_release>
} else {
rtems_filesystem_eval_path_error( &ctx, EBUSY );
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
108037: 89 2c 24 mov %ebp,(%esp)
10803a: e8 99 0d 00 00 call 108dd8 <rtems_filesystem_eval_path_cleanup>
rv = register_subordinate_file_system( mt_entry, target );
} else {
rv = register_root_file_system( mt_entry );
}
if ( rv != 0 ) {
10803f: 85 f6 test %esi,%esi
108041: 74 11 je 108054 <mount+0x1f4>
(*mt_entry->ops->fsunmount_me_h)( mt_entry );
108043: 8b 43 0c mov 0xc(%ebx),%eax
108046: 89 1c 24 mov %ebx,(%esp)
108049: ff 50 3c call *0x3c(%eax)
}
}
if ( rv != 0 ) {
free( mt_entry );
10804c: 89 1c 24 mov %ebx,(%esp)
10804f: e8 e8 f8 ff ff call 10793c <free>
errno = EINVAL;
rv = -1;
}
return rv;
}
108054: 89 f0 mov %esi,%eax
108056: 83 c4 7c add $0x7c,%esp
108059: 5b pop %ebx
10805a: 5e pop %esi
10805b: 5f pop %edi
10805c: 5d pop %ebp
10805d: c3 ret
10805e: 66 90 xchg %ax,%ax
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
108060: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
108067: 00
108068: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10806f: 00
108070: a1 1c 1e 13 00 mov 0x131e1c,%eax
108075: 89 04 24 mov %eax,(%esp)
108078: e8 ff 38 00 00 call 10b97c <rtems_semaphore_obtain>
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10807d: a1 cc fa 12 00 mov 0x12facc,%eax
the_node->next = tail;
108082: c7 03 c8 fa 12 00 movl $0x12fac8,(%ebx)
tail->previous = the_node;
108088: 89 1d cc fa 12 00 mov %ebx,0x12facc
old_last->next = the_node;
10808e: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
108090: 89 43 04 mov %eax,0x4(%ebx)
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
108093: a1 1c 1e 13 00 mov 0x131e1c,%eax
108098: 89 04 24 mov %eax,(%esp)
10809b: e8 08 3a 00 00 call 10baa8 <rtems_semaphore_release>
1080a0: eb 95 jmp 108037 <mount+0x1d7>
1080a2: 66 90 xchg %ax,%ax
if ( rv != 0 ) {
free( mt_entry );
}
} else {
errno = ENOMEM;
1080a4: e8 57 bb 00 00 call 113c00 <__errno> <== NOT EXECUTED
1080a9: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
rv = -1;
1080af: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
errno = EINVAL;
rv = -1;
}
return rv;
}
1080b4: 89 f0 mov %esi,%eax <== NOT EXECUTED
1080b6: 83 c4 7c add $0x7c,%esp <== NOT EXECUTED
1080b9: 5b pop %ebx <== NOT EXECUTED
1080ba: 5e pop %esi <== NOT EXECUTED
1080bb: 5f pop %edi <== NOT EXECUTED
1080bc: 5d pop %ebp <== NOT EXECUTED
1080bd: c3 ret <== NOT EXECUTED
1080be: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
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;
1080c0: c7 44 24 18 00 00 00 movl $0x0,0x18(%esp)
1080c7: 00
1080c8: e9 27 fe ff ff jmp 107ef4 <mount+0x94>
1080cd: 8d 76 00 lea 0x0(%esi),%esi
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
1080d0: c7 44 24 14 02 00 00 movl $0x2,0x14(%esp)
1080d7: 00
1080d8: c7 44 24 1c 60 28 12 movl $0x122860,0x1c(%esp)
1080df: 00
1080e0: e9 d9 fd ff ff jmp 107ebe <mount+0x5e>
1080e5: 8d 76 00 lea 0x0(%esi),%esi
} else {
errno = EINVAL;
rv = -1;
}
} else {
errno = EINVAL;
1080e8: e8 13 bb 00 00 call 113c00 <__errno>
1080ed: c7 00 16 00 00 00 movl $0x16,(%eax)
rv = -1;
1080f3: be ff ff ff ff mov $0xffffffff,%esi
}
return rv;
}
1080f8: 89 f0 mov %esi,%eax
1080fa: 83 c4 7c add $0x7c,%esp
1080fd: 5b pop %ebx
1080fe: 5e pop %esi
1080ff: 5f pop %edi
108100: 5d pop %ebp
108101: c3 ret
108102: 66 90 xchg %ax,%ax
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
108104: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10810b: 00
10810c: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
108113: 00
108114: a1 1c 1e 13 00 mov 0x131e1c,%eax
108119: 89 04 24 mov %eax,(%esp)
10811c: e8 5b 38 00 00 call 10b97c <rtems_semaphore_obtain>
)
{
int rv = 0;
rtems_filesystem_mt_lock();
if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) {
108121: 81 3d c4 fa 12 00 c8 cmpl $0x12fac8,0x12fac4
108128: fa 12 00
10812b: 75 7e jne 1081ab <mount+0x34b> <== NEVER TAKEN
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10812d: a1 cc fa 12 00 mov 0x12facc,%eax
the_node->next = tail;
108132: c7 03 c8 fa 12 00 movl $0x12fac8,(%ebx)
tail->previous = the_node;
108138: 89 1d cc fa 12 00 mov %ebx,0x12facc
old_last->next = the_node;
10813e: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
108140: 89 43 04 mov %eax,0x4(%ebx)
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
108143: a1 1c 1e 13 00 mov 0x131e1c,%eax
108148: 89 04 24 mov %eax,(%esp)
10814b: e8 58 39 00 00 call 10baa8 <rtems_semaphore_release>
}
rtems_filesystem_mt_unlock();
if ( rv == 0 ) {
rtems_filesystem_global_location_t *new_fs_root =
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
108150: 83 c3 24 add $0x24,%ebx
rv = -1;
}
rtems_filesystem_mt_unlock();
if ( rv == 0 ) {
rtems_filesystem_global_location_t *new_fs_root =
108153: 89 1c 24 mov %ebx,(%esp)
108156: e8 41 10 00 00 call 10919c <rtems_filesystem_global_location_obtain>
10815b: 89 c7 mov %eax,%edi
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_t *new_fs_current =
10815d: 89 1c 24 mov %ebx,(%esp)
108160: e8 37 10 00 00 call 10919c <rtems_filesystem_global_location_obtain>
108165: 89 c3 mov %eax,%ebx
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_assign(
108167: 89 7c 24 04 mov %edi,0x4(%esp)
10816b: a1 00 fb 12 00 mov 0x12fb00,%eax
108170: 83 c0 04 add $0x4,%eax
108173: 89 04 24 mov %eax,(%esp)
108176: e8 05 10 00 00 call 109180 <rtems_filesystem_global_location_assign>
&rtems_filesystem_root,
new_fs_root
);
rtems_filesystem_global_location_assign(
10817b: 89 5c 24 04 mov %ebx,0x4(%esp)
10817f: a1 00 fb 12 00 mov 0x12fb00,%eax
108184: 89 04 24 mov %eax,(%esp)
108187: e8 f4 0f 00 00 call 109180 <rtems_filesystem_global_location_assign>
10818c: e9 c3 fe ff ff jmp 108054 <mount+0x1f4>
rtems_filesystem_mt_unlock();
} else {
rtems_filesystem_global_location_release( mt_point_node );
}
} else {
rtems_filesystem_eval_path_error( &ctx, EBUSY );
108191: c7 44 24 04 10 00 00 movl $0x10,0x4(%esp)
108198: 00
108199: 89 2c 24 mov %ebp,(%esp)
10819c: e8 93 08 00 00 call 108a34 <rtems_filesystem_eval_path_error>
rv = -1;
1081a1: be ff ff ff ff mov $0xffffffff,%esi
1081a6: e9 8c fe ff ff jmp 108037 <mount+0x1d7>
rtems_chain_append_unprotected(
&rtems_filesystem_mount_table,
&mt_entry->mt_node
);
} else {
errno = EINVAL;
1081ab: e8 50 ba 00 00 call 113c00 <__errno> <== NOT EXECUTED
1081b0: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1081b6: a1 1c 1e 13 00 mov 0x131e1c,%eax <== NOT EXECUTED
1081bb: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1081be: e8 e5 38 00 00 call 10baa8 <rtems_semaphore_release><== NOT EXECUTED
rv = -1;
1081c3: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
1081c8: e9 76 fe ff ff jmp 108043 <mount+0x1e3> <== NOT EXECUTED
0010c8fc <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
10c8fc: 55 push %ebp
10c8fd: 57 push %edi
10c8fe: 56 push %esi
10c8ff: 53 push %ebx
10c900: 83 ec 2c sub $0x2c,%esp
10c903: 8b 44 24 40 mov 0x40(%esp),%eax
10c907: 89 44 24 1c mov %eax,0x1c(%esp)
10c90b: 8b 5c 24 44 mov 0x44(%esp),%ebx
10c90f: 8b 74 24 48 mov 0x48(%esp),%esi
10c913: 8b 7c 24 4c mov 0x4c(%esp),%edi
10c917: 8b 6c 24 50 mov 0x50(%esp),%ebp
int rv = -1;
if (target != NULL) {
10c91b: 85 db test %ebx,%ebx
10c91d: 74 41 je 10c960 <mount_and_make_target_path+0x64>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
10c91f: c7 44 24 04 ff 01 00 movl $0x1ff,0x4(%esp)
10c926: 00
10c927: 89 1c 24 mov %ebx,(%esp)
10c92a: e8 ad 0c 00 00 call 10d5dc <rtems_mkdir>
if (rv == 0) {
10c92f: 85 c0 test %eax,%eax
10c931: 74 09 je 10c93c <mount_and_make_target_path+0x40><== ALWAYS TAKEN
} else {
errno = EINVAL;
}
return rv;
}
10c933: 83 c4 2c add $0x2c,%esp
10c936: 5b pop %ebx
10c937: 5e pop %esi
10c938: 5f pop %edi
10c939: 5d pop %ebp
10c93a: c3 ret
10c93b: 90 nop
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
10c93c: 89 6c 24 50 mov %ebp,0x50(%esp)
10c940: 89 7c 24 4c mov %edi,0x4c(%esp)
10c944: 89 74 24 48 mov %esi,0x48(%esp)
10c948: 89 5c 24 44 mov %ebx,0x44(%esp)
10c94c: 8b 44 24 1c mov 0x1c(%esp),%eax
10c950: 89 44 24 40 mov %eax,0x40(%esp)
} else {
errno = EINVAL;
}
return rv;
}
10c954: 83 c4 2c add $0x2c,%esp
10c957: 5b pop %ebx
10c958: 5e pop %esi
10c959: 5f pop %edi
10c95a: 5d pop %ebp
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
10c95b: e9 14 00 00 00 jmp 10c974 <mount>
options,
data
);
}
} else {
errno = EINVAL;
10c960: e8 9f 95 01 00 call 125f04 <__errno>
10c965: c7 00 16 00 00 00 movl $0x16,(%eax)
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
10c96b: b8 ff ff ff ff mov $0xffffffff,%eax
10c970: eb c1 jmp 10c933 <mount_and_make_target_path+0x37>
00108518 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
108518: 56 push %esi
108519: 53 push %ebx
10851a: 83 ec 14 sub $0x14,%esp
10851d: 8b 5c 24 24 mov 0x24(%esp),%ebx
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
108521: 39 5c 24 20 cmp %ebx,0x20(%esp)
108525: 74 51 je 108578 <newlib_delete_hook+0x60>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
108527: 8b b3 e0 00 00 00 mov 0xe0(%ebx),%esi
}
if (ptr && ptr != _global_impure_ptr) {
10852d: 85 f6 test %esi,%esi
10852f: 74 20 je 108551 <newlib_delete_hook+0x39><== NEVER TAKEN
108531: 3b 35 c0 35 12 00 cmp 0x1235c0,%esi
108537: 74 18 je 108551 <newlib_delete_hook+0x39>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
108539: c7 44 24 04 4c 82 10 movl $0x10824c,0x4(%esp)
108540: 00
108541: 89 34 24 mov %esi,(%esp)
108544: e8 0b be 00 00 call 114354 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
108549: 89 34 24 mov %esi,(%esp)
10854c: e8 8f 67 00 00 call 10ece0 <_Workspace_Free>
#endif
}
deleted_task->libc_reent = NULL;
108551: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
108558: 00 00 00
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
10855b: 39 5c 24 20 cmp %ebx,0x20(%esp)
10855f: 74 07 je 108568 <newlib_delete_hook+0x50>
_REENT = 0;
}
}
108561: 83 c4 14 add $0x14,%esp
108564: 5b pop %ebx
108565: 5e pop %esi
108566: c3 ret
108567: 90 nop
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
108568: c7 05 00 fd 12 00 00 movl $0x0,0x12fd00
10856f: 00 00 00
}
}
108572: 83 c4 14 add $0x14,%esp
108575: 5b pop %ebx
108576: 5e pop %esi
108577: c3 ret
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
108578: 8b 35 00 fd 12 00 mov 0x12fd00,%esi
10857e: eb ad jmp 10852d <newlib_delete_hook+0x15>
0010824c <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
10824c: 53 push %ebx
10824d: 83 ec 18 sub $0x18,%esp
108250: 8b 5c 24 20 mov 0x20(%esp),%ebx
switch ( fileno(fp) ) {
108254: 89 1c 24 mov %ebx,(%esp)
108257: e8 48 bd 00 00 call 113fa4 <fileno>
10825c: 83 f8 02 cmp $0x2,%eax
10825f: 76 0f jbe 108270 <newlib_free_buffers+0x24><== ALWAYS TAKEN
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
108261: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
108264: e8 b3 ba 00 00 call 113d1c <fclose> <== NOT EXECUTED
}
return 0;
}
108269: 31 c0 xor %eax,%eax
10826b: 83 c4 18 add $0x18,%esp
10826e: 5b pop %ebx
10826f: c3 ret
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
108270: f6 43 0c 80 testb $0x80,0xc(%ebx)
108274: 74 f3 je 108269 <newlib_free_buffers+0x1d><== ALWAYS TAKEN
free( fp->_bf._base );
108276: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
108279: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10827c: e8 bb f6 ff ff call 10793c <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
108281: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
108287: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
10828d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
108294: 31 c0 xor %eax,%eax <== NOT EXECUTED
108296: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
108299: 5b pop %ebx <== NOT EXECUTED
10829a: c3 ret <== NOT EXECUTED
0010af64 <null_op_fsmount_me>:
rtems_filesystem_mount_table_entry_t *mt_entry,
const void *data
)
{
return -1;
}
10af64: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10af69: c3 ret <== NOT EXECUTED
0010af74 <null_op_fsunmount_me>:
static void null_op_fsunmount_me(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
10af74: c3 ret <== NOT EXECUTED
0010af3c <null_op_link>:
const char *name,
size_t namelen
)
{
return -1;
}
10af3c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10af41: c3 ret <== NOT EXECUTED
0010af5c <null_op_mount>:
static int null_op_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
return -1;
}
10af5c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10af61: c3 ret <== NOT EXECUTED
0010af88 <null_op_readlink>:
char *buf,
size_t bufsize
)
{
return -1;
}
10af88: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10af8d: c3 ret <== NOT EXECUTED
0010af90 <null_op_rename>:
const char *name,
size_t namelen
)
{
return -1;
}
10af90: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10af95: c3 ret <== NOT EXECUTED
0010a190 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
10a190: 56 push %esi
10a191: 53 push %ebx
10a192: 83 ec 24 sub $0x24,%esp
10a195: 88 44 24 1c mov %al,0x1c(%esp)
int i;
if (tty->termios.c_oflag & OPOST) {
10a199: 8b 4a 34 mov 0x34(%edx),%ecx
10a19c: f6 c1 01 test $0x1,%cl
10a19f: 74 4b je 10a1ec <oproc+0x5c> <== NEVER TAKEN
switch (c) {
10a1a1: 3c 09 cmp $0x9,%al
10a1a3: 0f 84 b3 00 00 00 je 10a25c <oproc+0xcc>
10a1a9: 76 61 jbe 10a20c <oproc+0x7c> <== NEVER TAKEN
10a1ab: 3c 0a cmp $0xa,%al
10a1ad: 74 71 je 10a220 <oproc+0x90>
10a1af: 3c 0d cmp $0xd,%al
10a1b1: 0f 84 cd 00 00 00 je 10a284 <oproc+0xf4> <== NEVER TAKEN
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
10a1b7: 83 e1 02 and $0x2,%ecx
c = toupper(c);
10a1ba: 8b 0d e8 fc 12 00 mov 0x12fce8,%ecx
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
10a1c0: 74 1b je 10a1dd <oproc+0x4d> <== ALWAYS TAKEN
c = toupper(c);
10a1c2: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
10a1c5: 8a 5c 01 01 mov 0x1(%ecx,%eax,1),%bl <== NOT EXECUTED
10a1c9: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED
10a1cc: 80 fb 02 cmp $0x2,%bl <== NOT EXECUTED
10a1cf: 0f 84 df 00 00 00 je 10a2b4 <oproc+0x124> <== NOT EXECUTED
10a1d5: 89 c3 mov %eax,%ebx <== NOT EXECUTED
10a1d7: 88 d8 mov %bl,%al <== NOT EXECUTED
10a1d9: 88 5c 24 1c mov %bl,0x1c(%esp) <== NOT EXECUTED
if (!iscntrl(c))
10a1dd: 0f b6 c0 movzbl %al,%eax
10a1e0: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1)
10a1e5: 75 05 jne 10a1ec <oproc+0x5c> <== NEVER TAKEN
tty->column++;
10a1e7: ff 42 28 incl 0x28(%edx)
10a1ea: 66 90 xchg %ax,%ax
break;
}
}
rtems_termios_puts (&c, 1, tty);
10a1ec: 89 54 24 08 mov %edx,0x8(%esp)
10a1f0: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10a1f7: 00
10a1f8: 8d 44 24 1c lea 0x1c(%esp),%eax
10a1fc: 89 04 24 mov %eax,(%esp)
10a1ff: e8 48 fe ff ff call 10a04c <rtems_termios_puts>
}
10a204: 83 c4 24 add $0x24,%esp
10a207: 5b pop %ebx
10a208: 5e pop %esi
10a209: c3 ret
10a20a: 66 90 xchg %ax,%ax
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
10a20c: 3c 08 cmp $0x8,%al <== NOT EXECUTED
10a20e: 75 a7 jne 10a1b7 <oproc+0x27> <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
10a210: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED
10a213: 85 c0 test %eax,%eax <== NOT EXECUTED
10a215: 7e d5 jle 10a1ec <oproc+0x5c> <== NOT EXECUTED
tty->column--;
10a217: 48 dec %eax <== NOT EXECUTED
10a218: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED
10a21b: eb cf jmp 10a1ec <oproc+0x5c> <== NOT EXECUTED
10a21d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
10a220: f6 c1 20 test $0x20,%cl
10a223: 74 07 je 10a22c <oproc+0x9c> <== ALWAYS TAKEN
tty->column = 0;
10a225: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
10a22c: 83 e1 04 and $0x4,%ecx
10a22f: 74 bb je 10a1ec <oproc+0x5c> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
10a231: 89 54 24 08 mov %edx,0x8(%esp)
10a235: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10a23c: 00
10a23d: c7 04 24 3c 2a 12 00 movl $0x122a3c,(%esp)
10a244: 89 54 24 18 mov %edx,0x18(%esp)
10a248: e8 ff fd ff ff call 10a04c <rtems_termios_puts>
tty->column = 0;
10a24d: 8b 54 24 18 mov 0x18(%esp),%edx
10a251: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx)
10a258: eb 92 jmp 10a1ec <oproc+0x5c>
10a25a: 66 90 xchg %ax,%ax
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
10a25c: 8b 5a 28 mov 0x28(%edx),%ebx
10a25f: 89 de mov %ebx,%esi
10a261: 83 e6 07 and $0x7,%esi
10a264: b8 08 00 00 00 mov $0x8,%eax
10a269: 29 f0 sub %esi,%eax
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
10a26b: 81 e1 00 18 00 00 and $0x1800,%ecx
10a271: 81 f9 00 18 00 00 cmp $0x1800,%ecx
10a277: 74 43 je 10a2bc <oproc+0x12c> <== ALWAYS TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
10a279: 01 d8 add %ebx,%eax <== NOT EXECUTED
10a27b: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED
break;
10a27e: e9 69 ff ff ff jmp 10a1ec <oproc+0x5c> <== NOT EXECUTED
10a283: 90 nop <== NOT EXECUTED
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
10a284: f6 c1 10 test $0x10,%cl <== NOT EXECUTED
10a287: 74 0b je 10a294 <oproc+0x104> <== NOT EXECUTED
10a289: 8b 5a 28 mov 0x28(%edx),%ebx <== NOT EXECUTED
10a28c: 85 db test %ebx,%ebx <== NOT EXECUTED
10a28e: 0f 84 70 ff ff ff je 10a204 <oproc+0x74> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
10a294: f6 c1 08 test $0x8,%cl <== NOT EXECUTED
10a297: 74 0e je 10a2a7 <oproc+0x117> <== NOT EXECUTED
c = '\n';
10a299: c6 44 24 1c 0a movb $0xa,0x1c(%esp) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
10a29e: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED
10a2a1: 0f 84 45 ff ff ff je 10a1ec <oproc+0x5c> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
10a2a7: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED
break;
10a2ae: e9 39 ff ff ff jmp 10a1ec <oproc+0x5c> <== NOT EXECUTED
10a2b3: 90 nop <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
10a2b4: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED
10a2b7: e9 1b ff ff ff jmp 10a1d7 <oproc+0x47> <== NOT EXECUTED
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
10a2bc: 01 c3 add %eax,%ebx
10a2be: 89 5a 28 mov %ebx,0x28(%edx)
rtems_termios_puts ( " ", i, tty);
10a2c1: 89 54 24 08 mov %edx,0x8(%esp)
10a2c5: 89 44 24 04 mov %eax,0x4(%esp)
10a2c9: c7 04 24 50 1e 12 00 movl $0x121e50,(%esp)
10a2d0: e8 77 fd ff ff call 10a04c <rtems_termios_puts>
return;
10a2d5: e9 2a ff ff ff jmp 10a204 <oproc+0x74>
0010614c <pathconf>:
long pathconf(
const char *path,
int name
)
{
10614c: 56 push %esi
10614d: 53 push %ebx
10614e: 83 ec 14 sub $0x14,%esp
int status;
int fd;
fd = open( path, O_RDONLY );
106151: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
106158: 00
106159: 8b 44 24 20 mov 0x20(%esp),%eax
10615d: 89 04 24 mov %eax,(%esp)
106160: e8 7b fd ff ff call 105ee0 <open>
106165: 89 c3 mov %eax,%ebx
if ( fd == -1 )
106167: 83 f8 ff cmp $0xffffffff,%eax
10616a: 74 24 je 106190 <pathconf+0x44> <== ALWAYS TAKEN
return -1;
status = fpathconf( fd, name );
10616c: 8b 44 24 24 mov 0x24(%esp),%eax <== NOT EXECUTED
106170: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
106174: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
106177: e8 18 4c 00 00 call 10ad94 <fpathconf> <== NOT EXECUTED
10617c: 89 c6 mov %eax,%esi <== NOT EXECUTED
(void) close( fd );
10617e: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
106181: e8 aa 4b 00 00 call 10ad30 <close> <== NOT EXECUTED
return status;
}
106186: 89 f0 mov %esi,%eax
106188: 83 c4 14 add $0x14,%esp
10618b: 5b pop %ebx
10618c: 5e pop %esi
10618d: c3 ret
10618e: 66 90 xchg %ax,%ax
int status;
int fd;
fd = open( path, O_RDONLY );
if ( fd == -1 )
return -1;
106190: be ff ff ff ff mov $0xffffffff,%esi
106195: eb ef jmp 106186 <pathconf+0x3a>
0010b7c8 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
10b7c8: 53 push %ebx
10b7c9: 8b 44 24 0c mov 0xc(%esp),%eax
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
10b7cd: ff 05 88 7e 13 00 incl 0x137e88
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
10b7d3: 8d 50 ff lea -0x1(%eax),%edx
10b7d6: 85 c2 test %eax,%edx
10b7d8: 74 0a je 10b7e4 <posix_memalign+0x1c> <== ALWAYS TAKEN
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
10b7da: b8 16 00 00 00 mov $0x16,%eax
10b7df: 5b pop %ebx
10b7e0: c3 ret
10b7e1: 8d 76 00 lea 0x0(%esi),%esi
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
10b7e4: 83 f8 03 cmp $0x3,%eax
10b7e7: 76 f1 jbe 10b7da <posix_memalign+0x12>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
10b7e9: 5b pop %ebx
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
10b7ea: e9 b9 01 00 00 jmp 10b9a8 <rtems_memalign>
00110ffc <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
110ffc: 8b 44 24 04 mov 0x4(%esp),%eax
if ( !attr || !attr->is_initialized )
111000: 85 c0 test %eax,%eax
111002: 74 06 je 11100a <pthread_attr_setschedpolicy+0xe>
111004: 8b 08 mov (%eax),%ecx
111006: 85 c9 test %ecx,%ecx
111008: 75 06 jne 111010 <pthread_attr_setschedpolicy+0x14>
return EINVAL;
11100a: b8 16 00 00 00 mov $0x16,%eax
11100f: c3 ret
switch ( policy ) {
111010: 8b 54 24 08 mov 0x8(%esp),%edx
111014: 85 d2 test %edx,%edx
111016: 78 1b js 111033 <pthread_attr_setschedpolicy+0x37>
111018: 83 7c 24 08 02 cmpl $0x2,0x8(%esp)
11101d: 7f 0d jg 11102c <pthread_attr_setschedpolicy+0x30>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
11101f: 8b 54 24 08 mov 0x8(%esp),%edx
111023: 89 50 14 mov %edx,0x14(%eax)
return 0;
111026: 31 c0 xor %eax,%eax
111028: c3 ret
111029: 8d 76 00 lea 0x0(%esi),%esi
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
11102c: 83 7c 24 08 04 cmpl $0x4,0x8(%esp)
111031: 74 ec je 11101f <pthread_attr_setschedpolicy+0x23><== ALWAYS TAKEN
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
111033: b8 86 00 00 00 mov $0x86,%eax
}
}
111038: c3 ret
0010bc6c <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
10bc6c: 56 push %esi
10bc6d: 53 push %ebx
10bc6e: 83 ec 34 sub $0x34,%esp
10bc71: 8b 5c 24 40 mov 0x40(%esp),%ebx
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
10bc75: 85 db test %ebx,%ebx
10bc77: 74 08 je 10bc81 <pthread_barrier_init+0x15>
return EINVAL;
if ( count == 0 )
10bc79: 8b 4c 24 48 mov 0x48(%esp),%ecx
10bc7d: 85 c9 test %ecx,%ecx
10bc7f: 75 0b jne 10bc8c <pthread_barrier_init+0x20>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
10bc81: b8 16 00 00 00 mov $0x16,%eax
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10bc86: 83 c4 34 add $0x34,%esp
10bc89: 5b pop %ebx
10bc8a: 5e pop %esi
10bc8b: c3 ret
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10bc8c: 8b 44 24 44 mov 0x44(%esp),%eax
10bc90: 85 c0 test %eax,%eax
10bc92: 74 7c je 10bd10 <pthread_barrier_init+0xa4>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10bc94: 8b 10 mov (%eax),%edx
10bc96: 85 d2 test %edx,%edx
10bc98: 74 e7 je 10bc81 <pthread_barrier_init+0x15>
return EINVAL;
switch ( the_attr->process_shared ) {
10bc9a: 8b 40 04 mov 0x4(%eax),%eax
10bc9d: 85 c0 test %eax,%eax
10bc9f: 75 e0 jne 10bc81 <pthread_barrier_init+0x15><== NEVER TAKEN
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
10bca1: c7 44 24 20 00 00 00 movl $0x0,0x20(%esp)
10bca8: 00
the_attributes.maximum_count = count;
10bca9: 8b 44 24 48 mov 0x48(%esp),%eax
10bcad: 89 44 24 24 mov %eax,0x24(%esp)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10bcb1: a1 c4 37 13 00 mov 0x1337c4,%eax
10bcb6: 40 inc %eax
10bcb7: a3 c4 37 13 00 mov %eax,0x1337c4
return _Thread_Dispatch_disable_level;
10bcbc: a1 c4 37 13 00 mov 0x1337c4,%eax
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
10bcc1: c7 04 24 a0 3b 13 00 movl $0x133ba0,(%esp)
10bcc8: e8 eb 20 00 00 call 10ddb8 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
10bccd: 85 c0 test %eax,%eax
10bccf: 74 52 je 10bd23 <pthread_barrier_init+0xb7>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
10bcd1: 8d 54 24 20 lea 0x20(%esp),%edx
10bcd5: 89 54 24 04 mov %edx,0x4(%esp)
10bcd9: 8d 50 10 lea 0x10(%eax),%edx
10bcdc: 89 14 24 mov %edx,(%esp)
10bcdf: 89 44 24 1c mov %eax,0x1c(%esp)
10bce3: e8 cc 17 00 00 call 10d4b4 <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10bce8: 8b 44 24 1c mov 0x1c(%esp),%eax
10bcec: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10bcef: 0f b7 f2 movzwl %dx,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bcf2: 8b 0d bc 3b 13 00 mov 0x133bbc,%ecx
10bcf8: 89 04 b1 mov %eax,(%ecx,%esi,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10bcfb: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
10bd02: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10bd04: e8 ab 31 00 00 call 10eeb4 <_Thread_Enable_dispatch>
return 0;
10bd09: 31 c0 xor %eax,%eax
10bd0b: e9 76 ff ff ff jmp 10bc86 <pthread_barrier_init+0x1a>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
10bd10: 8d 74 24 28 lea 0x28(%esp),%esi
10bd14: 89 34 24 mov %esi,(%esp)
10bd17: e8 84 fe ff ff call 10bba0 <pthread_barrierattr_init>
the_attr = &my_attr;
10bd1c: 89 f0 mov %esi,%eax
10bd1e: e9 71 ff ff ff jmp 10bc94 <pthread_barrier_init+0x28>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
10bd23: e8 8c 31 00 00 call 10eeb4 <_Thread_Enable_dispatch>
return EAGAIN;
10bd28: b8 0b 00 00 00 mov $0xb,%eax
10bd2d: e9 54 ff ff ff jmp 10bc86 <pthread_barrier_init+0x1a>
0010b4fc <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
10b4fc: 56 push %esi
10b4fd: 53 push %ebx
10b4fe: 83 ec 14 sub $0x14,%esp
10b501: 8b 5c 24 20 mov 0x20(%esp),%ebx
10b505: 8b 74 24 24 mov 0x24(%esp),%esi
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
10b509: 85 db test %ebx,%ebx
10b50b: 74 4f je 10b55c <pthread_cleanup_push+0x60>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10b50d: a1 c4 30 13 00 mov 0x1330c4,%eax
10b512: 40 inc %eax
10b513: a3 c4 30 13 00 mov %eax,0x1330c4
return _Thread_Dispatch_disable_level;
10b518: a1 c4 30 13 00 mov 0x1330c4,%eax
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
10b51d: c7 04 24 10 00 00 00 movl $0x10,(%esp)
10b524: e8 cf 41 00 00 call 10f6f8 <_Workspace_Allocate>
if ( handler ) {
10b529: 85 c0 test %eax,%eax
10b52b: 74 24 je 10b551 <pthread_cleanup_push+0x55><== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b52d: 8b 15 4c 36 13 00 mov 0x13364c,%edx
handler_stack = &thread_support->Cancellation_Handlers;
10b533: 8b 92 e8 00 00 00 mov 0xe8(%edx),%edx
10b539: 81 c2 e4 00 00 00 add $0xe4,%edx
handler->routine = routine;
10b53f: 89 58 08 mov %ebx,0x8(%eax)
handler->arg = arg;
10b542: 89 70 0c mov %esi,0xc(%eax)
_Chain_Append( handler_stack, &handler->Node );
10b545: 89 44 24 04 mov %eax,0x4(%esp)
10b549: 89 14 24 mov %edx,(%esp)
10b54c: e8 cb 18 00 00 call 10ce1c <_Chain_Append>
}
_Thread_Enable_dispatch();
}
10b551: 83 c4 14 add $0x14,%esp
10b554: 5b pop %ebx
10b555: 5e pop %esi
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
10b556: e9 91 32 00 00 jmp 10e7ec <_Thread_Enable_dispatch>
10b55b: 90 nop
}
10b55c: 83 c4 14 add $0x14,%esp
10b55f: 5b pop %ebx
10b560: 5e pop %esi
10b561: c3 ret
0010c604 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
10c604: 53 push %ebx
10c605: 83 ec 28 sub $0x28,%esp
10c608: 8b 44 24 34 mov 0x34(%esp),%eax
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10c60c: 85 c0 test %eax,%eax
10c60e: 0f 84 98 00 00 00 je 10c6ac <pthread_cond_init+0xa8>
10c614: 89 c3 mov %eax,%ebx
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10c616: 83 7b 04 01 cmpl $0x1,0x4(%ebx)
10c61a: 74 06 je 10c622 <pthread_cond_init+0x1e><== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
10c61c: 8b 03 mov (%ebx),%eax
10c61e: 85 c0 test %eax,%eax
10c620: 75 0a jne 10c62c <pthread_cond_init+0x28>
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
10c622: b8 16 00 00 00 mov $0x16,%eax
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10c627: 83 c4 28 add $0x28,%esp
10c62a: 5b pop %ebx
10c62b: c3 ret
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10c62c: a1 04 4e 13 00 mov 0x134e04,%eax
10c631: 40 inc %eax
10c632: a3 04 4e 13 00 mov %eax,0x134e04
return _Thread_Dispatch_disable_level;
10c637: a1 04 4e 13 00 mov 0x134e04,%eax
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
10c63c: c7 04 24 80 52 13 00 movl $0x135280,(%esp)
10c643: e8 d0 27 00 00 call 10ee18 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
10c648: 85 c0 test %eax,%eax
10c64a: 74 6c je 10c6b8 <pthread_cond_init+0xb4>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
10c64c: 8b 53 04 mov 0x4(%ebx),%edx
10c64f: 89 50 10 mov %edx,0x10(%eax)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10c652: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
_Thread_queue_Initialize(
10c659: c7 44 24 0c 74 00 00 movl $0x74,0xc(%esp)
10c660: 00
10c661: c7 44 24 08 00 08 00 movl $0x10000800,0x8(%esp)
10c668: 10
10c669: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c670: 00
10c671: 8d 50 18 lea 0x18(%eax),%edx
10c674: 89 14 24 mov %edx,(%esp)
10c677: 89 44 24 1c mov %eax,0x1c(%esp)
10c67b: e8 10 40 00 00 call 110690 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c680: 8b 44 24 1c mov 0x1c(%esp),%eax
10c684: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10c687: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c68a: 8b 0d 9c 52 13 00 mov 0x13529c,%ecx
10c690: 89 04 99 mov %eax,(%ecx,%ebx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10c693: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
10c69a: 8b 44 24 30 mov 0x30(%esp),%eax
10c69e: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10c6a0: e8 6f 38 00 00 call 10ff14 <_Thread_Enable_dispatch>
return 0;
10c6a5: 31 c0 xor %eax,%eax
10c6a7: e9 7b ff ff ff jmp 10c627 <pthread_cond_init+0x23>
{
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Condition_variables_Default_attributes;
10c6ac: bb 08 54 12 00 mov $0x125408,%ebx
10c6b1: e9 60 ff ff ff jmp 10c616 <pthread_cond_init+0x12>
10c6b6: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
10c6b8: e8 57 38 00 00 call 10ff14 <_Thread_Enable_dispatch>
return ENOMEM;
10c6bd: b8 0c 00 00 00 mov $0xc,%eax
10c6c2: e9 60 ff ff ff jmp 10c627 <pthread_cond_init+0x23>
0010c484 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
10c484: 8b 44 24 04 mov 0x4(%esp),%eax
if ( !attr || attr->is_initialized == false )
10c488: 85 c0 test %eax,%eax
10c48a: 74 06 je 10c492 <pthread_condattr_destroy+0xe>
10c48c: 8b 10 mov (%eax),%edx
10c48e: 85 d2 test %edx,%edx
10c490: 75 06 jne 10c498 <pthread_condattr_destroy+0x14><== ALWAYS TAKEN
return EINVAL;
10c492: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10c497: c3 ret
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
10c498: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10c49e: 31 c0 xor %eax,%eax
10c4a0: c3 ret
0010b978 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
10b978: 55 push %ebp
10b979: 57 push %edi
10b97a: 56 push %esi
10b97b: 53 push %ebx
10b97c: 83 ec 7c sub $0x7c,%esp
10b97f: 8b 9c 24 94 00 00 00 mov 0x94(%esp),%ebx
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
10b986: 8b b4 24 98 00 00 00 mov 0x98(%esp),%esi
10b98d: 85 f6 test %esi,%esi
10b98f: 74 5f je 10b9f0 <pthread_create+0x78>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10b991: 85 db test %ebx,%ebx
10b993: 74 6b je 10ba00 <pthread_create+0x88>
if ( !the_attr->is_initialized )
10b995: 8b 0b mov (%ebx),%ecx
10b997: 85 c9 test %ecx,%ecx
10b999: 75 11 jne 10b9ac <pthread_create+0x34>
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
break;
default:
return EINVAL;
10b99b: bd 16 00 00 00 mov $0x16,%ebp
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
10b9a0: 89 e8 mov %ebp,%eax
10b9a2: 83 c4 7c add $0x7c,%esp
10b9a5: 5b pop %ebx
10b9a6: 5e pop %esi
10b9a7: 5f pop %edi
10b9a8: 5d pop %ebp
10b9a9: c3 ret
10b9aa: 66 90 xchg %ax,%ax
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
10b9ac: 8b 53 04 mov 0x4(%ebx),%edx
10b9af: 85 d2 test %edx,%edx
10b9b1: 74 0a je 10b9bd <pthread_create+0x45>
10b9b3: a1 d0 ed 12 00 mov 0x12edd0,%eax
10b9b8: 39 43 08 cmp %eax,0x8(%ebx)
10b9bb: 72 de jb 10b99b <pthread_create+0x23>
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
10b9bd: 8b 43 10 mov 0x10(%ebx),%eax
10b9c0: 83 f8 01 cmp $0x1,%eax
10b9c3: 74 43 je 10ba08 <pthread_create+0x90>
10b9c5: 83 f8 02 cmp $0x2,%eax
10b9c8: 75 d1 jne 10b99b <pthread_create+0x23>
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
10b9ca: 8b 53 14 mov 0x14(%ebx),%edx
10b9cd: 89 54 24 34 mov %edx,0x34(%esp)
schedparam = the_attr->schedparam;
10b9d1: 8d 54 24 54 lea 0x54(%esp),%edx
10b9d5: 8d 73 18 lea 0x18(%ebx),%esi
10b9d8: b9 07 00 00 00 mov $0x7,%ecx
10b9dd: 89 d7 mov %edx,%edi
10b9df: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
10b9e1: 8b 43 0c mov 0xc(%ebx),%eax
10b9e4: 85 c0 test %eax,%eax
10b9e6: 74 4c je 10ba34 <pthread_create+0xbc>
return ENOTSUP;
10b9e8: bd 86 00 00 00 mov $0x86,%ebp
10b9ed: eb b1 jmp 10b9a0 <pthread_create+0x28>
10b9ef: 90 nop
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
10b9f0: bd 0e 00 00 00 mov $0xe,%ebp
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
10b9f5: 89 e8 mov %ebp,%eax
10b9f7: 83 c4 7c add $0x7c,%esp
10b9fa: 5b pop %ebx
10b9fb: 5e pop %esi
10b9fc: 5f pop %edi
10b9fd: 5d pop %ebp
10b9fe: c3 ret
10b9ff: 90 nop
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10ba00: bb 60 3c 12 00 mov $0x123c60,%ebx
10ba05: eb 8e jmp 10b995 <pthread_create+0x1d>
10ba07: 90 nop
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10ba08: a1 2c 38 13 00 mov 0x13382c,%eax
10ba0d: 8b b0 e8 00 00 00 mov 0xe8(%eax),%esi
schedpolicy = api->schedpolicy;
10ba13: 8b 96 84 00 00 00 mov 0x84(%esi),%edx
10ba19: 89 54 24 34 mov %edx,0x34(%esp)
schedparam = api->schedparam;
10ba1d: 8d 54 24 54 lea 0x54(%esp),%edx
10ba21: 81 c6 88 00 00 00 add $0x88,%esi
10ba27: b9 07 00 00 00 mov $0x7,%ecx
10ba2c: 89 d7 mov %edx,%edi
10ba2e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
break;
10ba30: eb af jmp 10b9e1 <pthread_create+0x69>
10ba32: 66 90 xchg %ax,%ax
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
10ba34: 8b 44 24 54 mov 0x54(%esp),%eax
10ba38: 89 04 24 mov %eax,(%esp)
10ba3b: 89 54 24 30 mov %edx,0x30(%esp)
10ba3f: e8 74 60 00 00 call 111ab8 <_POSIX_Priority_Is_valid>
10ba44: 84 c0 test %al,%al
10ba46: 8b 54 24 30 mov 0x30(%esp),%edx
10ba4a: 0f 84 4b ff ff ff je 10b99b <pthread_create+0x23> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
10ba50: 8b 74 24 54 mov 0x54(%esp),%esi
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10ba54: 0f b6 3d cc ed 12 00 movzbl 0x12edcc,%edi
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
10ba5b: 8d 44 24 50 lea 0x50(%esp),%eax
10ba5f: 89 44 24 0c mov %eax,0xc(%esp)
10ba63: 8d 44 24 4c lea 0x4c(%esp),%eax
10ba67: 89 44 24 08 mov %eax,0x8(%esp)
10ba6b: 89 54 24 04 mov %edx,0x4(%esp)
10ba6f: 8b 4c 24 34 mov 0x34(%esp),%ecx
10ba73: 89 0c 24 mov %ecx,(%esp)
10ba76: e8 59 60 00 00 call 111ad4 <_POSIX_Thread_Translate_sched_param>
10ba7b: 89 c5 mov %eax,%ebp
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
10ba7d: 85 c0 test %eax,%eax
10ba7f: 0f 85 1b ff ff ff jne 10b9a0 <pthread_create+0x28>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10ba85: a1 30 33 13 00 mov 0x133330,%eax
10ba8a: 89 04 24 mov %eax,(%esp)
10ba8d: e8 a2 18 00 00 call 10d334 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
10ba92: c7 04 24 00 35 13 00 movl $0x133500,(%esp)
10ba99: e8 1e 22 00 00 call 10dcbc <_Objects_Allocate>
10ba9e: 89 44 24 3c mov %eax,0x3c(%esp)
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
10baa2: 85 c0 test %eax,%eax
10baa4: 8b 54 24 30 mov 0x30(%esp),%edx
10baa8: 0f 84 37 01 00 00 je 10bbe5 <pthread_create+0x26d>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
10baae: 8b 4b 08 mov 0x8(%ebx),%ecx
10bab1: c7 44 24 28 00 00 00 movl $0x0,0x28(%esp)
10bab8: 00
10bab9: c7 44 24 24 00 00 00 movl $0x0,0x24(%esp)
10bac0: 00
10bac1: 8b 44 24 50 mov 0x50(%esp),%eax
10bac5: 89 44 24 20 mov %eax,0x20(%esp)
10bac9: 8b 44 24 4c mov 0x4c(%esp),%eax
10bacd: 89 44 24 1c mov %eax,0x1c(%esp)
10bad1: c7 44 24 18 01 00 00 movl $0x1,0x18(%esp)
10bad8: 00
10bad9: 81 e7 ff 00 00 00 and $0xff,%edi
10badf: 29 f7 sub %esi,%edi
10bae1: 89 7c 24 14 mov %edi,0x14(%esp)
10bae5: c7 44 24 10 01 00 00 movl $0x1,0x10(%esp)
10baec: 00
10baed: a1 d0 ed 12 00 mov 0x12edd0,%eax
10baf2: d1 e0 shl %eax
10baf4: 39 c8 cmp %ecx,%eax
10baf6: 73 02 jae 10bafa <pthread_create+0x182>
10baf8: 89 c8 mov %ecx,%eax
10bafa: 89 44 24 0c mov %eax,0xc(%esp)
10bafe: 8b 43 04 mov 0x4(%ebx),%eax
10bb01: 89 44 24 08 mov %eax,0x8(%esp)
10bb05: 8b 44 24 3c mov 0x3c(%esp),%eax
10bb09: 89 44 24 04 mov %eax,0x4(%esp)
10bb0d: c7 04 24 00 35 13 00 movl $0x133500,(%esp)
10bb14: 89 54 24 30 mov %edx,0x30(%esp)
10bb18: e8 3b 33 00 00 call 10ee58 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
10bb1d: 84 c0 test %al,%al
10bb1f: 8b 54 24 30 mov 0x30(%esp),%edx
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
10bb23: 8b 44 24 3c mov 0x3c(%esp),%eax
10bb27: 75 27 jne 10bb50 <pthread_create+0x1d8>
10bb29: 89 44 24 04 mov %eax,0x4(%esp)
10bb2d: c7 04 24 00 35 13 00 movl $0x133500,(%esp)
10bb34: e8 ff 24 00 00 call 10e038 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
10bb39: a1 30 33 13 00 mov 0x133330,%eax
10bb3e: 89 04 24 mov %eax,(%esp)
10bb41: e8 66 18 00 00 call 10d3ac <_API_Mutex_Unlock>
return EAGAIN;
10bb46: bd 0b 00 00 00 mov $0xb,%ebp
10bb4b: e9 50 fe ff ff jmp 10b9a0 <pthread_create+0x28>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10bb50: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
10bb56: 89 44 24 38 mov %eax,0x38(%esp)
api->Attributes = *the_attr;
10bb5a: b9 10 00 00 00 mov $0x10,%ecx
10bb5f: 89 c7 mov %eax,%edi
10bb61: 89 de mov %ebx,%esi
10bb63: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = the_attr->detachstate;
10bb65: 8b 43 3c mov 0x3c(%ebx),%eax
10bb68: 8b 4c 24 38 mov 0x38(%esp),%ecx
10bb6c: 89 41 40 mov %eax,0x40(%ecx)
api->schedpolicy = schedpolicy;
10bb6f: 8b 44 24 34 mov 0x34(%esp),%eax
10bb73: 89 81 84 00 00 00 mov %eax,0x84(%ecx)
api->schedparam = schedparam;
10bb79: 89 cf mov %ecx,%edi
10bb7b: 81 c7 88 00 00 00 add $0x88,%edi
10bb81: b9 07 00 00 00 mov $0x7,%ecx
10bb86: 89 d6 mov %edx,%esi
10bb88: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
10bb8a: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
10bb91: 00
10bb92: 8b 84 24 9c 00 00 00 mov 0x9c(%esp),%eax
10bb99: 89 44 24 0c mov %eax,0xc(%esp)
10bb9d: 8b 94 24 98 00 00 00 mov 0x98(%esp),%edx
10bba4: 89 54 24 08 mov %edx,0x8(%esp)
10bba8: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10bbaf: 00
10bbb0: 8b 44 24 3c mov 0x3c(%esp),%eax
10bbb4: 89 04 24 mov %eax,(%esp)
10bbb7: e8 58 3b 00 00 call 10f714 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
10bbbc: 83 7c 24 34 04 cmpl $0x4,0x34(%esp)
10bbc1: 74 38 je 10bbfb <pthread_create+0x283>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
10bbc3: 8b 44 24 3c mov 0x3c(%esp),%eax
10bbc7: 8b 50 08 mov 0x8(%eax),%edx
10bbca: 8b 84 24 90 00 00 00 mov 0x90(%esp),%eax
10bbd1: 89 10 mov %edx,(%eax)
_RTEMS_Unlock_allocator();
10bbd3: a1 30 33 13 00 mov 0x133330,%eax
10bbd8: 89 04 24 mov %eax,(%esp)
10bbdb: e8 cc 17 00 00 call 10d3ac <_API_Mutex_Unlock>
10bbe0: e9 bb fd ff ff jmp 10b9a0 <pthread_create+0x28>
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10bbe5: a1 30 33 13 00 mov 0x133330,%eax
10bbea: 89 04 24 mov %eax,(%esp)
10bbed: e8 ba 17 00 00 call 10d3ac <_API_Mutex_Unlock>
return EAGAIN;
10bbf2: 66 bd 0b 00 mov $0xb,%bp
10bbf6: e9 a5 fd ff ff jmp 10b9a0 <pthread_create+0x28>
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
&api->Sporadic_timer,
_Timespec_To_ticks( &api->schedparam.sched_ss_repl_period )
10bbfb: 8b 44 24 38 mov 0x38(%esp),%eax
10bbff: 05 90 00 00 00 add $0x90,%eax
10bc04: 89 04 24 mov %eax,(%esp)
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
10bc07: e8 b0 3b 00 00 call 10f7bc <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10bc0c: 8b 54 24 38 mov 0x38(%esp),%edx
10bc10: 89 82 b4 00 00 00 mov %eax,0xb4(%edx)
10bc16: 89 d0 mov %edx,%eax
10bc18: 05 a8 00 00 00 add $0xa8,%eax
10bc1d: 89 44 24 04 mov %eax,0x4(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10bc21: c7 04 24 48 33 13 00 movl $0x133348,(%esp)
10bc28: e8 6f 3e 00 00 call 10fa9c <_Watchdog_Insert>
10bc2d: eb 94 jmp 10bbc3 <pthread_create+0x24b>
001136b4 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
1136b4: 83 ec 1c sub $0x1c,%esp
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
1136b7: 8b 44 24 20 mov 0x20(%esp),%eax
1136bb: 89 44 24 04 mov %eax,0x4(%esp)
1136bf: a1 cc 24 13 00 mov 0x1324cc,%eax
1136c4: 89 04 24 mov %eax,(%esp)
1136c7: e8 00 ff ff ff call 1135cc <_POSIX_Thread_Exit>
}
1136cc: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
1136cf: c3 ret <== NOT EXECUTED
00120a80 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
120a80: 57 push %edi
120a81: 56 push %esi
120a82: 53 push %ebx
120a83: 83 ec 20 sub $0x20,%esp
120a86: 8b 5c 24 34 mov 0x34(%esp),%ebx
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
120a8a: 85 db test %ebx,%ebx
120a8c: 0f 84 8e 00 00 00 je 120b20 <pthread_kill+0xa0>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
120a92: 8d 7b ff lea -0x1(%ebx),%edi
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
120a95: 83 ff 1f cmp $0x1f,%edi
120a98: 0f 87 82 00 00 00 ja 120b20 <pthread_kill+0xa0>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
120a9e: 8d 44 24 1c lea 0x1c(%esp),%eax
120aa2: 89 44 24 04 mov %eax,0x4(%esp)
120aa6: 8b 44 24 30 mov 0x30(%esp),%eax
120aaa: 89 04 24 mov %eax,(%esp)
120aad: e8 92 d3 fe ff call 10de44 <_Thread_Get>
120ab2: 89 c6 mov %eax,%esi
switch ( location ) {
120ab4: 8b 54 24 1c mov 0x1c(%esp),%edx
120ab8: 85 d2 test %edx,%edx
120aba: 75 78 jne 120b34 <pthread_kill+0xb4> <== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
120abc: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
120ac2: 8d 04 5b lea (%ebx,%ebx,2),%eax
120ac5: 83 3c 85 48 25 13 00 cmpl $0x1,0x132548(,%eax,4)
120acc: 01
120acd: 74 34 je 120b03 <pthread_kill+0x83>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
120acf: b8 01 00 00 00 mov $0x1,%eax
120ad4: 89 f9 mov %edi,%ecx
120ad6: d3 e0 shl %cl,%eax
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
120ad8: 09 82 d4 00 00 00 or %eax,0xd4(%edx)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
120ade: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
120ae5: 00
120ae6: 89 5c 24 04 mov %ebx,0x4(%esp)
120aea: 89 34 24 mov %esi,(%esp)
120aed: e8 82 fe ff ff call 120974 <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
120af2: a1 c8 24 13 00 mov 0x1324c8,%eax
120af7: 85 c0 test %eax,%eax
120af9: 74 08 je 120b03 <pthread_kill+0x83>
120afb: 3b 35 cc 24 13 00 cmp 0x1324cc,%esi
120b01: 74 11 je 120b14 <pthread_kill+0x94>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
_Thread_Enable_dispatch();
120b03: e8 1c d3 fe ff call 10de24 <_Thread_Enable_dispatch>
return 0;
120b08: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
120b0a: 83 c4 20 add $0x20,%esp
120b0d: 5b pop %ebx
120b0e: 5e pop %esi
120b0f: 5f pop %edi
120b10: c3 ret
120b11: 8d 76 00 lea 0x0(%esi),%esi
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
120b14: c6 05 d8 24 13 00 01 movb $0x1,0x1324d8
120b1b: eb e6 jmp 120b03 <pthread_kill+0x83>
120b1d: 8d 76 00 lea 0x0(%esi),%esi
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
120b20: e8 db 30 ff ff call 113c00 <__errno>
120b25: c7 00 16 00 00 00 movl $0x16,(%eax)
120b2b: b8 ff ff ff ff mov $0xffffffff,%eax
120b30: eb d8 jmp 120b0a <pthread_kill+0x8a>
120b32: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
120b34: e8 c7 30 ff ff call 113c00 <__errno> <== NOT EXECUTED
120b39: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED
120b3f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
120b44: eb c4 jmp 120b0a <pthread_kill+0x8a> <== NOT EXECUTED
0010dba4 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
10dba4: 53 push %ebx
10dba5: 83 ec 28 sub $0x28,%esp
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10dba8: 8d 44 24 1c lea 0x1c(%esp),%eax
10dbac: 89 44 24 04 mov %eax,0x4(%esp)
10dbb0: 8b 44 24 34 mov 0x34(%esp),%eax
10dbb4: 89 04 24 mov %eax,(%esp)
10dbb7: e8 fc 00 00 00 call 10dcb8 <_POSIX_Absolute_timeout_to_ticks>
10dbbc: 89 c3 mov %eax,%ebx
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10dbbe: 83 f8 03 cmp $0x3,%eax
10dbc1: 74 29 je 10dbec <pthread_mutex_timedlock+0x48>
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10dbc3: 8b 44 24 1c mov 0x1c(%esp),%eax
10dbc7: 89 44 24 08 mov %eax,0x8(%esp)
10dbcb: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10dbd2: 00
10dbd3: 8b 44 24 30 mov 0x30(%esp),%eax
10dbd7: 89 04 24 mov %eax,(%esp)
10dbda: e8 c1 fe ff ff call 10daa0 <_POSIX_Mutex_Lock_support>
* This service only gives us the option to block. We used a polling
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
10dbdf: 83 f8 10 cmp $0x10,%eax
10dbe2: 74 2c je 10dc10 <pthread_mutex_timedlock+0x6c>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
10dbe4: 83 c4 28 add $0x28,%esp
10dbe7: 5b pop %ebx
10dbe8: c3 ret
10dbe9: 8d 76 00 lea 0x0(%esi),%esi
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10dbec: 8b 44 24 1c mov 0x1c(%esp),%eax
10dbf0: 89 44 24 08 mov %eax,0x8(%esp)
10dbf4: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10dbfb: 00
10dbfc: 8b 44 24 30 mov 0x30(%esp),%eax
10dc00: 89 04 24 mov %eax,(%esp)
10dc03: e8 98 fe ff ff call 10daa0 <_POSIX_Mutex_Lock_support>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
10dc08: 83 c4 28 add $0x28,%esp
10dc0b: 5b pop %ebx
10dc0c: c3 ret
10dc0d: 8d 76 00 lea 0x0(%esi),%esi
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10dc10: 85 db test %ebx,%ebx
10dc12: 75 08 jne 10dc1c <pthread_mutex_timedlock+0x78><== ALWAYS TAKEN
return EINVAL;
10dc14: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
10dc19: eb c9 jmp 10dbe4 <pthread_mutex_timedlock+0x40><== NOT EXECUTED
10dc1b: 90 nop <== NOT EXECUTED
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10dc1c: 4b dec %ebx
10dc1d: 83 fb 01 cmp $0x1,%ebx
10dc20: 77 c2 ja 10dbe4 <pthread_mutex_timedlock+0x40><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10dc22: b8 74 00 00 00 mov $0x74,%eax
10dc27: eb bb jmp 10dbe4 <pthread_mutex_timedlock+0x40>
0010b350 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
10b350: 8b 44 24 04 mov 0x4(%esp),%eax
if ( !attr )
10b354: 85 c0 test %eax,%eax
10b356: 74 06 je 10b35e <pthread_mutexattr_gettype+0xe>
return EINVAL;
if ( !attr->is_initialized )
10b358: 8b 08 mov (%eax),%ecx
10b35a: 85 c9 test %ecx,%ecx
10b35c: 75 06 jne 10b364 <pthread_mutexattr_gettype+0x14>
const pthread_mutexattr_t *attr,
int *type
)
{
if ( !attr )
return EINVAL;
10b35e: b8 16 00 00 00 mov $0x16,%eax
if ( !type )
return EINVAL;
*type = attr->type;
return 0;
}
10b363: c3 ret
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
if ( !type )
10b364: 8b 54 24 08 mov 0x8(%esp),%edx
10b368: 85 d2 test %edx,%edx
10b36a: 74 f2 je 10b35e <pthread_mutexattr_gettype+0xe><== NEVER TAKEN
return EINVAL;
*type = attr->type;
10b36c: 8b 40 10 mov 0x10(%eax),%eax
10b36f: 8b 54 24 08 mov 0x8(%esp),%edx
10b373: 89 02 mov %eax,(%edx)
return 0;
10b375: 31 c0 xor %eax,%eax
10b377: c3 ret
0010d760 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
10d760: 8b 44 24 04 mov 0x4(%esp),%eax
if ( !attr || !attr->is_initialized )
10d764: 85 c0 test %eax,%eax
10d766: 74 06 je 10d76e <pthread_mutexattr_setpshared+0xe>
10d768: 8b 10 mov (%eax),%edx
10d76a: 85 d2 test %edx,%edx
10d76c: 75 06 jne 10d774 <pthread_mutexattr_setpshared+0x14>
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10d76e: b8 16 00 00 00 mov $0x16,%eax
}
}
10d773: c3 ret
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
10d774: 83 7c 24 08 01 cmpl $0x1,0x8(%esp)
10d779: 77 f3 ja 10d76e <pthread_mutexattr_setpshared+0xe><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10d77b: 8b 54 24 08 mov 0x8(%esp),%edx
10d77f: 89 50 04 mov %edx,0x4(%eax)
return 0;
10d782: 31 c0 xor %eax,%eax
10d784: c3 ret
0010b3a0 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
10b3a0: 8b 44 24 04 mov 0x4(%esp),%eax
if ( !attr || !attr->is_initialized )
10b3a4: 85 c0 test %eax,%eax
10b3a6: 74 06 je 10b3ae <pthread_mutexattr_settype+0xe>
10b3a8: 8b 10 mov (%eax),%edx
10b3aa: 85 d2 test %edx,%edx
10b3ac: 75 06 jne 10b3b4 <pthread_mutexattr_settype+0x14><== ALWAYS TAKEN
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
return 0;
default:
return EINVAL;
10b3ae: b8 16 00 00 00 mov $0x16,%eax
}
}
10b3b3: c3 ret
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( type ) {
10b3b4: 83 7c 24 08 03 cmpl $0x3,0x8(%esp)
10b3b9: 77 f3 ja 10b3ae <pthread_mutexattr_settype+0xe>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
10b3bb: 8b 54 24 08 mov 0x8(%esp),%edx
10b3bf: 89 50 10 mov %edx,0x10(%eax)
return 0;
10b3c2: 31 c0 xor %eax,%eax
10b3c4: c3 ret
0010c0e8 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
10c0e8: 56 push %esi
10c0e9: 53 push %ebx
10c0ea: 83 ec 24 sub $0x24,%esp
10c0ed: 8b 5c 24 30 mov 0x30(%esp),%ebx
if ( !once_control || !init_routine )
10c0f1: 85 db test %ebx,%ebx
10c0f3: 74 5b je 10c150 <pthread_once+0x68>
10c0f5: 8b 4c 24 34 mov 0x34(%esp),%ecx
10c0f9: 85 c9 test %ecx,%ecx
10c0fb: 74 53 je 10c150 <pthread_once+0x68>
return EINVAL;
if ( !once_control->init_executed ) {
10c0fd: 8b 53 04 mov 0x4(%ebx),%edx
10c100: 85 d2 test %edx,%edx
10c102: 74 08 je 10c10c <pthread_once+0x24>
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
10c104: 31 c0 xor %eax,%eax
}
10c106: 83 c4 24 add $0x24,%esp
10c109: 5b pop %ebx
10c10a: 5e pop %esi
10c10b: c3 ret
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
10c10c: 8d 74 24 1c lea 0x1c(%esp),%esi
10c110: 89 74 24 08 mov %esi,0x8(%esp)
10c114: c7 44 24 04 00 01 00 movl $0x100,0x4(%esp)
10c11b: 00
10c11c: c7 04 24 00 01 00 00 movl $0x100,(%esp)
10c123: e8 bc 0b 00 00 call 10cce4 <rtems_task_mode>
if ( !once_control->init_executed ) {
10c128: 8b 43 04 mov 0x4(%ebx),%eax
10c12b: 85 c0 test %eax,%eax
10c12d: 74 2d je 10c15c <pthread_once+0x74> <== ALWAYS TAKEN
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10c12f: 89 74 24 08 mov %esi,0x8(%esp)
10c133: c7 44 24 04 00 01 00 movl $0x100,0x4(%esp)
10c13a: 00
10c13b: 8b 44 24 1c mov 0x1c(%esp),%eax
10c13f: 89 04 24 mov %eax,(%esp)
10c142: e8 9d 0b 00 00 call 10cce4 <rtems_task_mode>
}
return 0;
10c147: 31 c0 xor %eax,%eax
}
10c149: 83 c4 24 add $0x24,%esp
10c14c: 5b pop %ebx
10c14d: 5e pop %esi
10c14e: c3 ret
10c14f: 90 nop
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
10c150: b8 16 00 00 00 mov $0x16,%eax
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
10c155: 83 c4 24 add $0x24,%esp
10c158: 5b pop %ebx
10c159: 5e pop %esi
10c15a: c3 ret
10c15b: 90 nop
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
10c15c: c7 03 01 00 00 00 movl $0x1,(%ebx)
once_control->init_executed = true;
10c162: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
(*init_routine)();
10c169: 8b 44 24 34 mov 0x34(%esp),%eax
10c16d: ff d0 call *%eax
10c16f: eb be jmp 10c12f <pthread_once+0x47>
0010bf04 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
10bf04: 56 push %esi
10bf05: 53 push %ebx
10bf06: 83 ec 34 sub $0x34,%esp
10bf09: 8b 5c 24 40 mov 0x40(%esp),%ebx
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
10bf0d: 85 db test %ebx,%ebx
10bf0f: 74 0e je 10bf1f <pthread_rwlock_init+0x1b>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10bf11: 8b 44 24 44 mov 0x44(%esp),%eax
10bf15: 85 c0 test %eax,%eax
10bf17: 74 7f je 10bf98 <pthread_rwlock_init+0x94>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10bf19: 8b 10 mov (%eax),%edx
10bf1b: 85 d2 test %edx,%edx
10bf1d: 75 0d jne 10bf2c <pthread_rwlock_init+0x28><== ALWAYS TAKEN
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
10bf1f: b8 16 00 00 00 mov $0x16,%eax
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10bf24: 83 c4 34 add $0x34,%esp
10bf27: 5b pop %ebx
10bf28: 5e pop %esi
10bf29: c3 ret
10bf2a: 66 90 xchg %ax,%ax
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
return EINVAL;
switch ( the_attr->process_shared ) {
10bf2c: 8b 40 04 mov 0x4(%eax),%eax
10bf2f: 85 c0 test %eax,%eax
10bf31: 75 ec jne 10bf1f <pthread_rwlock_init+0x1b><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
10bf33: c7 44 24 24 00 00 00 movl $0x0,0x24(%esp)
10bf3a: 00
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10bf3b: a1 64 60 13 00 mov 0x136064,%eax
10bf40: 40 inc %eax
10bf41: a3 64 60 13 00 mov %eax,0x136064
return _Thread_Dispatch_disable_level;
10bf46: a1 64 60 13 00 mov 0x136064,%eax
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
10bf4b: c7 04 24 c0 62 13 00 movl $0x1362c0,(%esp)
10bf52: e8 85 29 00 00 call 10e8dc <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
10bf57: 85 c0 test %eax,%eax
10bf59: 74 51 je 10bfac <pthread_rwlock_init+0xa8>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
10bf5b: 8d 54 24 24 lea 0x24(%esp),%edx
10bf5f: 89 54 24 04 mov %edx,0x4(%esp)
10bf63: 8d 50 10 lea 0x10(%eax),%edx
10bf66: 89 14 24 mov %edx,(%esp)
10bf69: 89 44 24 1c mov %eax,0x1c(%esp)
10bf6d: e8 be 23 00 00 call 10e330 <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10bf72: 8b 44 24 1c mov 0x1c(%esp),%eax
10bf76: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10bf79: 0f b7 f2 movzwl %dx,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bf7c: 8b 0d dc 62 13 00 mov 0x1362dc,%ecx
10bf82: 89 04 b1 mov %eax,(%ecx,%esi,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10bf85: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
10bf8c: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10bf8e: e8 25 3b 00 00 call 10fab8 <_Thread_Enable_dispatch>
return 0;
10bf93: 31 c0 xor %eax,%eax
10bf95: eb 8d jmp 10bf24 <pthread_rwlock_init+0x20>
10bf97: 90 nop
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
10bf98: 8d 74 24 28 lea 0x28(%esp),%esi
10bf9c: 89 34 24 mov %esi,(%esp)
10bf9f: e8 04 07 00 00 call 10c6a8 <pthread_rwlockattr_init>
the_attr = &default_attr;
10bfa4: 89 f0 mov %esi,%eax
10bfa6: e9 6e ff ff ff jmp 10bf19 <pthread_rwlock_init+0x15>
10bfab: 90 nop
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
10bfac: e8 07 3b 00 00 call 10fab8 <_Thread_Enable_dispatch>
return EAGAIN;
10bfb1: b8 0b 00 00 00 mov $0xb,%eax
10bfb6: e9 69 ff ff ff jmp 10bf24 <pthread_rwlock_init+0x20>
0010ca24 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10ca24: 56 push %esi
10ca25: 53 push %ebx
10ca26: 83 ec 44 sub $0x44,%esp
10ca29: 8b 5c 24 50 mov 0x50(%esp),%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10ca2d: 85 db test %ebx,%ebx
10ca2f: 0f 84 8f 00 00 00 je 10cac4 <pthread_rwlock_timedrdlock+0xa0>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10ca35: 8d 44 24 3c lea 0x3c(%esp),%eax
10ca39: 89 44 24 04 mov %eax,0x4(%esp)
10ca3d: 8b 44 24 54 mov 0x54(%esp),%eax
10ca41: 89 04 24 mov %eax,(%esp)
10ca44: e8 c7 62 00 00 call 112d10 <_POSIX_Absolute_timeout_to_ticks>
10ca49: 89 c6 mov %eax,%esi
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10ca4b: 8d 54 24 38 lea 0x38(%esp),%edx
10ca4f: 89 54 24 08 mov %edx,0x8(%esp)
10ca53: 8b 13 mov (%ebx),%edx
10ca55: 89 54 24 04 mov %edx,0x4(%esp)
10ca59: c7 04 24 c0 48 13 00 movl $0x1348c0,(%esp)
10ca60: e8 ab 2a 00 00 call 10f510 <_Objects_Get>
switch ( location ) {
10ca65: 8b 54 24 38 mov 0x38(%esp),%edx
10ca69: 85 d2 test %edx,%edx
10ca6b: 75 57 jne 10cac4 <pthread_rwlock_timedrdlock+0xa0>
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10ca6d: 83 fe 03 cmp $0x3,%esi
10ca70: 0f 94 c2 sete %dl
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10ca73: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
10ca7a: 00
10ca7b: 8b 4c 24 3c mov 0x3c(%esp),%ecx
10ca7f: 89 4c 24 0c mov %ecx,0xc(%esp)
10ca83: 0f b6 ca movzbl %dl,%ecx
10ca86: 89 4c 24 08 mov %ecx,0x8(%esp)
10ca8a: 8b 0b mov (%ebx),%ecx
10ca8c: 89 4c 24 04 mov %ecx,0x4(%esp)
10ca90: 83 c0 10 add $0x10,%eax
10ca93: 89 04 24 mov %eax,(%esp)
10ca96: 88 54 24 2c mov %dl,0x2c(%esp)
10ca9a: e8 e9 1d 00 00 call 10e888 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10ca9f: e8 b0 36 00 00 call 110154 <_Thread_Enable_dispatch>
if ( !do_wait ) {
10caa4: 8a 54 24 2c mov 0x2c(%esp),%dl
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10caa8: a1 2c 4c 13 00 mov 0x134c2c,%eax
10caad: 8b 40 34 mov 0x34(%eax),%eax
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
10cab0: 84 d2 test %dl,%dl
10cab2: 75 05 jne 10cab9 <pthread_rwlock_timedrdlock+0x95>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10cab4: 83 f8 02 cmp $0x2,%eax
10cab7: 74 17 je 10cad0 <pthread_rwlock_timedrdlock+0xac>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10cab9: 89 04 24 mov %eax,(%esp)
10cabc: e8 e3 00 00 00 call 10cba4 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10cac1: eb 06 jmp 10cac9 <pthread_rwlock_timedrdlock+0xa5>
10cac3: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10cac4: b8 16 00 00 00 mov $0x16,%eax
}
10cac9: 83 c4 44 add $0x44,%esp
10cacc: 5b pop %ebx
10cacd: 5e pop %esi
10cace: c3 ret
10cacf: 90 nop
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10cad0: 85 f6 test %esi,%esi
10cad2: 74 f0 je 10cac4 <pthread_rwlock_timedrdlock+0xa0><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10cad4: 4e dec %esi
10cad5: 83 fe 01 cmp $0x1,%esi
10cad8: 77 df ja 10cab9 <pthread_rwlock_timedrdlock+0x95><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10cada: b8 74 00 00 00 mov $0x74,%eax
10cadf: eb e8 jmp 10cac9 <pthread_rwlock_timedrdlock+0xa5>
0010cae4 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10cae4: 56 push %esi
10cae5: 53 push %ebx
10cae6: 83 ec 44 sub $0x44,%esp
10cae9: 8b 5c 24 50 mov 0x50(%esp),%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10caed: 85 db test %ebx,%ebx
10caef: 0f 84 8f 00 00 00 je 10cb84 <pthread_rwlock_timedwrlock+0xa0>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10caf5: 8d 44 24 3c lea 0x3c(%esp),%eax
10caf9: 89 44 24 04 mov %eax,0x4(%esp)
10cafd: 8b 44 24 54 mov 0x54(%esp),%eax
10cb01: 89 04 24 mov %eax,(%esp)
10cb04: e8 07 62 00 00 call 112d10 <_POSIX_Absolute_timeout_to_ticks>
10cb09: 89 c6 mov %eax,%esi
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10cb0b: 8d 54 24 38 lea 0x38(%esp),%edx
10cb0f: 89 54 24 08 mov %edx,0x8(%esp)
10cb13: 8b 13 mov (%ebx),%edx
10cb15: 89 54 24 04 mov %edx,0x4(%esp)
10cb19: c7 04 24 c0 48 13 00 movl $0x1348c0,(%esp)
10cb20: e8 eb 29 00 00 call 10f510 <_Objects_Get>
switch ( location ) {
10cb25: 8b 54 24 38 mov 0x38(%esp),%edx
10cb29: 85 d2 test %edx,%edx
10cb2b: 75 57 jne 10cb84 <pthread_rwlock_timedwrlock+0xa0>
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10cb2d: 83 fe 03 cmp $0x3,%esi
10cb30: 0f 94 c2 sete %dl
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10cb33: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
10cb3a: 00
10cb3b: 8b 4c 24 3c mov 0x3c(%esp),%ecx
10cb3f: 89 4c 24 0c mov %ecx,0xc(%esp)
10cb43: 0f b6 ca movzbl %dl,%ecx
10cb46: 89 4c 24 08 mov %ecx,0x8(%esp)
10cb4a: 8b 0b mov (%ebx),%ecx
10cb4c: 89 4c 24 04 mov %ecx,0x4(%esp)
10cb50: 83 c0 10 add $0x10,%eax
10cb53: 89 04 24 mov %eax,(%esp)
10cb56: 88 54 24 2c mov %dl,0x2c(%esp)
10cb5a: e8 f1 1d 00 00 call 10e950 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10cb5f: e8 f0 35 00 00 call 110154 <_Thread_Enable_dispatch>
if ( !do_wait &&
10cb64: 8a 54 24 2c mov 0x2c(%esp),%dl
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
10cb68: a1 2c 4c 13 00 mov 0x134c2c,%eax
10cb6d: 8b 40 34 mov 0x34(%eax),%eax
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
10cb70: 84 d2 test %dl,%dl
10cb72: 75 05 jne 10cb79 <pthread_rwlock_timedwrlock+0x95>
10cb74: 83 f8 02 cmp $0x2,%eax
10cb77: 74 17 je 10cb90 <pthread_rwlock_timedwrlock+0xac>
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10cb79: 89 04 24 mov %eax,(%esp)
10cb7c: e8 23 00 00 00 call 10cba4 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10cb81: eb 06 jmp 10cb89 <pthread_rwlock_timedwrlock+0xa5>
10cb83: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10cb84: b8 16 00 00 00 mov $0x16,%eax
}
10cb89: 83 c4 44 add $0x44,%esp
10cb8c: 5b pop %ebx
10cb8d: 5e pop %esi
10cb8e: c3 ret
10cb8f: 90 nop
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10cb90: 85 f6 test %esi,%esi
10cb92: 74 f0 je 10cb84 <pthread_rwlock_timedwrlock+0xa0><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10cb94: 4e dec %esi
10cb95: 83 fe 01 cmp $0x1,%esi
10cb98: 77 df ja 10cb79 <pthread_rwlock_timedwrlock+0x95><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10cb9a: b8 74 00 00 00 mov $0x74,%eax
10cb9f: eb e8 jmp 10cb89 <pthread_rwlock_timedwrlock+0xa5>
0010d3e0 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
10d3e0: 8b 44 24 04 mov 0x4(%esp),%eax
if ( !attr )
10d3e4: 85 c0 test %eax,%eax
10d3e6: 74 06 je 10d3ee <pthread_rwlockattr_setpshared+0xe>
return EINVAL;
if ( !attr->is_initialized )
10d3e8: 8b 10 mov (%eax),%edx
10d3ea: 85 d2 test %edx,%edx
10d3ec: 75 06 jne 10d3f4 <pthread_rwlockattr_setpshared+0x14>
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10d3ee: b8 16 00 00 00 mov $0x16,%eax
}
}
10d3f3: c3 ret
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
10d3f4: 83 7c 24 08 01 cmpl $0x1,0x8(%esp)
10d3f9: 77 f3 ja 10d3ee <pthread_rwlockattr_setpshared+0xe><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10d3fb: 8b 54 24 08 mov 0x8(%esp),%edx
10d3ff: 89 50 04 mov %edx,0x4(%eax)
return 0;
10d402: 31 c0 xor %eax,%eax
10d404: c3 ret
0010e59c <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
10e59c: 55 push %ebp
10e59d: 57 push %edi
10e59e: 56 push %esi
10e59f: 53 push %ebx
10e5a0: 83 ec 3c sub $0x3c,%esp
10e5a3: 8b 74 24 58 mov 0x58(%esp),%esi
int rc;
/*
* Check all the parameters
*/
if ( !param )
10e5a7: 85 f6 test %esi,%esi
10e5a9: 0f 84 d5 00 00 00 je 10e684 <pthread_setschedparam+0xe8>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
10e5af: 8d 44 24 28 lea 0x28(%esp),%eax
10e5b3: 89 44 24 0c mov %eax,0xc(%esp)
10e5b7: 8d 44 24 24 lea 0x24(%esp),%eax
10e5bb: 89 44 24 08 mov %eax,0x8(%esp)
10e5bf: 89 74 24 04 mov %esi,0x4(%esp)
10e5c3: 8b 44 24 54 mov 0x54(%esp),%eax
10e5c7: 89 04 24 mov %eax,(%esp)
10e5ca: e8 d9 59 00 00 call 113fa8 <_POSIX_Thread_Translate_sched_param>
10e5cf: 89 c3 mov %eax,%ebx
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
10e5d1: 85 c0 test %eax,%eax
10e5d3: 74 0b je 10e5e0 <pthread_setschedparam+0x44>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10e5d5: 89 d8 mov %ebx,%eax
10e5d7: 83 c4 3c add $0x3c,%esp
10e5da: 5b pop %ebx
10e5db: 5e pop %esi
10e5dc: 5f pop %edi
10e5dd: 5d pop %ebp
10e5de: c3 ret
10e5df: 90 nop
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
10e5e0: 8d 44 24 2c lea 0x2c(%esp),%eax
10e5e4: 89 44 24 04 mov %eax,0x4(%esp)
10e5e8: 8b 44 24 50 mov 0x50(%esp),%eax
10e5ec: 89 04 24 mov %eax,(%esp)
10e5ef: e8 20 2c 00 00 call 111214 <_Thread_Get>
10e5f4: 89 c5 mov %eax,%ebp
switch ( location ) {
10e5f6: 8b 54 24 2c mov 0x2c(%esp),%edx
10e5fa: 85 d2 test %edx,%edx
10e5fc: 0f 85 92 00 00 00 jne 10e694 <pthread_setschedparam+0xf8>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e602: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
if ( api->schedpolicy == SCHED_SPORADIC )
10e608: 83 ba 84 00 00 00 04 cmpl $0x4,0x84(%edx)
10e60f: 0f 84 bd 00 00 00 je 10e6d2 <pthread_setschedparam+0x136>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
10e615: 8b 44 24 54 mov 0x54(%esp),%eax
10e619: 89 82 84 00 00 00 mov %eax,0x84(%edx)
api->schedparam = *param;
10e61f: 8d ba 88 00 00 00 lea 0x88(%edx),%edi
10e625: b9 07 00 00 00 mov $0x7,%ecx
10e62a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_thread->budget_algorithm = budget_algorithm;
10e62c: 8b 44 24 24 mov 0x24(%esp),%eax
10e630: 89 45 78 mov %eax,0x78(%ebp)
the_thread->budget_callout = budget_callout;
10e633: 8b 44 24 28 mov 0x28(%esp),%eax
10e637: 89 45 7c mov %eax,0x7c(%ebp)
switch ( api->schedpolicy ) {
10e63a: 8b 44 24 54 mov 0x54(%esp),%eax
10e63e: 85 c0 test %eax,%eax
10e640: 78 38 js 10e67a <pthread_setschedparam+0xde><== NEVER TAKEN
10e642: 83 7c 24 54 02 cmpl $0x2,0x54(%esp)
10e647: 7e 5b jle 10e6a4 <pthread_setschedparam+0x108>
10e649: 83 7c 24 54 04 cmpl $0x4,0x54(%esp)
10e64e: 75 2a jne 10e67a <pthread_setschedparam+0xde><== NEVER TAKEN
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
10e650: 8b 82 88 00 00 00 mov 0x88(%edx),%eax
10e656: 89 82 a4 00 00 00 mov %eax,0xa4(%edx)
_Watchdog_Remove( &api->Sporadic_timer );
10e65c: 81 c2 a8 00 00 00 add $0xa8,%edx
10e662: 89 14 24 mov %edx,(%esp)
10e665: e8 36 3a 00 00 call 1120a0 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
10e66a: 89 6c 24 04 mov %ebp,0x4(%esp)
10e66e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10e675: e8 ea fd ff ff call 10e464 <_POSIX_Threads_Sporadic_budget_TSR>
break;
}
_Thread_Enable_dispatch();
10e67a: e8 75 2b 00 00 call 1111f4 <_Thread_Enable_dispatch>
10e67f: e9 51 ff ff ff jmp 10e5d5 <pthread_setschedparam+0x39>
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
10e684: bb 16 00 00 00 mov $0x16,%ebx
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10e689: 89 d8 mov %ebx,%eax
10e68b: 83 c4 3c add $0x3c,%esp
10e68e: 5b pop %ebx
10e68f: 5e pop %esi
10e690: 5f pop %edi
10e691: 5d pop %ebp
10e692: c3 ret
10e693: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10e694: bb 03 00 00 00 mov $0x3,%ebx
}
10e699: 89 d8 mov %ebx,%eax
10e69b: 83 c4 3c add $0x3c,%esp
10e69e: 5b pop %ebx
10e69f: 5e pop %esi
10e6a0: 5f pop %edi
10e6a1: 5d pop %ebp
10e6a2: c3 ret
10e6a3: 90 nop
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10e6a4: a1 f8 7a 13 00 mov 0x137af8,%eax
10e6a9: 89 45 74 mov %eax,0x74(%ebp)
10e6ac: 0f b6 05 0c 36 13 00 movzbl 0x13360c,%eax
10e6b3: 2b 82 88 00 00 00 sub 0x88(%edx),%eax
the_thread->real_priority =
10e6b9: 89 45 18 mov %eax,0x18(%ebp)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
10e6bc: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10e6c3: 00
10e6c4: 89 44 24 04 mov %eax,0x4(%esp)
10e6c8: 89 2c 24 mov %ebp,(%esp)
10e6cb: e8 b8 26 00 00 call 110d88 <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
10e6d0: eb a8 jmp 10e67a <pthread_setschedparam+0xde>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
10e6d2: 8d 82 a8 00 00 00 lea 0xa8(%edx),%eax
10e6d8: 89 04 24 mov %eax,(%esp)
10e6db: 89 54 24 1c mov %edx,0x1c(%esp)
10e6df: e8 bc 39 00 00 call 1120a0 <_Watchdog_Remove>
10e6e4: 8b 54 24 1c mov 0x1c(%esp),%edx
10e6e8: e9 28 ff ff ff jmp 10e615 <pthread_setschedparam+0x79>
00111da4 <pthread_sigmask>:
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
111da4: 56 push %esi
111da5: 53 push %ebx
111da6: 51 push %ecx
111da7: 8b 54 24 10 mov 0x10(%esp),%edx
111dab: 8b 5c 24 14 mov 0x14(%esp),%ebx
111daf: 8b 4c 24 18 mov 0x18(%esp),%ecx
POSIX_API_Control *api;
if ( !set && !oset )
111db3: 85 db test %ebx,%ebx
111db5: 0f 84 81 00 00 00 je 111e3c <pthread_sigmask+0x98>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
111dbb: a1 2c 48 13 00 mov 0x13482c,%eax
111dc0: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
if ( oset )
111dc6: 85 c9 test %ecx,%ecx
111dc8: 74 08 je 111dd2 <pthread_sigmask+0x2e>
*oset = api->signals_blocked;
111dca: 8b b0 d0 00 00 00 mov 0xd0(%eax),%esi
111dd0: 89 31 mov %esi,(%ecx)
if ( !set )
return 0;
switch ( how ) {
111dd2: 83 fa 01 cmp $0x1,%edx
111dd5: 74 59 je 111e30 <pthread_sigmask+0x8c>
111dd7: 83 fa 02 cmp $0x2,%edx
111dda: 74 34 je 111e10 <pthread_sigmask+0x6c>
111ddc: 85 d2 test %edx,%edx
111dde: 75 3c jne 111e1c <pthread_sigmask+0x78>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
111de0: 8b 13 mov (%ebx),%edx
111de2: 89 90 d0 00 00 00 mov %edx,0xd0(%eax)
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
111de8: 8b 15 a8 4a 13 00 mov 0x134aa8,%edx
111dee: 0b 90 d4 00 00 00 or 0xd4(%eax),%edx
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
111df4: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
111dfa: f7 d0 not %eax
111dfc: 85 c2 test %eax,%edx
111dfe: 75 08 jne 111e08 <pthread_sigmask+0x64>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
111e00: 31 c0 xor %eax,%eax
}
111e02: 5a pop %edx
111e03: 5b pop %ebx
111e04: 5e pop %esi
111e05: c3 ret
111e06: 66 90 xchg %ax,%ax
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
111e08: e8 b3 cc ff ff call 10eac0 <_Thread_Dispatch>
111e0d: eb f1 jmp 111e00 <pthread_sigmask+0x5c>
111e0f: 90 nop
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
111e10: 8b 13 mov (%ebx),%edx
111e12: f7 d2 not %edx
111e14: 21 90 d0 00 00 00 and %edx,0xd0(%eax)
break;
111e1a: eb cc jmp 111de8 <pthread_sigmask+0x44>
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
111e1c: e8 03 2d 00 00 call 114b24 <__errno>
111e21: c7 00 16 00 00 00 movl $0x16,(%eax)
111e27: b8 ff ff ff ff mov $0xffffffff,%eax
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
111e2c: 5a pop %edx
111e2d: 5b pop %ebx
111e2e: 5e pop %esi
111e2f: c3 ret
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
111e30: 8b 13 mov (%ebx),%edx
111e32: 09 90 d0 00 00 00 or %edx,0xd0(%eax)
break;
111e38: eb ae jmp 111de8 <pthread_sigmask+0x44>
111e3a: 66 90 xchg %ax,%ax
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
111e3c: 85 c9 test %ecx,%ecx
111e3e: 74 dc je 111e1c <pthread_sigmask+0x78> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
111e40: a1 2c 48 13 00 mov 0x13482c,%eax
if ( oset )
*oset = api->signals_blocked;
111e45: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
111e4b: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
111e51: 89 01 mov %eax,(%ecx)
111e53: eb ab jmp 111e00 <pthread_sigmask+0x5c>
0010bda0 <pthread_testcancel>:
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
10bda0: 8b 0d 48 36 13 00 mov 0x133648,%ecx
10bda6: 85 c9 test %ecx,%ecx
10bda8: 75 52 jne 10bdfc <pthread_testcancel+0x5c><== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10bdaa: a1 4c 36 13 00 mov 0x13364c,%eax
10bdaf: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10bdb5: 8b 15 c4 30 13 00 mov 0x1330c4,%edx
10bdbb: 42 inc %edx
10bdbc: 89 15 c4 30 13 00 mov %edx,0x1330c4
return _Thread_Dispatch_disable_level;
10bdc2: 8b 15 c4 30 13 00 mov 0x1330c4,%edx
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10bdc8: 8b 90 d8 00 00 00 mov 0xd8(%eax),%edx
10bdce: 85 d2 test %edx,%edx
10bdd0: 75 2e jne 10be00 <pthread_testcancel+0x60><== NEVER TAKEN
10bdd2: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax
10bdd8: 85 c0 test %eax,%eax
10bdda: 74 24 je 10be00 <pthread_testcancel+0x60>
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
10bddc: 83 ec 1c sub $0x1c,%esp
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10bddf: e8 08 2a 00 00 call 10e7ec <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
10bde4: c7 44 24 04 ff ff ff movl $0xffffffff,0x4(%esp)
10bdeb: ff
10bdec: a1 4c 36 13 00 mov 0x13364c,%eax
10bdf1: 89 04 24 mov %eax,(%esp)
10bdf4: e8 a3 58 00 00 call 11169c <_POSIX_Thread_Exit>
}
10bdf9: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
10bdfc: c3 ret <== NOT EXECUTED
10bdfd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10be00: e9 e7 29 00 00 jmp 10e7ec <_Thread_Enable_dispatch>
0012052c <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
12052c: 53 push %ebx
12052d: 83 ec 08 sub $0x8,%esp
120530: 8b 44 24 10 mov 0x10(%esp),%eax
120534: 8b 54 24 14 mov 0x14(%esp),%edx
120538: 8b 4c 24 18 mov 0x18(%esp),%ecx
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
12053c: 3b 05 60 db 12 00 cmp 0x12db60,%eax
120542: 73 44 jae 120588 <read+0x5c>
iop = rtems_libio_iop( fd );
120544: 8d 04 40 lea (%eax,%eax,2),%eax
120547: c1 e0 04 shl $0x4,%eax
12054a: 03 05 14 1e 13 00 add 0x131e14,%eax
rtems_libio_check_is_open( iop );
120550: 8b 58 0c mov 0xc(%eax),%ebx
120553: f6 c7 01 test $0x1,%bh
120556: 74 30 je 120588 <read+0x5c>
rtems_libio_check_buffer( buffer );
120558: 85 d2 test %edx,%edx
12055a: 74 3e je 12059a <read+0x6e> <== NEVER TAKEN
rtems_libio_check_count( count );
12055c: 85 c9 test %ecx,%ecx
12055e: 74 20 je 120580 <read+0x54>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
120560: 83 e3 02 and $0x2,%ebx
120563: 74 23 je 120588 <read+0x5c>
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
120565: 8b 58 20 mov 0x20(%eax),%ebx
120568: 89 4c 24 18 mov %ecx,0x18(%esp)
12056c: 89 54 24 14 mov %edx,0x14(%esp)
120570: 89 44 24 10 mov %eax,0x10(%esp)
120574: 8b 43 08 mov 0x8(%ebx),%eax
}
120577: 83 c4 08 add $0x8,%esp
12057a: 5b pop %ebx
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
12057b: ff e0 jmp *%eax
12057d: 8d 76 00 lea 0x0(%esi),%esi
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 );
120580: 31 c0 xor %eax,%eax
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
}
120582: 83 c4 08 add $0x8,%esp
120585: 5b pop %ebx
120586: c3 ret
120587: 90 nop
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 );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
120588: e8 73 36 ff ff call 113c00 <__errno>
12058d: c7 00 09 00 00 00 movl $0x9,(%eax)
120593: b8 ff ff ff ff mov $0xffffffff,%eax
120598: eb e8 jmp 120582 <read+0x56>
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
12059a: e8 61 36 ff ff call 113c00 <__errno> <== NOT EXECUTED
12059f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1205a5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1205aa: eb d6 jmp 120582 <read+0x56> <== NOT EXECUTED
0010940c <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
10940c: 55 push %ebp
10940d: 57 push %edi
10940e: 56 push %esi
10940f: 53 push %ebx
109410: 83 ec 2c sub $0x2c,%esp
109413: 8b 54 24 40 mov 0x40(%esp),%edx
109417: 8b 5c 24 44 mov 0x44(%esp),%ebx
10941b: 8b 44 24 48 mov 0x48(%esp),%eax
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
10941f: 3b 15 80 e5 12 00 cmp 0x12e580,%edx
109425: 0f 83 bf 00 00 00 jae 1094ea <readv+0xde>
iop = rtems_libio_iop( fd );
10942b: 8d 3c 52 lea (%edx,%edx,2),%edi
10942e: c1 e7 04 shl $0x4,%edi
109431: 03 3d 34 28 13 00 add 0x132834,%edi
rtems_libio_check_is_open( iop );
109437: 8b 57 0c mov 0xc(%edi),%edx
10943a: f6 c6 01 test $0x1,%dh
10943d: 0f 84 a7 00 00 00 je 1094ea <readv+0xde>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
109443: 83 e2 02 and $0x2,%edx
109446: 0f 84 9e 00 00 00 je 1094ea <readv+0xde> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
10944c: 85 db test %ebx,%ebx
10944e: 74 4c je 10949c <readv+0x90>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
109450: 85 c0 test %eax,%eax
109452: 7e 48 jle 10949c <readv+0x90>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
109454: 3d 00 04 00 00 cmp $0x400,%eax
109459: 7f 41 jg 10949c <readv+0x90> <== NEVER TAKEN
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
10945b: 8d 34 c3 lea (%ebx,%eax,8),%esi
10945e: 89 d8 mov %ebx,%eax
109460: c6 44 24 1f 01 movb $0x1,0x1f(%esp)
109465: 31 d2 xor %edx,%edx
109467: eb 05 jmp 10946e <readv+0x62>
109469: 8d 76 00 lea 0x0(%esi),%esi
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
10946c: 89 ea mov %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 )
10946e: 8b 08 mov (%eax),%ecx
109470: 85 c9 test %ecx,%ecx
109472: 74 28 je 10949c <readv+0x90>
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
109474: 8b 48 04 mov 0x4(%eax),%ecx
109477: 8d 2c 11 lea (%ecx,%edx,1),%ebp
if ( total < old )
10947a: 39 d5 cmp %edx,%ebp
10947c: 7c 1e jl 10949c <readv+0x90>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
10947e: 85 c9 test %ecx,%ecx
109480: 74 05 je 109487 <readv+0x7b>
all_zeros = false;
109482: c6 44 24 1f 00 movb $0x0,0x1f(%esp)
109487: 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++ ) {
10948a: 39 f0 cmp %esi,%eax
10948c: 75 de jne 10946c <readv+0x60>
* 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;
10948e: 31 ed xor %ebp,%ebp
/*
* 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 ) {
109490: 80 7c 24 1f 00 cmpb $0x0,0x1f(%esp)
109495: 74 31 je 1094c8 <readv+0xbc>
109497: eb 13 jmp 1094ac <readv+0xa0>
109499: 8d 76 00 lea 0x0(%esi),%esi
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
10949c: e8 83 b2 00 00 call 114724 <__errno>
1094a1: c7 00 16 00 00 00 movl $0x16,(%eax)
1094a7: bd ff ff ff ff mov $0xffffffff,%ebp
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
1094ac: 89 e8 mov %ebp,%eax
1094ae: 83 c4 2c add $0x2c,%esp
1094b1: 5b pop %ebx
1094b2: 5e pop %esi
1094b3: 5f pop %edi
1094b4: 5d pop %ebp
1094b5: c3 ret
1094b6: 66 90 xchg %ax,%ax
);
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
1094b8: 74 02 je 1094bc <readv+0xb0> <== NEVER TAKEN
total += bytes;
1094ba: 01 c5 add %eax,%ebp
}
if (bytes != iov[ v ].iov_len)
1094bc: 3b 43 04 cmp 0x4(%ebx),%eax
1094bf: 75 eb jne 1094ac <readv+0xa0> <== NEVER TAKEN
1094c1: 83 c3 08 add $0x8,%ebx
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
1094c4: 39 f3 cmp %esi,%ebx
1094c6: 74 e4 je 1094ac <readv+0xa0>
bytes = (*iop->pathinfo.handlers->read_h)(
1094c8: 8b 47 20 mov 0x20(%edi),%eax
1094cb: 8b 53 04 mov 0x4(%ebx),%edx
1094ce: 89 54 24 08 mov %edx,0x8(%esp)
1094d2: 8b 13 mov (%ebx),%edx
1094d4: 89 54 24 04 mov %edx,0x4(%esp)
1094d8: 89 3c 24 mov %edi,(%esp)
1094db: ff 50 08 call *0x8(%eax)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
1094de: 83 f8 00 cmp $0x0,%eax
1094e1: 7d d5 jge 1094b8 <readv+0xac> <== ALWAYS TAKEN
return -1;
1094e3: bd ff ff ff ff mov $0xffffffff,%ebp <== NOT EXECUTED
1094e8: eb c2 jmp 1094ac <readv+0xa0> <== NOT EXECUTED
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
1094ea: e8 35 b2 00 00 call 114724 <__errno>
1094ef: c7 00 09 00 00 00 movl $0x9,(%eax)
1094f5: bd ff ff ff ff mov $0xffffffff,%ebp
1094fa: eb b0 jmp 1094ac <readv+0xa0>
00108884 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
108884: 55 push %ebp
108885: 57 push %edi
108886: 56 push %esi
108887: 53 push %ebx
108888: 83 ec 2c sub $0x2c,%esp
10888b: 8b 5c 24 40 mov 0x40(%esp),%ebx
10888f: 8b 74 24 44 mov 0x44(%esp),%esi
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
108893: ff 05 50 1e 13 00 incl 0x131e50
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
108899: 83 3d a0 20 13 00 03 cmpl $0x3,0x1320a0
1088a0: 0f 84 8e 00 00 00 je 108934 <realloc+0xb0>
}
/*
* Continue with realloc().
*/
if ( !ptr )
1088a6: 85 db test %ebx,%ebx
1088a8: 0f 84 de 00 00 00 je 10898c <realloc+0x108>
return malloc( size );
if ( !size ) {
1088ae: 85 f6 test %esi,%esi
1088b0: 0f 84 b6 00 00 00 je 10896c <realloc+0xe8> <== NEVER TAKEN
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
1088b6: 8d 44 24 1c lea 0x1c(%esp),%eax
1088ba: 89 44 24 08 mov %eax,0x8(%esp)
1088be: 89 5c 24 04 mov %ebx,0x4(%esp)
1088c2: a1 0c db 12 00 mov 0x12db0c,%eax
1088c7: 89 04 24 mov %eax,(%esp)
1088ca: e8 dd 4b 00 00 call 10d4ac <_Protected_heap_Get_block_size>
1088cf: 84 c0 test %al,%al
1088d1: 0f 84 a5 00 00 00 je 10897c <realloc+0xf8>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
1088d7: 89 74 24 08 mov %esi,0x8(%esp)
1088db: 89 5c 24 04 mov %ebx,0x4(%esp)
1088df: a1 0c db 12 00 mov 0x12db0c,%eax
1088e4: 89 04 24 mov %eax,(%esp)
1088e7: e8 10 4c 00 00 call 10d4fc <_Protected_heap_Resize_block>
1088ec: 84 c0 test %al,%al
1088ee: 74 0c je 1088fc <realloc+0x78>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
1088f0: 89 d8 mov %ebx,%eax
1088f2: 83 c4 2c add $0x2c,%esp
1088f5: 5b pop %ebx
1088f6: 5e pop %esi
1088f7: 5f pop %edi
1088f8: 5d pop %ebp
1088f9: c3 ret
1088fa: 66 90 xchg %ax,%ax
* 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 );
1088fc: 89 34 24 mov %esi,(%esp)
1088ff: e8 4c f3 ff ff call 107c50 <malloc>
108904: 89 c5 mov %eax,%ebp
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
108906: ff 0d 44 1e 13 00 decl 0x131e44
if ( !new_area ) {
10890c: 85 c0 test %eax,%eax
10890e: 74 3c je 10894c <realloc+0xc8>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
108910: 8b 44 24 1c mov 0x1c(%esp),%eax
108914: 89 f1 mov %esi,%ecx
108916: 39 c6 cmp %eax,%esi
108918: 77 3e ja 108958 <realloc+0xd4> <== ALWAYS TAKEN
10891a: 89 ef mov %ebp,%edi <== NOT EXECUTED
10891c: 89 de mov %ebx,%esi <== NOT EXECUTED
10891e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
free( ptr );
108920: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
108923: e8 14 f0 ff ff call 10793c <free> <== NOT EXECUTED
108928: 89 eb mov %ebp,%ebx <== NOT EXECUTED
return new_area;
}
10892a: 89 d8 mov %ebx,%eax
10892c: 83 c4 2c add $0x2c,%esp
10892f: 5b pop %ebx
108930: 5e pop %esi
108931: 5f pop %edi
108932: 5d pop %ebp
108933: c3 ret
* 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 )
108934: a1 44 1f 13 00 mov 0x131f44,%eax
108939: 85 c0 test %eax,%eax
10893b: 75 0f jne 10894c <realloc+0xc8> <== NEVER TAKEN
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_in_critical_section())
return (void *) 0;
if (_ISR_Nest_level > 0)
10893d: a1 c8 24 13 00 mov 0x1324c8,%eax
108942: 85 c0 test %eax,%eax
108944: 0f 84 5c ff ff ff je 1088a6 <realloc+0x22> <== ALWAYS TAKEN
10894a: 66 90 xchg %ax,%ax
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
return (void *) 0;
10894c: 31 db xor %ebx,%ebx
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
10894e: 89 d8 mov %ebx,%eax
108950: 83 c4 2c add $0x2c,%esp
108953: 5b pop %ebx
108954: 5e pop %esi
108955: 5f pop %edi
108956: 5d pop %ebp
108957: c3 ret
if ( !new_area ) {
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
108958: 89 c1 mov %eax,%ecx
10895a: 89 ef mov %ebp,%edi
10895c: 89 de mov %ebx,%esi
10895e: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
free( ptr );
108960: 89 1c 24 mov %ebx,(%esp)
108963: e8 d4 ef ff ff call 10793c <free>
108968: 89 eb mov %ebp,%ebx
10896a: eb be jmp 10892a <realloc+0xa6>
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
10896c: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10896f: e8 c8 ef ff ff call 10793c <free> <== NOT EXECUTED
return (void *) 0;
108974: 31 db xor %ebx,%ebx <== NOT EXECUTED
108976: e9 75 ff ff ff jmp 1088f0 <realloc+0x6c> <== NOT EXECUTED
10897b: 90 nop <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
10897c: e8 7f b2 00 00 call 113c00 <__errno>
108981: c7 00 16 00 00 00 movl $0x16,(%eax)
return (void *) 0;
108987: 31 db xor %ebx,%ebx
108989: eb c3 jmp 10894e <realloc+0xca>
10898b: 90 nop
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
10898c: 89 74 24 40 mov %esi,0x40(%esp)
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
108990: 83 c4 2c add $0x2c,%esp
108993: 5b pop %ebx
108994: 5e pop %esi
108995: 5f pop %edi
108996: 5d pop %ebp
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
108997: e9 b4 f2 ff ff jmp 107c50 <malloc>
0010c11c <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
10c11c: 55 push %ebp
10c11d: 57 push %edi
10c11e: 56 push %esi
10c11f: 53 push %ebx
10c120: 83 ec 4c sub $0x4c,%esp
10c123: 8b 5c 24 60 mov 0x60(%esp),%ebx
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
10c127: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10c12e: e8 6d 0a 00 00 call 10cba0 <pthread_mutex_lock>
10c133: 89 c6 mov %eax,%esi
if (result != 0) {
10c135: 85 c0 test %eax,%eax
10c137: 0f 85 bf 00 00 00 jne 10c1fc <rtems_aio_enqueue+0xe0><== NEVER TAKEN
return result;
}
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
10c13d: e8 a2 13 00 00 call 10d4e4 <pthread_self>
10c142: 8d 54 24 24 lea 0x24(%esp),%edx
10c146: 89 54 24 08 mov %edx,0x8(%esp)
10c14a: 8d 54 24 20 lea 0x20(%esp),%edx
10c14e: 89 54 24 04 mov %edx,0x4(%esp)
10c152: 89 04 24 mov %eax,(%esp)
10c155: e8 5e 0f 00 00 call 10d0b8 <pthread_getschedparam>
req->caller_thread = pthread_self ();
10c15a: e8 85 13 00 00 call 10d4e4 <pthread_self>
10c15f: 89 43 10 mov %eax,0x10(%ebx)
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
10c162: 8b 53 14 mov 0x14(%ebx),%edx
10c165: 8b 44 24 24 mov 0x24(%esp),%eax
10c169: 2b 42 14 sub 0x14(%edx),%eax
10c16c: 89 43 0c mov %eax,0xc(%ebx)
req->policy = policy;
10c16f: 8b 44 24 20 mov 0x20(%esp),%eax
10c173: 89 43 08 mov %eax,0x8(%ebx)
req->aiocbp->error_code = EINPROGRESS;
10c176: c7 42 30 77 00 00 00 movl $0x77,0x30(%edx)
req->aiocbp->return_value = 0;
10c17d: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ((aio_request_queue.idle_threads == 0) &&
10c184: 8b 0d e8 4d 13 00 mov 0x134de8,%ecx
10c18a: 85 c9 test %ecx,%ecx
10c18c: 75 09 jne 10c197 <rtems_aio_enqueue+0x7b><== NEVER TAKEN
10c18e: 83 3d e4 4d 13 00 04 cmpl $0x4,0x134de4
10c195: 7e 79 jle 10c210 <rtems_aio_enqueue+0xf4>
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
10c197: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10c19e: 00
10c19f: 8b 02 mov (%edx),%eax
10c1a1: 89 44 24 04 mov %eax,0x4(%esp)
10c1a5: c7 04 24 c8 4d 13 00 movl $0x134dc8,(%esp)
10c1ac: e8 13 fe ff ff call 10bfc4 <rtems_aio_search_fd>
10c1b1: 89 c7 mov %eax,%edi
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
10c1b3: 85 c0 test %eax,%eax
10c1b5: 0f 84 e9 00 00 00 je 10c2a4 <rtems_aio_enqueue+0x188>
{
pthread_mutex_lock (&r_chain->mutex);
10c1bb: 8d 6f 1c lea 0x1c(%edi),%ebp
10c1be: 89 2c 24 mov %ebp,(%esp)
10c1c1: e8 da 09 00 00 call 10cba0 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
10c1c6: 8d 47 08 lea 0x8(%edi),%eax
10c1c9: 89 da mov %ebx,%edx
10c1cb: e8 84 fc ff ff call 10be54 <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
10c1d0: 83 c7 20 add $0x20,%edi
10c1d3: 89 3c 24 mov %edi,(%esp)
10c1d6: e8 49 05 00 00 call 10c724 <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
10c1db: 89 2c 24 mov %ebp,(%esp)
10c1de: e8 61 0a 00 00 call 10cc44 <pthread_mutex_unlock>
if (aio_request_queue.idle_threads > 0)
pthread_cond_signal (&aio_request_queue.new_req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
10c1e3: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10c1ea: e8 55 0a 00 00 call 10cc44 <pthread_mutex_unlock>
return 0;
}
10c1ef: 89 f0 mov %esi,%eax
10c1f1: 83 c4 4c add $0x4c,%esp
10c1f4: 5b pop %ebx
10c1f5: 5e pop %esi
10c1f6: 5f pop %edi
10c1f7: 5d pop %ebp
10c1f8: c3 ret
10c1f9: 8d 76 00 lea 0x0(%esi),%esi
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
if (result != 0) {
free (req);
10c1fc: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10c1ff: e8 6c bb ff ff call 107d70 <free> <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
return 0;
}
10c204: 89 f0 mov %esi,%eax <== NOT EXECUTED
10c206: 83 c4 4c add $0x4c,%esp <== NOT EXECUTED
10c209: 5b pop %ebx <== NOT EXECUTED
10c20a: 5e pop %esi <== NOT EXECUTED
10c20b: 5f pop %edi <== NOT EXECUTED
10c20c: 5d pop %ebp <== NOT EXECUTED
10c20d: c3 ret <== NOT EXECUTED
10c20e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
10c210: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10c217: 00
10c218: 8b 02 mov (%edx),%eax
10c21a: 89 44 24 04 mov %eax,0x4(%esp)
10c21e: c7 04 24 c8 4d 13 00 movl $0x134dc8,(%esp)
10c225: e8 9a fd ff ff call 10bfc4 <rtems_aio_search_fd>
10c22a: 89 c7 mov %eax,%edi
if (r_chain->new_fd == 1) {
10c22c: 83 78 18 01 cmpl $0x1,0x18(%eax)
10c230: 75 89 jne 10c1bb <rtems_aio_enqueue+0x9f>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
10c232: 89 5c 24 04 mov %ebx,0x4(%esp)
10c236: 8d 40 08 lea 0x8(%eax),%eax
10c239: 89 04 24 mov %eax,(%esp)
10c23c: e8 6f 24 00 00 call 10e6b0 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
10c241: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
pthread_mutex_init (&r_chain->mutex, NULL);
10c248: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c24f: 00
10c250: 8d 47 1c lea 0x1c(%edi),%eax
10c253: 89 04 24 mov %eax,(%esp)
10c256: e8 09 08 00 00 call 10ca64 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10c25b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c262: 00
10c263: 8d 47 20 lea 0x20(%edi),%eax
10c266: 89 04 24 mov %eax,(%esp)
10c269: e8 f2 03 00 00 call 10c660 <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
10c26e: 89 7c 24 0c mov %edi,0xc(%esp)
10c272: c7 44 24 08 a8 bb 10 movl $0x10bba8,0x8(%esp)
10c279: 00
10c27a: c7 44 24 04 88 4d 13 movl $0x134d88,0x4(%esp)
10c281: 00
10c282: 8d 44 24 1c lea 0x1c(%esp),%eax
10c286: 89 04 24 mov %eax,(%esp)
10c289: e8 72 0b 00 00 call 10ce00 <pthread_create>
10c28e: 89 c3 mov %eax,%ebx
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
10c290: 85 c0 test %eax,%eax
10c292: 0f 85 9a 00 00 00 jne 10c332 <rtems_aio_enqueue+0x216><== NEVER TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
++aio_request_queue.active_threads;
10c298: ff 05 e4 4d 13 00 incl 0x134de4
10c29e: e9 40 ff ff ff jmp 10c1e3 <rtems_aio_enqueue+0xc7>
10c2a3: 90 nop
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
10c2a4: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10c2ab: 00
10c2ac: 8b 43 14 mov 0x14(%ebx),%eax
10c2af: 8b 00 mov (%eax),%eax
10c2b1: 89 44 24 04 mov %eax,0x4(%esp)
10c2b5: c7 04 24 d4 4d 13 00 movl $0x134dd4,(%esp)
10c2bc: e8 03 fd ff ff call 10bfc4 <rtems_aio_search_fd>
10c2c1: 89 c7 mov %eax,%edi
if (r_chain->new_fd == 1) {
10c2c3: 83 78 18 01 cmpl $0x1,0x18(%eax)
10c2c7: 74 2b je 10c2f4 <rtems_aio_enqueue+0x1d8>
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
pthread_cond_init (&r_chain->cond, NULL);
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
10c2c9: 8d 40 08 lea 0x8(%eax),%eax
10c2cc: 89 da mov %ebx,%edx
10c2ce: e8 81 fb ff ff call 10be54 <rtems_aio_insert_prio>
if (aio_request_queue.idle_threads > 0)
10c2d3: 8b 15 e8 4d 13 00 mov 0x134de8,%edx
10c2d9: 85 d2 test %edx,%edx
10c2db: 0f 8e 02 ff ff ff jle 10c1e3 <rtems_aio_enqueue+0xc7><== ALWAYS TAKEN
pthread_cond_signal (&aio_request_queue.new_req);
10c2e1: c7 04 24 84 4d 13 00 movl $0x134d84,(%esp) <== NOT EXECUTED
10c2e8: e8 37 04 00 00 call 10c724 <pthread_cond_signal> <== NOT EXECUTED
10c2ed: e9 f1 fe ff ff jmp 10c1e3 <rtems_aio_enqueue+0xc7><== NOT EXECUTED
10c2f2: 66 90 xchg %ax,%ax <== NOT EXECUTED
10c2f4: 89 5c 24 04 mov %ebx,0x4(%esp)
10c2f8: 8d 40 08 lea 0x8(%eax),%eax
10c2fb: 89 04 24 mov %eax,(%esp)
10c2fe: e8 ad 23 00 00 call 10e6b0 <_Chain_Insert>
if (r_chain->new_fd == 1) {
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
10c303: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
pthread_mutex_init (&r_chain->mutex, NULL);
10c30a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c311: 00
10c312: 8d 47 1c lea 0x1c(%edi),%eax
10c315: 89 04 24 mov %eax,(%esp)
10c318: e8 47 07 00 00 call 10ca64 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10c31d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c324: 00
10c325: 83 c7 20 add $0x20,%edi
10c328: 89 3c 24 mov %edi,(%esp)
10c32b: e8 30 03 00 00 call 10c660 <pthread_cond_init>
10c330: eb a1 jmp 10c2d3 <rtems_aio_enqueue+0x1b7>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
pthread_mutex_unlock (&aio_request_queue.mutex);
10c332: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp) <== NOT EXECUTED
10c339: e8 06 09 00 00 call 10cc44 <pthread_mutex_unlock> <== NOT EXECUTED
10c33e: 89 de mov %ebx,%esi <== NOT EXECUTED
10c340: e9 aa fe ff ff jmp 10c1ef <rtems_aio_enqueue+0xd3><== NOT EXECUTED
0010bba8 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
10bba8: 55 push %ebp
10bba9: 57 push %edi
10bbaa: 56 push %esi
10bbab: 53 push %ebx
10bbac: 83 ec 6c sub $0x6c,%esp
rtems_aio_request_chain *r_chain = arg;
10bbaf: 8b b4 24 80 00 00 00 mov 0x80(%esp),%esi
10bbb6: 8d 7e 1c lea 0x1c(%esi),%edi
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
10bbb9: 8d 6c 24 44 lea 0x44(%esp),%ebp
10bbbd: 8d 76 00 lea 0x0(%esi),%esi
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
10bbc0: 89 3c 24 mov %edi,(%esp)
10bbc3: e8 d8 0f 00 00 call 10cba0 <pthread_mutex_lock>
if (result != 0)
10bbc8: 85 c0 test %eax,%eax
10bbca: 0f 85 a0 00 00 00 jne 10bc70 <rtems_aio_handle+0xc8> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10bbd0: 8b 5e 08 mov 0x8(%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 );
10bbd3: 8d 46 0c lea 0xc(%esi),%eax
/* If the locked chain is not empty, take the first
request extract it, unlock the chain and process
the request, in this way the user can supply more
requests to this fd chain */
if (!rtems_chain_is_empty (chain)) {
10bbd6: 39 c3 cmp %eax,%ebx
10bbd8: 0f 84 16 01 00 00 je 10bcf4 <rtems_aio_handle+0x14c>
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
10bbde: e8 01 19 00 00 call 10d4e4 <pthread_self>
10bbe3: 89 6c 24 08 mov %ebp,0x8(%esp)
10bbe7: 8d 54 24 38 lea 0x38(%esp),%edx
10bbeb: 89 54 24 04 mov %edx,0x4(%esp)
10bbef: 89 04 24 mov %eax,(%esp)
10bbf2: e8 c1 14 00 00 call 10d0b8 <pthread_getschedparam>
param.sched_priority = req->priority;
10bbf7: 8b 43 0c mov 0xc(%ebx),%eax
10bbfa: 89 44 24 44 mov %eax,0x44(%esp)
pthread_setschedparam (pthread_self(), req->policy, ¶m);
10bbfe: 8b 53 08 mov 0x8(%ebx),%edx
10bc01: 89 54 24 2c mov %edx,0x2c(%esp)
10bc05: e8 da 18 00 00 call 10d4e4 <pthread_self>
10bc0a: 89 6c 24 08 mov %ebp,0x8(%esp)
10bc0e: 8b 54 24 2c mov 0x2c(%esp),%edx
10bc12: 89 54 24 04 mov %edx,0x4(%esp)
10bc16: 89 04 24 mov %eax,(%esp)
10bc19: e8 d2 18 00 00 call 10d4f0 <pthread_setschedparam>
10bc1e: 89 1c 24 mov %ebx,(%esp)
10bc21: e8 56 2a 00 00 call 10e67c <_Chain_Extract>
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
10bc26: 89 3c 24 mov %edi,(%esp)
10bc29: e8 16 10 00 00 call 10cc44 <pthread_mutex_unlock>
switch (req->aiocbp->aio_lio_opcode) {
10bc2e: 8b 4b 14 mov 0x14(%ebx),%ecx
10bc31: 8b 41 2c mov 0x2c(%ecx),%eax
10bc34: 83 f8 02 cmp $0x2,%eax
10bc37: 0f 84 8f 00 00 00 je 10bccc <rtems_aio_handle+0x124>
10bc3d: 83 f8 03 cmp $0x3,%eax
10bc40: 74 7e je 10bcc0 <rtems_aio_handle+0x118><== NEVER TAKEN
10bc42: 48 dec %eax
10bc43: 74 37 je 10bc7c <rtems_aio_handle+0xd4> <== ALWAYS TAKEN
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
10bc45: c7 41 34 ff ff ff ff movl $0xffffffff,0x34(%ecx) <== NOT EXECUTED
req->aiocbp->error_code = errno;
10bc4c: 89 4c 24 2c mov %ecx,0x2c(%esp) <== NOT EXECUTED
10bc50: e8 63 a2 00 00 call 115eb8 <__errno> <== NOT EXECUTED
10bc55: 8b 00 mov (%eax),%eax <== NOT EXECUTED
10bc57: 8b 4c 24 2c mov 0x2c(%esp),%ecx <== NOT EXECUTED
10bc5b: 89 41 30 mov %eax,0x30(%ecx) <== NOT EXECUTED
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
10bc5e: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
10bc61: e8 3a 0f 00 00 call 10cba0 <pthread_mutex_lock> <== NOT EXECUTED
if (result != 0)
10bc66: 85 c0 test %eax,%eax <== NOT EXECUTED
10bc68: 0f 84 62 ff ff ff je 10bbd0 <rtems_aio_handle+0x28> <== NOT EXECUTED
10bc6e: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10bc70: 31 c0 xor %eax,%eax
10bc72: 83 c4 6c add $0x6c,%esp
10bc75: 5b pop %ebx
10bc76: 5e pop %esi
10bc77: 5f pop %edi
10bc78: 5d pop %ebp
10bc79: c3 ret
10bc7a: 66 90 xchg %ax,%ax
pthread_mutex_unlock (&r_chain->mutex);
switch (req->aiocbp->aio_lio_opcode) {
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
10bc7c: 8b 41 04 mov 0x4(%ecx),%eax
10bc7f: 8b 51 08 mov 0x8(%ecx),%edx
10bc82: 89 44 24 0c mov %eax,0xc(%esp)
10bc86: 89 54 24 10 mov %edx,0x10(%esp)
10bc8a: 8b 41 10 mov 0x10(%ecx),%eax
10bc8d: 89 44 24 08 mov %eax,0x8(%esp)
10bc91: 8b 41 0c mov 0xc(%ecx),%eax
10bc94: 89 44 24 04 mov %eax,0x4(%esp)
10bc98: 8b 01 mov (%ecx),%eax
10bc9a: 89 04 24 mov %eax,(%esp)
10bc9d: e8 da ab 00 00 call 11687c <pread>
break;
default:
result = -1;
}
if (result == -1) {
10bca2: 83 f8 ff cmp $0xffffffff,%eax
10bca5: 0f 84 87 01 00 00 je 10be32 <rtems_aio_handle+0x28a><== NEVER TAKEN
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
10bcab: 8b 53 14 mov 0x14(%ebx),%edx
10bcae: 89 42 34 mov %eax,0x34(%edx)
req->aiocbp->error_code = 0;
10bcb1: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
10bcb8: e9 03 ff ff ff jmp 10bbc0 <rtems_aio_handle+0x18>
10bcbd: 8d 76 00 lea 0x0(%esi),%esi
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
10bcc0: 8b 01 mov (%ecx),%eax <== NOT EXECUTED
10bcc2: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10bcc5: e8 7a 66 00 00 call 112344 <fsync> <== NOT EXECUTED
break;
10bcca: eb d6 jmp 10bca2 <rtems_aio_handle+0xfa> <== NOT EXECUTED
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
10bccc: 8b 41 04 mov 0x4(%ecx),%eax
10bccf: 8b 51 08 mov 0x8(%ecx),%edx
10bcd2: 89 44 24 0c mov %eax,0xc(%esp)
10bcd6: 89 54 24 10 mov %edx,0x10(%esp)
10bcda: 8b 41 10 mov 0x10(%ecx),%eax
10bcdd: 89 44 24 08 mov %eax,0x8(%esp)
10bce1: 8b 41 0c mov 0xc(%ecx),%eax
10bce4: 89 44 24 04 mov %eax,0x4(%esp)
10bce8: 8b 01 mov (%ecx),%eax
10bcea: 89 04 24 mov %eax,(%esp)
10bced: e8 8a ac 00 00 call 11697c <pwrite>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
10bcf2: eb ae jmp 10bca2 <rtems_aio_handle+0xfa>
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
10bcf4: 89 3c 24 mov %edi,(%esp)
10bcf7: e8 48 0f 00 00 call 10cc44 <pthread_mutex_unlock>
pthread_mutex_lock (&aio_request_queue.mutex);
10bcfc: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10bd03: e8 98 0e 00 00 call 10cba0 <pthread_mutex_lock>
if (rtems_chain_is_empty (chain))
10bd08: 3b 5e 08 cmp 0x8(%esi),%ebx
10bd0b: 74 13 je 10bd20 <rtems_aio_handle+0x178><== ALWAYS TAKEN
}
}
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
10bd0d: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10bd14: e8 2b 0f 00 00 call 10cc44 <pthread_mutex_unlock>
10bd19: e9 a2 fe ff ff jmp 10bbc0 <rtems_aio_handle+0x18>
10bd1e: 66 90 xchg %ax,%ax
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
10bd20: 8d 44 24 3c lea 0x3c(%esp),%eax
10bd24: 89 44 24 04 mov %eax,0x4(%esp)
10bd28: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10bd2f: e8 88 07 00 00 call 10c4bc <clock_gettime>
timeout.tv_sec += 3;
10bd34: 83 44 24 3c 03 addl $0x3,0x3c(%esp)
timeout.tv_nsec = 0;
10bd39: c7 44 24 40 00 00 00 movl $0x0,0x40(%esp)
10bd40: 00
result = pthread_cond_timedwait (&r_chain->cond,
10bd41: 8d 5e 20 lea 0x20(%esi),%ebx
&aio_request_queue.mutex,
&timeout);
10bd44: 8d 44 24 3c lea 0x3c(%esp),%eax
10bd48: 89 44 24 08 mov %eax,0x8(%esp)
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
10bd4c: c7 44 24 04 80 4d 13 movl $0x134d80,0x4(%esp)
10bd53: 00
10bd54: 89 1c 24 mov %ebx,(%esp)
10bd57: e8 50 0a 00 00 call 10c7ac <pthread_cond_timedwait>
&aio_request_queue.mutex,
&timeout);
/* If no requests were added to the chain we delete the fd chain from
the queue and start working with idle fd chains */
if (result == ETIMEDOUT) {
10bd5c: 83 f8 74 cmp $0x74,%eax
10bd5f: 75 ac jne 10bd0d <rtems_aio_handle+0x165><== NEVER TAKEN
10bd61: 89 34 24 mov %esi,(%esp)
10bd64: e8 13 29 00 00 call 10e67c <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
10bd69: 89 3c 24 mov %edi,(%esp)
10bd6c: e8 87 0b 00 00 call 10c8f8 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->cond);
10bd71: 89 1c 24 mov %ebx,(%esp)
10bd74: e8 07 08 00 00 call 10c580 <pthread_cond_destroy>
free (r_chain);
10bd79: 89 34 24 mov %esi,(%esp)
10bd7c: e8 ef bf ff ff call 107d70 <free>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10bd81: 8b 35 d4 4d 13 00 mov 0x134dd4,%esi
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
10bd87: 81 fe d8 4d 13 00 cmp $0x134dd8,%esi
10bd8d: 74 4a je 10bdd9 <rtems_aio_handle+0x231>
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
10bd8f: ff 0d e8 4d 13 00 decl 0x134de8
++aio_request_queue.active_threads;
10bd95: ff 05 e4 4d 13 00 incl 0x134de4
10bd9b: 89 34 24 mov %esi,(%esp)
10bd9e: e8 d9 28 00 00 call 10e67c <_Chain_Extract>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10bda3: a1 c8 4d 13 00 mov 0x134dc8,%eax
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
10bda8: 8b 56 14 mov 0x14(%esi),%edx
10bdab: 3b 50 14 cmp 0x14(%eax),%edx
10bdae: 7f 0b jg 10bdbb <rtems_aio_handle+0x213><== ALWAYS TAKEN
10bdb0: eb 10 jmp 10bdc2 <rtems_aio_handle+0x21a><== NOT EXECUTED
10bdb2: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10bdb4: 8b 00 mov (%eax),%eax
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
10bdb6: 39 50 14 cmp %edx,0x14(%eax)
10bdb9: 7d 07 jge 10bdc2 <rtems_aio_handle+0x21a>
10bdbb: 3d cc 4d 13 00 cmp $0x134dcc,%eax
10bdc0: 75 f2 jne 10bdb4 <rtems_aio_handle+0x20c><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
10bdc2: 89 74 24 04 mov %esi,0x4(%esp)
10bdc6: 8b 40 04 mov 0x4(%eax),%eax
10bdc9: 89 04 24 mov %eax,(%esp)
10bdcc: e8 df 28 00 00 call 10e6b0 <_Chain_Insert>
10bdd1: 8d 7e 1c lea 0x1c(%esi),%edi
10bdd4: e9 34 ff ff ff jmp 10bd0d <rtems_aio_handle+0x165>
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
10bdd9: ff 05 e8 4d 13 00 incl 0x134de8
--aio_request_queue.active_threads;
10bddf: ff 0d e4 4d 13 00 decl 0x134de4
clock_gettime (CLOCK_REALTIME, &timeout);
10bde5: 8d 44 24 3c lea 0x3c(%esp),%eax
10bde9: 89 44 24 04 mov %eax,0x4(%esp)
10bded: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10bdf4: e8 c3 06 00 00 call 10c4bc <clock_gettime>
timeout.tv_sec += 3;
10bdf9: 83 44 24 3c 03 addl $0x3,0x3c(%esp)
timeout.tv_nsec = 0;
10bdfe: c7 44 24 40 00 00 00 movl $0x0,0x40(%esp)
10be05: 00
result = pthread_cond_timedwait (&aio_request_queue.new_req,
&aio_request_queue.mutex,
&timeout);
10be06: 8d 44 24 3c lea 0x3c(%esp),%eax
10be0a: 89 44 24 08 mov %eax,0x8(%esp)
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
10be0e: c7 44 24 04 80 4d 13 movl $0x134d80,0x4(%esp)
10be15: 00
10be16: c7 04 24 84 4d 13 00 movl $0x134d84,(%esp)
10be1d: e8 8a 09 00 00 call 10c7ac <pthread_cond_timedwait>
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
10be22: 83 f8 74 cmp $0x74,%eax
10be25: 74 13 je 10be3a <rtems_aio_handle+0x292><== ALWAYS TAKEN
10be27: 8b 35 d4 4d 13 00 mov 0x134dd4,%esi <== NOT EXECUTED
10be2d: e9 5d ff ff ff jmp 10bd8f <rtems_aio_handle+0x1e7><== NOT EXECUTED
10be32: 8b 4b 14 mov 0x14(%ebx),%ecx <== NOT EXECUTED
10be35: e9 0b fe ff ff jmp 10bc45 <rtems_aio_handle+0x9d> <== NOT EXECUTED
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
10be3a: ff 0d e8 4d 13 00 decl 0x134de8
pthread_mutex_unlock (&aio_request_queue.mutex);
10be40: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10be47: e8 f8 0d 00 00 call 10cc44 <pthread_mutex_unlock>
10be4c: e9 1f fe ff ff jmp 10bc70 <rtems_aio_handle+0xc8>
0010bea8 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
10bea8: 53 push %ebx
10bea9: 83 ec 18 sub $0x18,%esp
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
10beac: c7 04 24 88 4d 13 00 movl $0x134d88,(%esp)
10beb3: e8 f8 0e 00 00 call 10cdb0 <pthread_attr_init>
10beb8: 89 c3 mov %eax,%ebx
if (result != 0)
10beba: 85 c0 test %eax,%eax
10bebc: 74 0a je 10bec8 <rtems_aio_init+0x20> <== ALWAYS TAKEN
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
return result;
}
10bebe: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10bec0: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
10bec3: 5b pop %ebx <== NOT EXECUTED
10bec4: c3 ret <== NOT EXECUTED
10bec5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
result = pthread_attr_init (&aio_request_queue.attr);
if (result != 0)
return result;
result =
10bec8: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10becf: 00
10bed0: c7 04 24 88 4d 13 00 movl $0x134d88,(%esp)
10bed7: e8 fc 0e 00 00 call 10cdd8 <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
10bedc: 85 c0 test %eax,%eax
10bede: 0f 85 98 00 00 00 jne 10bf7c <rtems_aio_init+0xd4> <== NEVER TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
10bee4: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10beeb: 00
10beec: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10bef3: e8 6c 0b 00 00 call 10ca64 <pthread_mutex_init>
if (result != 0)
10bef8: 85 c0 test %eax,%eax
10befa: 0f 85 b0 00 00 00 jne 10bfb0 <rtems_aio_init+0x108> <== NEVER TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
10bf00: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10bf07: 00
10bf08: c7 04 24 84 4d 13 00 movl $0x134d84,(%esp)
10bf0f: e8 4c 07 00 00 call 10c660 <pthread_cond_init>
10bf14: 89 c3 mov %eax,%ebx
if (result != 0) {
10bf16: 85 c0 test %eax,%eax
10bf18: 75 76 jne 10bf90 <rtems_aio_init+0xe8> <== NEVER TAKEN
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10bf1a: c7 05 c8 4d 13 00 cc movl $0x134dcc,0x134dc8
10bf21: 4d 13 00
head->previous = NULL;
10bf24: c7 05 cc 4d 13 00 00 movl $0x0,0x134dcc
10bf2b: 00 00 00
tail->previous = head;
10bf2e: c7 05 d0 4d 13 00 c8 movl $0x134dc8,0x134dd0
10bf35: 4d 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10bf38: c7 05 d4 4d 13 00 d8 movl $0x134dd8,0x134dd4
10bf3f: 4d 13 00
head->previous = NULL;
10bf42: c7 05 d8 4d 13 00 00 movl $0x0,0x134dd8
10bf49: 00 00 00
tail->previous = head;
10bf4c: c7 05 dc 4d 13 00 d4 movl $0x134dd4,0x134ddc
10bf53: 4d 13 00
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
10bf56: c7 05 e4 4d 13 00 00 movl $0x0,0x134de4
10bf5d: 00 00 00
aio_request_queue.idle_threads = 0;
10bf60: c7 05 e8 4d 13 00 00 movl $0x0,0x134de8
10bf67: 00 00 00
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
10bf6a: c7 05 e0 4d 13 00 0b movl $0xb00b,0x134de0
10bf71: b0 00 00
return result;
}
10bf74: 89 d8 mov %ebx,%eax
10bf76: 83 c4 18 add $0x18,%esp
10bf79: 5b pop %ebx
10bf7a: c3 ret
10bf7b: 90 nop
result =
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
10bf7c: c7 04 24 88 4d 13 00 movl $0x134d88,(%esp) <== NOT EXECUTED
10bf83: e8 08 0e 00 00 call 10cd90 <pthread_attr_destroy> <== NOT EXECUTED
10bf88: e9 57 ff ff ff jmp 10bee4 <rtems_aio_init+0x3c> <== NOT EXECUTED
10bf8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
if (result != 0) {
pthread_mutex_destroy (&aio_request_queue.mutex);
10bf90: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp) <== NOT EXECUTED
10bf97: e8 5c 09 00 00 call 10c8f8 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
10bf9c: c7 04 24 88 4d 13 00 movl $0x134d88,(%esp) <== NOT EXECUTED
10bfa3: e8 e8 0d 00 00 call 10cd90 <pthread_attr_destroy> <== NOT EXECUTED
10bfa8: e9 6d ff ff ff jmp 10bf1a <rtems_aio_init+0x72> <== NOT EXECUTED
10bfad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
10bfb0: c7 04 24 88 4d 13 00 movl $0x134d88,(%esp) <== NOT EXECUTED
10bfb7: e8 d4 0d 00 00 call 10cd90 <pthread_attr_destroy> <== NOT EXECUTED
10bfbc: e9 3f ff ff ff jmp 10bf00 <rtems_aio_init+0x58> <== NOT EXECUTED
0010be54 <rtems_aio_insert_prio>:
* NONE
*/
static void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
10be54: 56 push %esi
10be55: 53 push %ebx
10be56: 83 ec 14 sub $0x14,%esp
10be59: 8b 08 mov (%eax),%ecx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10be5b: 8d 70 04 lea 0x4(%eax),%esi
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
10be5e: 39 f1 cmp %esi,%ecx
10be60: 74 35 je 10be97 <rtems_aio_insert_prio+0x43><== NEVER TAKEN
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
10be62: 8b 42 14 mov 0x14(%edx),%eax
10be65: 8b 58 14 mov 0x14(%eax),%ebx
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
10be68: 8b 41 14 mov 0x14(%ecx),%eax
while (req->aiocbp->aio_reqprio > prio &&
10be6b: 39 58 14 cmp %ebx,0x14(%eax)
10be6e: 7c 08 jl 10be78 <rtems_aio_insert_prio+0x24><== NEVER TAKEN
10be70: eb 10 jmp 10be82 <rtems_aio_insert_prio+0x2e>
10be72: 66 90 xchg %ax,%ax
10be74: 39 ce cmp %ecx,%esi <== NOT EXECUTED
10be76: 74 0a je 10be82 <rtems_aio_insert_prio+0x2e><== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10be78: 8b 09 mov (%ecx),%ecx <== NOT EXECUTED
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
10be7a: 8b 41 14 mov 0x14(%ecx),%eax <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
10be7d: 39 58 14 cmp %ebx,0x14(%eax) <== NOT EXECUTED
10be80: 7c f2 jl 10be74 <rtems_aio_insert_prio+0x20><== NOT EXECUTED
10be82: 89 54 24 04 mov %edx,0x4(%esp)
10be86: 8b 41 04 mov 0x4(%ecx),%eax
10be89: 89 04 24 mov %eax,(%esp)
10be8c: e8 1f 28 00 00 call 10e6b0 <_Chain_Insert>
}
rtems_chain_insert (node->previous, &req->next_prio);
}
}
10be91: 83 c4 14 add $0x14,%esp
10be94: 5b pop %ebx
10be95: 5e pop %esi
10be96: c3 ret
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
10be97: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
10be9b: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10be9e: e8 0d 28 00 00 call 10e6b0 <_Chain_Insert> <== NOT EXECUTED
10bea3: eb ec jmp 10be91 <rtems_aio_insert_prio+0x3d><== NOT EXECUTED
0010c078 <rtems_aio_remove_fd>:
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
10c078: 57 push %edi
10c079: 56 push %esi
10c07a: 53 push %ebx
10c07b: 83 ec 10 sub $0x10,%esp
10c07e: 8b 7c 24 20 mov 0x20(%esp),%edi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10c082: 8b 5f 08 mov 0x8(%edi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
const Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Immutable_tail( the_chain ));
10c085: 83 c7 0c add $0xc,%edi
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
10c088: 39 fb cmp %edi,%ebx
10c08a: 74 29 je 10c0b5 <rtems_aio_remove_fd+0x3d><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10c08c: 89 1c 24 mov %ebx,(%esp)
10c08f: e8 e8 25 00 00 call 10e67c <_Chain_Extract>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c094: 8b 33 mov (%ebx),%esi
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
10c096: 8b 43 14 mov 0x14(%ebx),%eax
10c099: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax)
req->aiocbp->return_value = -1;
10c0a0: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax)
free (req);
10c0a7: 89 1c 24 mov %ebx,(%esp)
10c0aa: e8 c1 bc ff ff call 107d70 <free>
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
10c0af: 89 f3 mov %esi,%ebx
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
10c0b1: 39 fe cmp %edi,%esi
10c0b3: 75 d7 jne 10c08c <rtems_aio_remove_fd+0x14>
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
req->aiocbp->return_value = -1;
free (req);
}
}
10c0b5: 83 c4 10 add $0x10,%esp
10c0b8: 5b pop %ebx
10c0b9: 5e pop %esi
10c0ba: 5f pop %edi
10c0bb: c3 ret
0010c0bc <rtems_aio_remove_req>:
* AIO_NOTCANCELED - if request was not canceled
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
10c0bc: 53 push %ebx
10c0bd: 83 ec 18 sub $0x18,%esp
10c0c0: 8b 44 24 20 mov 0x20(%esp),%eax
10c0c4: 8b 54 24 24 mov 0x24(%esp),%edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10c0c8: 8b 18 mov (%eax),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10c0ca: 83 c0 04 add $0x4,%eax
if (rtems_chain_is_empty (chain))
10c0cd: 39 c3 cmp %eax,%ebx
10c0cf: 75 09 jne 10c0da <rtems_aio_remove_req+0x1e>
10c0d1: eb 3f jmp 10c112 <rtems_aio_remove_req+0x56>
10c0d3: 90 nop
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c0d4: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
10c0d6: 39 d8 cmp %ebx,%eax <== NOT EXECUTED
10c0d8: 74 2e je 10c108 <rtems_aio_remove_req+0x4c><== NOT EXECUTED
10c0da: 39 53 14 cmp %edx,0x14(%ebx)
10c0dd: 75 f5 jne 10c0d4 <rtems_aio_remove_req+0x18><== NEVER TAKEN
10c0df: 89 1c 24 mov %ebx,(%esp)
10c0e2: e8 95 25 00 00 call 10e67c <_Chain_Extract>
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
10c0e7: 8b 43 14 mov 0x14(%ebx),%eax
10c0ea: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax)
current->aiocbp->return_value = -1;
10c0f1: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax)
free (current);
10c0f8: 89 1c 24 mov %ebx,(%esp)
10c0fb: e8 70 bc ff ff call 107d70 <free>
}
return AIO_CANCELED;
10c100: 31 c0 xor %eax,%eax
}
10c102: 83 c4 18 add $0x18,%esp
10c105: 5b pop %ebx
10c106: c3 ret
10c107: 90 nop
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
10c108: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
10c10d: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
10c110: 5b pop %ebx <== NOT EXECUTED
10c111: c3 ret <== NOT EXECUTED
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
return AIO_ALLDONE;
10c112: b8 02 00 00 00 mov $0x2,%eax
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
10c117: 83 c4 18 add $0x18,%esp
10c11a: 5b pop %ebx
10c11b: c3 ret
001130a4 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
1130a4: 55 push %ebp
1130a5: 57 push %edi
1130a6: 56 push %esi
1130a7: 53 push %ebx
1130a8: 83 ec 1c sub $0x1c,%esp
1130ab: 8b 74 24 34 mov 0x34(%esp),%esi
1130af: bd 20 00 00 00 mov $0x20,%ebp
uint32_t b;
uint32_t local_value = 0;
1130b4: 31 ff xor %edi,%edi
for (b = 1; b; b <<= 1) {
1130b6: bb 01 00 00 00 mov $0x1,%ebx
1130bb: eb 08 jmp 1130c5 <rtems_assoc_local_by_remote_bitfield+0x21>
1130bd: 8d 76 00 lea 0x0(%esi),%esi
1130c0: d1 e3 shl %ebx
1130c2: 4d dec %ebp
1130c3: 74 1b je 1130e0 <rtems_assoc_local_by_remote_bitfield+0x3c>
if (b & remote_value)
1130c5: 85 f3 test %esi,%ebx
1130c7: 74 f7 je 1130c0 <rtems_assoc_local_by_remote_bitfield+0x1c>
local_value |= rtems_assoc_local_by_remote(ap, b);
1130c9: 89 5c 24 04 mov %ebx,0x4(%esp)
1130cd: 8b 44 24 30 mov 0x30(%esp),%eax
1130d1: 89 04 24 mov %eax,(%esp)
1130d4: e8 b7 ca ff ff call 10fb90 <rtems_assoc_local_by_remote>
1130d9: 09 c7 or %eax,%edi
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
1130db: d1 e3 shl %ebx
1130dd: 4d dec %ebp
1130de: 75 e5 jne 1130c5 <rtems_assoc_local_by_remote_bitfield+0x21><== ALWAYS TAKEN
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
1130e0: 89 f8 mov %edi,%eax
1130e2: 83 c4 1c add $0x1c,%esp
1130e5: 5b pop %ebx
1130e6: 5e pop %esi
1130e7: 5f pop %edi
1130e8: 5d pop %ebp
1130e9: c3 ret
0010fbf0 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
10fbf0: 57 push %edi
10fbf1: 56 push %esi
10fbf2: 53 push %ebx
10fbf3: 8b 44 24 10 mov 0x10(%esp),%eax
10fbf7: 8b 54 24 14 mov 0x14(%esp),%edx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
10fbfb: 8b 30 mov (%eax),%esi
10fbfd: 85 f6 test %esi,%esi
10fbff: 74 3f je 10fc40 <rtems_assoc_ptr_by_local+0x50>
10fc01: bf 0c 30 12 00 mov $0x12300c,%edi
10fc06: b9 0a 00 00 00 mov $0xa,%ecx
10fc0b: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10fc0d: 74 19 je 10fc28 <rtems_assoc_ptr_by_local+0x38>
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
10fc0f: 31 c9 xor %ecx,%ecx
10fc11: eb 0a jmp 10fc1d <rtems_assoc_ptr_by_local+0x2d>
10fc13: 90 nop
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
10fc14: 83 c0 0c add $0xc,%eax
10fc17: 8b 18 mov (%eax),%ebx
10fc19: 85 db test %ebx,%ebx
10fc1b: 74 1b je 10fc38 <rtems_assoc_ptr_by_local+0x48>
if (ap->local_value == local_value)
10fc1d: 39 50 04 cmp %edx,0x4(%eax)
10fc20: 75 f2 jne 10fc14 <rtems_assoc_ptr_by_local+0x24>
return ap;
return default_ap;
}
10fc22: 5b pop %ebx
10fc23: 5e pop %esi
10fc24: 5f pop %edi
10fc25: c3 ret
10fc26: 66 90 xchg %ax,%ax
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
10fc28: 8d 58 0c lea 0xc(%eax),%ebx
for ( ; ap->name; ap++)
10fc2b: 8b 70 0c mov 0xc(%eax),%esi
10fc2e: 85 f6 test %esi,%esi
10fc30: 74 f0 je 10fc22 <rtems_assoc_ptr_by_local+0x32><== NEVER TAKEN
10fc32: 89 c1 mov %eax,%ecx
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
10fc34: 89 d8 mov %ebx,%eax
10fc36: eb e5 jmp 10fc1d <rtems_assoc_ptr_by_local+0x2d>
for ( ; ap->name; ap++)
10fc38: 89 c8 mov %ecx,%eax
if (ap->local_value == local_value)
return ap;
return default_ap;
}
10fc3a: 5b pop %ebx
10fc3b: 5e pop %esi
10fc3c: 5f pop %edi
10fc3d: c3 ret
10fc3e: 66 90 xchg %ax,%ax
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
10fc40: 31 c0 xor %eax,%eax
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
10fc42: 5b pop %ebx
10fc43: 5e pop %esi
10fc44: 5f pop %edi
10fc45: c3 ret
001081d4 <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
1081d4: 55 push %ebp
1081d5: 57 push %edi
1081d6: 56 push %esi
1081d7: 53 push %ebx
1081d8: 83 ec 1c sub $0x1c,%esp
1081db: 8b 5c 24 30 mov 0x30(%esp),%ebx
1081df: 8b 6c 24 34 mov 0x34(%esp),%ebp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
1081e3: 8b 03 mov (%ebx),%eax
1081e5: 85 c0 test %eax,%eax
1081e7: 74 57 je 108240 <rtems_assoc_ptr_by_name+0x6c>
1081e9: bf 02 1e 12 00 mov $0x121e02,%edi
1081ee: b9 0a 00 00 00 mov $0xa,%ecx
1081f3: 89 c6 mov %eax,%esi
1081f5: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
1081f7: 74 2b je 108224 <rtems_assoc_ptr_by_name+0x50>
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
1081f9: 31 f6 xor %esi,%esi
1081fb: eb 0c jmp 108209 <rtems_assoc_ptr_by_name+0x35>
1081fd: 8d 76 00 lea 0x0(%esi),%esi
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
108200: 83 c3 0c add $0xc,%ebx
108203: 8b 03 mov (%ebx),%eax
108205: 85 c0 test %eax,%eax
108207: 74 2b je 108234 <rtems_assoc_ptr_by_name+0x60>
if (strcmp(ap->name, name) == 0)
108209: 89 6c 24 04 mov %ebp,0x4(%esp)
10820d: 89 04 24 mov %eax,(%esp)
108210: e8 67 d2 00 00 call 11547c <strcmp>
108215: 85 c0 test %eax,%eax
108217: 75 e7 jne 108200 <rtems_assoc_ptr_by_name+0x2c>
return ap;
return default_ap;
}
108219: 89 d8 mov %ebx,%eax
10821b: 83 c4 1c add $0x1c,%esp
10821e: 5b pop %ebx
10821f: 5e pop %esi
108220: 5f pop %edi
108221: 5d pop %ebp
108222: c3 ret
108223: 90 nop
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
108224: 8d 53 0c lea 0xc(%ebx),%edx
for ( ; ap->name; ap++)
108227: 8b 43 0c mov 0xc(%ebx),%eax
10822a: 85 c0 test %eax,%eax
10822c: 74 eb je 108219 <rtems_assoc_ptr_by_name+0x45><== NEVER TAKEN
10822e: 89 de mov %ebx,%esi
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
108230: 89 d3 mov %edx,%ebx
108232: eb d5 jmp 108209 <rtems_assoc_ptr_by_name+0x35>
for ( ; ap->name; ap++)
108234: 89 f3 mov %esi,%ebx
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
108236: 89 d8 mov %ebx,%eax
108238: 83 c4 1c add $0x1c,%esp
10823b: 5b pop %ebx
10823c: 5e pop %esi
10823d: 5f pop %edi
10823e: 5d pop %ebp
10823f: c3 ret
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
108240: 31 db xor %ebx,%ebx
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
108242: 89 d8 mov %ebx,%eax
108244: 83 c4 1c add $0x1c,%esp
108247: 5b pop %ebx
108248: 5e pop %esi
108249: 5f pop %edi
10824a: 5d pop %ebp
10824b: c3 ret
0010fc48 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
10fc48: 57 push %edi
10fc49: 56 push %esi
10fc4a: 53 push %ebx
10fc4b: 8b 44 24 10 mov 0x10(%esp),%eax
10fc4f: 8b 54 24 14 mov 0x14(%esp),%edx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
10fc53: 8b 30 mov (%eax),%esi
10fc55: 85 f6 test %esi,%esi
10fc57: 74 3f je 10fc98 <rtems_assoc_ptr_by_remote+0x50>
10fc59: bf 0c 30 12 00 mov $0x12300c,%edi
10fc5e: b9 0a 00 00 00 mov $0xa,%ecx
10fc63: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10fc65: 74 19 je 10fc80 <rtems_assoc_ptr_by_remote+0x38>
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
10fc67: 31 c9 xor %ecx,%ecx
10fc69: eb 0a jmp 10fc75 <rtems_assoc_ptr_by_remote+0x2d>
10fc6b: 90 nop
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
10fc6c: 83 c0 0c add $0xc,%eax
10fc6f: 8b 18 mov (%eax),%ebx
10fc71: 85 db test %ebx,%ebx
10fc73: 74 1b je 10fc90 <rtems_assoc_ptr_by_remote+0x48>
if (ap->remote_value == remote_value)
10fc75: 39 50 08 cmp %edx,0x8(%eax)
10fc78: 75 f2 jne 10fc6c <rtems_assoc_ptr_by_remote+0x24>
return ap;
return default_ap;
}
10fc7a: 5b pop %ebx
10fc7b: 5e pop %esi
10fc7c: 5f pop %edi
10fc7d: c3 ret
10fc7e: 66 90 xchg %ax,%ax
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
10fc80: 8d 58 0c lea 0xc(%eax),%ebx
for ( ; ap->name; ap++)
10fc83: 8b 70 0c mov 0xc(%eax),%esi
10fc86: 85 f6 test %esi,%esi
10fc88: 74 f0 je 10fc7a <rtems_assoc_ptr_by_remote+0x32><== NEVER TAKEN
10fc8a: 89 c1 mov %eax,%ecx
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
10fc8c: 89 d8 mov %ebx,%eax
10fc8e: eb e5 jmp 10fc75 <rtems_assoc_ptr_by_remote+0x2d>
for ( ; ap->name; ap++)
10fc90: 89 c8 mov %ecx,%eax
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
10fc92: 5b pop %ebx
10fc93: 5e pop %esi
10fc94: 5f pop %edi
10fc95: c3 ret
10fc96: 66 90 xchg %ax,%ax
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
10fc98: 31 c0 xor %eax,%eax
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
10fc9a: 5b pop %ebx
10fc9b: 5e pop %esi
10fc9c: 5f pop %edi
10fc9d: c3 ret
001082a4 <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
1082a4: 55 push %ebp
1082a5: 57 push %edi
1082a6: 56 push %esi
1082a7: 53 push %ebx
1082a8: 83 ec 1c sub $0x1c,%esp
1082ab: 8b 74 24 34 mov 0x34(%esp),%esi
1082af: bd 20 00 00 00 mov $0x20,%ebp
uint32_t b;
uint32_t remote_value = 0;
1082b4: 31 ff xor %edi,%edi
for (b = 1; b; b <<= 1)
1082b6: bb 01 00 00 00 mov $0x1,%ebx
1082bb: eb 08 jmp 1082c5 <rtems_assoc_remote_by_local_bitfield+0x21>
1082bd: 8d 76 00 lea 0x0(%esi),%esi
1082c0: d1 e3 shl %ebx
1082c2: 4d dec %ebp
1082c3: 74 1b je 1082e0 <rtems_assoc_remote_by_local_bitfield+0x3c>
if (b & local_value)
1082c5: 85 f3 test %esi,%ebx
1082c7: 74 f7 je 1082c0 <rtems_assoc_remote_by_local_bitfield+0x1c>
remote_value |= rtems_assoc_remote_by_local(ap, b);
1082c9: 89 5c 24 04 mov %ebx,0x4(%esp)
1082cd: 8b 44 24 30 mov 0x30(%esp),%eax
1082d1: 89 04 24 mov %eax,(%esp)
1082d4: e8 13 00 00 00 call 1082ec <rtems_assoc_remote_by_local>
1082d9: 09 c7 or %eax,%edi
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
1082db: d1 e3 shl %ebx
1082dd: 4d dec %ebp
1082de: 75 e5 jne 1082c5 <rtems_assoc_remote_by_local_bitfield+0x21><== ALWAYS TAKEN
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
return remote_value;
}
1082e0: 89 f8 mov %edi,%eax
1082e2: 83 c4 1c add $0x1c,%esp
1082e5: 5b pop %ebx
1082e6: 5e pop %esi
1082e7: 5f pop %edi
1082e8: 5d pop %ebp
1082e9: c3 ret
0010744c <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
10744c: 55 push %ebp
10744d: 57 push %edi
10744e: 56 push %esi
10744f: 53 push %ebx
107450: 83 ec 1c sub $0x1c,%esp
107453: 8b 44 24 30 mov 0x30(%esp),%eax
107457: 8b 5c 24 34 mov 0x34(%esp),%ebx
10745b: 8b 6c 24 38 mov 0x38(%esp),%ebp
const char *p;
if ( !name )
10745f: 85 c0 test %eax,%eax
107461: 74 59 je 1074bc <rtems_bsp_cmdline_get_param+0x70>
return NULL;
if ( !value )
107463: 85 db test %ebx,%ebx
107465: 74 55 je 1074bc <rtems_bsp_cmdline_get_param+0x70>
return NULL;
if ( !length )
107467: 85 ed test %ebp,%ebp
107469: 74 51 je 1074bc <rtems_bsp_cmdline_get_param+0x70>
return NULL;
value[0] = '\0';
10746b: c6 03 00 movb $0x0,(%ebx)
p = rtems_bsp_cmdline_get_param_raw( name );
10746e: 89 04 24 mov %eax,(%esp)
107471: e8 52 00 00 00 call 1074c8 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
107476: 85 c0 test %eax,%eax
107478: 74 42 je 1074bc <rtems_bsp_cmdline_get_param+0x70>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
10747a: 8a 08 mov (%eax),%cl
10747c: 84 c9 test %cl,%cl
10747e: 74 3e je 1074be <rtems_bsp_cmdline_get_param+0x72><== NEVER TAKEN
107480: 83 fd 01 cmp $0x1,%ebp
107483: 74 39 je 1074be <rtems_bsp_cmdline_get_param+0x72><== NEVER TAKEN
value[i] = '\0';
}
}
const char *rtems_bsp_cmdline_get_param(
107485: 4d dec %ebp
107486: 31 d2 xor %edx,%edx
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
107488: 31 f6 xor %esi,%esi
value[i] = '\0';
}
}
const char *rtems_bsp_cmdline_get_param(
10748a: 31 ff xor %edi,%edi
10748c: eb 24 jmp 1074b2 <rtems_bsp_cmdline_get_param+0x66>
10748e: 66 90 xchg %ax,%ax
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
107490: f7 c7 01 00 00 00 test $0x1,%edi
107496: 75 05 jne 10749d <rtems_bsp_cmdline_get_param+0x51>
107498: 80 f9 20 cmp $0x20,%cl
10749b: 74 21 je 1074be <rtems_bsp_cmdline_get_param+0x72>
break;
value[i++] = *p++;
10749d: 88 0c 33 mov %cl,(%ebx,%esi,1)
1074a0: 42 inc %edx
value[i] = '\0';
1074a1: 89 d6 mov %edx,%esi
1074a3: c6 04 13 00 movb $0x0,(%ebx,%edx,1)
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
1074a7: 8a 0c 10 mov (%eax,%edx,1),%cl
1074aa: 84 c9 test %cl,%cl
1074ac: 74 10 je 1074be <rtems_bsp_cmdline_get_param+0x72>
1074ae: 39 ea cmp %ebp,%edx
1074b0: 74 0c je 1074be <rtems_bsp_cmdline_get_param+0x72>
if ( *p == '\"' ) {
1074b2: 80 f9 22 cmp $0x22,%cl
1074b5: 75 d9 jne 107490 <rtems_bsp_cmdline_get_param+0x44>
quotes++;
1074b7: 47 inc %edi
1074b8: eb e3 jmp 10749d <rtems_bsp_cmdline_get_param+0x51>
1074ba: 66 90 xchg %ax,%ax
)
{
const char *p;
if ( !name )
return NULL;
1074bc: 31 db xor %ebx,%ebx
return NULL;
copy_string( p, value, length );
return value;
}
1074be: 89 d8 mov %ebx,%eax
1074c0: 83 c4 1c add $0x1c,%esp
1074c3: 5b pop %ebx
1074c4: 5e pop %esi
1074c5: 5f pop %edi
1074c6: 5d pop %ebp
1074c7: c3 ret
0010c56c <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10c56c: 55 push %ebp
10c56d: 57 push %edi
10c56e: 56 push %esi
10c56f: 53 push %ebx
10c570: 83 ec 2c sub $0x2c,%esp
10c573: 8b 5c 24 40 mov 0x40(%esp),%ebx
10c577: 8b 6c 24 44 mov 0x44(%esp),%ebp
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
10c57b: 8d 74 24 1c lea 0x1c(%esp),%esi
10c57f: 90 nop
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10c580: 89 1c 24 mov %ebx,(%esp)
10c583: e8 a8 05 00 00 call 10cb30 <_Chain_Get>
10c588: 89 c7 mov %eax,%edi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10c58a: 85 c0 test %eax,%eax
10c58c: 75 2e jne 10c5bc <rtems_chain_get_with_wait+0x50>
) {
rtems_event_set out;
sc = rtems_event_receive(
10c58e: 89 74 24 0c mov %esi,0xc(%esp)
10c592: 8b 44 24 48 mov 0x48(%esp),%eax
10c596: 89 44 24 08 mov %eax,0x8(%esp)
10c59a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c5a1: 00
10c5a2: 89 2c 24 mov %ebp,(%esp)
10c5a5: e8 7e f3 ff ff call 10b928 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10c5aa: 85 c0 test %eax,%eax
10c5ac: 74 d2 je 10c580 <rtems_chain_get_with_wait+0x14><== NEVER TAKEN
timeout,
&out
);
}
*node_ptr = node;
10c5ae: 8b 4c 24 4c mov 0x4c(%esp),%ecx
10c5b2: 89 39 mov %edi,(%ecx)
return sc;
}
10c5b4: 83 c4 2c add $0x2c,%esp
10c5b7: 5b pop %ebx
10c5b8: 5e pop %esi
10c5b9: 5f pop %edi
10c5ba: 5d pop %ebp
10c5bb: c3 ret
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10c5bc: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10c5be: 8b 4c 24 4c mov 0x4c(%esp),%ecx
10c5c2: 89 39 mov %edi,(%ecx)
return sc;
}
10c5c4: 83 c4 2c add $0x2c,%esp
10c5c7: 5b pop %ebx
10c5c8: 5e pop %esi
10c5c9: 5f pop %edi
10c5ca: 5d pop %ebp
10c5cb: c3 ret
00107bf4 <rtems_cpu_usage_report_with_plugin>:
*/
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
107bf4: 55 push %ebp
107bf5: 57 push %edi
107bf6: 56 push %esi
107bf7: 53 push %ebx
107bf8: 83 ec 7c sub $0x7c,%esp
uint32_t seconds, nanoseconds;
#else
uint32_t total_units = 0;
#endif
if ( !print )
107bfb: 8b 84 24 94 00 00 00 mov 0x94(%esp),%eax
107c02: 85 c0 test %eax,%eax
107c04: 0f 84 9e 02 00 00 je 107ea8 <rtems_cpu_usage_report_with_plugin+0x2b4><== NEVER TAKEN
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
107c0a: c7 44 24 50 00 00 00 movl $0x0,0x50(%esp)
107c11: 00
107c12: c7 44 24 54 00 00 00 movl $0x0,0x54(%esp)
107c19: 00
* 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;
107c1a: 8b 35 00 41 13 00 mov 0x134100,%esi
107c20: 8b 3d 04 41 13 00 mov 0x134104,%edi
107c26: 89 74 24 30 mov %esi,0x30(%esp)
107c2a: 89 7c 24 34 mov %edi,0x34(%esp)
}
}
}
#endif
(*print)(
107c2e: c7 44 24 04 f0 41 12 movl $0x1241f0,0x4(%esp)
107c35: 00
107c36: 8b bc 24 90 00 00 00 mov 0x90(%esp),%edi
107c3d: 89 3c 24 mov %edi,(%esp)
107c40: 8b 8c 24 94 00 00 00 mov 0x94(%esp),%ecx
107c47: ff d1 call *%ecx
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
107c49: c7 44 24 3c 01 00 00 movl $0x1,0x3c(%esp)
107c50: 00
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
107c51: 8b 74 24 3c mov 0x3c(%esp),%esi
107c55: 8b 04 b5 9c 3a 13 00 mov 0x133a9c(,%esi,4),%eax
107c5c: 8b 68 04 mov 0x4(%eax),%ebp
if ( information ) {
107c5f: 85 ed test %ebp,%ebp
107c61: 0f 84 b5 01 00 00 je 107e1c <rtems_cpu_usage_report_with_plugin+0x228><== NEVER TAKEN
for ( i=1 ; i <= information->maximum ; i++ ) {
107c67: 66 83 7d 10 00 cmpw $0x0,0x10(%ebp)
107c6c: 0f 84 aa 01 00 00 je 107e1c <rtems_cpu_usage_report_with_plugin+0x228>
107c72: bb 01 00 00 00 mov $0x1,%ebx
107c77: e9 ea 00 00 00 jmp 107d66 <rtems_cpu_usage_report_with_plugin+0x172>
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
107c7c: 8d 44 24 48 lea 0x48(%esp),%eax
107c80: 89 04 24 mov %eax,(%esp)
107c83: e8 10 60 00 00 call 10dc98 <_TOD_Get_uptime>
107c88: 8b 44 24 48 mov 0x48(%esp),%eax
107c8c: 8b 54 24 4c mov 0x4c(%esp),%edx
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
107c90: 2b 44 24 30 sub 0x30(%esp),%eax
107c94: 1b 54 24 34 sbb 0x34(%esp),%edx
107c98: 89 44 24 50 mov %eax,0x50(%esp)
107c9c: 89 54 24 54 mov %edx,0x54(%esp)
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
_Timestamp_Divide( &ran, &total, &ival, &fval );
107ca0: 8d 44 24 44 lea 0x44(%esp),%eax
107ca4: 89 44 24 0c mov %eax,0xc(%esp)
107ca8: 8d 44 24 40 lea 0x40(%esp),%eax
107cac: 89 44 24 08 mov %eax,0x8(%esp)
107cb0: 8d 44 24 50 lea 0x50(%esp),%eax
107cb4: 89 44 24 04 mov %eax,0x4(%esp)
107cb8: 8d 44 24 58 lea 0x58(%esp),%eax
107cbc: 89 04 24 mov %eax,(%esp)
107cbf: e8 84 81 00 00 call 10fe48 <_Timestamp64_Divide>
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
107cc4: 8b 74 24 58 mov 0x58(%esp),%esi
107cc8: 8b 7c 24 5c mov 0x5c(%esp),%edi
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
107ccc: 8b 44 24 44 mov 0x44(%esp),%eax
107cd0: 89 44 24 14 mov %eax,0x14(%esp)
107cd4: 8b 44 24 40 mov 0x40(%esp),%eax
107cd8: 89 44 24 10 mov %eax,0x10(%esp)
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
107cdc: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
107ce3: 3b
107ce4: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
107ceb: 00
107cec: 89 34 24 mov %esi,(%esp)
107cef: 89 7c 24 04 mov %edi,0x4(%esp)
107cf3: e8 04 9f 01 00 call 121bfc <__moddi3>
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
107cf8: ba d3 4d 62 10 mov $0x10624dd3,%edx
107cfd: f7 e2 mul %edx
107cff: c1 ea 06 shr $0x6,%edx
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
107d02: 89 54 24 0c mov %edx,0xc(%esp)
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
107d06: 8b 44 24 08 mov 0x8(%esp),%eax
107d0a: 8b 54 24 0c mov 0xc(%esp),%edx
107d0e: 89 44 24 28 mov %eax,0x28(%esp)
107d12: 89 54 24 2c mov %edx,0x2c(%esp)
107d16: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
107d1d: 3b
107d1e: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
107d25: 00
107d26: 89 34 24 mov %esi,(%esp)
107d29: 89 7c 24 04 mov %edi,0x4(%esp)
107d2d: e8 76 9d 01 00 call 121aa8 <__divdi3>
107d32: 8b 7c 24 2c mov 0x2c(%esp),%edi
107d36: 89 7c 24 0c mov %edi,0xc(%esp)
107d3a: 89 44 24 08 mov %eax,0x8(%esp)
107d3e: c7 44 24 04 63 44 12 movl $0x124463,0x4(%esp)
107d45: 00
107d46: 8b bc 24 90 00 00 00 mov 0x90(%esp),%edi
107d4d: 89 3c 24 mov %edi,(%esp)
107d50: 8b 8c 24 94 00 00 00 mov 0x94(%esp),%ecx
107d57: ff d1 call *%ecx
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
107d59: 43 inc %ebx
107d5a: 0f b7 45 10 movzwl 0x10(%ebp),%eax
107d5e: 39 d8 cmp %ebx,%eax
107d60: 0f 82 b6 00 00 00 jb 107e1c <rtems_cpu_usage_report_with_plugin+0x228>
the_thread = (Thread_Control *)information->local_table[ i ];
107d66: 8b 45 1c mov 0x1c(%ebp),%eax
107d69: 8b 34 98 mov (%eax,%ebx,4),%esi
if ( !the_thread )
107d6c: 85 f6 test %esi,%esi
107d6e: 74 e9 je 107d59 <rtems_cpu_usage_report_with_plugin+0x165><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
107d70: 8d 7c 24 63 lea 0x63(%esp),%edi
107d74: 89 7c 24 08 mov %edi,0x8(%esp)
107d78: c7 44 24 04 0d 00 00 movl $0xd,0x4(%esp)
107d7f: 00
107d80: 8b 46 08 mov 0x8(%esi),%eax
107d83: 89 04 24 mov %eax,(%esp)
107d86: e8 45 4b 00 00 call 10c8d0 <rtems_object_get_name>
(*print)(
context,
" 0x%08" PRIx32 " | %-38s |",
the_thread->Object.id,
name
107d8b: 8d 44 24 63 lea 0x63(%esp),%eax
107d8f: 89 44 24 0c mov %eax,0xc(%esp)
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
107d93: 8b 46 08 mov 0x8(%esi),%eax
107d96: 89 44 24 08 mov %eax,0x8(%esp)
107d9a: c7 44 24 04 50 44 12 movl $0x124450,0x4(%esp)
107da1: 00
107da2: 8b 8c 24 90 00 00 00 mov 0x90(%esp),%ecx
107da9: 89 0c 24 mov %ecx,(%esp)
107dac: 8b bc 24 94 00 00 00 mov 0x94(%esp),%edi
107db3: ff d7 call *%edi
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
107db5: 8b 86 80 00 00 00 mov 0x80(%esi),%eax
107dbb: 8b 96 84 00 00 00 mov 0x84(%esi),%edx
107dc1: 89 44 24 58 mov %eax,0x58(%esp)
107dc5: 89 54 24 5c mov %edx,0x5c(%esp)
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
107dc9: a1 8c 40 13 00 mov 0x13408c,%eax
107dce: 8b 50 08 mov 0x8(%eax),%edx
107dd1: 39 56 08 cmp %edx,0x8(%esi)
107dd4: 0f 85 a2 fe ff ff jne 107c7c <rtems_cpu_usage_report_with_plugin+0x88>
*time_of_context_switch = _Thread_Time_of_last_context_switch;
107dda: 8b 35 9c 40 13 00 mov 0x13409c,%esi
107de0: 8b 3d a0 40 13 00 mov 0x1340a0,%edi
107de6: 89 74 24 28 mov %esi,0x28(%esp)
107dea: 89 7c 24 2c mov %edi,0x2c(%esp)
* 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 );
107dee: 8d 7c 24 48 lea 0x48(%esp),%edi
107df2: 89 3c 24 mov %edi,(%esp)
107df5: e8 9e 5e 00 00 call 10dc98 <_TOD_Get_uptime>
_Timestamp_Subtract( &last, &uptime, &used );
107dfa: 8b 44 24 48 mov 0x48(%esp),%eax
107dfe: 8b 54 24 4c mov 0x4c(%esp),%edx
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
107e02: 89 c6 mov %eax,%esi
107e04: 89 d7 mov %edx,%edi
107e06: 2b 74 24 28 sub 0x28(%esp),%esi
107e0a: 1b 7c 24 2c sbb 0x2c(%esp),%edi
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
107e0e: 01 74 24 58 add %esi,0x58(%esp)
107e12: 11 7c 24 5c adc %edi,0x5c(%esp)
107e16: e9 75 fe ff ff jmp 107c90 <rtems_cpu_usage_report_with_plugin+0x9c>
107e1b: 90 nop
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
107e1c: ff 44 24 3c incl 0x3c(%esp)
107e20: 83 7c 24 3c 04 cmpl $0x4,0x3c(%esp)
107e25: 0f 85 26 fe ff ff jne 107c51 <rtems_cpu_usage_report_with_plugin+0x5d>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
107e2b: 8b 74 24 50 mov 0x50(%esp),%esi
107e2f: 8b 7c 24 54 mov 0x54(%esp),%edi
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
107e33: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
107e3a: 3b
107e3b: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
107e42: 00
107e43: 89 34 24 mov %esi,(%esp)
107e46: 89 7c 24 04 mov %edi,0x4(%esp)
107e4a: e8 ad 9d 01 00 call 121bfc <__moddi3>
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
107e4f: ba d3 4d 62 10 mov $0x10624dd3,%edx
107e54: f7 e2 mul %edx
107e56: c1 ea 06 shr $0x6,%edx
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
107e59: 89 54 24 0c mov %edx,0xc(%esp)
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
107e5d: 8b 4c 24 08 mov 0x8(%esp),%ecx
107e61: 8b 5c 24 0c mov 0xc(%esp),%ebx
107e65: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
107e6c: 3b
107e6d: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
107e74: 00
107e75: 89 34 24 mov %esi,(%esp)
107e78: 89 7c 24 04 mov %edi,0x4(%esp)
107e7c: 89 4c 24 24 mov %ecx,0x24(%esp)
107e80: e8 23 9c 01 00 call 121aa8 <__divdi3>
107e85: 89 5c 24 0c mov %ebx,0xc(%esp)
107e89: 89 44 24 08 mov %eax,0x8(%esp)
107e8d: c7 44 24 04 64 43 12 movl $0x124364,0x4(%esp)
107e94: 00
107e95: 8b b4 24 90 00 00 00 mov 0x90(%esp),%esi
107e9c: 89 34 24 mov %esi,(%esp)
107e9f: 8b bc 24 94 00 00 00 mov 0x94(%esp),%edi
107ea6: ff d7 call *%edi
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
107ea8: 83 c4 7c add $0x7c,%esp
107eab: 5b pop %ebx
107eac: 5e pop %esi
107ead: 5f pop %edi
107eae: 5d pop %ebp
107eaf: c3 ret
00113b40 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
113b40: 53 push %ebx
113b41: 83 ec 08 sub $0x8,%esp
113b44: 8b 54 24 10 mov 0x10(%esp),%edx
if (sc == RTEMS_SUCCESSFUL) {
return 0;
113b48: 31 c0 xor %eax,%eax
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
113b4a: 85 d2 test %edx,%edx
113b4c: 75 06 jne 113b54 <rtems_deviceio_errno+0x14>
errno = eno;
return -1;
}
}
113b4e: 83 c4 08 add $0x8,%esp
113b51: 5b pop %ebx
113b52: c3 ret
113b53: 90 nop
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
113b54: 83 fa 1c cmp $0x1c,%edx
113b57: 77 17 ja 113b70 <rtems_deviceio_errno+0x30><== NEVER TAKEN
eno = status_code_to_errno [sc];
113b59: 8b 1c 95 a0 32 12 00 mov 0x1232a0(,%edx,4),%ebx
}
errno = eno;
113b60: e8 9b 00 00 00 call 113c00 <__errno>
113b65: 89 18 mov %ebx,(%eax)
return -1;
113b67: b8 ff ff ff ff mov $0xffffffff,%eax
113b6c: eb e0 jmp 113b4e <rtems_deviceio_errno+0xe>
113b6e: 66 90 xchg %ax,%ax
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
113b70: bb 16 00 00 00 mov $0x16,%ebx <== NOT EXECUTED
113b75: eb e9 jmp 113b60 <rtems_deviceio_errno+0x20><== NOT EXECUTED
00108fa4 <rtems_filesystem_do_unmount>:
}
void rtems_filesystem_do_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
108fa4: 53 push %ebx
108fa5: 83 ec 18 sub $0x18,%esp
108fa8: 8b 5c 24 20 mov 0x20(%esp),%ebx
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
108fac: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
108fb3: 00
108fb4: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
108fbb: 00
108fbc: a1 1c 1e 13 00 mov 0x131e1c,%eax
108fc1: 89 04 24 mov %eax,(%esp)
108fc4: e8 b3 29 00 00 call 10b97c <rtems_semaphore_obtain>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
108fc9: 8b 13 mov (%ebx),%edx
previous = the_node->previous;
108fcb: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
108fce: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
108fd1: 89 10 mov %edx,(%eax)
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
108fd3: a1 1c 1e 13 00 mov 0x131e1c,%eax
108fd8: 89 04 24 mov %eax,(%esp)
108fdb: e8 c8 2a 00 00 call 10baa8 <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);
108fe0: 8b 43 20 mov 0x20(%ebx),%eax
108fe3: 89 04 24 mov %eax,(%esp)
108fe6: e8 59 01 00 00 call 109144 <rtems_filesystem_global_location_release>
(*mt_entry->ops->fsunmount_me_h)(mt_entry);
108feb: 8b 43 0c mov 0xc(%ebx),%eax
108fee: 89 1c 24 mov %ebx,(%esp)
108ff1: ff 50 3c call *0x3c(%eax)
if (mt_entry->unmount_task != 0) {
108ff4: 8b 43 3c mov 0x3c(%ebx),%eax
108ff7: 85 c0 test %eax,%eax
108ff9: 74 14 je 10900f <rtems_filesystem_do_unmount+0x6b><== NEVER TAKEN
rtems_status_code sc =
108ffb: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
109002: 00
109003: 89 04 24 mov %eax,(%esp)
109006: e8 e5 24 00 00 call 10b4f0 <rtems_event_send>
rtems_event_send(mt_entry->unmount_task, RTEMS_FILESYSTEM_UNMOUNT_EVENT);
if (sc != RTEMS_SUCCESSFUL) {
10900b: 85 c0 test %eax,%eax
10900d: 75 0d jne 10901c <rtems_filesystem_do_unmount+0x78><== NEVER TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
}
}
free(mt_entry);
10900f: 89 5c 24 20 mov %ebx,0x20(%esp)
}
109013: 83 c4 18 add $0x18,%esp
109016: 5b pop %ebx
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(0xdeadbeef);
}
}
free(mt_entry);
109017: e9 20 e9 ff ff jmp 10793c <free>
if (mt_entry->unmount_task != 0) {
rtems_status_code sc =
rtems_event_send(mt_entry->unmount_task, RTEMS_FILESYSTEM_UNMOUNT_EVENT);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(0xdeadbeef);
10901c: c7 04 24 ef be ad de movl $0xdeadbeef,(%esp) <== NOT EXECUTED
109023: e8 8c 30 00 00 call 10c0b4 <rtems_fatal_error_occurred><== NOT EXECUTED
001102b4 <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
)
{
1102b4: 55 push %ebp
1102b5: 57 push %edi
1102b6: 56 push %esi
1102b7: 53 push %ebx
1102b8: 83 ec 2c sub $0x2c,%esp
1102bb: 8b 5c 24 40 mov 0x40(%esp),%ebx
1102bf: 8b 7c 24 44 mov 0x44(%esp),%edi
1102c3: 8b 54 24 48 mov 0x48(%esp),%edx
1102c7: 89 54 24 18 mov %edx,0x18(%esp)
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 =
1102cb: 8d 53 18 lea 0x18(%ebx),%edx
1102ce: 89 54 24 1c mov %edx,0x1c(%esp)
rtems_filesystem_eval_path_context_t *ctx,
const char **token,
size_t *tokenlen
)
{
rtems_filesystem_eval_path_next_token(ctx);
1102d2: 89 1c 24 mov %ebx,(%esp)
1102d5: e8 da 01 00 00 call 1104b4 <rtems_filesystem_eval_path_next_token>
*token = ctx->token;
1102da: 8b 6b 08 mov 0x8(%ebx),%ebp
*tokenlen = ctx->tokenlen;
1102dd: 8b 73 0c mov 0xc(%ebx),%esi
const char *token;
size_t tokenlen;
rtems_filesystem_eval_path_get_next_token(ctx, &token, &tokenlen);
if (tokenlen > 0) {
1102e0: 85 f6 test %esi,%esi
1102e2: 75 08 jne 1102ec <rtems_filesystem_eval_path_generic+0x38>
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
1102e4: 83 c4 2c add $0x2c,%esp
1102e7: 5b pop %ebx
1102e8: 5e pop %esi
1102e9: 5f pop %edi
1102ea: 5d pop %ebp
1102eb: c3 ret
size_t tokenlen;
rtems_filesystem_eval_path_get_next_token(ctx, &token, &tokenlen);
if (tokenlen > 0) {
if ((*config->is_directory)(ctx, arg)) {
1102ec: 89 7c 24 04 mov %edi,0x4(%esp)
1102f0: 89 1c 24 mov %ebx,(%esp)
1102f3: 8b 54 24 18 mov 0x18(%esp),%edx
1102f7: ff 12 call *(%edx)
1102f9: 84 c0 test %al,%al
1102fb: 74 2f je 11032c <rtems_filesystem_eval_path_generic+0x78>
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
1102fd: 83 fe 01 cmp $0x1,%esi
110300: 74 76 je 110378 <rtems_filesystem_eval_path_generic+0xc4>
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
110302: 83 fe 02 cmp $0x2,%esi
110305: 0f 84 a1 00 00 00 je 1103ac <rtems_filesystem_eval_path_generic+0xf8>
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
}
} else {
status = (*config->eval_token)(ctx, arg, token, tokenlen);
11030b: 89 74 24 0c mov %esi,0xc(%esp)
11030f: 89 6c 24 08 mov %ebp,0x8(%esp)
110313: 89 7c 24 04 mov %edi,0x4(%esp)
110317: 89 1c 24 mov %ebx,(%esp)
11031a: 8b 54 24 18 mov 0x18(%esp),%edx
11031e: ff 52 04 call *0x4(%edx)
}
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
110321: 83 f8 02 cmp $0x2,%eax
110324: 74 1e je 110344 <rtems_filesystem_eval_path_generic+0x90>
)
{
rtems_filesystem_eval_path_generic_status status =
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
while (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE) {
110326: 85 c0 test %eax,%eax
110328: 74 a8 je 1102d2 <rtems_filesystem_eval_path_generic+0x1e>
11032a: eb b8 jmp 1102e4 <rtems_filesystem_eval_path_generic+0x30>
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
11032c: c7 44 24 44 14 00 00 movl $0x14,0x44(%esp)
110333: 00
110334: 89 5c 24 40 mov %ebx,0x40(%esp)
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
110338: 83 c4 2c add $0x2c,%esp
11033b: 5b pop %ebx
11033c: 5e pop %esi
11033d: 5f pop %edi
11033e: 5d pop %ebp
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
11033f: e9 f0 86 ff ff jmp 108a34 <rtems_filesystem_eval_path_error>
} else {
status = (*config->eval_token)(ctx, arg, token, tokenlen);
}
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
if (rtems_filesystem_eval_path_has_path(ctx)) {
110344: 8b 4b 04 mov 0x4(%ebx),%ecx
110347: 85 c9 test %ecx,%ecx
110349: 74 99 je 1102e4 <rtems_filesystem_eval_path_generic+0x30>
int eval_flags;
rtems_filesystem_eval_path_eat_delimiter(ctx);
11034b: 89 1c 24 mov %ebx,(%esp)
11034e: e8 29 01 00 00 call 11047c <rtems_filesystem_eval_path_eat_delimiter>
eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (
110353: f6 43 10 80 testb $0x80,0x10(%ebx)
110357: 74 07 je 110360 <rtems_filesystem_eval_path_generic+0xac>
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
|| rtems_filesystem_eval_path_has_path(ctx)
110359: 8b 53 04 mov 0x4(%ebx),%edx
11035c: 85 d2 test %edx,%edx
11035e: 74 84 je 1102e4 <rtems_filesystem_eval_path_generic+0x30>
) {
rtems_filesystem_eval_path_error(ctx, ENOENT);
110360: c7 44 24 44 02 00 00 movl $0x2,0x44(%esp)
110367: 00
}
}
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
110368: 89 5c 24 40 mov %ebx,0x40(%esp)
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
11036c: 83 c4 2c add $0x2c,%esp
11036f: 5b pop %ebx
110370: 5e pop %esi
110371: 5f pop %edi
110372: 5d pop %ebp
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
110373: e9 bc 86 ff ff jmp 108a34 <rtems_filesystem_eval_path_error>
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
110378: 80 7d 00 2e cmpb $0x2e,0x0(%ebp)
11037c: 75 8d jne 11030b <rtems_filesystem_eval_path_generic+0x57>
rtems_filesystem_eval_path_get_next_token(ctx, &token, &tokenlen);
if (tokenlen > 0) {
if ((*config->is_directory)(ctx, arg)) {
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
if (rtems_filesystem_eval_path_has_path(ctx)) {
11037e: 8b 43 04 mov 0x4(%ebx),%eax
110381: 85 c0 test %eax,%eax
110383: 0f 85 8f 00 00 00 jne 110418 <rtems_filesystem_eval_path_generic+0x164>
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) {
110389: f6 43 11 01 testb $0x1,0x11(%ebx)
11038d: 0f 84 85 00 00 00 je 110418 <rtems_filesystem_eval_path_generic+0x164>
status = (*config->eval_token)(ctx, arg, ".", 1);
} else {
rtems_filesystem_eval_path_error(ctx, EINVAL);
110393: c7 44 24 44 16 00 00 movl $0x16,0x44(%esp)
11039a: 00
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
11039b: 89 5c 24 40 mov %ebx,0x40(%esp)
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
11039f: 83 c4 2c add $0x2c,%esp
1103a2: 5b pop %ebx
1103a3: 5e pop %esi
1103a4: 5f pop %edi
1103a5: 5d pop %ebp
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
1103a6: e9 89 86 ff ff jmp 108a34 <rtems_filesystem_eval_path_error>
1103ab: 90 nop
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
1103ac: 80 7d 00 2e cmpb $0x2e,0x0(%ebp)
1103b0: 0f 85 55 ff ff ff jne 11030b <rtems_filesystem_eval_path_generic+0x57>
1103b6: 80 7d 01 2e cmpb $0x2e,0x1(%ebp)
1103ba: 0f 85 4b ff ff ff jne 11030b <rtems_filesystem_eval_path_generic+0x57><== NEVER TAKEN
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
1103c0: 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;
1103c3: 8b 43 2c mov 0x2c(%ebx),%eax
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 );
1103c6: 3b 42 14 cmp 0x14(%edx),%eax
1103c9: 0f 84 8f 00 00 00 je 11045e <rtems_filesystem_eval_path_generic+0x1aa>
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
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 );
1103cf: 8b 50 0c mov 0xc(%eax),%edx
1103d2: 8b 40 24 mov 0x24(%eax),%eax
1103d5: 89 44 24 04 mov %eax,0x4(%esp)
1103d9: 8b 44 24 1c mov 0x1c(%esp),%eax
1103dd: 89 04 24 mov %eax,(%esp)
1103e0: 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)) {
1103e3: 84 c0 test %al,%al
1103e5: 74 54 je 11043b <rtems_filesystem_eval_path_generic+0x187>
if (currentloc->mt_entry->mt_point_node != NULL) {
1103e7: 8b 43 2c mov 0x2c(%ebx),%eax
1103ea: 8b 70 20 mov 0x20(%eax),%esi
1103ed: 85 f6 test %esi,%esi
1103ef: 74 27 je 110418 <rtems_filesystem_eval_path_generic+0x164><== NEVER TAKEN
static inline void rtems_filesystem_eval_path_put_back_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
size_t tokenlen = ctx->tokenlen;
1103f1: 8b 53 0c mov 0xc(%ebx),%edx
ctx->path -= tokenlen;
1103f4: 29 13 sub %edx,(%ebx)
ctx->pathlen += tokenlen;
1103f6: 01 53 04 add %edx,0x4(%ebx)
ctx->tokenlen = 0;
1103f9: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
rtems_filesystem_eval_path_put_back_token(ctx);
rtems_filesystem_eval_path_restart(
110400: 83 c0 20 add $0x20,%eax
110403: 89 44 24 44 mov %eax,0x44(%esp)
110407: 89 5c 24 40 mov %ebx,0x40(%esp)
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
11040b: 83 c4 2c add $0x2c,%esp
11040e: 5b pop %ebx
11040f: 5e pop %esi
110410: 5f pop %edi
110411: 5d pop %ebp
/* This prevents the escape from a chroot() environment */
status = (*config->eval_token)(ctx, arg, ".", 1);
} else if (is_fs_root(currentloc)) {
if (currentloc->mt_entry->mt_point_node != NULL) {
rtems_filesystem_eval_path_put_back_token(ctx);
rtems_filesystem_eval_path_restart(
110412: e9 1d 8a ff ff jmp 108e34 <rtems_filesystem_eval_path_restart>
110417: 90 nop
rtems_filesystem_location_info_t *currentloc =
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);
110418: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
11041f: 00
110420: c7 44 24 08 b1 30 12 movl $0x1230b1,0x8(%esp)
110427: 00
110428: 89 7c 24 04 mov %edi,0x4(%esp)
11042c: 89 1c 24 mov %ebx,(%esp)
11042f: 8b 54 24 18 mov 0x18(%esp),%edx
110433: ff 52 04 call *0x4(%edx)
110436: e9 e6 fe ff ff jmp 110321 <rtems_filesystem_eval_path_generic+0x6d>
} else {
/* This is the root file system */
status = (*config->eval_token)(ctx, arg, ".", 1);
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
11043b: c7 44 24 0c 02 00 00 movl $0x2,0xc(%esp)
110442: 00
110443: c7 44 24 08 b0 30 12 movl $0x1230b0,0x8(%esp)
11044a: 00
11044b: 89 7c 24 04 mov %edi,0x4(%esp)
11044f: 89 1c 24 mov %ebx,(%esp)
110452: 8b 54 24 18 mov 0x18(%esp),%edx
110456: ff 52 04 call *0x4(%edx)
110459: e9 c3 fe ff ff jmp 110321 <rtems_filesystem_eval_path_generic+0x6d>
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
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 );
11045e: 8b 40 0c mov 0xc(%eax),%eax
110461: 89 54 24 04 mov %edx,0x4(%esp)
110465: 8b 54 24 1c mov 0x1c(%esp),%edx
110469: 89 14 24 mov %edx,(%esp)
11046c: ff 50 10 call *0x10(%eax)
11046f: 84 c0 test %al,%al
110471: 75 a5 jne 110418 <rtems_filesystem_eval_path_generic+0x164>
110473: 8b 43 2c mov 0x2c(%ebx),%eax
110476: e9 54 ff ff ff jmp 1103cf <rtems_filesystem_eval_path_generic+0x11b>
001104b4 <rtems_filesystem_eval_path_next_token>:
}
void rtems_filesystem_eval_path_next_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
1104b4: 57 push %edi
1104b5: 56 push %esi
1104b6: 53 push %ebx
1104b7: 52 push %edx
1104b8: 8b 74 24 14 mov 0x14(%esp),%esi
rtems_filesystem_eval_path_eat_delimiter(ctx);
1104bc: 89 34 24 mov %esi,(%esp)
1104bf: e8 b8 ff ff ff call 11047c <rtems_filesystem_eval_path_eat_delimiter>
ctx->pathlen = (size_t) (end - current);
}
static void next_token(rtems_filesystem_eval_path_context_t *ctx)
{
const char *begin = ctx->path;
1104c4: 8b 0e mov (%esi),%ecx
const char *end = begin + ctx->pathlen;
1104c6: 8b 5e 04 mov 0x4(%esi),%ebx
1104c9: 01 cb add %ecx,%ebx
const char *current = begin;
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
1104cb: 39 d9 cmp %ebx,%ecx
1104cd: 74 2d je 1104fc <rtems_filesystem_eval_path_next_token+0x48>
1104cf: 8a 01 mov (%ecx),%al
1104d1: 3c 2f cmp $0x2f,%al
1104d3: 74 27 je 1104fc <rtems_filesystem_eval_path_next_token+0x48><== NEVER TAKEN
1104d5: 3c 5c cmp $0x5c,%al
1104d7: 74 23 je 1104fc <rtems_filesystem_eval_path_next_token+0x48><== NEVER TAKEN
1104d9: 89 c8 mov %ecx,%eax
1104db: eb 08 jmp 1104e5 <rtems_filesystem_eval_path_next_token+0x31>
1104dd: 8d 76 00 lea 0x0(%esi),%esi
1104e0: 80 fa 5c cmp $0x5c,%dl
1104e3: 74 0c je 1104f1 <rtems_filesystem_eval_path_next_token+0x3d>
++current;
1104e5: 40 inc %eax
{
const char *begin = ctx->path;
const char *end = begin + ctx->pathlen;
const char *current = begin;
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
1104e6: 39 c3 cmp %eax,%ebx
1104e8: 74 2e je 110518 <rtems_filesystem_eval_path_next_token+0x64>
1104ea: 8a 10 mov (%eax),%dl
1104ec: 80 fa 2f cmp $0x2f,%dl
1104ef: 75 ef jne 1104e0 <rtems_filesystem_eval_path_next_token+0x2c>
1104f1: 89 c7 mov %eax,%edi
1104f3: 89 c2 mov %eax,%edx
1104f5: 29 ca sub %ecx,%edx
1104f7: eb 0b jmp 110504 <rtems_filesystem_eval_path_next_token+0x50>
1104f9: 8d 76 00 lea 0x0(%esi),%esi
1104fc: 89 cf mov %ecx,%edi
1104fe: 89 c8 mov %ecx,%eax
110500: 31 d2 xor %edx,%edx
110502: 66 90 xchg %ax,%ax
++current;
}
ctx->path = current;
110504: 89 06 mov %eax,(%esi)
ctx->pathlen = (size_t) (end - current);
110506: 29 fb sub %edi,%ebx
110508: 89 5e 04 mov %ebx,0x4(%esi)
ctx->token = begin;
11050b: 89 4e 08 mov %ecx,0x8(%esi)
ctx->tokenlen = (size_t) (current - begin);
11050e: 89 56 0c mov %edx,0xc(%esi)
rtems_filesystem_eval_path_context_t *ctx
)
{
rtems_filesystem_eval_path_eat_delimiter(ctx);
next_token(ctx);
}
110511: 58 pop %eax
110512: 5b pop %ebx
110513: 5e pop %esi
110514: 5f pop %edi
110515: c3 ret
110516: 66 90 xchg %ax,%ax
110518: 89 df mov %ebx,%edi
11051a: 89 da mov %ebx,%edx
11051c: 29 ca sub %ecx,%edx
11051e: eb e4 jmp 110504 <rtems_filesystem_eval_path_next_token+0x50>
00108e98 <rtems_filesystem_eval_path_recursive>:
void rtems_filesystem_eval_path_recursive(
rtems_filesystem_eval_path_context_t *ctx,
const char *path,
size_t pathlen
)
{
108e98: 55 push %ebp
108e99: 57 push %edi
108e9a: 56 push %esi
108e9b: 53 push %ebx
108e9c: 83 ec 2c sub $0x2c,%esp
108e9f: 8b 5c 24 40 mov 0x40(%esp),%ebx
108ea3: 8b 54 24 44 mov 0x44(%esp),%edx
108ea7: 8b 6c 24 48 mov 0x48(%esp),%ebp
if (pathlen > 0) {
108eab: 85 ed test %ebp,%ebp
108ead: 74 5d je 108f0c <rtems_filesystem_eval_path_recursive+0x74><== NEVER TAKEN
if (ctx->recursionlevel < RTEMS_FILESYSTEM_SYMLOOP_MAX) {
108eaf: 83 7b 14 1f cmpl $0x1f,0x14(%ebx)
108eb3: 7f 6f jg 108f24 <rtems_filesystem_eval_path_recursive+0x8c>
const char *saved_path = ctx->path;
108eb5: 8b 33 mov (%ebx),%esi
size_t saved_pathlen = ctx->pathlen;
108eb7: 8b 7b 04 mov 0x4(%ebx),%edi
if (rtems_filesystem_is_delimiter(path [0])) {
108eba: 8a 02 mov (%edx),%al
gid_t node_gid
);
static inline bool rtems_filesystem_is_delimiter(char c)
{
return c == '/' || c == '\\';
108ebc: 3c 2f cmp $0x2f,%al
108ebe: 74 30 je 108ef0 <rtems_filesystem_eval_path_recursive+0x58>
108ec0: 3c 5c cmp $0x5c,%al
108ec2: 74 2c je 108ef0 <rtems_filesystem_eval_path_recursive+0x58><== NEVER TAKEN
rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc);
}
ctx->path = path;
108ec4: 89 13 mov %edx,(%ebx)
ctx->pathlen = pathlen;
108ec6: 89 6b 04 mov %ebp,0x4(%ebx)
++ctx->recursionlevel;
108ec9: ff 43 14 incl 0x14(%ebx)
while (ctx->pathlen > 0) {
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
108ecc: 8b 43 2c mov 0x2c(%ebx),%eax
108ecf: 8b 40 0c mov 0xc(%eax),%eax
108ed2: 89 1c 24 mov %ebx,(%esp)
108ed5: ff 50 08 call *0x8(%eax)
ctx->path = path;
ctx->pathlen = pathlen;
++ctx->recursionlevel;
while (ctx->pathlen > 0) {
108ed8: 8b 43 04 mov 0x4(%ebx),%eax
108edb: 85 c0 test %eax,%eax
108edd: 75 ed jne 108ecc <rtems_filesystem_eval_path_recursive+0x34>
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
}
--ctx->recursionlevel;
108edf: ff 4b 14 decl 0x14(%ebx)
ctx->path = saved_path;
108ee2: 89 33 mov %esi,(%ebx)
ctx->pathlen = saved_pathlen;
108ee4: 89 7b 04 mov %edi,0x4(%ebx)
rtems_filesystem_eval_path_error(ctx, ELOOP);
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
108ee7: 83 c4 2c add $0x2c,%esp
108eea: 5b pop %ebx
108eeb: 5e pop %esi
108eec: 5f pop %edi
108eed: 5d pop %ebp
108eee: c3 ret
108eef: 90 nop
if (ctx->recursionlevel < RTEMS_FILESYSTEM_SYMLOOP_MAX) {
const char *saved_path = ctx->path;
size_t saved_pathlen = ctx->pathlen;
if (rtems_filesystem_is_delimiter(path [0])) {
rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc);
108ef0: 8d 43 30 lea 0x30(%ebx),%eax
108ef3: 89 44 24 04 mov %eax,0x4(%esp)
108ef7: 89 1c 24 mov %ebx,(%esp)
108efa: 89 54 24 1c mov %edx,0x1c(%esp)
108efe: e8 31 ff ff ff call 108e34 <rtems_filesystem_eval_path_restart>
108f03: 8b 54 24 1c mov 0x1c(%esp),%edx
108f07: eb bb jmp 108ec4 <rtems_filesystem_eval_path_recursive+0x2c>
108f09: 8d 76 00 lea 0x0(%esi),%esi
ctx->pathlen = saved_pathlen;
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
108f0c: c7 44 24 44 02 00 00 movl $0x2,0x44(%esp) <== NOT EXECUTED
108f13: 00
108f14: 89 5c 24 40 mov %ebx,0x40(%esp) <== NOT EXECUTED
}
}
108f18: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
108f1b: 5b pop %ebx <== NOT EXECUTED
108f1c: 5e pop %esi <== NOT EXECUTED
108f1d: 5f pop %edi <== NOT EXECUTED
108f1e: 5d pop %ebp <== NOT EXECUTED
ctx->pathlen = saved_pathlen;
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
108f1f: e9 10 fb ff ff jmp 108a34 <rtems_filesystem_eval_path_error><== NOT EXECUTED
--ctx->recursionlevel;
ctx->path = saved_path;
ctx->pathlen = saved_pathlen;
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
108f24: c7 44 24 44 5c 00 00 movl $0x5c,0x44(%esp)
108f2b: 00
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
108f2c: 89 5c 24 40 mov %ebx,0x40(%esp)
}
}
108f30: 83 c4 2c add $0x2c,%esp
108f33: 5b pop %ebx
108f34: 5e pop %esi
108f35: 5f pop %edi
108f36: 5d pop %ebp
ctx->pathlen = saved_pathlen;
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
108f37: e9 f8 fa ff ff jmp 108a34 <rtems_filesystem_eval_path_error>
00108d20 <rtems_filesystem_eval_path_start_with_parent>:
const char *path,
int eval_flags,
rtems_filesystem_location_info_t *parentloc,
int parent_eval_flags
)
{
108d20: 57 push %edi
108d21: 56 push %esi
108d22: 53 push %ebx
108d23: 83 ec 10 sub $0x10,%esp
108d26: 8b 5c 24 20 mov 0x20(%esp),%ebx
108d2a: 8b 54 24 24 mov 0x24(%esp),%edx
size_t pathlen = strlen(path);
108d2e: 31 c0 xor %eax,%eax
108d30: b9 ff ff ff ff mov $0xffffffff,%ecx
108d35: 89 d7 mov %edx,%edi
108d37: f2 ae repnz scas %es:(%edi),%al
108d39: f7 d1 not %ecx
#include <rtems/libio_.h>
static size_t get_parentpathlen(const char *path, size_t pathlen)
{
while (pathlen > 0) {
108d3b: 89 cf mov %ecx,%edi
108d3d: 4f dec %edi
108d3e: 0f 84 8c 00 00 00 je 108dd0 <rtems_filesystem_eval_path_start_with_parent+0xb0>
size_t i = pathlen - 1;
108d44: 83 e9 02 sub $0x2,%ecx
if (rtems_filesystem_is_delimiter(path [i])) {
108d47: 8a 04 0a mov (%edx,%ecx,1),%al
gid_t node_gid
);
static inline bool rtems_filesystem_is_delimiter(char c)
{
return c == '/' || c == '\\';
108d4a: 3c 2f cmp $0x2f,%al
108d4c: 74 04 je 108d52 <rtems_filesystem_eval_path_start_with_parent+0x32>
108d4e: 3c 5c cmp $0x5c,%al
108d50: 75 0c jne 108d5e <rtems_filesystem_eval_path_start_with_parent+0x3e><== ALWAYS TAKEN
108d52: 89 f9 mov %edi,%ecx
108d54: 31 f6 xor %esi,%esi
108d56: eb 18 jmp 108d70 <rtems_filesystem_eval_path_start_with_parent+0x50>
108d58: 3c 5c cmp $0x5c,%al
108d5a: 74 10 je 108d6c <rtems_filesystem_eval_path_start_with_parent+0x4c><== NEVER TAKEN
#include <rtems/libio_.h>
static size_t get_parentpathlen(const char *path, size_t pathlen)
{
while (pathlen > 0) {
size_t i = pathlen - 1;
108d5c: 89 f1 mov %esi,%ecx
#include <rtems/libio_.h>
static size_t get_parentpathlen(const char *path, size_t pathlen)
{
while (pathlen > 0) {
108d5e: 85 c9 test %ecx,%ecx
108d60: 74 5e je 108dc0 <rtems_filesystem_eval_path_start_with_parent+0xa0>
size_t i = pathlen - 1;
108d62: 8d 71 ff lea -0x1(%ecx),%esi
if (rtems_filesystem_is_delimiter(path [i])) {
108d65: 8a 04 32 mov (%edx,%esi,1),%al
108d68: 3c 2f cmp $0x2f,%al
108d6a: 75 ec jne 108d58 <rtems_filesystem_eval_path_start_with_parent+0x38>
108d6c: 89 fe mov %edi,%esi
108d6e: 29 ce sub %ecx,%esi
parentpath = ".";
parentpathlen = 1;
name = path;
namelen = pathlen;
} else {
name = path + parentpathlen;
108d70: 8d 3c 0a lea (%edx,%ecx,1),%edi
ctx,
parentpath,
parentpathlen,
parent_eval_flags,
&rtems_filesystem_root,
&rtems_filesystem_current
108d73: a1 00 fb 12 00 mov 0x12fb00,%eax
name = path + parentpathlen;
namelen = pathlen - parentpathlen;
}
}
currentloc = eval_path_start(
108d78: 89 44 24 08 mov %eax,0x8(%esp)
ctx,
parentpath,
parentpathlen,
parent_eval_flags,
&rtems_filesystem_root,
108d7c: 83 c0 04 add $0x4,%eax
108d7f: 89 44 24 04 mov %eax,0x4(%esp)
name = path + parentpathlen;
namelen = pathlen - parentpathlen;
}
}
currentloc = eval_path_start(
108d83: 8b 44 24 30 mov 0x30(%esp),%eax
108d87: 89 04 24 mov %eax,(%esp)
108d8a: 89 d8 mov %ebx,%eax
108d8c: e8 3b fe ff ff call 108bcc <eval_path_start>
parent_eval_flags,
&rtems_filesystem_root,
&rtems_filesystem_current
);
rtems_filesystem_location_clone(parentloc, currentloc);
108d91: 89 44 24 04 mov %eax,0x4(%esp)
108d95: 8b 44 24 2c mov 0x2c(%esp),%eax
108d99: 89 04 24 mov %eax,(%esp)
108d9c: e8 ff 6e 00 00 call 10fca0 <rtems_filesystem_location_clone>
ctx->path = name;
108da1: 89 3b mov %edi,(%ebx)
ctx->pathlen = namelen;
108da3: 89 73 04 mov %esi,0x4(%ebx)
ctx->flags = eval_flags;
108da6: 8b 44 24 28 mov 0x28(%esp),%eax
108daa: 89 43 10 mov %eax,0x10(%ebx)
rtems_filesystem_eval_path_continue(ctx);
108dad: 89 1c 24 mov %ebx,(%esp)
108db0: e8 93 fd ff ff call 108b48 <rtems_filesystem_eval_path_continue>
return &ctx->currentloc;
108db5: 8d 43 18 lea 0x18(%ebx),%eax
}
108db8: 83 c4 10 add $0x10,%esp
108dbb: 5b pop %ebx
108dbc: 5e pop %esi
108dbd: 5f pop %edi
108dbe: c3 ret
108dbf: 90 nop
#include <rtems/libio_.h>
static size_t get_parentpathlen(const char *path, size_t pathlen)
{
while (pathlen > 0) {
108dc0: 89 fe mov %edi,%esi
if (pathlen > 0) {
if (parentpathlen == 0) {
parentpath = ".";
parentpathlen = 1;
name = path;
108dc2: 89 d7 mov %edx,%edi
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
if (parentpathlen == 0) {
parentpath = ".";
parentpathlen = 1;
108dc4: b1 01 mov $0x1,%cl
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
if (parentpathlen == 0) {
parentpath = ".";
108dc6: ba b1 30 12 00 mov $0x1230b1,%edx
108dcb: eb a6 jmp 108d73 <rtems_filesystem_eval_path_start_with_parent+0x53>
108dcd: 8d 76 00 lea 0x0(%esi),%esi
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
size_t namelen = 0;
108dd0: 31 f6 xor %esi,%esi
)
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
108dd2: 31 ff xor %edi,%edi
}
pathlen = i;
}
return 0;
108dd4: 31 c9 xor %ecx,%ecx
108dd6: eb 9b jmp 108d73 <rtems_filesystem_eval_path_start_with_parent+0x53>
0011001c <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
11001c: 83 ec 2c sub $0x2c,%esp
11001f: 8b 44 24 30 mov 0x30(%esp),%eax
find_arg fa = {
110023: 89 44 24 18 mov %eax,0x18(%esp)
110027: c7 44 24 1c 00 00 00 movl $0x0,0x1c(%esp)
11002e: 00
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
11002f: 85 c0 test %eax,%eax
110031: 74 1d je 110050 <rtems_filesystem_get_mount_handler+0x34><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
110033: 8d 44 24 18 lea 0x18(%esp),%eax
110037: 89 44 24 04 mov %eax,0x4(%esp)
11003b: c7 04 24 3c ff 10 00 movl $0x10ff3c,(%esp)
110042: e8 2d ff ff ff call 10ff74 <rtems_filesystem_iterate>
110047: 8b 44 24 1c mov 0x1c(%esp),%eax
}
return fa.mount_h;
}
11004b: 83 c4 2c add $0x2c,%esp
11004e: c3 ret
11004f: 90 nop
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
110050: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_filesystem_iterate( find_handler, &fa );
}
return fa.mount_h;
}
110052: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
110055: c3 ret <== NOT EXECUTED
0010767c <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 )
{
10767c: 83 ec 2c sub $0x2c,%esp
int rv = 0;
const rtems_filesystem_mount_configuration *root_config =
&rtems_filesystem_root_configuration;
rv = mount(
10767f: a1 38 0d 12 00 mov 0x120d38,%eax
107684: 89 44 24 10 mov %eax,0x10(%esp)
107688: a1 34 0d 12 00 mov 0x120d34,%eax
10768d: 89 44 24 0c mov %eax,0xc(%esp)
107691: a1 30 0d 12 00 mov 0x120d30,%eax
107696: 89 44 24 08 mov %eax,0x8(%esp)
10769a: a1 2c 0d 12 00 mov 0x120d2c,%eax
10769f: 89 44 24 04 mov %eax,0x4(%esp)
1076a3: a1 28 0d 12 00 mov 0x120d28,%eax
1076a8: 89 04 24 mov %eax,(%esp)
1076ab: e8 b0 07 00 00 call 107e60 <mount>
root_config->target,
root_config->filesystemtype,
root_config->options,
root_config->data
);
if ( rv != 0 )
1076b0: 85 c0 test %eax,%eax
1076b2: 75 1c jne 1076d0 <rtems_filesystem_initialize+0x54><== NEVER TAKEN
*
* 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);
1076b4: c7 44 24 04 ff 01 00 movl $0x1ff,0x4(%esp)
1076bb: 00
1076bc: c7 04 24 a4 23 12 00 movl $0x1223a4,(%esp)
1076c3: e8 38 06 00 00 call 107d00 <mkdir>
if ( rv != 0 )
1076c8: 85 c0 test %eax,%eax
1076ca: 75 10 jne 1076dc <rtems_filesystem_initialize+0x60><== NEVER TAKEN
* 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.
*/
}
1076cc: 83 c4 2c add $0x2c,%esp
1076cf: c3 ret
root_config->filesystemtype,
root_config->options,
root_config->data
);
if ( rv != 0 )
rtems_fatal_error_occurred( 0xABCD0002 );
1076d0: c7 04 24 02 00 cd ab movl $0xabcd0002,(%esp) <== NOT EXECUTED
1076d7: e8 d8 49 00 00 call 10c0b4 <rtems_fatal_error_occurred><== NOT EXECUTED
* created that way by the IMFS.
*/
rv = mkdir( "/dev", 0777);
if ( rv != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
1076dc: c7 04 24 03 00 cd ab movl $0xabcd0003,(%esp) <== NOT EXECUTED
1076e3: e8 cc 49 00 00 call 10c0b4 <rtems_fatal_error_occurred><== NOT EXECUTED
0010ff74 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
10ff74: 57 push %edi
10ff75: 56 push %esi
10ff76: 53 push %ebx
10ff77: 83 ec 20 sub $0x20,%esp
10ff7a: 8b 74 24 30 mov 0x30(%esp),%esi
10ff7e: 8b 7c 24 34 mov 0x34(%esp),%edi
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10ff82: bb 3c 0d 12 00 mov $0x120d3c,%ebx
10ff87: 8b 15 3c 0d 12 00 mov 0x120d3c,%edx
10ff8d: 85 d2 test %edx,%edx
10ff8f: 75 07 jne 10ff98 <rtems_filesystem_iterate+0x24><== ALWAYS TAKEN
10ff91: eb 1d jmp 10ffb0 <rtems_filesystem_iterate+0x3c><== NOT EXECUTED
10ff93: 90 nop <== NOT EXECUTED
10ff94: 84 d2 test %dl,%dl
10ff96: 75 79 jne 110011 <rtems_filesystem_iterate+0x9d>
stop = (*routine)( table_entry, routine_arg );
10ff98: 89 7c 24 04 mov %edi,0x4(%esp)
10ff9c: 89 1c 24 mov %ebx,(%esp)
10ff9f: ff d6 call *%esi
10ffa1: 88 c2 mov %al,%dl
++table_entry;
10ffa3: 83 c3 08 add $0x8,%ebx
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10ffa6: 8b 03 mov (%ebx),%eax
10ffa8: 85 c0 test %eax,%eax
10ffaa: 75 e8 jne 10ff94 <rtems_filesystem_iterate+0x20>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
10ffac: 84 d2 test %dl,%dl
10ffae: 75 61 jne 110011 <rtems_filesystem_iterate+0x9d>
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10ffb0: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10ffb7: 00
10ffb8: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10ffbf: 00
10ffc0: a1 1c 1e 13 00 mov 0x131e1c,%eax
10ffc5: 89 04 24 mov %eax,(%esp)
10ffc8: e8 af b9 ff ff call 10b97c <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10ffcd: 8b 1d e8 fb 12 00 mov 0x12fbe8,%ebx
rtems_libio_lock();
for (
10ffd3: 31 d2 xor %edx,%edx
10ffd5: 81 fb ec fb 12 00 cmp $0x12fbec,%ebx
10ffdb: 75 07 jne 10ffe4 <rtems_filesystem_iterate+0x70>
10ffdd: eb 1d jmp 10fffc <rtems_filesystem_iterate+0x88>
10ffdf: 90 nop
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
10ffe0: 84 c0 test %al,%al
10ffe2: 75 18 jne 10fffc <rtems_filesystem_iterate+0x88><== NEVER TAKEN
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
10ffe4: 89 7c 24 04 mov %edi,0x4(%esp)
10ffe8: 8d 43 08 lea 0x8(%ebx),%eax
10ffeb: 89 04 24 mov %eax,(%esp)
10ffee: ff d6 call *%esi
10fff0: 88 c2 mov %al,%dl
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
10fff2: 8b 1b mov (%ebx),%ebx
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
10fff4: 81 fb ec fb 12 00 cmp $0x12fbec,%ebx
10fffa: 75 e4 jne 10ffe0 <rtems_filesystem_iterate+0x6c>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10fffc: a1 1c 1e 13 00 mov 0x131e1c,%eax
110001: 89 04 24 mov %eax,(%esp)
110004: 88 54 24 1c mov %dl,0x1c(%esp)
110008: e8 9b ba ff ff call 10baa8 <rtems_semaphore_release>
11000d: 8a 54 24 1c mov 0x1c(%esp),%dl
}
rtems_libio_unlock();
}
return stop;
}
110011: 88 d0 mov %dl,%al
110013: 83 c4 20 add $0x20,%esp
110016: 5b pop %ebx
110017: 5e pop %esi
110018: 5f pop %edi
110019: c3 ret
00109028 <rtems_filesystem_location_remove_from_mt_entry>:
}
void rtems_filesystem_location_remove_from_mt_entry(
rtems_filesystem_location_info_t *loc
)
{
109028: 56 push %esi
109029: 53 push %ebx
10902a: 8b 44 24 0c mov 0xc(%esp),%eax
rtems_filesystem_mt_entry_declare_lock_context(lock_context);
bool do_unmount;
rtems_filesystem_mt_entry_lock(lock_context);
10902e: 9c pushf
10902f: fa cli
109030: 5b pop %ebx
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
109031: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
109033: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
109036: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
109039: 89 0a mov %ecx,(%edx)
rtems_chain_extract_unprotected(&loc->mt_entry_node);
do_unmount = rtems_filesystem_is_ready_for_unmount(loc->mt_entry);
10903b: 8b 50 14 mov 0x14(%eax),%edx
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
bool ready = !mt_entry->mounted
&& rtems_chain_has_only_one_node( &mt_entry->location_chain )
&& mt_entry->mt_fs_root->reference_count == 1;
10903e: 80 7a 28 00 cmpb $0x0,0x28(%edx)
109042: 75 08 jne 10904c <rtems_filesystem_location_remove_from_mt_entry+0x24>
static inline bool rtems_filesystem_is_ready_for_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
bool ready = !mt_entry->mounted
&& rtems_chain_has_only_one_node( &mt_entry->location_chain )
109044: 8b 4a 1c mov 0x1c(%edx),%ecx
109047: 39 4a 14 cmp %ecx,0x14(%edx)
10904a: 74 1c je 109068 <rtems_filesystem_location_remove_from_mt_entry+0x40>
static inline bool rtems_filesystem_is_ready_for_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
bool ready = !mt_entry->mounted
10904c: 31 d2 xor %edx,%edx
rtems_filesystem_mt_entry_unlock(lock_context);
10904e: 53 push %ebx
10904f: 9d popf
if (do_unmount) {
109050: 84 d2 test %dl,%dl
109052: 75 04 jne 109058 <rtems_filesystem_location_remove_from_mt_entry+0x30><== NEVER TAKEN
rtems_filesystem_do_unmount(loc->mt_entry);
}
}
109054: 5b pop %ebx
109055: 5e pop %esi
109056: c3 ret
109057: 90 nop
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);
109058: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
10905b: 89 44 24 0c mov %eax,0xc(%esp) <== NOT EXECUTED
}
}
10905f: 5b pop %ebx <== NOT EXECUTED
109060: 5e pop %esi <== 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);
109061: e9 3e ff ff ff jmp 108fa4 <rtems_filesystem_do_unmount><== NOT EXECUTED
109066: 66 90 xchg %ax,%ax <== NOT EXECUTED
&& rtems_chain_has_only_one_node( &mt_entry->location_chain )
&& mt_entry->mt_fs_root->reference_count == 1;
109068: 8b 4a 24 mov 0x24(%edx),%ecx
10906b: 83 79 18 01 cmpl $0x1,0x18(%ecx)
10906f: 75 db jne 10904c <rtems_filesystem_location_remove_from_mt_entry+0x24><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
109071: 8d 4a 14 lea 0x14(%edx),%ecx <== NOT EXECUTED
109074: 8d 72 18 lea 0x18(%edx),%esi <== NOT EXECUTED
109077: 89 72 14 mov %esi,0x14(%edx) <== NOT EXECUTED
head->next = tail;
head->previous = NULL;
10907a: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
109081: 89 4a 1c mov %ecx,0x1c(%edx) <== NOT EXECUTED
static inline bool rtems_filesystem_is_ready_for_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
bool ready = !mt_entry->mounted
109084: b2 01 mov $0x1,%dl <== NOT EXECUTED
109086: eb c6 jmp 10904e <rtems_filesystem_location_remove_from_mt_entry+0x26><== NOT EXECUTED
00109224 <rtems_filesystem_location_transform_to_global>:
}
rtems_filesystem_global_location_t *rtems_filesystem_location_transform_to_global(
rtems_filesystem_location_info_t *loc
)
{
109224: 56 push %esi
109225: 53 push %ebx
109226: 83 ec 24 sub $0x24,%esp
109229: 8b 74 24 30 mov 0x30(%esp),%esi
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
10922d: c7 04 24 24 00 00 00 movl $0x24,(%esp)
109234: e8 17 ea ff ff call 107c50 <malloc>
109239: 89 c3 mov %eax,%ebx
if (global_loc != NULL) {
10923b: 85 c0 test %eax,%eax
10923d: 74 31 je 109270 <rtems_filesystem_location_transform_to_global+0x4c><== NEVER TAKEN
global_loc->reference_count = 1;
10923f: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax)
global_loc->deferred_released_next = NULL;
109246: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
global_loc->deferred_released_count = 0;
10924d: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
rtems_filesystem_location_copy(&global_loc->location, loc);
109254: 89 74 24 04 mov %esi,0x4(%esp)
109258: 89 04 24 mov %eax,(%esp)
10925b: e8 dc fc ff ff call 108f3c <rtems_filesystem_location_copy>
rtems_filesystem_location_remove_from_mt_entry(loc);
109260: 89 34 24 mov %esi,(%esp)
109263: e8 c0 fd ff ff call 109028 <rtems_filesystem_location_remove_from_mt_entry>
global_loc = rtems_filesystem_global_location_obtain_null();
errno = ENOMEM;
}
return global_loc;
}
109268: 89 d8 mov %ebx,%eax
10926a: 83 c4 24 add $0x24,%esp
10926d: 5b pop %ebx
10926e: 5e pop %esi
10926f: c3 ret
global_loc->deferred_released_next = NULL;
global_loc->deferred_released_count = 0;
rtems_filesystem_location_copy(&global_loc->location, loc);
rtems_filesystem_location_remove_from_mt_entry(loc);
} else {
rtems_filesystem_location_free(loc);
109270: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
109273: e8 78 6a 00 00 call 10fcf0 <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;
109278: c7 44 24 1c 00 00 00 movl $0x0,0x1c(%esp) <== NOT EXECUTED
10927f: 00
return rtems_filesystem_global_location_obtain( &global_loc );
109280: 8d 44 24 1c lea 0x1c(%esp),%eax <== NOT EXECUTED
109284: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
109287: e8 10 ff ff ff call 10919c <rtems_filesystem_global_location_obtain><== NOT EXECUTED
10928c: 89 c3 mov %eax,%ebx <== NOT EXECUTED
global_loc = rtems_filesystem_global_location_obtain_null();
errno = ENOMEM;
10928e: e8 6d a9 00 00 call 113c00 <__errno> <== NOT EXECUTED
109293: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
}
return global_loc;
}
109299: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10929b: 83 c4 24 add $0x24,%esp <== NOT EXECUTED
10929e: 5b pop %ebx <== NOT EXECUTED
10929f: 5e pop %esi <== NOT EXECUTED
1092a0: c3 ret <== NOT EXECUTED
00107d30 <rtems_filesystem_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
107d30: 55 push %ebp
107d31: 57 push %edi
107d32: 56 push %esi
107d33: 53 push %ebx
107d34: 83 ec 0c sub $0xc,%esp
107d37: 8b 74 24 20 mov 0x20(%esp),%esi
107d3b: 8b 7c 24 24 mov 0x24(%esp),%edi
107d3f: 8b 6c 24 28 mov 0x28(%esp),%ebp
107d43: 8b 44 24 30 mov 0x30(%esp),%eax
107d47: 8b 54 24 34 mov 0x34(%esp),%edx
int rv = 0;
mode &= ~rtems_filesystem_umask;
107d4b: 8b 0d 00 fb 12 00 mov 0x12fb00,%ecx
107d51: 8b 49 08 mov 0x8(%ecx),%ecx
107d54: f7 d1 not %ecx
107d56: 23 4c 24 2c and 0x2c(%esp),%ecx
switch (mode & S_IFMT) {
107d5a: 89 cb mov %ecx,%ebx
107d5c: 81 e3 00 f0 00 00 and $0xf000,%ebx
107d62: 81 fb 00 40 00 00 cmp $0x4000,%ebx
107d68: 74 3a je 107da4 <rtems_filesystem_mknod+0x74>
107d6a: 76 28 jbe 107d94 <rtems_filesystem_mknod+0x64>
107d6c: 81 fb 00 60 00 00 cmp $0x6000,%ebx
107d72: 74 30 je 107da4 <rtems_filesystem_mknod+0x74>
107d74: 81 fb 00 80 00 00 cmp $0x8000,%ebx
107d7a: 74 28 je 107da4 <rtems_filesystem_mknod+0x74><== ALWAYS TAKEN
case S_IFDIR:
case S_IFIFO:
case S_IFREG:
break;
default:
errno = EINVAL;
107d7c: e8 7f be 00 00 call 113c00 <__errno>
107d81: c7 00 16 00 00 00 movl $0x16,(%eax)
rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev );
}
return rv;
}
107d87: b8 ff ff ff ff mov $0xffffffff,%eax
107d8c: 83 c4 0c add $0xc,%esp
107d8f: 5b pop %ebx
107d90: 5e pop %esi
107d91: 5f pop %edi
107d92: 5d pop %ebp
107d93: c3 ret
{
int rv = 0;
mode &= ~rtems_filesystem_umask;
switch (mode & S_IFMT) {
107d94: 81 fb 00 10 00 00 cmp $0x1000,%ebx
107d9a: 74 08 je 107da4 <rtems_filesystem_mknod+0x74>
107d9c: 81 fb 00 20 00 00 cmp $0x2000,%ebx
107da2: 75 d8 jne 107d7c <rtems_filesystem_mknod+0x4c>
rv = -1;
break;
}
if ( rv == 0 ) {
const rtems_filesystem_operations_table *ops = parentloc->mt_entry->ops;
107da4: 8b 5e 14 mov 0x14(%esi),%ebx
rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev );
107da7: 8b 5b 0c mov 0xc(%ebx),%ebx
107daa: 89 44 24 30 mov %eax,0x30(%esp)
107dae: 89 54 24 34 mov %edx,0x34(%esp)
107db2: 89 4c 24 2c mov %ecx,0x2c(%esp)
107db6: 89 6c 24 28 mov %ebp,0x28(%esp)
107dba: 89 7c 24 24 mov %edi,0x24(%esp)
107dbe: 89 74 24 20 mov %esi,0x20(%esp)
107dc2: 8b 43 18 mov 0x18(%ebx),%eax
}
return rv;
}
107dc5: 83 c4 0c add $0xc,%esp
107dc8: 5b pop %ebx
107dc9: 5e pop %esi
107dca: 5f pop %edi
107dcb: 5d pop %ebp
}
if ( rv == 0 ) {
const rtems_filesystem_operations_table *ops = parentloc->mt_entry->ops;
rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev );
107dcc: ff e0 jmp *%eax
00110130 <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
110130: 56 push %esi
110131: 53 push %ebx
110132: 83 ec 14 sub $0x14,%esp
110135: 8b 74 24 20 mov 0x20(%esp),%esi
rtems_chain_node *node = NULL;
if ( type == NULL ) {
110139: 85 f6 test %esi,%esi
11013b: 0f 84 96 00 00 00 je 1101d7 <rtems_filesystem_unregister+0xa7>
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
110141: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
110148: 00
110149: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
110150: 00
110151: a1 1c 1e 13 00 mov 0x131e1c,%eax
110156: 89 04 24 mov %eax,(%esp)
110159: e8 1e b8 ff ff call 10b97c <rtems_semaphore_obtain>
11015e: 8b 1d e8 fb 12 00 mov 0x12fbe8,%ebx
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
110164: 81 fb ec fb 12 00 cmp $0x12fbec,%ebx
11016a: 75 0e jne 11017a <rtems_filesystem_unregister+0x4a>
11016c: eb 46 jmp 1101b4 <rtems_filesystem_unregister+0x84>
11016e: 66 90 xchg %ax,%ax
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
110170: 8b 1b mov (%ebx),%ebx
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
110172: 81 fb ec fb 12 00 cmp $0x12fbec,%ebx
110178: 74 3a je 1101b4 <rtems_filesystem_unregister+0x84><== ALWAYS TAKEN
!rtems_chain_is_tail( &filesystem_chain, node );
node = rtems_chain_next( node )
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
11017a: 89 74 24 04 mov %esi,0x4(%esp)
11017e: 8b 43 08 mov 0x8(%ebx),%eax
110181: 89 04 24 mov %eax,(%esp)
110184: e8 23 48 00 00 call 1149ac <strcmp>
110189: 85 c0 test %eax,%eax
11018b: 75 e3 jne 110170 <rtems_filesystem_unregister+0x40>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
11018d: 89 1c 24 mov %ebx,(%esp)
110190: e8 7f 13 00 00 call 111514 <_Chain_Extract>
rtems_chain_extract( node );
free( fsn );
110195: 89 1c 24 mov %ebx,(%esp)
110198: e8 9f 77 ff ff call 10793c <free>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
11019d: a1 1c 1e 13 00 mov 0x131e1c,%eax
1101a2: 89 04 24 mov %eax,(%esp)
1101a5: e8 fe b8 ff ff call 10baa8 <rtems_semaphore_release>
rtems_libio_unlock();
return 0;
1101aa: 31 c0 xor %eax,%eax
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
1101ac: 83 c4 14 add $0x14,%esp
1101af: 5b pop %ebx
1101b0: 5e pop %esi
1101b1: c3 ret
1101b2: 66 90 xchg %ax,%ax
1101b4: a1 1c 1e 13 00 mov 0x131e1c,%eax
1101b9: 89 04 24 mov %eax,(%esp)
1101bc: e8 e7 b8 ff ff call 10baa8 <rtems_semaphore_release>
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
1101c1: e8 3a 3a 00 00 call 113c00 <__errno>
1101c6: c7 00 02 00 00 00 movl $0x2,(%eax)
1101cc: b8 ff ff ff ff mov $0xffffffff,%eax
}
1101d1: 83 c4 14 add $0x14,%esp
1101d4: 5b pop %ebx
1101d5: 5e pop %esi
1101d6: c3 ret
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
1101d7: e8 24 3a 00 00 call 113c00 <__errno>
1101dc: c7 00 16 00 00 00 movl $0x16,(%eax)
1101e2: b8 ff ff ff ff mov $0xffffffff,%eax
1101e7: eb e8 jmp 1101d1 <rtems_filesystem_unregister+0xa1>
00108150 <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
108150: 56 push %esi
108151: 53 push %ebx
108152: 83 ec 14 sub $0x14,%esp
108155: 8b 74 24 24 mov 0x24(%esp),%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 ) );
108159: c7 04 24 08 00 00 00 movl $0x8,(%esp)
108160: e8 13 04 00 00 call 108578 <malloc>
108165: 89 c3 mov %eax,%ebx
*key = new_key;
108167: 8b 44 24 20 mov 0x20(%esp),%eax
10816b: 89 18 mov %ebx,(%eax)
new_key->val = NULL;
10816d: c7 03 00 00 00 00 movl $0x0,(%ebx)
new_key->dtor = dtor;
108173: 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 );
108176: 89 74 24 08 mov %esi,0x8(%esp)
10817a: 89 5c 24 04 mov %ebx,0x4(%esp)
10817e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
108185: e8 66 47 00 00 call 10c8f0 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
10818a: 85 c0 test %eax,%eax
10818c: 75 0a jne 108198 <rtems_gxx_key_create+0x48><== NEVER TAKEN
return 0;
10818e: 31 c0 xor %eax,%eax
free( new_key );
return -1;
}
108190: 83 c4 14 add $0x14,%esp
108193: 5b pop %ebx
108194: 5e pop %esi
108195: c3 ret
108196: 66 90 xchg %ax,%ax
/* 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 )
return 0;
free( new_key );
108198: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10819b: e8 ec fd ff ff call 107f8c <free> <== NOT EXECUTED
return -1;
1081a0: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1081a5: eb e9 jmp 108190 <rtems_gxx_key_create+0x40><== NOT EXECUTED
001081b8 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
1081b8: 53 push %ebx
1081b9: 83 ec 18 sub $0x18,%esp
1081bc: 8b 5c 24 20 mov 0x20(%esp),%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 );
1081c0: 89 5c 24 04 mov %ebx,0x4(%esp)
1081c4: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1081cb: e8 d0 47 00 00 call 10c9a0 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
1081d0: 85 c0 test %eax,%eax
1081d2: 75 0e jne 1081e2 <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
1081d4: 85 db test %ebx,%ebx
1081d6: 74 0a je 1081e2 <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
1081d8: 8b 03 mov (%ebx),%eax
1081da: 89 04 24 mov %eax,(%esp)
1081dd: e8 aa fd ff ff call 107f8c <free>
return 0;
}
key = NULL;
return 0;
}
1081e2: 31 c0 xor %eax,%eax
1081e4: 83 c4 18 add $0x18,%esp
1081e7: 5b pop %ebx
1081e8: c3 ret
001080cc <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))
{
1080cc: 56 push %esi
1080cd: 53 push %ebx
1080ce: 83 ec 24 sub $0x24,%esp
1080d1: 8b 5c 24 30 mov 0x30(%esp),%ebx
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
1080d5: 8b 03 mov (%ebx),%eax
1080d7: 85 c0 test %eax,%eax
1080d9: 74 09 je 1080e4 <rtems_gxx_once+0x18>
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
1080db: 31 c0 xor %eax,%eax
1080dd: 83 c4 24 add $0x24,%esp
1080e0: 5b pop %ebx
1080e1: 5e pop %esi
1080e2: c3 ret
1080e3: 90 nop
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
1080e4: 8d 74 24 1c lea 0x1c(%esp),%esi
1080e8: 89 74 24 08 mov %esi,0x8(%esp)
1080ec: c7 44 24 04 00 01 00 movl $0x100,0x4(%esp)
1080f3: 00
1080f4: c7 04 24 00 01 00 00 movl $0x100,(%esp)
1080fb: e8 08 46 00 00 call 10c708 <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
108100: 8b 03 mov (%ebx),%eax
108102: 85 c0 test %eax,%eax
108104: 75 2a jne 108130 <rtems_gxx_once+0x64> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
108106: c7 03 01 00 00 00 movl $0x1,(%ebx)
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10810c: 89 74 24 08 mov %esi,0x8(%esp)
108110: c7 44 24 04 00 01 00 movl $0x100,0x4(%esp)
108117: 00
108118: 8b 44 24 1c mov 0x1c(%esp),%eax
10811c: 89 04 24 mov %eax,(%esp)
10811f: e8 e4 45 00 00 call 10c708 <rtems_task_mode>
if ( o == 0 )
(*func)();
108124: ff 54 24 34 call *0x34(%esp)
}
return 0;
}
108128: 31 c0 xor %eax,%eax
10812a: 83 c4 24 add $0x24,%esp
10812d: 5b pop %ebx
10812e: 5e pop %esi
10812f: c3 ret
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
108130: 89 74 24 08 mov %esi,0x8(%esp) <== NOT EXECUTED
108134: c7 44 24 04 00 01 00 movl $0x100,0x4(%esp) <== NOT EXECUTED
10813b: 00
10813c: 8b 44 24 1c mov 0x1c(%esp),%eax <== NOT EXECUTED
108140: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
108143: e8 c0 45 00 00 call 10c708 <rtems_task_mode> <== NOT EXECUTED
if ( o == 0 )
(*func)();
}
return 0;
}
108148: 31 c0 xor %eax,%eax <== NOT EXECUTED
10814a: 83 c4 24 add $0x24,%esp <== NOT EXECUTED
10814d: 5b pop %ebx <== NOT EXECUTED
10814e: 5e pop %esi <== NOT EXECUTED
10814f: c3 ret <== NOT EXECUTED
00108268 <rtems_gxx_setspecific>:
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
108268: 53 push %ebx
108269: 83 ec 18 sub $0x18,%esp
10826c: 8b 5c 24 20 mov 0x20(%esp),%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 );
108270: 8b 43 04 mov 0x4(%ebx),%eax
108273: 89 44 24 08 mov %eax,0x8(%esp)
108277: 89 5c 24 04 mov %ebx,0x4(%esp)
10827b: c7 04 24 00 00 00 00 movl $0x0,(%esp)
108282: e8 69 46 00 00 call 10c8f0 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
108287: 85 c0 test %eax,%eax
108289: 75 0d jne 108298 <rtems_gxx_setspecific+0x30><== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
10828b: 8b 44 24 24 mov 0x24(%esp),%eax
10828f: 89 03 mov %eax,(%ebx)
return 0;
108291: 31 c0 xor %eax,%eax
}
return -1;
}
108293: 83 c4 18 add $0x18,%esp
108296: 5b pop %ebx
108297: c3 ret
if ( status == RTEMS_SUCCESSFUL ) {
/* now let's set the proper value */
key->val = (void *)ptr;
return 0;
}
return -1;
108298: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10829d: eb f4 jmp 108293 <rtems_gxx_setspecific+0x2b><== NOT EXECUTED
0010b95c <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
10b95c: 83 ec 1c sub $0x1c,%esp
if (
10b95f: 83 3d e0 80 13 00 03 cmpl $0x3,0x1380e0
10b966: 74 30 je 10b998 <rtems_heap_allocate_aligned_with_boundary+0x3c><== ALWAYS TAKEN
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
10b968: e8 37 ef ff ff call 10a8a4 <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
10b96d: 8b 44 24 28 mov 0x28(%esp),%eax
10b971: 89 44 24 0c mov %eax,0xc(%esp)
10b975: 8b 44 24 24 mov 0x24(%esp),%eax
10b979: 89 44 24 08 mov %eax,0x8(%esp)
10b97d: 8b 44 24 20 mov 0x20(%esp),%eax
10b981: 89 44 24 04 mov %eax,0x4(%esp)
10b985: a1 70 32 13 00 mov 0x133270,%eax
10b98a: 89 04 24 mov %eax,(%esp)
10b98d: e8 52 59 00 00 call 1112e4 <_Protected_heap_Allocate_aligned_with_boundary>
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
10b992: 83 c4 1c add $0x1c,%esp
10b995: c3 ret
10b996: 66 90 xchg %ax,%ax
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
10b998: e8 cf ee ff ff call 10a86c <malloc_is_system_state_OK>
10b99d: 84 c0 test %al,%al
10b99f: 75 c7 jne 10b968 <rtems_heap_allocate_aligned_with_boundary+0xc>
) {
return NULL;
10b9a1: 31 c0 xor %eax,%eax
10b9a3: eb ed jmp 10b992 <rtems_heap_allocate_aligned_with_boundary+0x36>
0010d570 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
10d570: 57 push %edi
10d571: 56 push %esi
10d572: 53 push %ebx
10d573: 8b 5c 24 10 mov 0x10(%esp),%ebx
10d577: 8b 74 24 14 mov 0x14(%esp),%esi
10d57b: 8b 44 24 18 mov 0x18(%esp),%eax
rtems_device_major_number major_limit = _IO_Number_of_drivers;
10d57f: 8b 15 00 77 13 00 mov 0x137700,%edx
if ( rtems_interrupt_is_in_progress() )
10d585: 8b 0d 68 72 13 00 mov 0x137268,%ecx
10d58b: 85 c9 test %ecx,%ecx
10d58d: 74 09 je 10d598 <rtems_io_register_driver+0x28>
return RTEMS_CALLED_FROM_ISR;
10d58f: b8 12 00 00 00 mov $0x12,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d594: 5b pop %ebx
10d595: 5e pop %esi
10d596: 5f pop %edi
10d597: c3 ret
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
10d598: 85 c0 test %eax,%eax
10d59a: 74 24 je 10d5c0 <rtems_io_register_driver+0x50>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
10d59c: 89 10 mov %edx,(%eax)
if ( driver_table == NULL )
10d59e: 85 f6 test %esi,%esi
10d5a0: 74 1e je 10d5c0 <rtems_io_register_driver+0x50>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d5a2: 8b 3e mov (%esi),%edi
10d5a4: 85 ff test %edi,%edi
10d5a6: 74 10 je 10d5b8 <rtems_io_register_driver+0x48>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
10d5a8: 39 da cmp %ebx,%edx
10d5aa: 77 20 ja 10d5cc <rtems_io_register_driver+0x5c>
return RTEMS_INVALID_NUMBER;
10d5ac: b8 0a 00 00 00 mov $0xa,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d5b1: 5b pop %ebx
10d5b2: 5e pop %esi
10d5b3: 5f pop %edi
10d5b4: c3 ret
10d5b5: 8d 76 00 lea 0x0(%esi),%esi
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d5b8: 8b 4e 04 mov 0x4(%esi),%ecx
10d5bb: 85 c9 test %ecx,%ecx
10d5bd: 75 e9 jne 10d5a8 <rtems_io_register_driver+0x38>
10d5bf: 90 nop
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
10d5c0: b8 09 00 00 00 mov $0x9,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d5c5: 5b pop %ebx
10d5c6: 5e pop %esi
10d5c7: 5f pop %edi
10d5c8: c3 ret
10d5c9: 8d 76 00 lea 0x0(%esi),%esi
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10d5cc: 8b 15 e4 6c 13 00 mov 0x136ce4,%edx
10d5d2: 42 inc %edx
10d5d3: 89 15 e4 6c 13 00 mov %edx,0x136ce4
return _Thread_Dispatch_disable_level;
10d5d9: 8b 15 e4 6c 13 00 mov 0x136ce4,%edx
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
10d5df: 85 db test %ebx,%ebx
10d5e1: 74 1e je 10d601 <rtems_io_register_driver+0x91>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
10d5e3: 8d 14 5b lea (%ebx,%ebx,2),%edx
10d5e6: 8b 3d 04 77 13 00 mov 0x137704,%edi
10d5ec: 8d 14 d7 lea (%edi,%edx,8),%edx
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d5ef: 8b 0a mov (%edx),%ecx
10d5f1: 85 c9 test %ecx,%ecx
10d5f3: 74 7d je 10d672 <rtems_io_register_driver+0x102>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
10d5f5: e8 02 1d 00 00 call 10f2fc <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10d5fa: b8 0c 00 00 00 mov $0xc,%eax
10d5ff: eb 93 jmp 10d594 <rtems_io_register_driver+0x24>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
10d601: 8b 0d 00 77 13 00 mov 0x137700,%ecx
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10d607: 85 c9 test %ecx,%ecx
10d609: 74 76 je 10d681 <rtems_io_register_driver+0x111><== NEVER TAKEN
10d60b: 8b 3d 04 77 13 00 mov 0x137704,%edi
10d611: 89 fa mov %edi,%edx
10d613: eb 0b jmp 10d620 <rtems_io_register_driver+0xb0>
10d615: 8d 76 00 lea 0x0(%esi),%esi
10d618: 43 inc %ebx
10d619: 83 c2 18 add $0x18,%edx
10d61c: 39 cb cmp %ecx,%ebx
10d61e: 74 41 je 10d661 <rtems_io_register_driver+0xf1>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d620: 83 3a 00 cmpl $0x0,(%edx)
10d623: 75 f3 jne 10d618 <rtems_io_register_driver+0xa8>
10d625: 83 7a 04 00 cmpl $0x0,0x4(%edx)
10d629: 75 ed jne 10d618 <rtems_io_register_driver+0xa8>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d62b: 89 18 mov %ebx,(%eax)
if ( m != n )
10d62d: 39 d9 cmp %ebx,%ecx
10d62f: 74 32 je 10d663 <rtems_io_register_driver+0xf3><== NEVER TAKEN
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
10d631: 8d 04 5b lea (%ebx,%ebx,2),%eax
10d634: 8d 04 c7 lea (%edi,%eax,8),%eax
10d637: b9 06 00 00 00 mov $0x6,%ecx
10d63c: 89 c7 mov %eax,%edi
10d63e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
10d640: e8 b7 1c 00 00 call 10f2fc <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
10d645: c7 44 24 18 00 00 00 movl $0x0,0x18(%esp)
10d64c: 00
10d64d: c7 44 24 14 00 00 00 movl $0x0,0x14(%esp)
10d654: 00
10d655: 89 5c 24 10 mov %ebx,0x10(%esp)
}
10d659: 5b pop %ebx
10d65a: 5e pop %esi
10d65b: 5f pop %edi
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10d65c: e9 2f 7e 00 00 jmp 115490 <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d661: 89 18 mov %ebx,(%eax)
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
10d663: e8 94 1c 00 00 call 10f2fc <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
10d668: b8 05 00 00 00 mov $0x5,%eax
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
10d66d: e9 22 ff ff ff jmp 10d594 <rtems_io_register_driver+0x24>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d672: 8b 52 04 mov 0x4(%edx),%edx
10d675: 85 d2 test %edx,%edx
10d677: 0f 85 78 ff ff ff jne 10d5f5 <rtems_io_register_driver+0x85>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
10d67d: 89 18 mov %ebx,(%eax)
10d67f: eb b0 jmp 10d631 <rtems_io_register_driver+0xc1>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d681: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
10d687: eb da jmp 10d663 <rtems_io_register_driver+0xf3><== NOT EXECUTED
0010e23c <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)
{
10e23c: 55 push %ebp
10e23d: 57 push %edi
10e23e: 56 push %esi
10e23f: 53 push %ebx
10e240: 83 ec 1c sub $0x1c,%esp
10e243: 8b 74 24 30 mov 0x30(%esp),%esi
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10e247: bf 01 00 00 00 mov $0x1,%edi
10e24c: 85 f6 test %esi,%esi
10e24e: 74 3a je 10e28a <rtems_iterate_over_all_threads+0x4e><== NEVER TAKEN
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10e250: 8b 04 bd 9c 3a 13 00 mov 0x133a9c(,%edi,4),%eax
10e257: 8b 68 04 mov 0x4(%eax),%ebp
if ( !information )
10e25a: 85 ed test %ebp,%ebp
10e25c: 74 26 je 10e284 <rtems_iterate_over_all_threads+0x48>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e25e: 66 83 7d 10 00 cmpw $0x0,0x10(%ebp)
10e263: 74 1f je 10e284 <rtems_iterate_over_all_threads+0x48>
10e265: bb 01 00 00 00 mov $0x1,%ebx
10e26a: 66 90 xchg %ax,%ax
the_thread = (Thread_Control *)information->local_table[ i ];
10e26c: 8b 45 1c mov 0x1c(%ebp),%eax
10e26f: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !the_thread )
10e272: 85 c0 test %eax,%eax
10e274: 74 05 je 10e27b <rtems_iterate_over_all_threads+0x3f><== NEVER TAKEN
continue;
(*routine)(the_thread);
10e276: 89 04 24 mov %eax,(%esp)
10e279: ff d6 call *%esi
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e27b: 43 inc %ebx
10e27c: 0f b7 45 10 movzwl 0x10(%ebp),%eax
10e280: 39 d8 cmp %ebx,%eax
10e282: 73 e8 jae 10e26c <rtems_iterate_over_all_threads+0x30>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10e284: 47 inc %edi
10e285: 83 ff 04 cmp $0x4,%edi
10e288: 75 c6 jne 10e250 <rtems_iterate_over_all_threads+0x14>
(*routine)(the_thread);
}
}
}
10e28a: 83 c4 1c add $0x1c,%esp
10e28d: 5b pop %ebx
10e28e: 5e pop %esi
10e28f: 5f pop %edi
10e290: 5d pop %ebp
10e291: c3 ret
00107a7c <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
107a7c: 53 push %ebx
107a7d: 83 ec 28 sub $0x28,%esp
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
107a80: 8b 1d 60 db 12 00 mov 0x12db60,%ebx
107a86: 85 db test %ebx,%ebx
107a88: 74 45 je 107acf <rtems_libio_init+0x53> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
107a8a: c7 44 24 04 30 00 00 movl $0x30,0x4(%esp)
107a91: 00
107a92: 89 1c 24 mov %ebx,(%esp)
107a95: e8 4e fc ff ff call 1076e8 <calloc>
107a9a: a3 14 1e 13 00 mov %eax,0x131e14
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
107a9f: 85 c0 test %eax,%eax
107aa1: 74 7a je 107b1d <rtems_libio_init+0xa1>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
107aa3: a3 18 1e 13 00 mov %eax,0x131e18
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
107aa8: 83 fb 01 cmp $0x1,%ebx
107aab: 76 1b jbe 107ac8 <rtems_libio_init+0x4c>
107aad: 89 c2 mov %eax,%edx
107aaf: b9 01 00 00 00 mov $0x1,%ecx
iop->data1 = iop + 1;
107ab4: 83 c2 30 add $0x30,%edx
107ab7: 89 52 fc mov %edx,-0x4(%edx)
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++)
107aba: 41 inc %ecx
107abb: 39 d9 cmp %ebx,%ecx
107abd: 75 f5 jne 107ab4 <rtems_libio_init+0x38>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
107abf: 8d 54 49 fd lea -0x3(%ecx,%ecx,2),%edx
107ac3: c1 e2 04 shl $0x4,%edx
107ac6: 01 d0 add %edx,%eax
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++)
iop->data1 = iop + 1;
iop->data1 = NULL;
107ac8: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
107acf: c7 44 24 10 1c 1e 13 movl $0x131e1c,0x10(%esp)
107ad6: 00
107ad7: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
107ade: 00
107adf: c7 44 24 08 54 00 00 movl $0x54,0x8(%esp)
107ae6: 00
107ae7: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
107aee: 00
107aef: c7 04 24 4f 49 42 4c movl $0x4c42494f,(%esp)
107af6: e8 cd 3b 00 00 call 10b6c8 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
107afb: 85 c0 test %eax,%eax
107afd: 75 16 jne 107b15 <rtems_libio_init+0x99> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
107aff: a1 64 db 12 00 mov 0x12db64,%eax
107b04: 85 c0 test %eax,%eax
107b06: 74 08 je 107b10 <rtems_libio_init+0x94>
(* rtems_fs_init_helper)();
}
107b08: 83 c4 28 add $0x28,%esp
107b0b: 5b pop %ebx
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
107b0c: ff e0 jmp *%eax
107b0e: 66 90 xchg %ax,%ax
}
107b10: 83 c4 28 add $0x28,%esp
107b13: 5b pop %ebx
107b14: c3 ret
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
107b15: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
107b18: e8 97 45 00 00 call 10c0b4 <rtems_fatal_error_occurred><== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
107b1d: c7 04 24 1a 00 00 00 movl $0x1a,(%esp)
107b24: e8 8b 45 00 00 call 10c0b4 <rtems_fatal_error_occurred>
00106224 <rtems_libio_set_private_env>:
}
rtems_status_code rtems_libio_set_private_env(void)
{
106224: 55 push %ebp
106225: 57 push %edi
106226: 56 push %esi
106227: 53 push %ebx
106228: 83 ec 2c sub $0x2c,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
10622b: e8 f4 18 00 00 call 107b24 <rtems_task_self>
106230: 89 c2 mov %eax,%edx
rtems_user_env_t *old_env = rtems_current_user_env;
106232: 8b 2d e0 b6 12 00 mov 0x12b6e0,%ebp
bool uses_global_env = old_env == &rtems_global_user_env;
bool uses_shared_env = old_env->task_id != self_task_id;
106238: 8b 45 24 mov 0x24(%ebp),%eax
if (uses_global_env || uses_shared_env) {
10623b: 81 fd 00 b7 12 00 cmp $0x12b700,%ebp
106241: 74 08 je 10624b <rtems_libio_set_private_env+0x27>
106243: 39 c2 cmp %eax,%edx
106245: 0f 84 bd 00 00 00 je 106308 <rtems_libio_set_private_env+0xe4>
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
10624b: c7 44 24 04 2c 00 00 movl $0x2c,0x4(%esp)
106252: 00
106253: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10625a: 89 54 24 1c mov %edx,0x1c(%esp)
10625e: e8 45 4a 00 00 call 10aca8 <calloc>
106263: 89 c3 mov %eax,%ebx
if (new_env != NULL) {
106265: 85 c0 test %eax,%eax
106267: 8b 54 24 1c mov 0x1c(%esp),%edx
10626b: 74 7b je 1062e8 <rtems_libio_set_private_env+0xc4>
*new_env = *old_env;
10626d: b9 0b 00 00 00 mov $0xb,%ecx
106272: 89 c7 mov %eax,%edi
106274: 89 ee mov %ebp,%esi
106276: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
new_env->reference_count = 1;
106278: c7 40 28 01 00 00 00 movl $0x1,0x28(%eax)
new_env->task_id = self_task_id;
10627f: 89 50 24 mov %edx,0x24(%eax)
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
106282: 8d 45 04 lea 0x4(%ebp),%eax
106285: 89 04 24 mov %eax,(%esp)
106288: e8 37 0b 00 00 call 106dc4 <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 =
10628d: 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);
106290: 89 2c 24 mov %ebp,(%esp)
106293: e8 2c 0b 00 00 call 106dc4 <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 =
106298: 89 03 mov %eax,(%ebx)
rtems_fatal_error_occurred(0xdeadbeef);
}
rtems_current_user_env = &rtems_global_user_env;
}
}
10629a: 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 (
10629d: 81 7a 10 20 01 12 00 cmpl $0x120120,0x10(%edx)
1062a4: 74 6e je 106314 <rtems_libio_set_private_env+0xf0>
!rtems_filesystem_global_location_is_null(new_env->root_directory)
&& !rtems_filesystem_global_location_is_null(new_env->current_directory)
1062a6: 81 78 10 20 01 12 00 cmpl $0x120120,0x10(%eax)
1062ad: 74 65 je 106314 <rtems_libio_set_private_env+0xf0><== NEVER TAKEN
) {
sc = rtems_task_variable_add(
1062af: c7 44 24 08 b4 61 10 movl $0x1061b4,0x8(%esp)
1062b6: 00
1062b7: c7 44 24 04 e0 b6 12 movl $0x12b6e0,0x4(%esp)
1062be: 00
1062bf: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1062c6: e8 e5 18 00 00 call 107bb0 <rtems_task_variable_add>
1062cb: 89 c6 mov %eax,%esi
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
1062cd: 85 c0 test %eax,%eax
1062cf: 74 27 je 1062f8 <rtems_libio_set_private_env+0xd4>
free_user_env_protected(old_env);
rtems_current_user_env = new_env;
} else {
sc = RTEMS_TOO_MANY;
1062d1: be 05 00 00 00 mov $0x5,%esi
} else {
sc = RTEMS_UNSATISFIED;
}
if (sc != RTEMS_SUCCESSFUL) {
free_user_env(new_env);
1062d6: 89 1c 24 mov %ebx,(%esp)
1062d9: e8 d6 fe ff ff call 1061b4 <free_user_env>
sc = RTEMS_NO_MEMORY;
}
}
return sc;
}
1062de: 89 f0 mov %esi,%eax
1062e0: 83 c4 2c add $0x2c,%esp
1062e3: 5b pop %ebx
1062e4: 5e pop %esi
1062e5: 5f pop %edi
1062e6: 5d pop %ebp
1062e7: c3 ret
if (sc != RTEMS_SUCCESSFUL) {
free_user_env(new_env);
}
} else {
sc = RTEMS_NO_MEMORY;
1062e8: be 1a 00 00 00 mov $0x1a,%esi
}
}
return sc;
}
1062ed: 89 f0 mov %esi,%eax
1062ef: 83 c4 2c add $0x2c,%esp
1062f2: 5b pop %ebx
1062f3: 5e pop %esi
1062f4: 5f pop %edi
1062f5: 5d pop %ebp
1062f6: c3 ret
1062f7: 90 nop
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
free_user_env_protected(old_env);
1062f8: 89 e8 mov %ebp,%eax
1062fa: e8 fd fe ff ff call 1061fc <free_user_env_protected>
rtems_current_user_env = new_env;
1062ff: 89 1d e0 b6 12 00 mov %ebx,0x12b6e0
106305: eb e6 jmp 1062ed <rtems_libio_set_private_env+0xc9>
106307: 90 nop
_Thread_Enable_dispatch();
}
rtems_status_code rtems_libio_set_private_env(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
106308: 31 f6 xor %esi,%esi
sc = RTEMS_NO_MEMORY;
}
}
return sc;
}
10630a: 89 f0 mov %esi,%eax
10630c: 83 c4 2c add $0x2c,%esp
10630f: 5b pop %ebx
106310: 5e pop %esi
106311: 5f pop %edi
106312: 5d pop %ebp
106313: c3 ret
rtems_current_user_env = new_env;
} else {
sc = RTEMS_TOO_MANY;
}
} else {
sc = RTEMS_UNSATISFIED;
106314: be 0d 00 00 00 mov $0xd,%esi
106319: eb bb jmp 1062d6 <rtems_libio_set_private_env+0xb2>
0010631c <rtems_libio_share_private_env>:
return sc;
}
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
10631c: 53 push %ebx
10631d: 83 ec 28 sub $0x28,%esp
106320: 8b 5c 24 30 mov 0x30(%esp),%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
106324: e8 fb 17 00 00 call 107b24 <rtems_task_self>
if (task_id != RTEMS_SELF && self_task_id != task_id) {
106329: 85 db test %ebx,%ebx
10632b: 74 73 je 1063a0 <rtems_libio_share_private_env+0x84>
10632d: 39 d8 cmp %ebx,%eax
10632f: 74 6f je 1063a0 <rtems_libio_share_private_env+0x84>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
106331: a1 24 f1 12 00 mov 0x12f124,%eax
106336: 40 inc %eax
106337: a3 24 f1 12 00 mov %eax,0x12f124
return _Thread_Dispatch_disable_level;
10633c: a1 24 f1 12 00 mov 0x12f124,%eax
*/
_Thread_Disable_dispatch();
sc = rtems_task_variable_get(
task_id,
(void *) &rtems_current_user_env,
(void *) &env
106341: 8d 44 24 1c lea 0x1c(%esp),%eax
106345: 89 44 24 08 mov %eax,0x8(%esp)
/*
* We have to disable the thread dispatching to prevent deletion of the
* environment in the meantime.
*/
_Thread_Disable_dispatch();
sc = rtems_task_variable_get(
106349: c7 44 24 04 e0 b6 12 movl $0x12b6e0,0x4(%esp)
106350: 00
106351: 89 1c 24 mov %ebx,(%esp)
106354: e8 9f 19 00 00 call 107cf8 <rtems_task_variable_get>
task_id,
(void *) &rtems_current_user_env,
(void *) &env
);
if (sc == RTEMS_SUCCESSFUL) {
106359: 85 c0 test %eax,%eax
10635b: 75 4f jne 1063ac <rtems_libio_share_private_env+0x90>
++env->reference_count;
10635d: 8b 44 24 1c mov 0x1c(%esp),%eax
106361: ff 40 28 incl 0x28(%eax)
} else {
sc = RTEMS_UNSATISFIED;
}
_Thread_Enable_dispatch();
106364: e8 c3 35 00 00 call 10992c <_Thread_Enable_dispatch>
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_task_variable_add(
106369: c7 44 24 08 b4 61 10 movl $0x1061b4,0x8(%esp)
106370: 00
106371: c7 44 24 04 e0 b6 12 movl $0x12b6e0,0x4(%esp)
106378: 00
106379: c7 04 24 00 00 00 00 movl $0x0,(%esp)
106380: e8 2b 18 00 00 call 107bb0 <rtems_task_variable_add>
106385: 89 c3 mov %eax,%ebx
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
106387: 85 c0 test %eax,%eax
106389: 75 35 jne 1063c0 <rtems_libio_share_private_env+0xa4><== NEVER TAKEN
free_user_env_protected(rtems_current_user_env);
10638b: a1 e0 b6 12 00 mov 0x12b6e0,%eax
106390: e8 67 fe ff ff call 1061fc <free_user_env_protected>
rtems_current_user_env = env;
106395: 8b 44 24 1c mov 0x1c(%esp),%eax
106399: a3 e0 b6 12 00 mov %eax,0x12b6e0
10639e: eb 02 jmp 1063a2 <rtems_libio_share_private_env+0x86>
return sc;
}
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
1063a0: 31 db xor %ebx,%ebx
}
}
}
return sc;
}
1063a2: 89 d8 mov %ebx,%eax
1063a4: 83 c4 28 add $0x28,%esp
1063a7: 5b pop %ebx
1063a8: c3 ret
1063a9: 8d 76 00 lea 0x0(%esi),%esi
if (sc == RTEMS_SUCCESSFUL) {
++env->reference_count;
} else {
sc = RTEMS_UNSATISFIED;
}
_Thread_Enable_dispatch();
1063ac: e8 7b 35 00 00 call 10992c <_Thread_Enable_dispatch>
(void *) &env
);
if (sc == RTEMS_SUCCESSFUL) {
++env->reference_count;
} else {
sc = RTEMS_UNSATISFIED;
1063b1: bb 0d 00 00 00 mov $0xd,%ebx
}
}
}
return sc;
}
1063b6: 89 d8 mov %ebx,%eax
1063b8: 83 c4 28 add $0x28,%esp
1063bb: 5b pop %ebx
1063bc: c3 ret
1063bd: 8d 76 00 lea 0x0(%esi),%esi
);
if (sc == RTEMS_SUCCESSFUL) {
free_user_env_protected(rtems_current_user_env);
rtems_current_user_env = env;
} else {
free_user_env_protected(env);
1063c0: 8b 44 24 1c mov 0x1c(%esp),%eax <== NOT EXECUTED
1063c4: e8 33 fe ff ff call 1061fc <free_user_env_protected><== NOT EXECUTED
sc = RTEMS_TOO_MANY;
1063c9: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
1063ce: eb d2 jmp 1063a2 <rtems_libio_share_private_env+0x86><== NOT EXECUTED
0010fe48 <rtems_libio_to_fcntl_flags>:
*
* Convert RTEMS internal flags to UNIX fnctl(2) flags
*/
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
10fe48: 8b 54 24 04 mov 0x4(%esp),%edx
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10fe4c: 89 d0 mov %edx,%eax
10fe4e: 83 e0 06 and $0x6,%eax
10fe51: 83 f8 06 cmp $0x6,%eax
10fe54: 74 2a je 10fe80 <rtems_libio_to_fcntl_flags+0x38>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
10fe56: f6 c2 02 test $0x2,%dl
10fe59: 75 21 jne 10fe7c <rtems_libio_to_fcntl_flags+0x34><== ALWAYS TAKEN
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
10fe5b: 89 d0 mov %edx,%eax <== NOT EXECUTED
10fe5d: 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;
10fe60: 83 e0 01 and $0x1,%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 ) {
10fe63: f6 c2 01 test $0x1,%dl
10fe66: 74 03 je 10fe6b <rtems_libio_to_fcntl_flags+0x23>
fcntl_flags |= O_NONBLOCK;
10fe68: 80 cc 40 or $0x40,%ah
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
10fe6b: f6 c6 02 test $0x2,%dh
10fe6e: 74 03 je 10fe73 <rtems_libio_to_fcntl_flags+0x2b>
fcntl_flags |= O_APPEND;
10fe70: 83 c8 08 or $0x8,%eax
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
10fe73: 80 e6 04 and $0x4,%dh
10fe76: 74 03 je 10fe7b <rtems_libio_to_fcntl_flags+0x33>
fcntl_flags |= O_CREAT;
10fe78: 80 cc 02 or $0x2,%ah
}
return fcntl_flags;
}
10fe7b: c3 ret
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) {
fcntl_flags |= O_RDONLY;
10fe7c: 31 c0 xor %eax,%eax
10fe7e: eb e3 jmp 10fe63 <rtems_libio_to_fcntl_flags+0x1b>
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;
10fe80: b8 02 00 00 00 mov $0x2,%eax
10fe85: eb dc jmp 10fe63 <rtems_libio_to_fcntl_flags+0x1b>
001063d0 <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) {
1063d0: 81 3d e0 b6 12 00 00 cmpl $0x12b700,0x12b6e0
1063d7: b7 12 00
1063da: 74 28 je 106404 <rtems_libio_use_global_env+0x34>
return sc;
}
void rtems_libio_use_global_env(void)
{
1063dc: 83 ec 1c sub $0x1c,%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(
1063df: c7 44 24 04 e0 b6 12 movl $0x12b6e0,0x4(%esp)
1063e6: 00
1063e7: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1063ee: e8 6d 18 00 00 call 107c60 <rtems_task_variable_delete>
RTEMS_SELF,
(void **) &rtems_current_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
1063f3: 85 c0 test %eax,%eax
1063f5: 75 0e jne 106405 <rtems_libio_use_global_env+0x35><== NEVER TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
}
rtems_current_user_env = &rtems_global_user_env;
1063f7: c7 05 e0 b6 12 00 00 movl $0x12b700,0x12b6e0
1063fe: b7 12 00
}
}
106401: 83 c4 1c add $0x1c,%esp
106404: c3 ret
sc = rtems_task_variable_delete(
RTEMS_SELF,
(void **) &rtems_current_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(0xdeadbeef);
106405: c7 04 24 ef be ad de movl $0xdeadbeef,(%esp) <== NOT EXECUTED
10640c: e8 57 1b 00 00 call 107f68 <rtems_fatal_error_occurred><== NOT EXECUTED
0010ab88 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
10ab88: 83 ec 2c sub $0x2c,%esp
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
10ab8b: 8d 44 24 1c lea 0x1c(%esp),%eax
10ab8f: 89 44 24 08 mov %eax,0x8(%esp)
10ab93: 8b 44 24 30 mov 0x30(%esp),%eax
10ab97: 89 44 24 04 mov %eax,0x4(%esp)
10ab9b: a1 70 32 13 00 mov 0x133270,%eax
10aba0: 89 04 24 mov %eax,(%esp)
10aba3: e8 1c 68 00 00 call 1113c4 <_Protected_heap_Get_block_size>
10aba8: 84 c0 test %al,%al
10abaa: 74 12 je 10abbe <rtems_malloc_statistics_at_free+0x36><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
10abac: 8b 44 24 1c mov 0x1c(%esp),%eax
10abb0: 31 d2 xor %edx,%edx
10abb2: 01 05 a4 7e 13 00 add %eax,0x137ea4
10abb8: 11 15 a8 7e 13 00 adc %edx,0x137ea8
}
}
10abbe: 83 c4 2c add $0x2c,%esp
10abc1: c3 ret
0010abc4 <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
10abc4: 83 ec 2c sub $0x2c,%esp
10abc7: 8b 44 24 30 mov 0x30(%esp),%eax
uintptr_t actual_size = 0;
10abcb: c7 44 24 1c 00 00 00 movl $0x0,0x1c(%esp)
10abd2: 00
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
10abd3: 85 c0 test %eax,%eax
10abd5: 74 49 je 10ac20 <rtems_malloc_statistics_at_malloc+0x5c><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
10abd7: 8d 54 24 1c lea 0x1c(%esp),%edx
10abdb: 89 54 24 08 mov %edx,0x8(%esp)
10abdf: 89 44 24 04 mov %eax,0x4(%esp)
10abe3: a1 70 32 13 00 mov 0x133270,%eax
10abe8: 89 04 24 mov %eax,(%esp)
10abeb: e8 d4 67 00 00 call 1113c4 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
10abf0: 8b 44 24 1c mov 0x1c(%esp),%eax
10abf4: 31 d2 xor %edx,%edx
10abf6: 03 05 9c 7e 13 00 add 0x137e9c,%eax
10abfc: 13 15 a0 7e 13 00 adc 0x137ea0,%edx
10ac02: a3 9c 7e 13 00 mov %eax,0x137e9c
10ac07: 89 15 a0 7e 13 00 mov %edx,0x137ea0
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
10ac0d: 2b 05 a4 7e 13 00 sub 0x137ea4,%eax
if (current_depth > s->max_depth)
10ac13: 3b 05 98 7e 13 00 cmp 0x137e98,%eax
10ac19: 76 05 jbe 10ac20 <rtems_malloc_statistics_at_malloc+0x5c>
s->max_depth = current_depth;
10ac1b: a3 98 7e 13 00 mov %eax,0x137e98
}
10ac20: 83 c4 2c add $0x2c,%esp
10ac23: c3 ret
00113f24 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
113f24: 53 push %ebx
113f25: 83 ec 28 sub $0x28,%esp
113f28: 8b 5c 24 30 mov 0x30(%esp),%ebx
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
113f2c: 85 db test %ebx,%ebx
113f2e: 74 69 je 113f99 <rtems_memalign+0x75>
return EINVAL;
*pointer = NULL;
113f30: 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()) &&
113f36: 83 3d 40 6e 13 00 03 cmpl $0x3,0x136e40
113f3d: 74 51 je 113f90 <rtems_memalign+0x6c>
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
113f3f: e8 e0 4f ff ff call 108f24 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
113f44: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
113f4b: 00
113f4c: 8b 44 24 34 mov 0x34(%esp),%eax
113f50: 89 44 24 08 mov %eax,0x8(%esp)
113f54: 8b 44 24 38 mov 0x38(%esp),%eax
113f58: 89 44 24 04 mov %eax,0x4(%esp)
113f5c: a1 14 28 13 00 mov 0x132814,%eax
113f61: 89 04 24 mov %eax,(%esp)
113f64: e8 8b a9 ff ff call 10e8f4 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
113f69: 85 c0 test %eax,%eax
113f6b: 74 37 je 113fa4 <rtems_memalign+0x80>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
113f6d: 8b 15 80 4f 13 00 mov 0x134f80,%edx
113f73: 85 d2 test %edx,%edx
113f75: 74 0e je 113f85 <rtems_memalign+0x61>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
113f77: 89 1c 24 mov %ebx,(%esp)
113f7a: 89 44 24 1c mov %eax,0x1c(%esp)
113f7e: ff 52 04 call *0x4(%edx)
113f81: 8b 44 24 1c mov 0x1c(%esp),%eax
*pointer = return_this;
113f85: 89 03 mov %eax,(%ebx)
return 0;
113f87: 31 c0 xor %eax,%eax
}
113f89: 83 c4 28 add $0x28,%esp
113f8c: 5b pop %ebx
113f8d: c3 ret
113f8e: 66 90 xchg %ax,%ax
/*
* 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() )
113f90: e8 57 4f ff ff call 108eec <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()) &&
113f95: 84 c0 test %al,%al
113f97: 75 a6 jne 113f3f <rtems_memalign+0x1b> <== ALWAYS TAKEN
/*
* Parameter error checks
*/
if ( !pointer )
return EINVAL;
113f99: b8 16 00 00 00 mov $0x16,%eax
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
113f9e: 83 c4 28 add $0x28,%esp
113fa1: 5b pop %ebx
113fa2: c3 ret
113fa3: 90 nop
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
113fa4: 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;
}
113fa9: 83 c4 28 add $0x28,%esp
113fac: 5b pop %ebx
113fad: c3 ret
0010d5dc <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
10d5dc: 55 push %ebp
10d5dd: 57 push %edi
10d5de: 56 push %esi
10d5df: 53 push %ebx
10d5e0: 83 ec 6c sub $0x6c,%esp
int success = 0;
char *dup_path = strdup(path);
10d5e3: 8b 84 24 80 00 00 00 mov 0x80(%esp),%eax
10d5ea: 89 04 24 mov %eax,(%esp)
10d5ed: e8 f2 a4 01 00 call 127ae4 <strdup>
10d5f2: 89 c6 mov %eax,%esi
if (dup_path != NULL) {
10d5f4: 85 c0 test %eax,%eax
10d5f6: 0f 84 1b 01 00 00 je 10d717 <rtems_mkdir+0x13b>
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
10d5fc: 8a 00 mov (%eax),%al
10d5fe: 3c 2f cmp $0x2f,%al
10d600: 0f 84 fa 00 00 00 je 10d700 <rtems_mkdir+0x124>
10d606: 89 f3 mov %esi,%ebx
10d608: 31 ff xor %edi,%edi
10d60a: b9 01 00 00 00 mov $0x1,%ecx
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
10d60f: 84 c0 test %al,%al
10d611: 74 10 je 10d623 <rtems_mkdir+0x47> <== NEVER TAKEN
10d613: 90 nop
last = 1;
else if (p[0] != '/')
10d614: 3c 2f cmp $0x2f,%al
10d616: 0f 84 84 00 00 00 je 10d6a0 <rtems_mkdir+0xc4>
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
10d61c: 43 inc %ebx
10d61d: 8a 03 mov (%ebx),%al
if (p[0] == '\0')
10d61f: 84 c0 test %al,%al
10d621: 75 f1 jne 10d614 <rtems_mkdir+0x38>
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
10d623: c6 03 00 movb $0x0,(%ebx)
10d626: bd 01 00 00 00 mov $0x1,%ebp
if (!last && p[1] == '\0')
last = 1;
if (first) {
10d62b: 85 c9 test %ecx,%ecx
10d62d: 75 55 jne 10d684 <rtems_mkdir+0xa8>
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
10d62f: 85 ed test %ebp,%ebp
10d631: 75 1d jne 10d650 <rtems_mkdir+0x74>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
10d633: c7 44 24 04 ff 01 00 movl $0x1ff,0x4(%esp)
10d63a: 00
10d63b: 89 34 24 mov %esi,(%esp)
10d63e: e8 59 f1 ff ff call 10c79c <mkdir>
10d643: 85 c0 test %eax,%eax
10d645: 78 6d js 10d6b4 <rtems_mkdir+0xd8>
retval = 0;
break;
}
}
if (!last)
*p = '/';
10d647: c6 03 2f movb $0x2f,(%ebx)
10d64a: 31 c9 xor %ecx,%ecx
10d64c: eb ce jmp 10d61c <rtems_mkdir+0x40>
10d64e: 66 90 xchg %ax,%ax
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
10d650: 89 3c 24 mov %edi,(%esp)
10d653: e8 a4 26 00 00 call 10fcfc <umask>
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
10d658: 8b 84 24 84 00 00 00 mov 0x84(%esp),%eax
10d65f: 89 44 24 04 mov %eax,0x4(%esp)
10d663: 89 34 24 mov %esi,(%esp)
10d666: e8 31 f1 ff ff call 10c79c <mkdir>
10d66b: 85 c0 test %eax,%eax
10d66d: 78 45 js 10d6b4 <rtems_mkdir+0xd8>
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
10d66f: 89 34 24 mov %esi,(%esp)
10d672: e8 c9 ea ff ff call 10c140 <free>
}
return success != 0 ? 0 : -1;
10d677: 31 c0 xor %eax,%eax
}
10d679: 83 c4 6c add $0x6c,%esp
10d67c: 5b pop %ebx
10d67d: 5e pop %esi
10d67e: 5f pop %edi
10d67f: 5d pop %ebp
10d680: c3 ret
10d681: 8d 76 00 lea 0x0(%esi),%esi
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
10d684: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10d68b: e8 6c 26 00 00 call 10fcfc <umask>
10d690: 89 c7 mov %eax,%edi
numask = oumask & ~(S_IWUSR | S_IXUSR);
10d692: 24 3f and $0x3f,%al
(void)umask(numask);
10d694: 89 04 24 mov %eax,(%esp)
10d697: e8 60 26 00 00 call 10fcfc <umask>
10d69c: eb 91 jmp 10d62f <rtems_mkdir+0x53>
10d69e: 66 90 xchg %ax,%ax
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
10d6a0: c6 03 00 movb $0x0,(%ebx)
10d6a3: 31 c0 xor %eax,%eax
10d6a5: 80 7b 01 00 cmpb $0x0,0x1(%ebx)
10d6a9: 0f 94 c0 sete %al
10d6ac: 89 c5 mov %eax,%ebp
10d6ae: e9 78 ff ff ff jmp 10d62b <rtems_mkdir+0x4f>
10d6b3: 90 nop
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
10d6b4: e8 4b 88 01 00 call 125f04 <__errno>
10d6b9: 83 38 11 cmpl $0x11,(%eax)
10d6bc: 74 0a je 10d6c8 <rtems_mkdir+0xec>
10d6be: e8 41 88 01 00 call 125f04 <__errno>
10d6c3: 83 38 15 cmpl $0x15,(%eax)
10d6c6: 75 43 jne 10d70b <rtems_mkdir+0x12f> <== ALWAYS TAKEN
if (stat(path, &sb) < 0) {
10d6c8: 8d 44 24 18 lea 0x18(%esp),%eax
10d6cc: 89 44 24 04 mov %eax,0x4(%esp)
10d6d0: 89 34 24 mov %esi,(%esp)
10d6d3: e8 70 00 00 00 call 10d748 <stat>
10d6d8: 85 c0 test %eax,%eax
10d6da: 78 2f js 10d70b <rtems_mkdir+0x12f> <== NEVER TAKEN
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
10d6dc: 8b 44 24 24 mov 0x24(%esp),%eax
10d6e0: 25 00 f0 00 00 and $0xf000,%eax
10d6e5: 3d 00 40 00 00 cmp $0x4000,%eax
10d6ea: 75 4a jne 10d736 <rtems_mkdir+0x15a>
else
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
10d6ec: 85 ed test %ebp,%ebp
10d6ee: 0f 85 7b ff ff ff jne 10d66f <rtems_mkdir+0x93>
retval = 0;
break;
}
}
if (!last)
*p = '/';
10d6f4: c6 03 2f movb $0x2f,(%ebx)
10d6f7: 31 c9 xor %ecx,%ecx
10d6f9: e9 1e ff ff ff jmp 10d61c <rtems_mkdir+0x40>
10d6fe: 66 90 xchg %ax,%ax
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
10d700: 8d 5e 01 lea 0x1(%esi),%ebx
10d703: 8a 46 01 mov 0x1(%esi),%al
10d706: e9 fd fe ff ff jmp 10d608 <rtems_mkdir+0x2c>
}
}
if (!last)
*p = '/';
}
if (!first && !last)
10d70b: 85 ed test %ebp,%ebp
10d70d: 74 1d je 10d72c <rtems_mkdir+0x150> <== NEVER TAKEN
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
10d70f: 89 34 24 mov %esi,(%esp)
10d712: e8 29 ea ff ff call 10c140 <free>
}
return success != 0 ? 0 : -1;
10d717: b8 ff ff ff ff mov $0xffffffff,%eax
10d71c: e9 58 ff ff ff jmp 10d679 <rtems_mkdir+0x9d>
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
10d721: e8 de 87 01 00 call 125f04 <__errno>
10d726: c7 00 14 00 00 00 movl $0x14,(%eax)
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
10d72c: 89 3c 24 mov %edi,(%esp)
10d72f: e8 c8 25 00 00 call 10fcfc <umask>
10d734: eb d9 jmp 10d70f <rtems_mkdir+0x133>
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
10d736: 85 ed test %ebp,%ebp
10d738: 74 e7 je 10d721 <rtems_mkdir+0x145>
errno = EEXIST;
10d73a: e8 c5 87 01 00 call 125f04 <__errno>
10d73f: c7 00 11 00 00 00 movl $0x11,(%eax)
10d745: eb c8 jmp 10d70f <rtems_mkdir+0x133>
0010d3fc <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
10d3fc: 57 push %edi
10d3fd: 56 push %esi
10d3fe: 53 push %ebx
10d3ff: 83 ec 10 sub $0x10,%esp
10d402: 8b 7c 24 28 mov 0x28(%esp),%edi
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10d406: 85 ff test %edi,%edi
10d408: 74 62 je 10d46c <rtems_object_get_class_information+0x70>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
10d40a: 0f b7 44 24 24 movzwl 0x24(%esp),%eax
10d40f: 89 44 24 04 mov %eax,0x4(%esp)
10d413: 8b 44 24 20 mov 0x20(%esp),%eax
10d417: 89 04 24 mov %eax,(%esp)
10d41a: e8 8d 1b 00 00 call 10efac <_Objects_Get_information>
if ( !obj_info )
10d41f: 85 c0 test %eax,%eax
10d421: 74 55 je 10d478 <rtems_object_get_class_information+0x7c>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
10d423: 8b 50 08 mov 0x8(%eax),%edx
10d426: 89 17 mov %edx,(%edi)
info->maximum_id = obj_info->maximum_id;
10d428: 8b 50 0c mov 0xc(%eax),%edx
10d42b: 89 57 04 mov %edx,0x4(%edi)
info->auto_extend = obj_info->auto_extend;
10d42e: 8a 50 12 mov 0x12(%eax),%dl
10d431: 88 57 0c mov %dl,0xc(%edi)
info->maximum = obj_info->maximum;
10d434: 0f b7 58 10 movzwl 0x10(%eax),%ebx
10d438: 89 5f 08 mov %ebx,0x8(%edi)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d43b: 85 db test %ebx,%ebx
10d43d: 74 45 je 10d484 <rtems_object_get_class_information+0x88><== NEVER TAKEN
10d43f: 8b 70 1c mov 0x1c(%eax),%esi
10d442: b9 01 00 00 00 mov $0x1,%ecx
10d447: b8 01 00 00 00 mov $0x1,%eax
10d44c: 31 d2 xor %edx,%edx
10d44e: 66 90 xchg %ax,%ax
if ( !obj_info->local_table[i] )
unallocated++;
10d450: 83 3c 8e 01 cmpl $0x1,(%esi,%ecx,4)
10d454: 83 d2 00 adc $0x0,%edx
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d457: 40 inc %eax
10d458: 89 c1 mov %eax,%ecx
10d45a: 39 c3 cmp %eax,%ebx
10d45c: 73 f2 jae 10d450 <rtems_object_get_class_information+0x54>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
10d45e: 89 57 10 mov %edx,0x10(%edi)
return RTEMS_SUCCESSFUL;
10d461: 31 c0 xor %eax,%eax
}
10d463: 83 c4 10 add $0x10,%esp
10d466: 5b pop %ebx
10d467: 5e pop %esi
10d468: 5f pop %edi
10d469: c3 ret
10d46a: 66 90 xchg %ax,%ax
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
10d46c: b8 09 00 00 00 mov $0x9,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10d471: 83 c4 10 add $0x10,%esp
10d474: 5b pop %ebx
10d475: 5e pop %esi
10d476: 5f pop %edi
10d477: c3 ret
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
10d478: b8 0a 00 00 00 mov $0xa,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10d47d: 83 c4 10 add $0x10,%esp
10d480: 5b pop %ebx
10d481: 5e pop %esi
10d482: 5f pop %edi
10d483: c3 ret
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d484: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d486: eb d6 jmp 10d45e <rtems_object_get_class_information+0x62><== NOT EXECUTED
0010cd08 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
10cd08: 56 push %esi
10cd09: 53 push %ebx
10cd0a: 83 ec 14 sub $0x14,%esp
10cd0d: 8b 74 24 20 mov 0x20(%esp),%esi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
10cd11: 85 f6 test %esi,%esi
10cd13: 75 0b jne 10cd20 <rtems_partition_create+0x18>
return RTEMS_INVALID_NAME;
10cd15: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10cd1a: 83 c4 14 add $0x14,%esp
10cd1d: 5b pop %ebx
10cd1e: 5e pop %esi
10cd1f: c3 ret
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
10cd20: 8b 5c 24 24 mov 0x24(%esp),%ebx
10cd24: 85 db test %ebx,%ebx
10cd26: 74 1c je 10cd44 <rtems_partition_create+0x3c>
return RTEMS_INVALID_ADDRESS;
if ( !id )
10cd28: 8b 4c 24 34 mov 0x34(%esp),%ecx
10cd2c: 85 c9 test %ecx,%ecx
10cd2e: 74 14 je 10cd44 <rtems_partition_create+0x3c><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
10cd30: 8b 54 24 28 mov 0x28(%esp),%edx
10cd34: 85 d2 test %edx,%edx
10cd36: 75 18 jne 10cd50 <rtems_partition_create+0x48>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
10cd38: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10cd3d: 83 c4 14 add $0x14,%esp
10cd40: 5b pop %ebx
10cd41: 5e pop %esi
10cd42: c3 ret
10cd43: 90 nop
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
10cd44: b8 09 00 00 00 mov $0x9,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10cd49: 83 c4 14 add $0x14,%esp
10cd4c: 5b pop %ebx
10cd4d: 5e pop %esi
10cd4e: c3 ret
10cd4f: 90 nop
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
10cd50: 8b 44 24 2c mov 0x2c(%esp),%eax
10cd54: 85 c0 test %eax,%eax
10cd56: 74 e0 je 10cd38 <rtems_partition_create+0x30>
10cd58: 8b 44 24 2c mov 0x2c(%esp),%eax
10cd5c: 39 44 24 28 cmp %eax,0x28(%esp)
10cd60: 72 d6 jb 10cd38 <rtems_partition_create+0x30>
10cd62: a8 03 test $0x3,%al
10cd64: 75 d2 jne 10cd38 <rtems_partition_create+0x30>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
10cd66: f6 44 24 24 03 testb $0x3,0x24(%esp)
10cd6b: 75 d7 jne 10cd44 <rtems_partition_create+0x3c>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10cd6d: a1 64 60 13 00 mov 0x136064,%eax
10cd72: 40 inc %eax
10cd73: a3 64 60 13 00 mov %eax,0x136064
return _Thread_Dispatch_disable_level;
10cd78: a1 64 60 13 00 mov 0x136064,%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 );
10cd7d: c7 04 24 e0 5e 13 00 movl $0x135ee0,(%esp)
10cd84: e8 53 1b 00 00 call 10e8dc <_Objects_Allocate>
10cd89: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
10cd8b: 85 c0 test %eax,%eax
10cd8d: 74 6c je 10cdfb <rtems_partition_create+0xf3>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
10cd8f: 8b 54 24 24 mov 0x24(%esp),%edx
10cd93: 89 50 10 mov %edx,0x10(%eax)
the_partition->length = length;
10cd96: 8b 44 24 28 mov 0x28(%esp),%eax
10cd9a: 89 43 14 mov %eax,0x14(%ebx)
the_partition->buffer_size = buffer_size;
10cd9d: 8b 54 24 2c mov 0x2c(%esp),%edx
10cda1: 89 53 18 mov %edx,0x18(%ebx)
the_partition->attribute_set = attribute_set;
10cda4: 8b 44 24 30 mov 0x30(%esp),%eax
10cda8: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
10cdab: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
10cdb2: 89 54 24 0c mov %edx,0xc(%esp)
10cdb6: 8b 44 24 28 mov 0x28(%esp),%eax
10cdba: 31 d2 xor %edx,%edx
10cdbc: f7 74 24 2c divl 0x2c(%esp)
10cdc0: 89 44 24 08 mov %eax,0x8(%esp)
10cdc4: 8b 44 24 24 mov 0x24(%esp),%eax
10cdc8: 89 44 24 04 mov %eax,0x4(%esp)
10cdcc: 8d 43 24 lea 0x24(%ebx),%eax
10cdcf: 89 04 24 mov %eax,(%esp)
10cdd2: e8 c9 11 00 00 call 10dfa0 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10cdd7: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10cdda: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10cddd: 8b 15 fc 5e 13 00 mov 0x135efc,%edx
10cde3: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10cde6: 89 73 0c mov %esi,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
10cde9: 8b 54 24 34 mov 0x34(%esp),%edx
10cded: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
10cdef: e8 c4 2c 00 00 call 10fab8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10cdf4: 31 c0 xor %eax,%eax
10cdf6: e9 1f ff ff ff jmp 10cd1a <rtems_partition_create+0x12>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
10cdfb: e8 b8 2c 00 00 call 10fab8 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10ce00: b8 05 00 00 00 mov $0x5,%eax
10ce05: e9 10 ff ff ff jmp 10cd1a <rtems_partition_create+0x12>
00119624 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
119624: 53 push %ebx
119625: 83 ec 28 sub $0x28,%esp
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
119628: 8d 44 24 1c lea 0x1c(%esp),%eax
11962c: 89 44 24 08 mov %eax,0x8(%esp)
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
119630: 8b 44 24 30 mov 0x30(%esp),%eax
119634: 89 44 24 04 mov %eax,0x4(%esp)
119638: c7 04 24 40 e9 14 00 movl $0x14e940,(%esp)
11963f: e8 9c 4e 00 00 call 11e4e0 <_Objects_Get>
switch ( location ) {
119644: 8b 54 24 1c mov 0x1c(%esp),%edx
119648: 85 d2 test %edx,%edx
11964a: 75 48 jne 119694 <rtems_partition_return_buffer+0x70>
11964c: 89 c3 mov %eax,%ebx
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
11964e: 8b 40 10 mov 0x10(%eax),%eax
ending = _Addresses_Add_offset( starting, the_partition->length );
119651: 8b 53 14 mov 0x14(%ebx),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
119654: 39 44 24 34 cmp %eax,0x34(%esp)
119658: 72 46 jb 1196a0 <rtems_partition_return_buffer+0x7c>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
11965a: 01 c2 add %eax,%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
11965c: 39 54 24 34 cmp %edx,0x34(%esp)
119660: 77 3e ja 1196a0 <rtems_partition_return_buffer+0x7c><== NEVER TAKEN
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
119662: 8b 54 24 34 mov 0x34(%esp),%edx
119666: 29 c2 sub %eax,%edx
119668: 89 d0 mov %edx,%eax
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
11966a: 31 d2 xor %edx,%edx
11966c: 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 ) &&
11966f: 85 d2 test %edx,%edx
119671: 75 2d jne 1196a0 <rtems_partition_return_buffer+0x7c>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
119673: 8b 44 24 34 mov 0x34(%esp),%eax
119677: 89 44 24 04 mov %eax,0x4(%esp)
11967b: 8d 43 24 lea 0x24(%ebx),%eax
11967e: 89 04 24 mov %eax,(%esp)
119681: e8 7e 32 00 00 call 11c904 <_Chain_Append>
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
119686: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
119689: e8 16 5b 00 00 call 11f1a4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11968e: 31 c0 xor %eax,%eax
119690: eb 07 jmp 119699 <rtems_partition_return_buffer+0x75>
119692: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
119694: b8 04 00 00 00 mov $0x4,%eax
}
119699: 83 c4 28 add $0x28,%esp
11969c: 5b pop %ebx
11969d: c3 ret
11969e: 66 90 xchg %ax,%ax
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
1196a0: e8 ff 5a 00 00 call 11f1a4 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
1196a5: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1196aa: 83 c4 28 add $0x28,%esp
1196ad: 5b pop %ebx
1196ae: c3 ret
00138494 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
138494: 57 push %edi
138495: 56 push %esi
138496: 53 push %ebx
138497: 83 ec 30 sub $0x30,%esp
13849a: 8b 5c 24 40 mov 0x40(%esp),%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 );
13849e: 8d 44 24 2c lea 0x2c(%esp),%eax
1384a2: 89 44 24 08 mov %eax,0x8(%esp)
1384a6: 89 5c 24 04 mov %ebx,0x4(%esp)
1384aa: c7 04 24 60 ca 17 00 movl $0x17ca60,(%esp)
1384b1: e8 f2 49 fd ff call 10cea8 <_Objects_Get>
switch ( location ) {
1384b6: 8b 54 24 2c mov 0x2c(%esp),%edx
1384ba: 85 d2 test %edx,%edx
1384bc: 75 1e jne 1384dc <rtems_rate_monotonic_period+0x48>
1384be: 89 c6 mov %eax,%esi
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
1384c0: a1 2c c4 17 00 mov 0x17c42c,%eax
1384c5: 39 46 40 cmp %eax,0x40(%esi)
1384c8: 74 1e je 1384e8 <rtems_rate_monotonic_period+0x54>
_Thread_Enable_dispatch();
1384ca: e8 1d 56 fd ff call 10daec <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
1384cf: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1384d4: 83 c4 30 add $0x30,%esp
1384d7: 5b pop %ebx
1384d8: 5e pop %esi
1384d9: 5f pop %edi
1384da: c3 ret
1384db: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1384dc: b8 04 00 00 00 mov $0x4,%eax
}
1384e1: 83 c4 30 add $0x30,%esp
1384e4: 5b pop %ebx
1384e5: 5e pop %esi
1384e6: 5f pop %edi
1384e7: c3 ret
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
1384e8: 8b 44 24 44 mov 0x44(%esp),%eax
1384ec: 85 c0 test %eax,%eax
1384ee: 74 68 je 138558 <rtems_rate_monotonic_period+0xc4>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
1384f0: 9c pushf
1384f1: fa cli
1384f2: 5f pop %edi
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
1384f3: 8b 46 38 mov 0x38(%esi),%eax
1384f6: 85 c0 test %eax,%eax
1384f8: 0f 84 82 00 00 00 je 138580 <rtems_rate_monotonic_period+0xec>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
1384fe: 83 f8 02 cmp $0x2,%eax
138501: 0f 84 cf 00 00 00 je 1385d6 <rtems_rate_monotonic_period+0x142>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
138507: 83 f8 04 cmp $0x4,%eax
13850a: 75 d0 jne 1384dc <rtems_rate_monotonic_period+0x48><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
13850c: 89 f0 mov %esi,%eax
13850e: e8 2d fe ff ff call 138340 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
138513: 57 push %edi
138514: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
138515: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
the_period->next_length = length;
13851c: 8b 44 24 44 mov 0x44(%esp),%eax
138520: 89 46 3c mov %eax,0x3c(%esi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
138523: 89 46 1c mov %eax,0x1c(%esi)
_Watchdog_Insert_ticks( &the_period->Timer, length );
138526: 8d 46 10 lea 0x10(%esi),%eax
138529: 89 44 24 04 mov %eax,0x4(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
13852d: c7 04 24 48 bf 17 00 movl $0x17bf48,(%esp)
138534: e8 d3 61 fd ff call 10e70c <_Watchdog_Insert>
138539: 8b 46 3c mov 0x3c(%esi),%eax
13853c: 89 44 24 04 mov %eax,0x4(%esp)
138540: 8b 46 40 mov 0x40(%esi),%eax
138543: 89 04 24 mov %eax,(%esp)
138546: ff 15 b4 42 17 00 call *0x1742b4
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
13854c: e8 9b 55 fd ff call 10daec <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
138551: b8 06 00 00 00 mov $0x6,%eax
138556: eb 89 jmp 1384e1 <rtems_rate_monotonic_period+0x4d>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
138558: 8b 46 38 mov 0x38(%esi),%eax
13855b: 83 f8 04 cmp $0x4,%eax
13855e: 77 1c ja 13857c <rtems_rate_monotonic_period+0xe8><== NEVER TAKEN
138560: 8b 04 85 14 f9 15 00 mov 0x15f914(,%eax,4),%eax
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
138567: 89 44 24 1c mov %eax,0x1c(%esp)
13856b: e8 7c 55 fd ff call 10daec <_Thread_Enable_dispatch>
138570: 8b 44 24 1c mov 0x1c(%esp),%eax
138574: e9 68 ff ff ff jmp 1384e1 <rtems_rate_monotonic_period+0x4d>
138579: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
13857c: 31 c0 xor %eax,%eax <== NOT EXECUTED
13857e: eb e7 jmp 138567 <rtems_rate_monotonic_period+0xd3><== NOT EXECUTED
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
138580: 57 push %edi
138581: 9d popf
the_period->next_length = length;
138582: 8b 44 24 44 mov 0x44(%esp),%eax
138586: 89 46 3c mov %eax,0x3c(%esi)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
138589: 89 34 24 mov %esi,(%esp)
13858c: e8 8f fe ff ff call 138420 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
138591: 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;
138598: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
the_watchdog->routine = routine;
13859f: c7 46 2c 40 86 13 00 movl $0x138640,0x2c(%esi)
the_watchdog->id = id;
1385a6: 89 5e 30 mov %ebx,0x30(%esi)
the_watchdog->user_data = user_data;
1385a9: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
1385b0: 8b 44 24 44 mov 0x44(%esp),%eax
1385b4: 89 46 1c mov %eax,0x1c(%esi)
_Rate_monotonic_Timeout,
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
1385b7: 83 c6 10 add $0x10,%esi
1385ba: 89 74 24 04 mov %esi,0x4(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
1385be: c7 04 24 48 bf 17 00 movl $0x17bf48,(%esp)
1385c5: e8 42 61 fd ff call 10e70c <_Watchdog_Insert>
_Thread_Enable_dispatch();
1385ca: e8 1d 55 fd ff call 10daec <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1385cf: 31 c0 xor %eax,%eax
1385d1: e9 0b ff ff ff jmp 1384e1 <rtems_rate_monotonic_period+0x4d>
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
1385d6: 89 f0 mov %esi,%eax
1385d8: e8 63 fd ff ff call 138340 <_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;
1385dd: c7 46 38 01 00 00 00 movl $0x1,0x38(%esi)
the_period->next_length = length;
1385e4: 8b 44 24 44 mov 0x44(%esp),%eax
1385e8: 89 46 3c mov %eax,0x3c(%esi)
_ISR_Enable( level );
1385eb: 57 push %edi
1385ec: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
1385ed: a1 2c c4 17 00 mov 0x17c42c,%eax
1385f2: 8b 56 08 mov 0x8(%esi),%edx
1385f5: 89 50 20 mov %edx,0x20(%eax)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
1385f8: c7 44 24 04 00 40 00 movl $0x4000,0x4(%esp)
1385ff: 00
138600: 89 04 24 mov %eax,(%esp)
138603: e8 30 5d fd ff call 10e338 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
138608: 9c pushf
138609: fa cli
13860a: 5a pop %edx
local_state = the_period->state;
13860b: 8b 46 38 mov 0x38(%esi),%eax
the_period->state = RATE_MONOTONIC_ACTIVE;
13860e: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
_ISR_Enable( level );
138615: 52 push %edx
138616: 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 )
138617: 83 f8 03 cmp $0x3,%eax
13861a: 74 0c je 138628 <rtems_rate_monotonic_period+0x194>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
13861c: e8 cb 54 fd ff call 10daec <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
138621: 31 c0 xor %eax,%eax
138623: e9 b9 fe ff ff jmp 1384e1 <rtems_rate_monotonic_period+0x4d>
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
138628: c7 44 24 04 00 40 00 movl $0x4000,0x4(%esp)
13862f: 00
138630: a1 2c c4 17 00 mov 0x17c42c,%eax
138635: 89 04 24 mov %eax,(%esp)
138638: e8 0b 51 fd ff call 10d748 <_Thread_Clear_state>
13863d: eb dd jmp 13861c <rtems_rate_monotonic_period+0x188>
0012b7ac <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
12b7ac: 55 push %ebp
12b7ad: 57 push %edi
12b7ae: 56 push %esi
12b7af: 53 push %ebx
12b7b0: 81 ec 9c 00 00 00 sub $0x9c,%esp
12b7b6: 8b b4 24 b0 00 00 00 mov 0xb0(%esp),%esi
12b7bd: 8b 9c 24 b4 00 00 00 mov 0xb4(%esp),%ebx
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
12b7c4: 85 db test %ebx,%ebx
12b7c6: 0f 84 ec 00 00 00 je 12b8b8 <rtems_rate_monotonic_report_statistics_with_plugin+0x10c><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
12b7cc: c7 44 24 04 c8 c9 15 movl $0x15c9c8,0x4(%esp)
12b7d3: 00
12b7d4: 89 34 24 mov %esi,(%esp)
12b7d7: ff d3 call *%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
12b7d9: c7 44 24 04 00 ca 15 movl $0x15ca00,0x4(%esp)
12b7e0: 00
12b7e1: 89 34 24 mov %esi,(%esp)
12b7e4: ff d3 call *%ebx
(*print)( context, "--- Wall times are in seconds ---\n" );
12b7e6: c7 44 24 04 24 ca 15 movl $0x15ca24,0x4(%esp)
12b7ed: 00
12b7ee: 89 34 24 mov %esi,(%esp)
12b7f1: ff d3 call *%ebx
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
12b7f3: c7 44 24 04 48 ca 15 movl $0x15ca48,0x4(%esp)
12b7fa: 00
12b7fb: 89 34 24 mov %esi,(%esp)
12b7fe: ff d3 call *%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
12b800: c7 44 24 04 94 ca 15 movl $0x15ca94,0x4(%esp)
12b807: 00
12b808: 89 34 24 mov %esi,(%esp)
12b80b: 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 ;
12b80d: 8b 2d 68 ca 17 00 mov 0x17ca68,%ebp
12b813: 8d 7c 24 58 lea 0x58(%esp),%edi
12b817: 3b 2d 6c ca 17 00 cmp 0x17ca6c,%ebp
12b81d: 76 12 jbe 12b831 <rtems_rate_monotonic_report_statistics_with_plugin+0x85><== ALWAYS TAKEN
12b81f: e9 94 00 00 00 jmp 12b8b8 <rtems_rate_monotonic_report_statistics_with_plugin+0x10c><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
12b824: 45 inc %ebp
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
12b825: 39 2d 6c ca 17 00 cmp %ebp,0x17ca6c
12b82b: 0f 82 87 00 00 00 jb 12b8b8 <rtems_rate_monotonic_report_statistics_with_plugin+0x10c>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
12b831: 89 7c 24 04 mov %edi,0x4(%esp)
12b835: 89 2c 24 mov %ebp,(%esp)
12b838: e8 1b c7 00 00 call 137f58 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
12b83d: 85 c0 test %eax,%eax
12b83f: 75 e3 jne 12b824 <rtems_rate_monotonic_report_statistics_with_plugin+0x78>
#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 );
12b841: 8d 44 24 40 lea 0x40(%esp),%eax
12b845: 89 44 24 04 mov %eax,0x4(%esp)
12b849: 89 2c 24 mov %ebp,(%esp)
12b84c: e8 13 c9 00 00 call 138164 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
12b851: 8d 54 24 33 lea 0x33(%esp),%edx
12b855: 89 54 24 08 mov %edx,0x8(%esp)
12b859: c7 44 24 04 05 00 00 movl $0x5,0x4(%esp)
12b860: 00
12b861: 8b 44 24 40 mov 0x40(%esp),%eax
12b865: 89 04 24 mov %eax,(%esp)
12b868: e8 27 7b fe ff call 113394 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
12b86d: 8b 44 24 5c mov 0x5c(%esp),%eax
12b871: 89 44 24 14 mov %eax,0x14(%esp)
12b875: 8b 44 24 58 mov 0x58(%esp),%eax
12b879: 89 44 24 10 mov %eax,0x10(%esp)
"0x%08" PRIx32 " %4s %5" PRId32 " %6" PRId32 " ",
id, name,
12b87d: 8d 44 24 33 lea 0x33(%esp),%eax
12b881: 89 44 24 0c mov %eax,0xc(%esp)
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
12b885: 89 6c 24 08 mov %ebp,0x8(%esp)
12b889: c7 44 24 04 e6 c9 15 movl $0x15c9e6,0x4(%esp)
12b890: 00
12b891: 89 34 24 mov %esi,(%esp)
12b894: ff d3 call *%ebx
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
12b896: 8b 44 24 58 mov 0x58(%esp),%eax
12b89a: 85 c0 test %eax,%eax
12b89c: 75 26 jne 12b8c4 <rtems_rate_monotonic_report_statistics_with_plugin+0x118>
(*print)( context, "\n" );
12b89e: c7 44 24 04 b5 67 15 movl $0x1567b5,0x4(%esp)
12b8a5: 00
12b8a6: 89 34 24 mov %esi,(%esp)
12b8a9: 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 ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
12b8ab: 45 inc %ebp
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
12b8ac: 39 2d 6c ca 17 00 cmp %ebp,0x17ca6c
12b8b2: 0f 83 79 ff ff ff jae 12b831 <rtems_rate_monotonic_report_statistics_with_plugin+0x85><== ALWAYS TAKEN
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
12b8b8: 81 c4 9c 00 00 00 add $0x9c,%esp
12b8be: 5b pop %ebx
12b8bf: 5e pop %esi
12b8c0: 5f pop %edi
12b8c1: 5d pop %ebp
12b8c2: c3 ret
12b8c3: 90 nop
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 );
12b8c4: 8d 4c 24 38 lea 0x38(%esp),%ecx
12b8c8: 89 4c 24 08 mov %ecx,0x8(%esp)
12b8cc: 89 44 24 04 mov %eax,0x4(%esp)
{
#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;
12b8d0: 8d 44 24 70 lea 0x70(%esp),%eax
12b8d4: 89 04 24 mov %eax,(%esp)
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
12b8d7: 89 4c 24 2c mov %ecx,0x2c(%esp)
12b8db: e8 80 0b 00 00 call 12c460 <_Timespec_Divide_by_integer>
(*print)( context,
12b8e0: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12b8e5: f7 6c 24 3c imull 0x3c(%esp)
12b8e9: c1 fa 06 sar $0x6,%edx
12b8ec: 89 54 24 28 mov %edx,0x28(%esp)
12b8f0: 8b 44 24 3c mov 0x3c(%esp),%eax
12b8f4: 99 cltd
12b8f5: 29 54 24 28 sub %edx,0x28(%esp)
12b8f9: 8b 54 24 28 mov 0x28(%esp),%edx
12b8fd: 89 54 24 1c mov %edx,0x1c(%esp)
12b901: 8b 44 24 38 mov 0x38(%esp),%eax
12b905: 89 44 24 18 mov %eax,0x18(%esp)
12b909: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12b90e: f7 6c 24 6c imull 0x6c(%esp)
12b912: c1 fa 06 sar $0x6,%edx
12b915: 89 54 24 28 mov %edx,0x28(%esp)
12b919: 8b 44 24 6c mov 0x6c(%esp),%eax
12b91d: 99 cltd
12b91e: 29 54 24 28 sub %edx,0x28(%esp)
12b922: 8b 54 24 28 mov 0x28(%esp),%edx
12b926: 89 54 24 14 mov %edx,0x14(%esp)
12b92a: 8b 44 24 68 mov 0x68(%esp),%eax
12b92e: 89 44 24 10 mov %eax,0x10(%esp)
12b932: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12b937: f7 6c 24 64 imull 0x64(%esp)
12b93b: 89 44 24 20 mov %eax,0x20(%esp)
12b93f: 89 54 24 24 mov %edx,0x24(%esp)
12b943: c1 fa 06 sar $0x6,%edx
12b946: 89 54 24 28 mov %edx,0x28(%esp)
12b94a: 8b 44 24 64 mov 0x64(%esp),%eax
12b94e: 99 cltd
12b94f: 29 54 24 28 sub %edx,0x28(%esp)
12b953: 8b 54 24 28 mov 0x28(%esp),%edx
12b957: 89 54 24 0c mov %edx,0xc(%esp)
12b95b: 8b 44 24 60 mov 0x60(%esp),%eax
12b95f: 89 44 24 08 mov %eax,0x8(%esp)
12b963: c7 44 24 04 e0 ca 15 movl $0x15cae0,0x4(%esp)
12b96a: 00
12b96b: 89 34 24 mov %esi,(%esp)
12b96e: 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);
12b970: 8b 4c 24 2c mov 0x2c(%esp),%ecx
12b974: 89 4c 24 08 mov %ecx,0x8(%esp)
12b978: 8b 44 24 58 mov 0x58(%esp),%eax
12b97c: 89 44 24 04 mov %eax,0x4(%esp)
{
#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;
12b980: 8d 84 24 88 00 00 00 lea 0x88(%esp),%eax
12b987: 89 04 24 mov %eax,(%esp)
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
12b98a: e8 d1 0a 00 00 call 12c460 <_Timespec_Divide_by_integer>
(*print)( context,
12b98f: 8b 4c 24 3c mov 0x3c(%esp),%ecx
12b993: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12b998: f7 e9 imul %ecx
12b99a: 89 54 24 24 mov %edx,0x24(%esp)
12b99e: 8b 44 24 24 mov 0x24(%esp),%eax
12b9a2: c1 f8 06 sar $0x6,%eax
12b9a5: c1 f9 1f sar $0x1f,%ecx
12b9a8: 29 c8 sub %ecx,%eax
12b9aa: 89 44 24 1c mov %eax,0x1c(%esp)
12b9ae: 8b 44 24 38 mov 0x38(%esp),%eax
12b9b2: 89 44 24 18 mov %eax,0x18(%esp)
12b9b6: 8b 8c 24 84 00 00 00 mov 0x84(%esp),%ecx
12b9bd: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12b9c2: f7 e9 imul %ecx
12b9c4: 89 54 24 24 mov %edx,0x24(%esp)
12b9c8: 8b 44 24 24 mov 0x24(%esp),%eax
12b9cc: c1 f8 06 sar $0x6,%eax
12b9cf: c1 f9 1f sar $0x1f,%ecx
12b9d2: 29 c8 sub %ecx,%eax
12b9d4: 89 44 24 14 mov %eax,0x14(%esp)
12b9d8: 8b 84 24 80 00 00 00 mov 0x80(%esp),%eax
12b9df: 89 44 24 10 mov %eax,0x10(%esp)
12b9e3: 8b 4c 24 7c mov 0x7c(%esp),%ecx
12b9e7: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12b9ec: f7 e9 imul %ecx
12b9ee: 89 44 24 20 mov %eax,0x20(%esp)
12b9f2: 89 54 24 24 mov %edx,0x24(%esp)
12b9f6: 8b 44 24 24 mov 0x24(%esp),%eax
12b9fa: c1 f8 06 sar $0x6,%eax
12b9fd: c1 f9 1f sar $0x1f,%ecx
12ba00: 29 c8 sub %ecx,%eax
12ba02: 89 44 24 0c mov %eax,0xc(%esp)
12ba06: 8b 44 24 78 mov 0x78(%esp),%eax
12ba0a: 89 44 24 08 mov %eax,0x8(%esp)
12ba0e: c7 44 24 04 00 cb 15 movl $0x15cb00,0x4(%esp)
12ba15: 00
12ba16: 89 34 24 mov %esi,(%esp)
12ba19: ff d3 call *%ebx
12ba1b: e9 04 fe ff ff jmp 12b824 <rtems_rate_monotonic_report_statistics_with_plugin+0x78>
0012ba3c <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
12ba3c: 53 push %ebx
12ba3d: 83 ec 18 sub $0x18,%esp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
12ba40: a1 a4 be 17 00 mov 0x17bea4,%eax
12ba45: 40 inc %eax
12ba46: a3 a4 be 17 00 mov %eax,0x17bea4
return _Thread_Dispatch_disable_level;
12ba4b: a1 a4 be 17 00 mov 0x17bea4,%eax
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
12ba50: 8b 1d 68 ca 17 00 mov 0x17ca68,%ebx
12ba56: 3b 1d 6c ca 17 00 cmp 0x17ca6c,%ebx
12ba5c: 77 13 ja 12ba71 <rtems_rate_monotonic_reset_all_statistics+0x35><== NEVER TAKEN
12ba5e: 66 90 xchg %ax,%ax
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
12ba60: 89 1c 24 mov %ebx,(%esp)
12ba63: e8 14 00 00 00 call 12ba7c <rtems_rate_monotonic_reset_statistics>
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
12ba68: 43 inc %ebx
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
12ba69: 39 1d 6c ca 17 00 cmp %ebx,0x17ca6c
12ba6f: 73 ef jae 12ba60 <rtems_rate_monotonic_reset_all_statistics+0x24>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
12ba71: 83 c4 18 add $0x18,%esp
12ba74: 5b pop %ebx
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
12ba75: e9 72 20 fe ff jmp 10daec <_Thread_Enable_dispatch>
0010ca2c <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
10ca2c: 55 push %ebp
10ca2d: 57 push %edi
10ca2e: 56 push %esi
10ca2f: 53 push %ebx
10ca30: 83 ec 2c sub $0x2c,%esp
10ca33: 8b 6c 24 40 mov 0x40(%esp),%ebp
10ca37: 8b 4c 24 44 mov 0x44(%esp),%ecx
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;
10ca3b: 8b 75 30 mov 0x30(%ebp),%esi
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10ca3e: 89 c8 mov %ecx,%eax
10ca40: 31 d2 xor %edx,%edx
10ca42: f7 f6 div %esi
if (excess > 0) {
10ca44: 85 d2 test %edx,%edx
10ca46: 75 54 jne 10ca9c <rtems_rbheap_allocate+0x70><== NEVER TAKEN
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) {
10ca48: 89 ce mov %ecx,%esi
10ca4a: 85 c9 test %ecx,%ecx
10ca4c: 74 1a je 10ca68 <rtems_rbheap_allocate+0x3c>
10ca4e: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10ca50: 8b 7d 00 mov 0x0(%ebp),%edi
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);
10ca53: 8d 45 04 lea 0x4(%ebp),%eax
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
10ca56: 39 c7 cmp %eax,%edi
10ca58: 74 0e je 10ca68 <rtems_rbheap_allocate+0x3c>
rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
if (free_chunk->size >= size) {
10ca5a: 8b 5f 1c mov 0x1c(%edi),%ebx
10ca5d: 39 f3 cmp %esi,%ebx
10ca5f: 73 13 jae 10ca74 <rtems_rbheap_allocate+0x48>
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
if (chunk != NULL) {
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
10ca61: 8b 3f mov (%edi),%edi
{
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) {
10ca63: 39 f8 cmp %edi,%eax
10ca65: 75 f3 jne 10ca5a <rtems_rbheap_allocate+0x2e><== NEVER TAKEN
10ca67: 90 nop
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
10ca68: 31 c0 xor %eax,%eax
}
}
}
return ptr;
}
10ca6a: 83 c4 2c add $0x2c,%esp
10ca6d: 5b pop %ebx
10ca6e: 5e pop %esi
10ca6f: 5f pop %edi
10ca70: 5d pop %ebp
10ca71: c3 ret
10ca72: 66 90 xchg %ax,%ax
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
uintptr_t free_size = free_chunk->size;
if (free_size > aligned_size) {
10ca74: 39 de cmp %ebx,%esi
10ca76: 72 34 jb 10caac <rtems_rbheap_allocate+0x80>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10ca78: 8b 17 mov (%edi),%edx
previous = the_node->previous;
10ca7a: 8b 47 04 mov 0x4(%edi),%eax
next->previous = previous;
10ca7d: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
10ca80: 89 10 mov %edx,(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
10ca82: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
10ca89: c7 07 00 00 00 00 movl $0x0,(%edi)
ptr = (void *) new_chunk->begin;
}
} else {
rtems_chain_extract_unprotected(&free_chunk->chain_node);
rtems_chain_set_off_chain(&free_chunk->chain_node);
ptr = (void *) free_chunk->begin;
10ca8f: 8b 47 18 mov 0x18(%edi),%eax
}
}
}
return ptr;
}
10ca92: 83 c4 2c add $0x2c,%esp
10ca95: 5b pop %ebx
10ca96: 5e pop %esi
10ca97: 5f pop %edi
10ca98: 5d pop %ebp
10ca99: c3 ret
10ca9a: 66 90 xchg %ax,%ax
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
if (excess > 0) {
value += alignment - excess;
10ca9c: 01 ce add %ecx,%esi <== NOT EXECUTED
10ca9e: 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) {
10caa0: 85 c9 test %ecx,%ecx <== NOT EXECUTED
10caa2: 74 c4 je 10ca68 <rtems_rbheap_allocate+0x3c><== NOT EXECUTED
10caa4: 39 f1 cmp %esi,%ecx <== NOT EXECUTED
10caa6: 76 a8 jbe 10ca50 <rtems_rbheap_allocate+0x24><== NOT EXECUTED
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
10caa8: 31 c0 xor %eax,%eax <== NOT EXECUTED
10caaa: eb be jmp 10ca6a <rtems_rbheap_allocate+0x3e><== NOT EXECUTED
if (free_chunk != NULL) {
uintptr_t free_size = free_chunk->size;
if (free_size > aligned_size) {
rtems_rbheap_chunk *new_chunk = get_chunk(control);
10caac: 89 e8 mov %ebp,%eax
10caae: e8 91 fd ff ff call 10c844 <get_chunk>
10cab3: 89 c2 mov %eax,%edx
if (new_chunk != NULL) {
10cab5: 85 c0 test %eax,%eax
10cab7: 74 af je 10ca68 <rtems_rbheap_allocate+0x3c><== NEVER TAKEN
uintptr_t new_free_size = free_size - aligned_size;
10cab9: 29 f3 sub %esi,%ebx
free_chunk->size = new_free_size;
10cabb: 89 5f 1c mov %ebx,0x1c(%edi)
new_chunk->begin = free_chunk->begin + new_free_size;
10cabe: 03 5f 18 add 0x18(%edi),%ebx
10cac1: 89 58 18 mov %ebx,0x18(%eax)
new_chunk->size = aligned_size;
10cac4: 89 70 1c mov %esi,0x1c(%eax)
10cac7: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
10cace: 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);
10cad4: 8d 40 08 lea 0x8(%eax),%eax
10cad7: 89 44 24 04 mov %eax,0x4(%esp)
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;
10cadb: 83 c5 18 add $0x18,%ebp
10cade: 89 2c 24 mov %ebp,(%esp)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10cae1: 89 54 24 1c mov %edx,0x1c(%esp)
10cae5: e8 ee 17 00 00 call 10e2d8 <_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;
10caea: 8b 54 24 1c mov 0x1c(%esp),%edx
10caee: 8b 42 18 mov 0x18(%edx),%eax
}
}
}
return ptr;
}
10caf1: 83 c4 2c add $0x2c,%esp
10caf4: 5b pop %ebx
10caf5: 5e pop %esi
10caf6: 5f pop %edi
10caf7: 5d pop %ebp
10caf8: c3 ret
0010cc0c <rtems_rbheap_extend_descriptors_with_malloc>:
/* Do nothing */
}
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
10cc0c: 53 push %ebx <== NOT EXECUTED
10cc0d: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED
10cc10: 8b 5c 24 20 mov 0x20(%esp),%ebx <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
10cc14: c7 04 24 20 00 00 00 movl $0x20,(%esp) <== NOT EXECUTED
10cc1b: e8 e0 b6 ff ff call 108300 <malloc> <== NOT EXECUTED
if (chunk != NULL) {
10cc20: 85 c0 test %eax,%eax <== NOT EXECUTED
10cc22: 74 11 je 10cc35 <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);
10cc24: 8d 53 0c lea 0xc(%ebx),%edx <== NOT EXECUTED
10cc27: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
10cc2a: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
after_node->next = the_node;
10cc2d: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
the_node->next = before_node;
10cc30: 89 10 mov %edx,(%eax) <== NOT EXECUTED
before_node->previous = the_node;
10cc32: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
10cc35: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
10cc38: 5b pop %ebx <== NOT EXECUTED
10cc39: c3 ret <== NOT EXECUTED
0010cafc <rtems_rbheap_free>:
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
10cafc: 55 push %ebp
10cafd: 57 push %edi
10cafe: 56 push %esi
10caff: 53 push %ebx
10cb00: 83 ec 4c sub $0x4c,%esp
10cb03: 8b 54 24 64 mov 0x64(%esp),%edx
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
10cb07: 85 d2 test %edx,%edx
10cb09: 0f 84 dd 00 00 00 je 10cbec <rtems_rbheap_free+0xf0>
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
10cb0f: 8b 5c 24 60 mov 0x60(%esp),%ebx
10cb13: 83 c3 18 add $0x18,%ebx
#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 };
10cb16: 8d 7c 24 20 lea 0x20(%esp),%edi
10cb1a: b9 20 00 00 00 mov $0x20,%ecx
10cb1f: 31 c0 xor %eax,%eax
10cb21: f3 aa rep stos %al,%es:(%edi)
10cb23: 89 54 24 38 mov %edx,0x38(%esp)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
10cb27: 8b 44 24 60 mov 0x60(%esp),%eax
10cb2b: 8b 68 1c mov 0x1c(%eax),%ebp
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10cb2e: 85 ed test %ebp,%ebp
10cb30: 0f 84 c2 00 00 00 je 10cbf8 <rtems_rbheap_free+0xfc><== NEVER TAKEN
10cb36: 31 f6 xor %esi,%esi
10cb38: 8d 7c 24 28 lea 0x28(%esp),%edi
compare_result = the_rbtree->compare_function(the_node, iter_node);
10cb3c: 89 6c 24 04 mov %ebp,0x4(%esp)
return rtems_rbheap_chunk_of_node(
10cb40: 89 3c 24 mov %edi,(%esp)
10cb43: ff 53 10 call *0x10(%ebx)
if ( _RBTree_Is_equal( compare_result ) ) {
10cb46: 85 c0 test %eax,%eax
10cb48: 75 08 jne 10cb52 <rtems_rbheap_free+0x56>
found = iter_node;
if ( the_rbtree->is_unique )
10cb4a: 89 ee mov %ebp,%esi
10cb4c: 80 7b 14 00 cmpb $0x0,0x14(%ebx)
10cb50: 75 10 jne 10cb62 <rtems_rbheap_free+0x66><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
10cb52: 85 c0 test %eax,%eax
10cb54: 0f 9f c0 setg %al
10cb57: 0f b6 c0 movzbl %al,%eax
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
10cb5a: 8b 6c 85 04 mov 0x4(%ebp,%eax,4),%ebp
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10cb5e: 85 ed test %ebp,%ebp
10cb60: 75 da jne 10cb3c <rtems_rbheap_free+0x40>
10cb62: 8d 7e f8 lea -0x8(%esi),%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) {
10cb65: 83 ff f8 cmp $0xfffffff8,%edi
10cb68: 0f 84 8a 00 00 00 je 10cbf8 <rtems_rbheap_free+0xfc>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10cb6e: 8b 46 f8 mov -0x8(%esi),%eax
10cb71: 85 c0 test %eax,%eax
10cb73: 74 0d je 10cb82 <rtems_rbheap_free+0x86>
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;
10cb75: b8 0e 00 00 00 mov $0xe,%eax
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
10cb7a: 83 c4 4c add $0x4c,%esp
10cb7d: 5b pop %ebx
10cb7e: 5e pop %esi
10cb7f: 5f pop %edi
10cb80: 5d pop %ebp
10cb81: c3 ret
10cb82: 8b 6f 04 mov 0x4(%edi),%ebp
10cb85: 85 ed test %ebp,%ebp
10cb87: 75 ec jne 10cb75 <rtems_rbheap_free+0x79><== NEVER TAKEN
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
10cb89: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10cb90: 00
10cb91: 89 34 24 mov %esi,(%esp)
10cb94: e8 df 19 00 00 call 10e578 <_RBTree_Next_unprotected>
10cb99: 89 44 24 1c mov %eax,0x1c(%esp)
10cb9d: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10cba4: 00
10cba5: 89 34 24 mov %esi,(%esp)
10cba8: e8 cb 19 00 00 call 10e578 <_RBTree_Next_unprotected>
10cbad: 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);
10cbb0: 89 04 24 mov %eax,(%esp)
10cbb3: 89 f9 mov %edi,%ecx
10cbb5: 89 da mov %ebx,%edx
10cbb7: 8b 44 24 60 mov 0x60(%esp),%eax
10cbbb: e8 d0 fc ff ff call 10c890 <check_and_merge>
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10cbc0: 8b 44 24 60 mov 0x60(%esp),%eax
10cbc4: 89 47 04 mov %eax,0x4(%edi)
before_node = after_node->next;
10cbc7: 89 c2 mov %eax,%edx
10cbc9: 8b 00 mov (%eax),%eax
after_node->next = the_node;
10cbcb: 89 3a mov %edi,(%edx)
the_node->next = before_node;
10cbcd: 89 07 mov %eax,(%edi)
before_node->previous = the_node;
10cbcf: 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(
10cbd2: 8b 44 24 1c mov 0x1c(%esp),%eax
10cbd6: 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);
10cbd9: 89 04 24 mov %eax,(%esp)
10cbdc: 89 f9 mov %edi,%ecx
10cbde: 89 da mov %ebx,%edx
10cbe0: 8b 44 24 60 mov 0x60(%esp),%eax
10cbe4: e8 a7 fc ff ff call 10c890 <check_and_merge>
10cbe9: 8d 76 00 lea 0x0(%esi),%esi
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
10cbec: 31 c0 xor %eax,%eax
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
10cbee: 83 c4 4c add $0x4c,%esp
10cbf1: 5b pop %ebx
10cbf2: 5e pop %esi
10cbf3: 5f pop %edi
10cbf4: 5d pop %ebp
10cbf5: c3 ret
10cbf6: 66 90 xchg %ax,%ax
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
}
} else {
sc = RTEMS_INVALID_ID;
10cbf8: b8 04 00 00 00 mov $0x4,%eax
}
}
return sc;
}
10cbfd: 83 c4 4c add $0x4c,%esp
10cc00: 5b pop %ebx
10cc01: 5e pop %esi
10cc02: 5f pop %edi
10cc03: 5d pop %ebp
10cc04: c3 ret
0010c8f8 <rtems_rbheap_initialize>:
uintptr_t area_size,
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
10c8f8: 57 push %edi
10c8f9: 56 push %esi
10c8fa: 53 push %ebx
10c8fb: 83 ec 10 sub $0x10,%esp
10c8fe: 8b 4c 24 2c mov 0x2c(%esp),%ecx
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (alignment > 0) {
10c902: 85 c9 test %ecx,%ecx
10c904: 75 0e jne 10c914 <rtems_rbheap_initialize+0x1c>
}
} else {
sc = RTEMS_INVALID_ADDRESS;
}
} else {
sc = RTEMS_INVALID_NUMBER;
10c906: b8 0a 00 00 00 mov $0xa,%eax
}
return sc;
}
10c90b: 83 c4 10 add $0x10,%esp
10c90e: 5b pop %ebx
10c90f: 5e pop %esi
10c910: 5f pop %edi
10c911: c3 ret
10c912: 66 90 xchg %ax,%ax
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (alignment > 0) {
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
10c914: 8b 5c 24 24 mov 0x24(%esp),%ebx
10c918: 03 5c 24 28 add 0x28(%esp),%ebx
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10c91c: 8b 44 24 24 mov 0x24(%esp),%eax
10c920: 31 d2 xor %edx,%edx
10c922: f7 f1 div %ecx
if (excess > 0) {
10c924: 85 d2 test %edx,%edx
10c926: 0f 85 c4 00 00 00 jne 10c9f0 <rtems_rbheap_initialize+0xf8>
return value;
}
static uintptr_t align_down(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10c92c: 89 d8 mov %ebx,%eax
10c92e: 31 d2 xor %edx,%edx
10c930: f7 f1 div %ecx
return value - excess;
10c932: 89 df mov %ebx,%edi
10c934: 29 d7 sub %edx,%edi
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
10c936: 39 5c 24 24 cmp %ebx,0x24(%esp)
10c93a: 0f 83 b6 00 00 00 jae 10c9f6 <rtems_rbheap_initialize+0xfe>
10c940: 8b 74 24 24 mov 0x24(%esp),%esi
10c944: 39 f7 cmp %esi,%edi
10c946: 0f 86 aa 00 00 00 jbe 10c9f6 <rtems_rbheap_initialize+0xfe>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c94c: 8b 44 24 20 mov 0x20(%esp),%eax
10c950: 83 c0 04 add $0x4,%eax
10c953: 8b 54 24 20 mov 0x20(%esp),%edx
10c957: 89 02 mov %eax,(%edx)
head->next = tail;
head->previous = NULL;
10c959: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
tail->previous = head;
10c960: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c963: 89 d0 mov %edx,%eax
10c965: 83 c0 0c add $0xc,%eax
10c968: 83 c2 10 add $0x10,%edx
10c96b: 8b 5c 24 20 mov 0x20(%esp),%ebx
10c96f: 89 53 0c mov %edx,0xc(%ebx)
head->next = tail;
head->previous = NULL;
10c972: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10c979: 89 43 14 mov %eax,0x14(%ebx)
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
10c97c: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_rbtree->root = NULL;
10c983: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_rbtree->first[0] = NULL;
10c98a: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
the_rbtree->first[1] = NULL;
10c991: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
the_rbtree->compare_function = compare_function;
10c998: c7 43 28 34 c8 10 00 movl $0x10c834,0x28(%ebx)
the_rbtree->is_unique = is_unique;
10c99f: c6 43 2c 01 movb $0x1,0x2c(%ebx)
rtems_rbheap_chunk *first = NULL;
rtems_chain_initialize_empty(free_chain);
rtems_chain_initialize_empty(&control->spare_descriptor_chain);
rtems_rbtree_initialize_empty(chunk_tree, chunk_compare, true);
control->alignment = alignment;
10c9a3: 89 4b 30 mov %ecx,0x30(%ebx)
control->handler_arg = handler_arg;
10c9a6: 8b 44 24 34 mov 0x34(%esp),%eax
10c9aa: 89 43 38 mov %eax,0x38(%ebx)
control->extend_descriptors = extend_descriptors;
10c9ad: 8b 44 24 30 mov 0x30(%esp),%eax
10c9b1: 89 43 34 mov %eax,0x34(%ebx)
first = get_chunk(control);
10c9b4: 89 d8 mov %ebx,%eax
10c9b6: e8 89 fe ff ff call 10c844 <get_chunk>
if (first != NULL) {
10c9bb: 85 c0 test %eax,%eax
10c9bd: 74 62 je 10ca21 <rtems_rbheap_initialize+0x129>
first->begin = aligned_begin;
10c9bf: 89 70 18 mov %esi,0x18(%eax)
first->size = aligned_end - aligned_begin;
10c9c2: 29 f7 sub %esi,%edi
10c9c4: 89 78 1c mov %edi,0x1c(%eax)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10c9c7: 89 58 04 mov %ebx,0x4(%eax)
before_node = after_node->next;
10c9ca: 8b 13 mov (%ebx),%edx
after_node->next = the_node;
10c9cc: 89 03 mov %eax,(%ebx)
the_node->next = before_node;
10c9ce: 89 10 mov %edx,(%eax)
before_node->previous = the_node;
10c9d0: 89 42 04 mov %eax,0x4(%edx)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10c9d3: 83 c0 08 add $0x8,%eax
10c9d6: 89 44 24 04 mov %eax,0x4(%esp)
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
10c9da: 89 d8 mov %ebx,%eax
10c9dc: 83 c0 18 add $0x18,%eax
10c9df: 89 04 24 mov %eax,(%esp)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10c9e2: e8 f1 18 00 00 call 10e2d8 <_RBTree_Insert_unprotected>
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
10c9e7: 31 c0 xor %eax,%eax
10c9e9: e9 1d ff ff ff jmp 10c90b <rtems_rbheap_initialize+0x13>
10c9ee: 66 90 xchg %ax,%ax
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
10c9f0: 39 5c 24 24 cmp %ebx,0x24(%esp)
10c9f4: 72 0e jb 10ca04 <rtems_rbheap_initialize+0x10c>
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
}
} else {
sc = RTEMS_INVALID_ADDRESS;
10c9f6: b8 09 00 00 00 mov $0x9,%eax
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
10c9fb: 83 c4 10 add $0x10,%esp
10c9fe: 5b pop %ebx
10c9ff: 5e pop %esi
10ca00: 5f pop %edi
10ca01: c3 ret
10ca02: 66 90 xchg %ax,%ax
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
if (excess > 0) {
value += alignment - excess;
10ca04: 8b 74 24 24 mov 0x24(%esp),%esi
10ca08: 01 ce add %ecx,%esi
10ca0a: 29 d6 sub %edx,%esi
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
10ca0c: 39 74 24 24 cmp %esi,0x24(%esp)
10ca10: 77 e4 ja 10c9f6 <rtems_rbheap_initialize+0xfe><== NEVER TAKEN
return value;
}
static uintptr_t align_down(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10ca12: 89 d8 mov %ebx,%eax
10ca14: 31 d2 xor %edx,%edx
10ca16: f7 f1 div %ecx
return value - excess;
10ca18: 89 df mov %ebx,%edi
10ca1a: 29 d7 sub %edx,%edi
10ca1c: e9 23 ff ff ff jmp 10c944 <rtems_rbheap_initialize+0x4c>
first->begin = aligned_begin;
first->size = aligned_end - aligned_begin;
add_to_chain(free_chain, first);
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
10ca21: b8 1a 00 00 00 mov $0x1a,%eax
10ca26: e9 e0 fe ff ff jmp 10c90b <rtems_rbheap_initialize+0x13>
0011ac6c <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
11ac6c: 53 push %ebx
11ac6d: 83 ec 28 sub $0x28,%esp
11ac70: 8b 5c 24 34 mov 0x34(%esp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
11ac74: 85 db test %ebx,%ebx
11ac76: 75 0c jne 11ac84 <rtems_signal_send+0x18>
return RTEMS_INVALID_NUMBER;
11ac78: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11ac7d: 83 c4 28 add $0x28,%esp
11ac80: 5b pop %ebx
11ac81: c3 ret
11ac82: 66 90 xchg %ax,%ax
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
11ac84: 8d 44 24 1c lea 0x1c(%esp),%eax
11ac88: 89 44 24 04 mov %eax,0x4(%esp)
11ac8c: 8b 44 24 30 mov 0x30(%esp),%eax
11ac90: 89 04 24 mov %eax,(%esp)
11ac93: e8 2c 45 00 00 call 11f1c4 <_Thread_Get>
switch ( location ) {
11ac98: 8b 54 24 1c mov 0x1c(%esp),%edx
11ac9c: 85 d2 test %edx,%edx
11ac9e: 75 38 jne 11acd8 <rtems_signal_send+0x6c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
11aca0: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
11aca6: 8b 4a 0c mov 0xc(%edx),%ecx
11aca9: 85 c9 test %ecx,%ecx
11acab: 74 35 je 11ace2 <rtems_signal_send+0x76>
if ( asr->is_enabled ) {
11acad: 80 7a 08 00 cmpb $0x0,0x8(%edx)
11acb1: 74 3d je 11acf0 <rtems_signal_send+0x84>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
11acb3: 9c pushf
11acb4: fa cli
11acb5: 59 pop %ecx
*signal_set |= signals;
11acb6: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
11acb9: 51 push %ecx
11acba: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
11acbb: 8b 15 48 f0 14 00 mov 0x14f048,%edx
11acc1: 85 d2 test %edx,%edx
11acc3: 74 08 je 11accd <rtems_signal_send+0x61>
11acc5: 3b 05 4c f0 14 00 cmp 0x14f04c,%eax
11accb: 74 2d je 11acfa <rtems_signal_send+0x8e><== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
11accd: e8 d2 44 00 00 call 11f1a4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11acd2: 31 c0 xor %eax,%eax
11acd4: eb a7 jmp 11ac7d <rtems_signal_send+0x11>
11acd6: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11acd8: b8 04 00 00 00 mov $0x4,%eax
}
11acdd: 83 c4 28 add $0x28,%esp
11ace0: 5b pop %ebx
11ace1: c3 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
11ace2: e8 bd 44 00 00 call 11f1a4 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
11ace7: b8 0b 00 00 00 mov $0xb,%eax
11acec: eb 8f jmp 11ac7d <rtems_signal_send+0x11>
11acee: 66 90 xchg %ax,%ax
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
11acf0: 9c pushf
11acf1: fa cli
11acf2: 58 pop %eax
*signal_set |= signals;
11acf3: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
11acf6: 50 push %eax
11acf7: 9d popf
11acf8: eb d3 jmp 11accd <rtems_signal_send+0x61>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
11acfa: c6 05 58 f0 14 00 01 movb $0x1,0x14f058
11ad01: eb ca jmp 11accd <rtems_signal_send+0x61>
00127f38 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
127f38: 57 push %edi
127f39: 56 push %esi
127f3a: 8b 44 24 0c mov 0xc(%esp),%eax
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
127f3e: 8b 70 08 mov 0x8(%eax),%esi
127f41: 85 f6 test %esi,%esi
127f43: 74 15 je 127f5a <rtems_stack_checker_begin_extension+0x22><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
127f45: 8b b8 b8 00 00 00 mov 0xb8(%eax),%edi
127f4b: 83 c7 08 add $0x8,%edi
127f4e: be ac c9 17 00 mov $0x17c9ac,%esi
127f53: b9 04 00 00 00 mov $0x4,%ecx
127f58: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
127f5a: 5e pop %esi
127f5b: 5f pop %edi
127f5c: c3 ret
00127eb0 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
127eb0: 57 push %edi
127eb1: 53 push %ebx
127eb2: 8b 54 24 10 mov 0x10(%esp),%edx
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
127eb6: 8b 0d 68 b6 17 00 mov 0x17b668,%ecx
127ebc: 85 c9 test %ecx,%ecx
127ebe: 75 5a jne 127f1a <rtems_stack_checker_create_extension+0x6a>
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
127ec0: c7 05 ac c9 17 00 0d movl $0xfeedf00d,0x17c9ac
127ec7: f0 ed fe
127eca: c7 05 b0 c9 17 00 06 movl $0xbad0d06,0x17c9b0
127ed1: 0d ad 0b
127ed4: c7 05 b4 c9 17 00 0d movl $0xdeadf00d,0x17c9b4
127edb: f0 ad de
127ede: c7 05 b8 c9 17 00 06 movl $0x600d0d06,0x17c9b8
127ee5: 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) {
127ee8: 8b 1d 20 c4 17 00 mov 0x17c420,%ebx
127eee: 85 db test %ebx,%ebx
127ef0: 74 1e je 127f10 <rtems_stack_checker_create_extension+0x60><== NEVER TAKEN
127ef2: 8b 0d 24 c4 17 00 mov 0x17c424,%ecx
127ef8: 85 c9 test %ecx,%ecx
127efa: 74 14 je 127f10 <rtems_stack_checker_create_extension+0x60><== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
127efc: 89 1d c0 c9 17 00 mov %ebx,0x17c9c0
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
127f02: 29 d9 sub %ebx,%ecx
127f04: 89 0d bc c9 17 00 mov %ecx,0x17c9bc
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
127f0a: b0 a5 mov $0xa5,%al
127f0c: 89 df mov %ebx,%edi
127f0e: f3 aa rep stos %al,%es:(%edi)
}
#endif
Stack_check_Initialized = 1;
127f10: c7 05 68 b6 17 00 01 movl $0x1,0x17b668
127f17: 00 00 00
Thread_Control *the_thread
)
{
Stack_check_Initialize();
if (the_thread)
127f1a: 85 d2 test %edx,%edx
127f1c: 74 12 je 127f30 <rtems_stack_checker_create_extension+0x80><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
127f1e: 8b 9a b8 00 00 00 mov 0xb8(%edx),%ebx
127f24: 8b 8a b4 00 00 00 mov 0xb4(%edx),%ecx
127f2a: b0 a5 mov $0xa5,%al
127f2c: 89 df mov %ebx,%edi
127f2e: f3 aa rep stos %al,%es:(%edi)
return true;
}
127f30: b0 01 mov $0x1,%al
127f32: 5b pop %ebx
127f33: 5f pop %edi
127f34: c3 ret
001280bc <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
1280bc: 55 push %ebp
1280bd: 89 e5 mov %esp,%ebp
1280bf: 56 push %esi
1280c0: 53 push %ebx
1280c1: 83 ec 10 sub $0x10,%esp
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
1280c4: 8b 35 2c c4 17 00 mov 0x17c42c,%esi
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
1280ca: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax
1280d0: 39 c5 cmp %eax,%ebp
1280d2: 73 30 jae 128104 <rtems_stack_checker_is_blown+0x48><== ALWAYS TAKEN
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
1280d4: b2 01 mov $0x1,%dl <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
1280d6: 83 3d 68 b6 17 00 00 cmpl $0x0,0x17b668 <== NOT EXECUTED
1280dd: 74 42 je 128121 <rtems_stack_checker_is_blown+0x65><== NOT EXECUTED
pattern_ok = (!memcmp(
1280df: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) <== NOT EXECUTED
1280e6: 00
1280e7: c7 44 24 04 ac c9 17 movl $0x17c9ac,0x4(%esp) <== NOT EXECUTED
1280ee: 00
1280ef: 83 c0 08 add $0x8,%eax <== NOT EXECUTED
1280f2: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1280f5: e8 6e 72 01 00 call 13f368 <memcmp> <== NOT EXECUTED
1280fa: 85 c0 test %eax,%eax <== NOT EXECUTED
1280fc: 0f 94 c2 sete %dl <== NOT EXECUTED
1280ff: eb 20 jmp 128121 <rtems_stack_checker_is_blown+0x65><== NOT EXECUTED
128101: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
128104: 8b 96 b4 00 00 00 mov 0xb4(%esi),%edx
12810a: 01 c2 add %eax,%edx
12810c: 39 d5 cmp %edx,%ebp
12810e: 0f 96 c3 setbe %bl
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
128111: 8b 15 68 b6 17 00 mov 0x17b668,%edx
128117: 85 d2 test %edx,%edx
128119: 75 15 jne 128130 <rtems_stack_checker_is_blown+0x74><== ALWAYS TAKEN
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
12811b: b2 01 mov $0x1,%dl <== NOT EXECUTED
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
12811d: 84 db test %bl,%bl <== NOT EXECUTED
12811f: 75 37 jne 128158 <rtems_stack_checker_is_blown+0x9c><== NOT EXECUTED
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
128121: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
128124: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
128128: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
12812b: e8 30 fe ff ff call 127f60 <Stack_check_report_blown_task><== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
pattern_ok = (!memcmp(
128130: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
128137: 00
128138: c7 44 24 04 ac c9 17 movl $0x17c9ac,0x4(%esp)
12813f: 00
128140: 83 c0 08 add $0x8,%eax
128143: 89 04 24 mov %eax,(%esp)
128146: e8 1d 72 01 00 call 13f368 <memcmp>
12814b: 85 c0 test %eax,%eax
12814d: 0f 94 c2 sete %dl
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
128150: 84 db test %bl,%bl
128152: 74 cd je 128121 <rtems_stack_checker_is_blown+0x65><== NEVER TAKEN
128154: 84 d2 test %dl,%dl
128156: 74 c9 je 128121 <rtems_stack_checker_is_blown+0x65><== NEVER TAKEN
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
128158: 31 c0 xor %eax,%eax
12815a: 83 c4 10 add $0x10,%esp
12815d: 5b pop %ebx
12815e: 5e pop %esi
12815f: 5d pop %ebp
128160: c3 ret
001281d0 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
1281d0: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
1281d3: c7 44 24 04 c0 a2 12 movl $0x12a2c0,0x4(%esp) <== NOT EXECUTED
1281da: 00
1281db: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED
1281e2: e8 7d ff ff ff call 128164 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
}
1281e7: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
1281ea: c3 ret <== NOT EXECUTED
00128164 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
128164: 56 push %esi <== NOT EXECUTED
128165: 53 push %ebx <== NOT EXECUTED
128166: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
128169: 8b 74 24 20 mov 0x20(%esp),%esi <== NOT EXECUTED
12816d: 8b 5c 24 24 mov 0x24(%esp),%ebx <== NOT EXECUTED
if ( !print )
128171: 85 db test %ebx,%ebx <== NOT EXECUTED
128173: 74 52 je 1281c7 <rtems_stack_checker_report_usage_with_plugin+0x63><== NOT EXECUTED
return;
print_context = context;
128175: 89 35 6c b6 17 00 mov %esi,0x17b66c <== NOT EXECUTED
print_handler = print;
12817b: 89 1d 70 b6 17 00 mov %ebx,0x17b670 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
128181: c7 44 24 04 33 c4 15 movl $0x15c433,0x4(%esp) <== NOT EXECUTED
128188: 00
128189: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
12818c: ff d3 call *%ebx <== NOT EXECUTED
(*print)( context,
12818e: c7 44 24 04 b8 c4 15 movl $0x15c4b8,0x4(%esp) <== NOT EXECUTED
128195: 00
128196: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
128199: 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 );
12819b: c7 04 24 2c 7d 12 00 movl $0x127d2c,(%esp) <== NOT EXECUTED
1281a2: e8 e9 3f 00 00 call 12c190 <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);
1281a7: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED
1281ae: e8 79 fb ff ff call 127d2c <Stack_check_Dump_threads_usage><== NOT EXECUTED
#endif
print_context = NULL;
1281b3: c7 05 6c b6 17 00 00 movl $0x0,0x17b66c <== NOT EXECUTED
1281ba: 00 00 00
print_handler = NULL;
1281bd: c7 05 70 b6 17 00 00 movl $0x0,0x17b670 <== NOT EXECUTED
1281c4: 00 00 00
}
1281c7: 83 c4 14 add $0x14,%esp <== NOT EXECUTED
1281ca: 5b pop %ebx <== NOT EXECUTED
1281cb: 5e pop %esi <== NOT EXECUTED
1281cc: c3 ret <== NOT EXECUTED
00128044 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
128044: 55 push %ebp
128045: 89 e5 mov %esp,%ebp
128047: 53 push %ebx
128048: 83 ec 14 sub $0x14,%esp
12804b: 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);
12804e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
128054: 8d 50 08 lea 0x8(%eax),%edx
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
128057: 39 c5 cmp %eax,%ebp
128059: 72 0a jb 128065 <rtems_stack_checker_switch_extension+0x21><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
12805b: 03 83 b4 00 00 00 add 0xb4(%ebx),%eax
128061: 39 c5 cmp %eax,%ebp
128063: 76 2f jbe 128094 <rtems_stack_checker_switch_extension+0x50><== ALWAYS TAKEN
/*
* 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,
128065: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) <== NOT EXECUTED
12806c: 00
12806d: c7 44 24 04 ac c9 17 movl $0x17c9ac,0x4(%esp) <== NOT EXECUTED
128074: 00
128075: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
128078: e8 eb 72 01 00 call 13f368 <memcmp> <== NOT EXECUTED
12807d: 85 c0 test %eax,%eax <== NOT EXECUTED
12807f: 0f 94 c0 sete %al <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
128082: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
128085: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
128089: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
12808c: e8 cf fe ff ff call 127f60 <Stack_check_report_blown_task><== NOT EXECUTED
128091: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* 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,
128094: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
12809b: 00
12809c: c7 44 24 04 ac c9 17 movl $0x17c9ac,0x4(%esp)
1280a3: 00
1280a4: 89 14 24 mov %edx,(%esp)
1280a7: e8 bc 72 01 00 call 13f368 <memcmp>
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
1280ac: 85 c0 test %eax,%eax
1280ae: 75 06 jne 1280b6 <rtems_stack_checker_switch_extension+0x72><== NEVER TAKEN
Stack_check_report_blown_task( running, pattern_ok );
}
}
1280b0: 83 c4 14 add $0x14,%esp
1280b3: 5b pop %ebx
1280b4: 5d pop %ebp
1280b5: c3 ret
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
1280b6: 31 c0 xor %eax,%eax
1280b8: eb c8 jmp 128082 <rtems_stack_checker_switch_extension+0x3e><== NOT EXECUTED
00111514 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
111514: 53 push %ebx
111515: 83 ec 38 sub $0x38,%esp
111518: 8b 5c 24 44 mov 0x44(%esp),%ebx
double result;
char *end;
if ( !n )
11151c: 85 db test %ebx,%ebx
11151e: 74 6c je 11158c <rtems_string_to_double+0x78>
return RTEMS_INVALID_ADDRESS;
errno = 0;
111520: e8 ef 38 00 00 call 114e14 <__errno>
111525: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
11152b: c7 03 00 00 00 00 movl $0x0,(%ebx)
111531: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtod( s, &end );
111538: 8d 44 24 2c lea 0x2c(%esp),%eax
11153c: 89 44 24 04 mov %eax,0x4(%esp)
111540: 8b 44 24 40 mov 0x40(%esp),%eax
111544: 89 04 24 mov %eax,(%esp)
111547: e8 48 65 00 00 call 117a94 <strtod>
if ( endptr )
*endptr = end;
11154c: 8b 44 24 2c mov 0x2c(%esp),%eax
errno = 0;
*n = 0;
result = strtod( s, &end );
if ( endptr )
111550: 8b 54 24 48 mov 0x48(%esp),%edx
111554: 85 d2 test %edx,%edx
111556: 74 06 je 11155e <rtems_string_to_double+0x4a>
*endptr = end;
111558: 8b 54 24 48 mov 0x48(%esp),%edx
11155c: 89 02 mov %eax,(%edx)
if ( end == s )
11155e: 39 44 24 40 cmp %eax,0x40(%esp)
111562: 74 1c je 111580 <rtems_string_to_double+0x6c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111564: dd 5c 24 10 fstpl 0x10(%esp)
111568: e8 a7 38 00 00 call 114e14 <__errno>
11156d: 83 38 22 cmpl $0x22,(%eax)
111570: dd 44 24 10 fldl 0x10(%esp)
111574: 74 22 je 111598 <rtems_string_to_double+0x84>
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
111576: dd 1b fstpl (%ebx)
return RTEMS_SUCCESSFUL;
111578: 31 c0 xor %eax,%eax
}
11157a: 83 c4 38 add $0x38,%esp
11157d: 5b pop %ebx
11157e: c3 ret
11157f: 90 nop
111580: dd d8 fstp %st(0)
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
111582: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
111587: 83 c4 38 add $0x38,%esp
11158a: 5b pop %ebx
11158b: c3 ret
{
double result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
11158c: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
111591: 83 c4 38 add $0x38,%esp
111594: 5b pop %ebx
111595: c3 ret
111596: 66 90 xchg %ax,%ax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111598: d9 ee fldz
11159a: d9 c9 fxch %st(1)
11159c: dd e1 fucom %st(1)
11159e: df e0 fnstsw %ax
1115a0: dd d9 fstp %st(1)
1115a2: 80 e4 45 and $0x45,%ah
1115a5: 80 fc 40 cmp $0x40,%ah
1115a8: 75 16 jne 1115c0 <rtems_string_to_double+0xac><== ALWAYS TAKEN
1115aa: dd d8 fstp %st(0) <== NOT EXECUTED
1115ac: eb 0a jmp 1115b8 <rtems_string_to_double+0xa4><== NOT EXECUTED
1115ae: 66 90 xchg %ax,%ax <== NOT EXECUTED
1115b0: dd d8 fstp %st(0)
1115b2: eb 04 jmp 1115b8 <rtems_string_to_double+0xa4>
1115b4: dd d8 fstp %st(0)
1115b6: 66 90 xchg %ax,%ax
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
1115b8: b8 0a 00 00 00 mov $0xa,%eax
1115bd: eb bb jmp 11157a <rtems_string_to_double+0x66>
1115bf: 90 nop
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
1115c0: dd 05 90 7d 12 00 fldl 0x127d90
1115c6: d9 c9 fxch %st(1)
1115c8: dd e1 fucom %st(1)
1115ca: df e0 fnstsw %ax
1115cc: dd d9 fstp %st(1)
1115ce: f6 c4 45 test $0x45,%ah
1115d1: 74 dd je 1115b0 <rtems_string_to_double+0x9c>
1115d3: dd 05 98 7d 12 00 fldl 0x127d98
1115d9: dd e9 fucomp %st(1)
1115db: df e0 fnstsw %ax
1115dd: f6 c4 45 test $0x45,%ah
1115e0: 74 d2 je 1115b4 <rtems_string_to_double+0xa0><== ALWAYS TAKEN
1115e2: eb 92 jmp 111576 <rtems_string_to_double+0x62><== NOT EXECUTED
001115e4 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
1115e4: 53 push %ebx
1115e5: 83 ec 38 sub $0x38,%esp
1115e8: 8b 5c 24 44 mov 0x44(%esp),%ebx
float result;
char *end;
if ( !n )
1115ec: 85 db test %ebx,%ebx
1115ee: 74 64 je 111654 <rtems_string_to_float+0x70>
return RTEMS_INVALID_ADDRESS;
errno = 0;
1115f0: e8 1f 38 00 00 call 114e14 <__errno>
1115f5: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
1115fb: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtof( s, &end );
111601: 8d 44 24 2c lea 0x2c(%esp),%eax
111605: 89 44 24 04 mov %eax,0x4(%esp)
111609: 8b 44 24 40 mov 0x40(%esp),%eax
11160d: 89 04 24 mov %eax,(%esp)
111610: e8 a3 64 00 00 call 117ab8 <strtof>
if ( endptr )
*endptr = end;
111615: 8b 44 24 2c mov 0x2c(%esp),%eax
errno = 0;
*n = 0;
result = strtof( s, &end );
if ( endptr )
111619: 8b 54 24 48 mov 0x48(%esp),%edx
11161d: 85 d2 test %edx,%edx
11161f: 74 06 je 111627 <rtems_string_to_float+0x43>
*endptr = end;
111621: 8b 54 24 48 mov 0x48(%esp),%edx
111625: 89 02 mov %eax,(%edx)
if ( end == s )
111627: 39 44 24 40 cmp %eax,0x40(%esp)
11162b: 74 1b je 111648 <rtems_string_to_float+0x64>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
11162d: d9 5c 24 10 fstps 0x10(%esp)
111631: e8 de 37 00 00 call 114e14 <__errno>
111636: 83 38 22 cmpl $0x22,(%eax)
111639: d9 44 24 10 flds 0x10(%esp)
11163d: 74 21 je 111660 <rtems_string_to_float+0x7c>
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
11163f: d9 1b fstps (%ebx)
return RTEMS_SUCCESSFUL;
111641: 31 c0 xor %eax,%eax
}
111643: 83 c4 38 add $0x38,%esp
111646: 5b pop %ebx
111647: c3 ret
111648: dd d8 fstp %st(0)
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
11164a: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
11164f: 83 c4 38 add $0x38,%esp
111652: 5b pop %ebx
111653: c3 ret
{
float result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
111654: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
111659: 83 c4 38 add $0x38,%esp
11165c: 5b pop %ebx
11165d: c3 ret
11165e: 66 90 xchg %ax,%ax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111660: d9 ee fldz
111662: d9 c9 fxch %st(1)
111664: dd e1 fucom %st(1)
111666: df e0 fnstsw %ax
111668: dd d9 fstp %st(1)
11166a: 80 e4 45 and $0x45,%ah
11166d: 80 fc 40 cmp $0x40,%ah
111670: 75 16 jne 111688 <rtems_string_to_float+0xa4><== ALWAYS TAKEN
111672: dd d8 fstp %st(0) <== NOT EXECUTED
111674: eb 0a jmp 111680 <rtems_string_to_float+0x9c><== NOT EXECUTED
111676: 66 90 xchg %ax,%ax <== NOT EXECUTED
111678: dd d8 fstp %st(0)
11167a: eb 04 jmp 111680 <rtems_string_to_float+0x9c>
11167c: dd d8 fstp %st(0)
11167e: 66 90 xchg %ax,%ax
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
111680: b8 0a 00 00 00 mov $0xa,%eax
111685: eb bc jmp 111643 <rtems_string_to_float+0x5f>
111687: 90 nop
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
111688: d9 05 a0 7d 12 00 flds 0x127da0
11168e: d9 c9 fxch %st(1)
111690: dd e1 fucom %st(1)
111692: df e0 fnstsw %ax
111694: dd d9 fstp %st(1)
111696: f6 c4 45 test $0x45,%ah
111699: 74 dd je 111678 <rtems_string_to_float+0x94>
11169b: d9 05 a4 7d 12 00 flds 0x127da4
1116a1: dd e9 fucomp %st(1)
1116a3: df e0 fnstsw %ax
1116a5: f6 c4 45 test $0x45,%ah
1116a8: 74 d2 je 11167c <rtems_string_to_float+0x98><== ALWAYS TAKEN
1116aa: eb 93 jmp 11163f <rtems_string_to_float+0x5b><== NOT EXECUTED
00122150 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
122150: 56 push %esi
122151: 53 push %ebx
122152: 83 ec 24 sub $0x24,%esp
122155: 8b 5c 24 34 mov 0x34(%esp),%ebx
long result;
char *end;
if ( !n )
122159: 85 db test %ebx,%ebx
12215b: 74 67 je 1221c4 <rtems_string_to_int+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
12215d: e8 2e a0 01 00 call 13c190 <__errno>
122162: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
122168: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtol( s, &end, base );
12216e: 8b 44 24 3c mov 0x3c(%esp),%eax
122172: 89 44 24 08 mov %eax,0x8(%esp)
122176: 8d 44 24 1c lea 0x1c(%esp),%eax
12217a: 89 44 24 04 mov %eax,0x4(%esp)
12217e: 8b 44 24 30 mov 0x30(%esp),%eax
122182: 89 04 24 mov %eax,(%esp)
122185: e8 42 17 02 00 call 1438cc <strtol>
12218a: 89 c6 mov %eax,%esi
if ( endptr )
*endptr = end;
12218c: 8b 54 24 1c mov 0x1c(%esp),%edx
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
122190: 8b 44 24 38 mov 0x38(%esp),%eax
122194: 85 c0 test %eax,%eax
122196: 74 06 je 12219e <rtems_string_to_int+0x4e>
*endptr = end;
122198: 8b 44 24 38 mov 0x38(%esp),%eax
12219c: 89 10 mov %edx,(%eax)
if ( end == s )
12219e: 39 54 24 30 cmp %edx,0x30(%esp)
1221a2: 74 14 je 1221b8 <rtems_string_to_int+0x68>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1221a4: e8 e7 9f 01 00 call 13c190 <__errno>
1221a9: 83 38 22 cmpl $0x22,(%eax)
1221ac: 74 22 je 1221d0 <rtems_string_to_int+0x80>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
1221ae: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
1221b0: 31 c0 xor %eax,%eax
}
1221b2: 83 c4 24 add $0x24,%esp
1221b5: 5b pop %ebx
1221b6: 5e pop %esi
1221b7: c3 ret
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
1221b8: b8 0b 00 00 00 mov $0xb,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
1221bd: 83 c4 24 add $0x24,%esp
1221c0: 5b pop %ebx
1221c1: 5e pop %esi
1221c2: c3 ret
1221c3: 90 nop
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
1221c4: b8 09 00 00 00 mov $0x9,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
1221c9: 83 c4 24 add $0x24,%esp
1221cc: 5b pop %ebx
1221cd: 5e pop %esi
1221ce: c3 ret
1221cf: 90 nop
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1221d0: 85 f6 test %esi,%esi
1221d2: 75 08 jne 1221dc <rtems_string_to_int+0x8c><== ALWAYS TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
1221d4: b8 0a 00 00 00 mov $0xa,%eax
1221d9: eb d7 jmp 1221b2 <rtems_string_to_int+0x62>
1221db: 90 nop
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
1221dc: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi
1221e2: 74 f0 je 1221d4 <rtems_string_to_int+0x84>
1221e4: 81 fe 00 00 00 80 cmp $0x80000000,%esi
1221ea: 75 c2 jne 1221ae <rtems_string_to_int+0x5e><== NEVER TAKEN
1221ec: eb e6 jmp 1221d4 <rtems_string_to_int+0x84>
0011180c <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
11180c: 56 push %esi
11180d: 53 push %ebx
11180e: 83 ec 24 sub $0x24,%esp
111811: 8b 5c 24 34 mov 0x34(%esp),%ebx
long result;
char *end;
if ( !n )
111815: 85 db test %ebx,%ebx
111817: 74 67 je 111880 <rtems_string_to_long+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
111819: e8 f6 35 00 00 call 114e14 <__errno>
11181e: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
111824: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtol( s, &end, base );
11182a: 8b 44 24 3c mov 0x3c(%esp),%eax
11182e: 89 44 24 08 mov %eax,0x8(%esp)
111832: 8d 44 24 1c lea 0x1c(%esp),%eax
111836: 89 44 24 04 mov %eax,0x4(%esp)
11183a: 8b 44 24 30 mov 0x30(%esp),%eax
11183e: 89 04 24 mov %eax,(%esp)
111841: e8 86 64 00 00 call 117ccc <strtol>
111846: 89 c6 mov %eax,%esi
if ( endptr )
*endptr = end;
111848: 8b 54 24 1c mov 0x1c(%esp),%edx
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
11184c: 8b 44 24 38 mov 0x38(%esp),%eax
111850: 85 c0 test %eax,%eax
111852: 74 06 je 11185a <rtems_string_to_long+0x4e>
*endptr = end;
111854: 8b 44 24 38 mov 0x38(%esp),%eax
111858: 89 10 mov %edx,(%eax)
if ( end == s )
11185a: 39 54 24 30 cmp %edx,0x30(%esp)
11185e: 74 14 je 111874 <rtems_string_to_long+0x68>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111860: e8 af 35 00 00 call 114e14 <__errno>
111865: 83 38 22 cmpl $0x22,(%eax)
111868: 74 22 je 11188c <rtems_string_to_long+0x80>
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
11186a: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
11186c: 31 c0 xor %eax,%eax
}
11186e: 83 c4 24 add $0x24,%esp
111871: 5b pop %ebx
111872: 5e pop %esi
111873: c3 ret
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
111874: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
111879: 83 c4 24 add $0x24,%esp
11187c: 5b pop %ebx
11187d: 5e pop %esi
11187e: c3 ret
11187f: 90 nop
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
111880: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
111885: 83 c4 24 add $0x24,%esp
111888: 5b pop %ebx
111889: 5e pop %esi
11188a: c3 ret
11188b: 90 nop
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
11188c: 85 f6 test %esi,%esi
11188e: 75 08 jne 111898 <rtems_string_to_long+0x8c><== ALWAYS TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
111890: b8 0a 00 00 00 mov $0xa,%eax
111895: eb d7 jmp 11186e <rtems_string_to_long+0x62>
111897: 90 nop
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
111898: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi
11189e: 74 f0 je 111890 <rtems_string_to_long+0x84>
1118a0: 81 fe 00 00 00 80 cmp $0x80000000,%esi
1118a6: 75 c2 jne 11186a <rtems_string_to_long+0x5e><== NEVER TAKEN
1118a8: eb e6 jmp 111890 <rtems_string_to_long+0x84>
0011174c <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
11174c: 56 push %esi
11174d: 53 push %ebx
11174e: 83 ec 34 sub $0x34,%esp
111751: 8b 5c 24 44 mov 0x44(%esp),%ebx
long long result;
char *end;
if ( !n )
111755: 85 db test %ebx,%ebx
111757: 74 7b je 1117d4 <rtems_string_to_long_long+0x88>
return RTEMS_INVALID_ADDRESS;
errno = 0;
111759: e8 b6 36 00 00 call 114e14 <__errno>
11175e: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
111764: c7 03 00 00 00 00 movl $0x0,(%ebx)
11176a: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtoll( s, &end, base );
111771: 8b 44 24 4c mov 0x4c(%esp),%eax
111775: 89 44 24 08 mov %eax,0x8(%esp)
111779: 8d 44 24 2c lea 0x2c(%esp),%eax
11177d: 89 44 24 04 mov %eax,0x4(%esp)
111781: 8b 44 24 40 mov 0x40(%esp),%eax
111785: 89 04 24 mov %eax,(%esp)
111788: e8 6b 65 00 00 call 117cf8 <strtoll>
11178d: 89 c6 mov %eax,%esi
if ( endptr )
*endptr = end;
11178f: 8b 4c 24 2c mov 0x2c(%esp),%ecx
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
if ( endptr )
111793: 8b 44 24 48 mov 0x48(%esp),%eax
111797: 85 c0 test %eax,%eax
111799: 74 06 je 1117a1 <rtems_string_to_long_long+0x55>
*endptr = end;
11179b: 8b 44 24 48 mov 0x48(%esp),%eax
11179f: 89 08 mov %ecx,(%eax)
if ( end == s )
1117a1: 39 4c 24 40 cmp %ecx,0x40(%esp)
1117a5: 74 21 je 1117c8 <rtems_string_to_long_long+0x7c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1117a7: 89 54 24 1c mov %edx,0x1c(%esp)
1117ab: e8 64 36 00 00 call 114e14 <__errno>
1117b0: 83 38 22 cmpl $0x22,(%eax)
1117b3: 8b 54 24 1c mov 0x1c(%esp),%edx
1117b7: 74 27 je 1117e0 <rtems_string_to_long_long+0x94>
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
1117b9: 89 33 mov %esi,(%ebx)
1117bb: 89 53 04 mov %edx,0x4(%ebx)
return RTEMS_SUCCESSFUL;
1117be: 31 c0 xor %eax,%eax
}
1117c0: 83 c4 34 add $0x34,%esp
1117c3: 5b pop %ebx
1117c4: 5e pop %esi
1117c5: c3 ret
1117c6: 66 90 xchg %ax,%ax
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
1117c8: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
1117cd: 83 c4 34 add $0x34,%esp
1117d0: 5b pop %ebx
1117d1: 5e pop %esi
1117d2: c3 ret
1117d3: 90 nop
{
long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
1117d4: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
1117d9: 83 c4 34 add $0x34,%esp
1117dc: 5b pop %ebx
1117dd: 5e pop %esi
1117de: c3 ret
1117df: 90 nop
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1117e0: 89 d0 mov %edx,%eax
1117e2: 09 f0 or %esi,%eax
1117e4: 75 0a jne 1117f0 <rtems_string_to_long_long+0xa4><== ALWAYS TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
1117e6: b8 0a 00 00 00 mov $0xa,%eax
1117eb: eb d3 jmp 1117c0 <rtems_string_to_long_long+0x74>
1117ed: 8d 76 00 lea 0x0(%esi),%esi
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
1117f0: 89 d1 mov %edx,%ecx
1117f2: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx
1117f8: 89 f0 mov %esi,%eax
1117fa: f7 d0 not %eax
1117fc: 09 c1 or %eax,%ecx
1117fe: 74 e6 je 1117e6 <rtems_string_to_long_long+0x9a>
111800: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax
111806: 09 f0 or %esi,%eax
111808: 75 af jne 1117b9 <rtems_string_to_long_long+0x6d><== NEVER TAKEN
11180a: eb da jmp 1117e6 <rtems_string_to_long_long+0x9a>
0012221c <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
12221c: 56 push %esi
12221d: 53 push %ebx
12221e: 83 ec 24 sub $0x24,%esp
122221: 8b 5c 24 34 mov 0x34(%esp),%ebx
unsigned long result;
char *end;
if ( !n )
122225: 85 db test %ebx,%ebx
122227: 74 6f je 122298 <rtems_string_to_unsigned_char+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
122229: e8 62 9f 01 00 call 13c190 <__errno>
12222e: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
122234: c6 03 00 movb $0x0,(%ebx)
result = strtoul( s, &end, base );
122237: 8b 44 24 3c mov 0x3c(%esp),%eax
12223b: 89 44 24 08 mov %eax,0x8(%esp)
12223f: 8d 44 24 1c lea 0x1c(%esp),%eax
122243: 89 44 24 04 mov %eax,0x4(%esp)
122247: 8b 44 24 30 mov 0x30(%esp),%eax
12224b: 89 04 24 mov %eax,(%esp)
12224e: e8 f5 1b 02 00 call 143e48 <strtoul>
122253: 89 c6 mov %eax,%esi
if ( endptr )
*endptr = end;
122255: 8b 54 24 1c mov 0x1c(%esp),%edx
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
122259: 8b 44 24 38 mov 0x38(%esp),%eax
12225d: 85 c0 test %eax,%eax
12225f: 74 06 je 122267 <rtems_string_to_unsigned_char+0x4b>
*endptr = end;
122261: 8b 44 24 38 mov 0x38(%esp),%eax
122265: 89 10 mov %edx,(%eax)
if ( end == s )
122267: 39 54 24 30 cmp %edx,0x30(%esp)
12226b: 74 1f je 12228c <rtems_string_to_unsigned_char+0x70>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
12226d: e8 1e 9f 01 00 call 13c190 <__errno>
122272: 83 38 22 cmpl $0x22,(%eax)
122275: 74 45 je 1222bc <rtems_string_to_unsigned_char+0xa0>
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
122277: 81 fe ff 00 00 00 cmp $0xff,%esi
12227d: 77 25 ja 1222a4 <rtems_string_to_unsigned_char+0x88>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
12227f: 89 f0 mov %esi,%eax
122281: 88 03 mov %al,(%ebx)
return RTEMS_SUCCESSFUL;
122283: 31 c0 xor %eax,%eax
}
122285: 83 c4 24 add $0x24,%esp
122288: 5b pop %ebx
122289: 5e pop %esi
12228a: c3 ret
12228b: 90 nop
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
12228c: b8 0b 00 00 00 mov $0xb,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
122291: 83 c4 24 add $0x24,%esp
122294: 5b pop %ebx
122295: 5e pop %esi
122296: c3 ret
122297: 90 nop
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
122298: b8 09 00 00 00 mov $0x9,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
12229d: 83 c4 24 add $0x24,%esp
1222a0: 5b pop %ebx
1222a1: 5e pop %esi
1222a2: c3 ret
1222a3: 90 nop
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
1222a4: e8 e7 9e 01 00 call 13c190 <__errno>
1222a9: c7 00 22 00 00 00 movl $0x22,(%eax)
return RTEMS_INVALID_NUMBER;
1222af: b8 0a 00 00 00 mov $0xa,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
1222b4: 83 c4 24 add $0x24,%esp
1222b7: 5b pop %ebx
1222b8: 5e pop %esi
1222b9: c3 ret
1222ba: 66 90 xchg %ax,%ax
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
1222bc: 8d 46 ff lea -0x1(%esi),%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1222bf: 83 f8 fd cmp $0xfffffffd,%eax
1222c2: 76 b3 jbe 122277 <rtems_string_to_unsigned_char+0x5b><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
1222c4: b8 0a 00 00 00 mov $0xa,%eax
1222c9: eb c6 jmp 122291 <rtems_string_to_unsigned_char+0x75>
00111988 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
111988: 56 push %esi
111989: 53 push %ebx
11198a: 83 ec 24 sub $0x24,%esp
11198d: 8b 5c 24 34 mov 0x34(%esp),%ebx
unsigned long result;
char *end;
if ( !n )
111991: 85 db test %ebx,%ebx
111993: 74 67 je 1119fc <rtems_string_to_unsigned_int+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
111995: e8 7a 34 00 00 call 114e14 <__errno>
11199a: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
1119a0: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtoul( s, &end, base );
1119a6: 8b 44 24 3c mov 0x3c(%esp),%eax
1119aa: 89 44 24 08 mov %eax,0x8(%esp)
1119ae: 8d 44 24 1c lea 0x1c(%esp),%eax
1119b2: 89 44 24 04 mov %eax,0x4(%esp)
1119b6: 8b 44 24 30 mov 0x30(%esp),%eax
1119ba: 89 04 24 mov %eax,(%esp)
1119bd: e8 86 68 00 00 call 118248 <strtoul>
1119c2: 89 c6 mov %eax,%esi
if ( endptr )
*endptr = end;
1119c4: 8b 54 24 1c mov 0x1c(%esp),%edx
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
1119c8: 8b 44 24 38 mov 0x38(%esp),%eax
1119cc: 85 c0 test %eax,%eax
1119ce: 74 06 je 1119d6 <rtems_string_to_unsigned_int+0x4e>
*endptr = end;
1119d0: 8b 44 24 38 mov 0x38(%esp),%eax
1119d4: 89 10 mov %edx,(%eax)
if ( end == s )
1119d6: 39 54 24 30 cmp %edx,0x30(%esp)
1119da: 74 14 je 1119f0 <rtems_string_to_unsigned_int+0x68>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1119dc: e8 33 34 00 00 call 114e14 <__errno>
1119e1: 83 38 22 cmpl $0x22,(%eax)
1119e4: 74 22 je 111a08 <rtems_string_to_unsigned_int+0x80>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
1119e6: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
1119e8: 31 c0 xor %eax,%eax
}
1119ea: 83 c4 24 add $0x24,%esp
1119ed: 5b pop %ebx
1119ee: 5e pop %esi
1119ef: c3 ret
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
1119f0: b8 0b 00 00 00 mov $0xb,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
1119f5: 83 c4 24 add $0x24,%esp
1119f8: 5b pop %ebx
1119f9: 5e pop %esi
1119fa: c3 ret
1119fb: 90 nop
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
1119fc: b8 09 00 00 00 mov $0x9,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
111a01: 83 c4 24 add $0x24,%esp
111a04: 5b pop %ebx
111a05: 5e pop %esi
111a06: c3 ret
111a07: 90 nop
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
111a08: 8d 46 ff lea -0x1(%esi),%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111a0b: 83 f8 fd cmp $0xfffffffd,%eax
111a0e: 76 d6 jbe 1119e6 <rtems_string_to_unsigned_int+0x5e><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
111a10: b8 0a 00 00 00 mov $0xa,%eax
111a15: eb d3 jmp 1119ea <rtems_string_to_unsigned_int+0x62>
0010f7a4 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
10f7a4: 56 push %esi
10f7a5: 53 push %ebx
10f7a6: 83 ec 24 sub $0x24,%esp
10f7a9: 8b 5c 24 34 mov 0x34(%esp),%ebx
unsigned long result;
char *end;
if ( !n )
10f7ad: 85 db test %ebx,%ebx
10f7af: 74 67 je 10f818 <rtems_string_to_unsigned_long+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f7b1: e8 da c9 02 00 call 13c190 <__errno>
10f7b6: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f7bc: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtoul( s, &end, base );
10f7c2: 8b 44 24 3c mov 0x3c(%esp),%eax
10f7c6: 89 44 24 08 mov %eax,0x8(%esp)
10f7ca: 8d 44 24 1c lea 0x1c(%esp),%eax
10f7ce: 89 44 24 04 mov %eax,0x4(%esp)
10f7d2: 8b 44 24 30 mov 0x30(%esp),%eax
10f7d6: 89 04 24 mov %eax,(%esp)
10f7d9: e8 6a 46 03 00 call 143e48 <strtoul>
10f7de: 89 c6 mov %eax,%esi
if ( endptr )
*endptr = end;
10f7e0: 8b 54 24 1c mov 0x1c(%esp),%edx
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
10f7e4: 8b 44 24 38 mov 0x38(%esp),%eax
10f7e8: 85 c0 test %eax,%eax
10f7ea: 74 06 je 10f7f2 <rtems_string_to_unsigned_long+0x4e>
*endptr = end;
10f7ec: 8b 44 24 38 mov 0x38(%esp),%eax
10f7f0: 89 10 mov %edx,(%eax)
if ( end == s )
10f7f2: 39 54 24 30 cmp %edx,0x30(%esp)
10f7f6: 74 14 je 10f80c <rtems_string_to_unsigned_long+0x68>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10f7f8: e8 93 c9 02 00 call 13c190 <__errno>
10f7fd: 83 38 22 cmpl $0x22,(%eax)
10f800: 74 22 je 10f824 <rtems_string_to_unsigned_long+0x80>
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
10f802: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
10f804: 31 c0 xor %eax,%eax
}
10f806: 83 c4 24 add $0x24,%esp
10f809: 5b pop %ebx
10f80a: 5e pop %esi
10f80b: c3 ret
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
10f80c: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
10f811: 83 c4 24 add $0x24,%esp
10f814: 5b pop %ebx
10f815: 5e pop %esi
10f816: c3 ret
10f817: 90 nop
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10f818: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
10f81d: 83 c4 24 add $0x24,%esp
10f820: 5b pop %ebx
10f821: 5e pop %esi
10f822: c3 ret
10f823: 90 nop
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
10f824: 8d 46 ff lea -0x1(%esi),%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10f827: 83 f8 fd cmp $0xfffffffd,%eax
10f82a: 76 d6 jbe 10f802 <rtems_string_to_unsigned_long+0x5e><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
10f82c: b8 0a 00 00 00 mov $0xa,%eax
10f831: eb d3 jmp 10f806 <rtems_string_to_unsigned_long+0x62>
00111a18 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
111a18: 57 push %edi
111a19: 56 push %esi
111a1a: 53 push %ebx
111a1b: 83 ec 20 sub $0x20,%esp
111a1e: 8b 5c 24 34 mov 0x34(%esp),%ebx
unsigned long long result;
char *end;
if ( !n )
111a22: 85 db test %ebx,%ebx
111a24: 74 76 je 111a9c <rtems_string_to_unsigned_long_long+0x84>
return RTEMS_INVALID_ADDRESS;
errno = 0;
111a26: e8 e9 33 00 00 call 114e14 <__errno>
111a2b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
111a31: c7 03 00 00 00 00 movl $0x0,(%ebx)
111a37: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtoull( s, &end, base );
111a3e: 8b 44 24 3c mov 0x3c(%esp),%eax
111a42: 89 44 24 08 mov %eax,0x8(%esp)
111a46: 8d 44 24 1c lea 0x1c(%esp),%eax
111a4a: 89 44 24 04 mov %eax,0x4(%esp)
111a4e: 8b 44 24 30 mov 0x30(%esp),%eax
111a52: 89 04 24 mov %eax,(%esp)
111a55: e8 1a 68 00 00 call 118274 <strtoull>
111a5a: 89 c6 mov %eax,%esi
111a5c: 89 d7 mov %edx,%edi
if ( endptr )
*endptr = end;
111a5e: 8b 44 24 1c mov 0x1c(%esp),%eax
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
if ( endptr )
111a62: 8b 54 24 38 mov 0x38(%esp),%edx
111a66: 85 d2 test %edx,%edx
111a68: 74 06 je 111a70 <rtems_string_to_unsigned_long_long+0x58>
*endptr = end;
111a6a: 8b 54 24 38 mov 0x38(%esp),%edx
111a6e: 89 02 mov %eax,(%edx)
if ( end == s )
111a70: 39 44 24 30 cmp %eax,0x30(%esp)
111a74: 74 1a je 111a90 <rtems_string_to_unsigned_long_long+0x78>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111a76: e8 99 33 00 00 call 114e14 <__errno>
111a7b: 83 38 22 cmpl $0x22,(%eax)
111a7e: 74 28 je 111aa8 <rtems_string_to_unsigned_long_long+0x90>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
111a80: 89 33 mov %esi,(%ebx)
111a82: 89 7b 04 mov %edi,0x4(%ebx)
return RTEMS_SUCCESSFUL;
111a85: 31 c0 xor %eax,%eax
}
111a87: 83 c4 20 add $0x20,%esp
111a8a: 5b pop %ebx
111a8b: 5e pop %esi
111a8c: 5f pop %edi
111a8d: c3 ret
111a8e: 66 90 xchg %ax,%ax
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
111a90: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
111a95: 83 c4 20 add $0x20,%esp
111a98: 5b pop %ebx
111a99: 5e pop %esi
111a9a: 5f pop %edi
111a9b: c3 ret
{
unsigned long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
111a9c: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
111aa1: 83 c4 20 add $0x20,%esp
111aa4: 5b pop %ebx
111aa5: 5e pop %esi
111aa6: 5f pop %edi
111aa7: c3 ret
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
111aa8: 89 f0 mov %esi,%eax
111aaa: 89 fa mov %edi,%edx
111aac: 83 c0 ff add $0xffffffff,%eax
111aaf: 83 d2 ff adc $0xffffffff,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111ab2: 83 fa ff cmp $0xffffffff,%edx
111ab5: 72 c9 jb 111a80 <rtems_string_to_unsigned_long_long+0x68><== NEVER TAKEN
111ab7: 83 f8 fd cmp $0xfffffffd,%eax
111aba: 76 c4 jbe 111a80 <rtems_string_to_unsigned_long_long+0x68><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
111abc: b8 0a 00 00 00 mov $0xa,%eax
111ac1: eb c4 jmp 111a87 <rtems_string_to_unsigned_long_long+0x6f>
001136e4 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
1136e4: 55 push %ebp
1136e5: 57 push %edi
1136e6: 56 push %esi
1136e7: 53 push %ebx
1136e8: 83 ec 0c sub $0xc,%esp
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
1136eb: 8b 4c 24 28 mov 0x28(%esp),%ecx
1136ef: 85 c9 test %ecx,%ecx
1136f1: 0f 84 25 01 00 00 je 11381c <rtems_task_mode+0x138>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
1136f7: 8b 35 cc 24 13 00 mov 0x1324cc,%esi
api = executing->API_Extensions[ THREAD_API_RTEMS ];
1136fd: 8b 9e e4 00 00 00 mov 0xe4(%esi),%ebx
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
113703: 80 7e 70 01 cmpb $0x1,0x70(%esi)
113707: 19 ff sbb %edi,%edi
113709: 81 e7 00 01 00 00 and $0x100,%edi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
11370f: 8b 56 78 mov 0x78(%esi),%edx
113712: 85 d2 test %edx,%edx
113714: 0f 85 f6 00 00 00 jne 113810 <rtems_task_mode+0x12c>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
11371a: 80 7b 08 01 cmpb $0x1,0x8(%ebx)
11371e: 19 ed sbb %ebp,%ebp
113720: 81 e5 00 04 00 00 and $0x400,%ebp
old_mode |= _ISR_Get_level();
113726: e8 c1 b9 ff ff call 10f0ec <_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;
11372b: 09 e8 or %ebp,%eax
old_mode |= _ISR_Get_level();
11372d: 09 f8 or %edi,%eax
11372f: 8b 54 24 28 mov 0x28(%esp),%edx
113733: 89 02 mov %eax,(%edx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
113735: f7 44 24 24 00 01 00 testl $0x100,0x24(%esp)
11373c: 00
11373d: 74 10 je 11374f <rtems_task_mode+0x6b>
11373f: 8b 44 24 20 mov 0x20(%esp),%eax
113743: c1 e8 08 shr $0x8,%eax
113746: 83 f0 01 xor $0x1,%eax
113749: 83 e0 01 and $0x1,%eax
11374c: 88 46 70 mov %al,0x70(%esi)
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
11374f: f7 44 24 24 00 02 00 testl $0x200,0x24(%esp)
113756: 00
113757: 74 1d je 113776 <rtems_task_mode+0x92>
if ( _Modes_Is_timeslice(mode_set) ) {
113759: f7 44 24 20 00 02 00 testl $0x200,0x20(%esp)
113760: 00
113761: 0f 84 c5 00 00 00 je 11382c <rtems_task_mode+0x148>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
113767: c7 46 78 01 00 00 00 movl $0x1,0x78(%esi)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
11376e: a1 18 1f 13 00 mov 0x131f18,%eax
113773: 89 46 74 mov %eax,0x74(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
113776: f6 44 24 24 01 testb $0x1,0x24(%esp)
11377b: 74 0c je 113789 <rtems_task_mode+0xa5>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
11377d: f6 44 24 20 01 testb $0x1,0x20(%esp)
113782: 0f 84 bc 00 00 00 je 113844 <rtems_task_mode+0x160>
113788: fa cli
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
113789: f7 44 24 24 00 04 00 testl $0x400,0x24(%esp)
113790: 00
113791: 74 41 je 1137d4 <rtems_task_mode+0xf0>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
113793: 8b 44 24 20 mov 0x20(%esp),%eax
113797: c1 e8 0a shr $0xa,%eax
11379a: 83 f0 01 xor $0x1,%eax
11379d: 83 e0 01 and $0x1,%eax
if ( is_asr_enabled != asr->is_enabled ) {
1137a0: 38 43 08 cmp %al,0x8(%ebx)
1137a3: 74 2f je 1137d4 <rtems_task_mode+0xf0>
asr->is_enabled = is_asr_enabled;
1137a5: 88 43 08 mov %al,0x8(%ebx)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
1137a8: 9c pushf
1137a9: fa cli
1137aa: 58 pop %eax
_signals = information->signals_pending;
1137ab: 8b 4b 18 mov 0x18(%ebx),%ecx
information->signals_pending = information->signals_posted;
1137ae: 8b 53 14 mov 0x14(%ebx),%edx
1137b1: 89 53 18 mov %edx,0x18(%ebx)
information->signals_posted = _signals;
1137b4: 89 4b 14 mov %ecx,0x14(%ebx)
_ISR_Enable( _level );
1137b7: 50 push %eax
1137b8: 9d popf
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
1137b9: 8b 43 14 mov 0x14(%ebx),%eax
1137bc: 85 c0 test %eax,%eax
1137be: 0f 95 c0 setne %al
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
1137c1: 83 3d a0 20 13 00 03 cmpl $0x3,0x1320a0
1137c8: 74 15 je 1137df <rtems_task_mode+0xfb> <== ALWAYS TAKEN
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
1137ca: 31 c0 xor %eax,%eax
}
1137cc: 83 c4 0c add $0xc,%esp
1137cf: 5b pop %ebx
1137d0: 5e pop %esi
1137d1: 5f pop %edi
1137d2: 5d pop %ebp
1137d3: c3 ret
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
1137d4: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
1137d6: 83 3d a0 20 13 00 03 cmpl $0x3,0x1320a0
1137dd: 75 eb jne 1137ca <rtems_task_mode+0xe6>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
1137df: 8b 15 cc 24 13 00 mov 0x1324cc,%edx
if ( are_signals_pending ||
1137e5: 84 c0 test %al,%al
1137e7: 75 0e jne 1137f7 <rtems_task_mode+0x113>
1137e9: 3b 15 d0 24 13 00 cmp 0x1324d0,%edx
1137ef: 74 d9 je 1137ca <rtems_task_mode+0xe6>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
1137f1: 80 7a 70 00 cmpb $0x0,0x70(%edx)
1137f5: 74 d3 je 1137ca <rtems_task_mode+0xe6> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
1137f7: c6 05 d8 24 13 00 01 movb $0x1,0x1324d8
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
1137fe: e8 bd a4 ff ff call 10dcc0 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
113803: 31 c0 xor %eax,%eax
}
113805: 83 c4 0c add $0xc,%esp
113808: 5b pop %ebx
113809: 5e pop %esi
11380a: 5f pop %edi
11380b: 5d pop %ebp
11380c: c3 ret
11380d: 8d 76 00 lea 0x0(%esi),%esi
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
113810: 81 cf 00 02 00 00 or $0x200,%edi
113816: e9 ff fe ff ff jmp 11371a <rtems_task_mode+0x36>
11381b: 90 nop
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
11381c: b8 09 00 00 00 mov $0x9,%eax
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
113821: 83 c4 0c add $0xc,%esp
113824: 5b pop %ebx
113825: 5e pop %esi
113826: 5f pop %edi
113827: 5d pop %ebp
113828: c3 ret
113829: 8d 76 00 lea 0x0(%esi),%esi
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
11382c: c7 46 78 00 00 00 00 movl $0x0,0x78(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
113833: f6 44 24 24 01 testb $0x1,0x24(%esp)
113838: 0f 84 4b ff ff ff je 113789 <rtems_task_mode+0xa5>
11383e: e9 3a ff ff ff jmp 11377d <rtems_task_mode+0x99>
113843: 90 nop
113844: fb sti
113845: e9 3f ff ff ff jmp 113789 <rtems_task_mode+0xa5>
0010f99c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10f99c: 53 push %ebx
10f99d: 83 ec 28 sub $0x28,%esp
10f9a0: 8b 5c 24 34 mov 0x34(%esp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10f9a4: 85 db test %ebx,%ebx
10f9a6: 74 0b je 10f9b3 <rtems_task_set_priority+0x17>
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 ) );
10f9a8: 0f b6 05 ac 26 13 00 movzbl 0x1326ac,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10f9af: 39 c3 cmp %eax,%ebx
10f9b1: 77 79 ja 10fa2c <rtems_task_set_priority+0x90>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10f9b3: 8b 44 24 38 mov 0x38(%esp),%eax
10f9b7: 85 c0 test %eax,%eax
10f9b9: 74 59 je 10fa14 <rtems_task_set_priority+0x78>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10f9bb: 8d 44 24 1c lea 0x1c(%esp),%eax
10f9bf: 89 44 24 04 mov %eax,0x4(%esp)
10f9c3: 8b 44 24 30 mov 0x30(%esp),%eax
10f9c7: 89 04 24 mov %eax,(%esp)
10f9ca: e8 6d 21 00 00 call 111b3c <_Thread_Get>
switch ( location ) {
10f9cf: 8b 4c 24 1c mov 0x1c(%esp),%ecx
10f9d3: 85 c9 test %ecx,%ecx
10f9d5: 75 49 jne 10fa20 <rtems_task_set_priority+0x84>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10f9d7: 8b 50 14 mov 0x14(%eax),%edx
10f9da: 8b 4c 24 38 mov 0x38(%esp),%ecx
10f9de: 89 11 mov %edx,(%ecx)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10f9e0: 85 db test %ebx,%ebx
10f9e2: 74 23 je 10fa07 <rtems_task_set_priority+0x6b>
the_thread->real_priority = new_priority;
10f9e4: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10f9e7: 8b 50 1c mov 0x1c(%eax),%edx
10f9ea: 85 d2 test %edx,%edx
10f9ec: 74 05 je 10f9f3 <rtems_task_set_priority+0x57>
10f9ee: 3b 58 14 cmp 0x14(%eax),%ebx
10f9f1: 73 14 jae 10fa07 <rtems_task_set_priority+0x6b><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10f9f3: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10f9fa: 00
10f9fb: 89 5c 24 04 mov %ebx,0x4(%esp)
10f9ff: 89 04 24 mov %eax,(%esp)
10fa02: e8 a9 1c 00 00 call 1116b0 <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
10fa07: e8 10 21 00 00 call 111b1c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10fa0c: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa0e: 83 c4 28 add $0x28,%esp
10fa11: 5b pop %ebx
10fa12: c3 ret
10fa13: 90 nop
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10fa14: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa19: 83 c4 28 add $0x28,%esp
10fa1c: 5b pop %ebx
10fa1d: c3 ret
10fa1e: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10fa20: b8 04 00 00 00 mov $0x4,%eax
}
10fa25: 83 c4 28 add $0x28,%esp
10fa28: 5b pop %ebx
10fa29: c3 ret
10fa2a: 66 90 xchg %ax,%ax
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10fa2c: b8 13 00 00 00 mov $0x13,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa31: 83 c4 28 add $0x28,%esp
10fa34: 5b pop %ebx
10fa35: c3 ret
00107c60 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
107c60: 53 push %ebx
107c61: 83 ec 28 sub $0x28,%esp
107c64: 8b 5c 24 34 mov 0x34(%esp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
107c68: 85 db test %ebx,%ebx
107c6a: 74 58 je 107cc4 <rtems_task_variable_delete+0x64>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
107c6c: 8d 44 24 1c lea 0x1c(%esp),%eax
107c70: 89 44 24 04 mov %eax,0x4(%esp)
107c74: 8b 44 24 30 mov 0x30(%esp),%eax
107c78: 89 04 24 mov %eax,(%esp)
107c7b: e8 cc 1c 00 00 call 10994c <_Thread_Get>
switch (location) {
107c80: 8b 54 24 1c mov 0x1c(%esp),%edx
107c84: 85 d2 test %edx,%edx
107c86: 75 30 jne 107cb8 <rtems_task_variable_delete+0x58>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
107c88: 8b 88 f0 00 00 00 mov 0xf0(%eax),%ecx
while (tvp) {
107c8e: 85 c9 test %ecx,%ecx
107c90: 74 17 je 107ca9 <rtems_task_variable_delete+0x49>
if (tvp->ptr == ptr) {
107c92: 39 59 04 cmp %ebx,0x4(%ecx)
107c95: 75 0c jne 107ca3 <rtems_task_variable_delete+0x43>
107c97: eb 50 jmp 107ce9 <rtems_task_variable_delete+0x89>
107c99: 8d 76 00 lea 0x0(%esi),%esi
107c9c: 39 5a 04 cmp %ebx,0x4(%edx)
107c9f: 74 2f je 107cd0 <rtems_task_variable_delete+0x70>
107ca1: 89 d1 mov %edx,%ecx
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
107ca3: 8b 11 mov (%ecx),%edx
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
107ca5: 85 d2 test %edx,%edx
107ca7: 75 f3 jne 107c9c <rtems_task_variable_delete+0x3c><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
107ca9: e8 7e 1c 00 00 call 10992c <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
107cae: b8 09 00 00 00 mov $0x9,%eax
107cb3: eb 08 jmp 107cbd <rtems_task_variable_delete+0x5d>
107cb5: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
107cb8: b8 04 00 00 00 mov $0x4,%eax
}
107cbd: 83 c4 28 add $0x28,%esp
107cc0: 5b pop %ebx
107cc1: c3 ret
107cc2: 66 90 xchg %ax,%ax
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
107cc4: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
107cc9: 83 c4 28 add $0x28,%esp
107ccc: 5b pop %ebx
107ccd: c3 ret
107cce: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
107cd0: 8b 1a mov (%edx),%ebx
107cd2: 89 19 mov %ebx,(%ecx)
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
107cd4: 89 54 24 04 mov %edx,0x4(%esp)
107cd8: 89 04 24 mov %eax,(%esp)
107cdb: e8 98 00 00 00 call 107d78 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
107ce0: e8 47 1c 00 00 call 10992c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
107ce5: 31 c0 xor %eax,%eax
107ce7: eb d4 jmp 107cbd <rtems_task_variable_delete+0x5d>
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
107ce9: 8b 11 mov (%ecx),%edx
107ceb: 89 90 f0 00 00 00 mov %edx,0xf0(%eax)
107cf1: 89 ca mov %ecx,%edx
107cf3: eb df jmp 107cd4 <rtems_task_variable_delete+0x74>
00107cf8 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
107cf8: 53 push %ebx
107cf9: 83 ec 28 sub $0x28,%esp
107cfc: 8b 5c 24 34 mov 0x34(%esp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
107d00: 85 db test %ebx,%ebx
107d02: 74 50 je 107d54 <rtems_task_variable_get+0x5c>
return RTEMS_INVALID_ADDRESS;
if ( !result )
107d04: 8b 4c 24 38 mov 0x38(%esp),%ecx
107d08: 85 c9 test %ecx,%ecx
107d0a: 74 48 je 107d54 <rtems_task_variable_get+0x5c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
107d0c: 8d 44 24 1c lea 0x1c(%esp),%eax
107d10: 89 44 24 04 mov %eax,0x4(%esp)
107d14: 8b 44 24 30 mov 0x30(%esp),%eax
107d18: 89 04 24 mov %eax,(%esp)
107d1b: e8 2c 1c 00 00 call 10994c <_Thread_Get>
switch (location) {
107d20: 8b 54 24 1c mov 0x1c(%esp),%edx
107d24: 85 d2 test %edx,%edx
107d26: 75 38 jne 107d60 <rtems_task_variable_get+0x68>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
107d28: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax
while (tvp) {
107d2e: 85 c0 test %eax,%eax
107d30: 75 08 jne 107d3a <rtems_task_variable_get+0x42>
107d32: eb 38 jmp 107d6c <rtems_task_variable_get+0x74>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
107d34: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
107d36: 85 c0 test %eax,%eax
107d38: 74 32 je 107d6c <rtems_task_variable_get+0x74><== NEVER TAKEN
if (tvp->ptr == ptr) {
107d3a: 39 58 04 cmp %ebx,0x4(%eax)
107d3d: 75 f5 jne 107d34 <rtems_task_variable_get+0x3c>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
107d3f: 8b 40 0c mov 0xc(%eax),%eax
107d42: 8b 54 24 38 mov 0x38(%esp),%edx
107d46: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
107d48: e8 df 1b 00 00 call 10992c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
107d4d: 31 c0 xor %eax,%eax
107d4f: eb 08 jmp 107d59 <rtems_task_variable_get+0x61>
107d51: 8d 76 00 lea 0x0(%esi),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
107d54: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
107d59: 83 c4 28 add $0x28,%esp
107d5c: 5b pop %ebx
107d5d: c3 ret
107d5e: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
107d60: b8 04 00 00 00 mov $0x4,%eax
}
107d65: 83 c4 28 add $0x28,%esp
107d68: 5b pop %ebx
107d69: c3 ret
107d6a: 66 90 xchg %ax,%ax
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
107d6c: e8 bb 1b 00 00 call 10992c <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
107d71: b8 09 00 00 00 mov $0x9,%eax
107d76: eb e1 jmp 107d59 <rtems_task_variable_get+0x61>
0010a530 <rtems_termios_baud_to_index>:
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
10a530: 8b 44 24 04 mov 0x4(%esp),%eax
int baud_index;
switch (termios_baud) {
10a534: 83 f8 09 cmp $0x9,%eax
10a537: 0f 84 03 01 00 00 je 10a640 <rtems_termios_baud_to_index+0x110>
10a53d: 76 35 jbe 10a574 <rtems_termios_baud_to_index+0x44>
10a53f: 83 f8 0e cmp $0xe,%eax
10a542: 0f 84 08 01 00 00 je 10a650 <rtems_termios_baud_to_index+0x120>
10a548: 76 52 jbe 10a59c <rtems_termios_baud_to_index+0x6c>
10a54a: 3d 02 10 00 00 cmp $0x1002,%eax
10a54f: 0f 84 db 00 00 00 je 10a630 <rtems_termios_baud_to_index+0x100>
10a555: 0f 86 8d 00 00 00 jbe 10a5e8 <rtems_termios_baud_to_index+0xb8>
10a55b: 3d 03 10 00 00 cmp $0x1003,%eax
10a560: 0f 84 d2 00 00 00 je 10a638 <rtems_termios_baud_to_index+0x108>
10a566: 3d 04 10 00 00 cmp $0x1004,%eax
10a56b: 75 60 jne 10a5cd <rtems_termios_baud_to_index+0x9d>
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
10a56d: b8 13 00 00 00 mov $0x13,%eax
10a572: c3 ret
10a573: 90 nop
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a574: 83 f8 04 cmp $0x4,%eax
10a577: 0f 84 cb 00 00 00 je 10a648 <rtems_termios_baud_to_index+0x118>
10a57d: 76 3d jbe 10a5bc <rtems_termios_baud_to_index+0x8c>
10a57f: 83 f8 06 cmp $0x6,%eax
10a582: 74 7c je 10a600 <rtems_termios_baud_to_index+0xd0>
10a584: 72 4e jb 10a5d4 <rtems_termios_baud_to_index+0xa4>
10a586: 83 f8 07 cmp $0x7,%eax
10a589: 0f 84 89 00 00 00 je 10a618 <rtems_termios_baud_to_index+0xe8>
10a58f: 83 f8 08 cmp $0x8,%eax
10a592: 75 39 jne 10a5cd <rtems_termios_baud_to_index+0x9d><== NEVER TAKEN
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
10a594: b8 08 00 00 00 mov $0x8,%eax
10a599: c3 ret
10a59a: 66 90 xchg %ax,%ax
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a59c: 83 f8 0b cmp $0xb,%eax
10a59f: 0f 84 83 00 00 00 je 10a628 <rtems_termios_baud_to_index+0xf8>
10a5a5: 72 39 jb 10a5e0 <rtems_termios_baud_to_index+0xb0>
10a5a7: 83 f8 0c cmp $0xc,%eax
10a5aa: 0f 84 a8 00 00 00 je 10a658 <rtems_termios_baud_to_index+0x128>
10a5b0: 83 f8 0d cmp $0xd,%eax
10a5b3: 75 18 jne 10a5cd <rtems_termios_baud_to_index+0x9d><== NEVER TAKEN
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
10a5b5: b8 0d 00 00 00 mov $0xd,%eax
10a5ba: c3 ret
10a5bb: 90 nop
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a5bc: 83 f8 01 cmp $0x1,%eax
10a5bf: 74 5f je 10a620 <rtems_termios_baud_to_index+0xf0>
10a5c1: 72 19 jb 10a5dc <rtems_termios_baud_to_index+0xac>
10a5c3: 83 f8 02 cmp $0x2,%eax
10a5c6: 74 48 je 10a610 <rtems_termios_baud_to_index+0xe0>
10a5c8: 83 f8 03 cmp $0x3,%eax
10a5cb: 74 2d je 10a5fa <rtems_termios_baud_to_index+0xca><== ALWAYS TAKEN
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
10a5cd: b8 ff ff ff ff mov $0xffffffff,%eax
10a5d2: c3 ret
10a5d3: 90 nop
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;
10a5d4: b8 05 00 00 00 mov $0x5,%eax
10a5d9: c3 ret
10a5da: 66 90 xchg %ax,%ax
)
{
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
10a5dc: 31 c0 xor %eax,%eax
10a5de: c3 ret
10a5df: 90 nop
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;
10a5e0: b8 0a 00 00 00 mov $0xa,%eax
10a5e5: c3 ret
10a5e6: 66 90 xchg %ax,%ax
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a5e8: 83 f8 0f cmp $0xf,%eax
10a5eb: 74 1b je 10a608 <rtems_termios_baud_to_index+0xd8>
10a5ed: 3d 01 10 00 00 cmp $0x1001,%eax
10a5f2: 75 d9 jne 10a5cd <rtems_termios_baud_to_index+0x9d><== NEVER TAKEN
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
10a5f4: b8 10 00 00 00 mov $0x10,%eax
10a5f9: c3 ret
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
10a5fa: b8 03 00 00 00 mov $0x3,%eax
10a5ff: c3 ret
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
10a600: b8 06 00 00 00 mov $0x6,%eax
10a605: c3 ret
10a606: 66 90 xchg %ax,%ax
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
10a608: b8 0f 00 00 00 mov $0xf,%eax
10a60d: c3 ret
10a60e: 66 90 xchg %ax,%ax
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
10a610: b8 02 00 00 00 mov $0x2,%eax
10a615: c3 ret
10a616: 66 90 xchg %ax,%ax
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
10a618: b8 07 00 00 00 mov $0x7,%eax
10a61d: c3 ret
10a61e: 66 90 xchg %ax,%ax
{
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
10a620: b8 01 00 00 00 mov $0x1,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a625: c3 ret
10a626: 66 90 xchg %ax,%ax
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;
case B2400: baud_index = 11; break;
10a628: b8 0b 00 00 00 mov $0xb,%eax
10a62d: c3 ret
10a62e: 66 90 xchg %ax,%ax
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
10a630: b8 11 00 00 00 mov $0x11,%eax
10a635: c3 ret
10a636: 66 90 xchg %ax,%ax
case B230400: baud_index = 18; break;
10a638: b8 12 00 00 00 mov $0x12,%eax
10a63d: c3 ret
10a63e: 66 90 xchg %ax,%ax
case B134: baud_index = 4; break;
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;
10a640: b8 09 00 00 00 mov $0x9,%eax
10a645: c3 ret
10a646: 66 90 xchg %ax,%ax
switch (termios_baud) {
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;
10a648: b8 04 00 00 00 mov $0x4,%eax
10a64d: c3 ret
10a64e: 66 90 xchg %ax,%ax
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
10a650: b8 0e 00 00 00 mov $0xe,%eax
10a655: c3 ret
10a656: 66 90 xchg %ax,%ax
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
10a658: b8 0c 00 00 00 mov $0xc,%eax
10a65d: c3 ret
00109aa8 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
109aa8: 56 push %esi
109aa9: 53 push %ebx
109aaa: 83 ec 14 sub $0x14,%esp
109aad: 8b 74 24 20 mov 0x20(%esp),%esi
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
109ab1: 8b 06 mov (%esi),%eax
109ab3: 8b 58 2c mov 0x2c(%eax),%ebx
rtems_status_code sc;
sc = rtems_semaphore_obtain(
109ab6: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
109abd: 00
109abe: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
109ac5: 00
109ac6: a1 6c 1e 13 00 mov 0x131e6c,%eax
109acb: 89 04 24 mov %eax,(%esp)
109ace: e8 a9 1e 00 00 call 10b97c <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
109ad3: 85 c0 test %eax,%eax
109ad5: 0f 85 a1 01 00 00 jne 109c7c <rtems_termios_close+0x1d4><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
109adb: ff 4b 08 decl 0x8(%ebx)
109ade: 0f 85 c3 00 00 00 jne 109ba7 <rtems_termios_close+0xff>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
109ae4: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
109aea: c1 e0 05 shl $0x5,%eax
109aed: 8b 80 e4 1a 13 00 mov 0x131ae4(%eax),%eax
109af3: 85 c0 test %eax,%eax
109af5: 0f 84 01 01 00 00 je 109bfc <rtems_termios_close+0x154>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
109afb: 89 1c 24 mov %ebx,(%esp)
109afe: ff d0 call *%eax
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
109b00: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
109b07: 0f 84 37 01 00 00 je 109c44 <rtems_termios_close+0x19c><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
109b0d: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax
109b13: 85 c0 test %eax,%eax
109b15: 74 13 je 109b2a <rtems_termios_close+0x82>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
109b17: 89 74 24 08 mov %esi,0x8(%esp)
109b1b: 8b 53 10 mov 0x10(%ebx),%edx
109b1e: 89 54 24 04 mov %edx,0x4(%esp)
109b22: 8b 53 0c mov 0xc(%ebx),%edx
109b25: 89 14 24 mov %edx,(%esp)
109b28: ff d0 call *%eax
if (tty->forw == NULL) {
109b2a: 8b 03 mov (%ebx),%eax
rtems_termios_ttyTail = tty->back;
109b2c: 8b 53 04 mov 0x4(%ebx),%edx
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
109b2f: 85 c0 test %eax,%eax
109b31: 0f 84 a9 00 00 00 je 109be0 <rtems_termios_close+0x138>
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
109b37: 89 50 04 mov %edx,0x4(%eax)
109b3a: 8b 53 04 mov 0x4(%ebx),%edx
}
if (tty->back == NULL) {
109b3d: 85 d2 test %edx,%edx
109b3f: 0f 84 87 00 00 00 je 109bcc <rtems_termios_close+0x124><== ALWAYS TAKEN
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
109b45: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
109b47: 8b 43 14 mov 0x14(%ebx),%eax
109b4a: 89 04 24 mov %eax,(%esp)
109b4d: e8 52 1d 00 00 call 10b8a4 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
109b52: 8b 43 18 mov 0x18(%ebx),%eax
109b55: 89 04 24 mov %eax,(%esp)
109b58: e8 47 1d 00 00 call 10b8a4 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
109b5d: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
109b63: 89 04 24 mov %eax,(%esp)
109b66: e8 39 1d 00 00 call 10b8a4 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
109b6b: 8b 8b a0 00 00 00 mov 0xa0(%ebx),%ecx
109b71: 85 c9 test %ecx,%ecx
109b73: 74 47 je 109bbc <rtems_termios_close+0x114>
109b75: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
109b7c: 74 3e je 109bbc <rtems_termios_close+0x114>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
109b7e: 8b 43 58 mov 0x58(%ebx),%eax
109b81: 89 04 24 mov %eax,(%esp)
109b84: e8 b3 dd ff ff call 10793c <free>
free (tty->rawOutBuf.theBuf);
109b89: 8b 43 7c mov 0x7c(%ebx),%eax
109b8c: 89 04 24 mov %eax,(%esp)
109b8f: e8 a8 dd ff ff call 10793c <free>
free (tty->cbuf);
109b94: 8b 43 1c mov 0x1c(%ebx),%eax
109b97: 89 04 24 mov %eax,(%esp)
109b9a: e8 9d dd ff ff call 10793c <free>
free (tty);
109b9f: 89 1c 24 mov %ebx,(%esp)
109ba2: e8 95 dd ff ff call 10793c <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
109ba7: a1 6c 1e 13 00 mov 0x131e6c,%eax
109bac: 89 04 24 mov %eax,(%esp)
109baf: e8 f4 1e 00 00 call 10baa8 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
109bb4: 31 c0 xor %eax,%eax
109bb6: 83 c4 14 add $0x14,%esp
109bb9: 5b pop %ebx
109bba: 5e pop %esi
109bbb: c3 ret
rtems_semaphore_delete (tty->isem);
rtems_semaphore_delete (tty->osem);
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
109bbc: 8b 43 68 mov 0x68(%ebx),%eax
109bbf: 89 04 24 mov %eax,(%esp)
109bc2: e8 dd 1c 00 00 call 10b8a4 <rtems_semaphore_delete>
109bc7: eb b5 jmp 109b7e <rtems_termios_close+0xd6>
109bc9: 8d 76 00 lea 0x0(%esi),%esi
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
109bcc: a3 74 1e 13 00 mov %eax,0x131e74
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
109bd1: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
109bd8: e9 6a ff ff ff jmp 109b47 <rtems_termios_close+0x9f>
109bdd: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
109be0: 89 15 70 1e 13 00 mov %edx,0x131e70
if ( rtems_termios_ttyTail != NULL ) {
109be6: 85 d2 test %edx,%edx
109be8: 0f 84 96 00 00 00 je 109c84 <rtems_termios_close+0x1dc><== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
109bee: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
109bf4: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
109bf6: e9 4a ff ff ff jmp 109b45 <rtems_termios_close+0x9d><== NOT EXECUTED
109bfb: 90 nop <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
109bfc: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
109c03: 00
109c04: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
109c0b: 00
109c0c: 8b 43 18 mov 0x18(%ebx),%eax
109c0f: 89 04 24 mov %eax,(%esp)
109c12: e8 65 1d 00 00 call 10b97c <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
109c17: 85 c0 test %eax,%eax
109c19: 75 61 jne 109c7c <rtems_termios_close+0x1d4><== NEVER TAKEN
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
109c1b: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax
109c21: 85 c0 test %eax,%eax
109c23: 74 07 je 109c2c <rtems_termios_close+0x184>
109c25: 89 d8 mov %ebx,%eax
109c27: e8 a0 f9 ff ff call 1095cc <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);
109c2c: 8b 43 18 mov 0x18(%ebx),%eax
109c2f: 89 04 24 mov %eax,(%esp)
109c32: e8 71 1e 00 00 call 10baa8 <rtems_semaphore_release>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
109c37: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
109c3e: 0f 85 c9 fe ff ff jne 109b0d <rtems_termios_close+0x65>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
109c44: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
109c4b: 00
109c4c: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax
109c52: 89 04 24 mov %eax,(%esp)
109c55: e8 96 18 00 00 call 10b4f0 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
109c5a: 85 c0 test %eax,%eax
109c5c: 75 1e jne 109c7c <rtems_termios_close+0x1d4><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
109c5e: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
109c65: 00
109c66: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax
109c6c: 89 04 24 mov %eax,(%esp)
109c6f: e8 7c 18 00 00 call 10b4f0 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
109c74: 85 c0 test %eax,%eax
109c76: 0f 84 91 fe ff ff je 109b0d <rtems_termios_close+0x65><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
109c7c: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
109c7f: e8 30 24 00 00 call 10c0b4 <rtems_fatal_error_occurred><== NOT EXECUTED
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
109c84: c7 05 74 1e 13 00 00 movl $0x0,0x131e74
109c8b: 00 00 00
109c8e: e9 b4 fe ff ff jmp 109b47 <rtems_termios_close+0x9f>
0010ae78 <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)
{
10ae78: 83 ec 1c sub $0x1c,%esp
10ae7b: 8b 44 24 20 mov 0x20(%esp),%eax
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
10ae7f: 8b 54 24 24 mov 0x24(%esp),%edx
10ae83: 01 90 90 00 00 00 add %edx,0x90(%eax)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10ae89: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
10ae90: 74 2a je 10aebc <rtems_termios_dequeue_characters+0x44>
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
10ae92: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax)
10ae99: 74 09 je 10aea4 <rtems_termios_dequeue_characters+0x2c>
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
10ae9b: 83 c4 1c add $0x1c,%esp
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
10ae9e: e9 6d e4 ff ff jmp 109310 <rtems_termios_refill_transmitter>
10aea3: 90 nop
if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
10aea4: 8b 15 94 1b 13 00 mov 0x131b94,%edx
10aeaa: 85 d2 test %edx,%edx
10aeac: 74 05 je 10aeb3 <rtems_termios_dequeue_characters+0x3b><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
10aeae: 89 04 24 mov %eax,(%esp)
10aeb1: ff d2 call *%edx
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
10aeb3: 31 c0 xor %eax,%eax
10aeb5: 83 c4 1c add $0x1c,%esp
10aeb8: c3 ret
10aeb9: 8d 76 00 lea 0x0(%esi),%esi
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
10aebc: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
10aec3: 00
10aec4: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax
10aeca: 89 04 24 mov %eax,(%esp)
10aecd: e8 1e 06 00 00 call 10b4f0 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10aed2: 85 c0 test %eax,%eax
10aed4: 74 dd je 10aeb3 <rtems_termios_dequeue_characters+0x3b><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
10aed6: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10aed9: e8 d6 11 00 00 call 10c0b4 <rtems_fatal_error_occurred><== NOT EXECUTED
0010aafc <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)
{
10aafc: 55 push %ebp
10aafd: 57 push %edi
10aafe: 56 push %esi
10aaff: 53 push %ebx
10ab00: 83 ec 3c sub $0x3c,%esp
10ab03: 8b 5c 24 50 mov 0x50(%esp),%ebx
10ab07: 8b 6c 24 54 mov 0x54(%esp),%ebp
10ab0b: 8b 7c 24 58 mov 0x58(%esp),%edi
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) {
10ab0f: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10ab15: c1 e0 05 shl $0x5,%eax
10ab18: 8b 80 f0 1a 13 00 mov 0x131af0(%eax),%eax
10ab1e: 85 c0 test %eax,%eax
10ab20: 74 6a je 10ab8c <rtems_termios_enqueue_raw_characters+0x90>
while (len--) {
10ab22: 85 ff test %edi,%edi
10ab24: 74 28 je 10ab4e <rtems_termios_enqueue_raw_characters+0x52><== NEVER TAKEN
* 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)
10ab26: 4f dec %edi
10ab27: 31 f6 xor %esi,%esi
10ab29: eb 11 jmp 10ab3c <rtems_termios_enqueue_raw_characters+0x40>
10ab2b: 90 nop
10ab2c: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10ab32: c1 e0 05 shl $0x5,%eax
10ab35: 8b 80 f0 1a 13 00 mov 0x131af0(%eax),%eax
10ab3b: 46 inc %esi
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
10ab3c: 89 5c 24 04 mov %ebx,0x4(%esp)
10ab40: 0f be 54 35 00 movsbl 0x0(%ebp,%esi,1),%edx
10ab45: 89 14 24 mov %edx,(%esp)
10ab48: ff d0 call *%eax
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--) {
10ab4a: 39 fe cmp %edi,%esi
10ab4c: 75 de jne 10ab2c <rtems_termios_enqueue_raw_characters+0x30>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
10ab4e: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax
10ab54: 85 c0 test %eax,%eax
10ab56: 75 26 jne 10ab7e <rtems_termios_enqueue_raw_characters+0x82><== NEVER TAKEN
10ab58: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
10ab5e: 85 c0 test %eax,%eax
10ab60: 74 1c je 10ab7e <rtems_termios_enqueue_raw_characters+0x82>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
10ab62: 8b 93 e0 00 00 00 mov 0xe0(%ebx),%edx
10ab68: 89 54 24 04 mov %edx,0x4(%esp)
10ab6c: 8d 53 30 lea 0x30(%ebx),%edx
10ab6f: 89 14 24 mov %edx,(%esp)
10ab72: ff d0 call *%eax
tty->tty_rcvwakeup = 1;
10ab74: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx)
10ab7b: 00 00 00
}
return 0;
10ab7e: 31 ff xor %edi,%edi
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
10ab80: 89 f8 mov %edi,%eax
10ab82: 83 c4 3c add $0x3c,%esp
10ab85: 5b pop %ebx
10ab86: 5e pop %esi
10ab87: 5f pop %edi
10ab88: 5d pop %ebp
10ab89: c3 ret
10ab8a: 66 90 xchg %ax,%ax
* 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)
10ab8c: 01 ef add %ebp,%edi
10ab8e: 89 7c 24 1c mov %edi,0x1c(%esp)
10ab92: c6 44 24 23 00 movb $0x0,0x23(%esp)
10ab97: 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);
10ab99: 8d 43 30 lea 0x30(%ebx),%eax
10ab9c: 89 44 24 28 mov %eax,0x28(%esp)
(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);
10aba0: 8d 53 4a lea 0x4a(%ebx),%edx
10aba3: 89 54 24 2c mov %edx,0x2c(%esp)
10aba7: 89 7c 24 10 mov %edi,0x10(%esp)
10abab: 90 nop
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
10abac: 3b 6c 24 1c cmp 0x1c(%esp),%ebp
10abb0: 0f 84 06 01 00 00 je 10acbc <rtems_termios_enqueue_raw_characters+0x1c0>
c = *buf++;
10abb6: 8a 4d 00 mov 0x0(%ebp),%cl
10abb9: 45 inc %ebp
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
10abba: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10abc0: f6 c4 02 test $0x2,%ah
10abc3: 74 1b je 10abe0 <rtems_termios_enqueue_raw_characters+0xe4>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
10abc5: 0f be c1 movsbl %cl,%eax
10abc8: 0f b6 53 4a movzbl 0x4a(%ebx),%edx
10abcc: 39 d0 cmp %edx,%eax
if (c == tty->termios.c_cc[VSTART]) {
10abce: 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]) {
10abd2: 0f 84 00 01 00 00 je 10acd8 <rtems_termios_enqueue_raw_characters+0x1dc>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
10abd8: 39 d0 cmp %edx,%eax
10abda: 0f 84 58 01 00 00 je 10ad38 <rtems_termios_enqueue_raw_characters+0x23c><== NEVER TAKEN
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
10abe0: 80 7c 24 23 00 cmpb $0x0,0x23(%esp)
10abe5: 0f 85 09 01 00 00 jne 10acf4 <rtems_termios_enqueue_raw_characters+0x1f8><== NEVER TAKEN
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
10abeb: 8b 43 60 mov 0x60(%ebx),%eax
10abee: 8b 7b 64 mov 0x64(%ebx),%edi
10abf1: 40 inc %eax
10abf2: 31 d2 xor %edx,%edx
10abf4: f7 f7 div %edi
10abf6: 89 d6 mov %edx,%esi
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
10abf8: 9c pushf
10abf9: fa cli
10abfa: 8f 44 24 24 popl 0x24(%esp)
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
10abfe: 8b 53 5c mov 0x5c(%ebx),%edx
10ac01: 8b 43 64 mov 0x64(%ebx),%eax
% tty->rawInBuf.Size) > tty->highwater) &&
10ac04: 8b 7b 64 mov 0x64(%ebx),%edi
10ac07: 89 7c 24 18 mov %edi,0x18(%esp)
}
} 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)
10ac0b: 29 d0 sub %edx,%eax
10ac0d: 01 f0 add %esi,%eax
% tty->rawInBuf.Size) > tty->highwater) &&
10ac0f: 31 d2 xor %edx,%edx
10ac11: f7 f7 div %edi
}
} 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)
10ac13: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx
10ac19: 76 45 jbe 10ac60 <rtems_termios_enqueue_raw_characters+0x164><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
10ac1b: 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) &&
10ac21: a8 01 test $0x1,%al <== NOT EXECUTED
10ac23: 75 3b jne 10ac60 <rtems_termios_enqueue_raw_characters+0x164><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
10ac25: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10ac2b: 83 c8 01 or $0x1,%eax <== NOT EXECUTED
10ac2e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
10ac34: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10ac3a: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED
10ac3f: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
10ac44: 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))
10ac4a: 0f 84 2a 01 00 00 je 10ad7a <rtems_termios_enqueue_raw_characters+0x27e><== NOT EXECUTED
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
10ac50: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED
10ac55: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED
10ac5a: 0f 84 64 01 00 00 je 10adc4 <rtems_termios_enqueue_raw_characters+0x2c8><== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
10ac60: ff 74 24 24 pushl 0x24(%esp)
10ac64: 9d popf
if (newTail == tty->rawInBuf.Head) {
10ac65: 8b 43 5c mov 0x5c(%ebx),%eax
10ac68: 39 f0 cmp %esi,%eax
10ac6a: 0f 84 bc 00 00 00 je 10ad2c <rtems_termios_enqueue_raw_characters+0x230><== NEVER TAKEN
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
10ac70: 8b 43 58 mov 0x58(%ebx),%eax
10ac73: 88 0c 30 mov %cl,(%eax,%esi,1)
tty->rawInBuf.Tail = newTail;
10ac76: 89 73 60 mov %esi,0x60(%ebx)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
10ac79: 8b 8b e4 00 00 00 mov 0xe4(%ebx),%ecx
10ac7f: 85 c9 test %ecx,%ecx
10ac81: 0f 85 25 ff ff ff jne 10abac <rtems_termios_enqueue_raw_characters+0xb0><== NEVER TAKEN
10ac87: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
10ac8d: 85 c0 test %eax,%eax
10ac8f: 0f 84 17 ff ff ff je 10abac <rtems_termios_enqueue_raw_characters+0xb0><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
10ac95: 8b 93 e0 00 00 00 mov 0xe0(%ebx),%edx <== NOT EXECUTED
10ac9b: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
10ac9f: 8b 7c 24 28 mov 0x28(%esp),%edi <== NOT EXECUTED
10aca3: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
10aca6: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
10aca8: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
10acaf: 00 00 00
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
10acb2: 3b 6c 24 1c cmp 0x1c(%esp),%ebp <== NOT EXECUTED
10acb6: 0f 85 fa fe ff ff jne 10abb6 <rtems_termios_enqueue_raw_characters+0xba><== NOT EXECUTED
10acbc: 8b 7c 24 10 mov 0x10(%esp),%edi
}
}
}
}
tty->rawInBufDropped += dropped;
10acc0: 01 7b 78 add %edi,0x78(%ebx)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
10acc3: 8b 43 68 mov 0x68(%ebx),%eax
10acc6: 89 04 24 mov %eax,(%esp)
10acc9: e8 da 0d 00 00 call 10baa8 <rtems_semaphore_release>
return dropped;
}
10acce: 89 f8 mov %edi,%eax
10acd0: 83 c4 3c add $0x3c,%esp
10acd3: 5b pop %ebx
10acd4: 5e pop %esi
10acd5: 5f pop %edi
10acd6: 5d pop %ebp
10acd7: c3 ret
/* 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]) {
10acd8: 39 d0 cmp %edx,%eax
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
10acda: 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]) {
10ace0: 0f 84 86 00 00 00 je 10ad6c <rtems_termios_enqueue_raw_characters+0x270><== NEVER TAKEN
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
10ace6: 83 c8 10 or $0x10,%eax
10ace9: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
* 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)
10acef: c6 44 24 23 01 movb $0x1,0x23(%esp)
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
10acf4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10acfa: 83 e0 30 and $0x30,%eax
10acfd: 83 f8 20 cmp $0x20,%eax
10ad00: 0f 85 a6 fe ff ff jne 10abac <rtems_termios_enqueue_raw_characters+0xb0><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
10ad06: 9c pushf <== NOT EXECUTED
10ad07: fa cli <== NOT EXECUTED
10ad08: 5e pop %esi <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
10ad09: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10ad0f: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
10ad12: 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) {
10ad18: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED
10ad1e: 85 c0 test %eax,%eax <== NOT EXECUTED
10ad20: 75 27 jne 10ad49 <rtems_termios_enqueue_raw_characters+0x24d><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
10ad22: 56 push %esi <== NOT EXECUTED
10ad23: 9d popf <== NOT EXECUTED
10ad24: e9 83 fe ff ff jmp 10abac <rtems_termios_enqueue_raw_characters+0xb0><== NOT EXECUTED
10ad29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
10ad2c: ff 44 24 10 incl 0x10(%esp) <== NOT EXECUTED
10ad30: e9 77 fe ff ff jmp 10abac <rtems_termios_enqueue_raw_characters+0xb0><== NOT EXECUTED
10ad35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
10ad38: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10ad3e: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED
10ad41: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
10ad47: eb a6 jmp 10acef <rtems_termios_enqueue_raw_characters+0x1f3><== NOT EXECUTED
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)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
10ad49: 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)(
10ad4f: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) <== NOT EXECUTED
10ad56: 00
10ad57: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
10ad5a: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
10ad5e: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10ad61: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10ad64: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10ad6a: eb b6 jmp 10ad22 <rtems_termios_enqueue_raw_characters+0x226><== NOT EXECUTED
/* 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]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
10ad6c: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED
10ad6f: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
10ad75: e9 75 ff ff ff jmp 10acef <rtems_termios_enqueue_raw_characters+0x1f3><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
10ad7a: a8 20 test $0x20,%al <== NOT EXECUTED
10ad7c: 75 0e jne 10ad8c <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
10ad7e: 8b bb 94 00 00 00 mov 0x94(%ebx),%edi <== NOT EXECUTED
10ad84: 85 ff test %edi,%edi <== NOT EXECUTED
10ad86: 0f 85 d4 fe ff ff jne 10ac60 <rtems_termios_enqueue_raw_characters+0x164><== 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;
10ad8c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10ad92: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
10ad95: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
10ad9b: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) <== NOT EXECUTED
10ada2: 00
(void *)&(tty->termios.c_cc[VSTOP]), 1);
10ada3: 8b 7c 24 2c mov 0x2c(%esp),%edi <== NOT EXECUTED
10ada7: 89 7c 24 04 mov %edi,0x4(%esp) <== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
(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,
10adab: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10adae: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10adb1: 88 4c 24 14 mov %cl,0x14(%esp) <== NOT EXECUTED
10adb5: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10adbb: 8a 4c 24 14 mov 0x14(%esp),%cl <== NOT EXECUTED
10adbf: e9 9c fe ff ff jmp 10ac60 <rtems_termios_enqueue_raw_characters+0x164><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
10adc4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10adca: 83 c8 04 or $0x4,%eax <== NOT EXECUTED
10adcd: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
10add3: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED
10add9: 85 c0 test %eax,%eax <== NOT EXECUTED
10addb: 0f 84 7f fe ff ff je 10ac60 <rtems_termios_enqueue_raw_characters+0x164><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
10ade1: 8b 53 10 mov 0x10(%ebx),%edx <== NOT EXECUTED
10ade4: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
10ade7: 88 4c 24 14 mov %cl,0x14(%esp) <== NOT EXECUTED
10adeb: ff d0 call *%eax <== NOT EXECUTED
10aded: 8a 4c 24 14 mov 0x14(%esp),%cl <== NOT EXECUTED
10adf1: e9 6a fe ff ff jmp 10ac60 <rtems_termios_enqueue_raw_characters+0x164><== NOT EXECUTED
00109cb4 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
109cb4: 55 push %ebp
109cb5: 57 push %edi
109cb6: 56 push %esi
109cb7: 53 push %ebx
109cb8: 83 ec 2c sub $0x2c,%esp
109cbb: 8b 74 24 40 mov 0x40(%esp),%esi
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
109cbf: 8b 06 mov (%esi),%eax
109cc1: 8b 58 2c mov 0x2c(%eax),%ebx
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
109cc4: 8b 7e 08 mov 0x8(%esi),%edi
rtems_status_code sc;
args->ioctl_return = 0;
109cc7: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
109cce: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
109cd5: 00
109cd6: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
109cdd: 00
109cde: 8b 43 18 mov 0x18(%ebx),%eax
109ce1: 89 04 24 mov %eax,(%esp)
109ce4: e8 93 1c 00 00 call 10b97c <rtems_semaphore_obtain>
109ce9: 89 c5 mov %eax,%ebp
if (sc != RTEMS_SUCCESSFUL) {
109ceb: 85 c0 test %eax,%eax
109ced: 75 4c jne 109d3b <rtems_termios_ioctl+0x87><== NEVER TAKEN
return sc;
}
switch (args->command) {
109cef: 8b 46 04 mov 0x4(%esi),%eax
109cf2: 83 f8 04 cmp $0x4,%eax
109cf5: 74 25 je 109d1c <rtems_termios_ioctl+0x68>
109cf7: 77 4f ja 109d48 <rtems_termios_ioctl+0x94>
109cf9: 83 f8 02 cmp $0x2,%eax
109cfc: 0f 84 86 00 00 00 je 109d88 <rtems_termios_ioctl+0xd4>
109d02: 0f 86 fc 01 00 00 jbe 109f04 <rtems_termios_ioctl+0x250>
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
109d08: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax
109d0e: 85 c0 test %eax,%eax
109d10: 74 1e je 109d30 <rtems_termios_ioctl+0x7c>
109d12: 89 d8 mov %ebx,%eax
109d14: e8 b3 f8 ff ff call 1095cc <drainOutput.part.0>
109d19: eb 15 jmp 109d30 <rtems_termios_ioctl+0x7c>
109d1b: 90 nop
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
109d1c: 8b 07 mov (%edi),%eax
109d1e: 8b 57 04 mov 0x4(%edi),%edx
109d21: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx)
109d27: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx)
109d2d: 8d 76 00 lea 0x0(%esi),%esi
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
109d30: 8b 43 18 mov 0x18(%ebx),%eax
109d33: 89 04 24 mov %eax,(%esp)
109d36: e8 6d 1d 00 00 call 10baa8 <rtems_semaphore_release>
return sc;
}
109d3b: 89 e8 mov %ebp,%eax
109d3d: 83 c4 2c add $0x2c,%esp
109d40: 5b pop %ebx
109d41: 5e pop %esi
109d42: 5f pop %edi
109d43: 5d pop %ebp
109d44: c3 ret
109d45: 8d 76 00 lea 0x0(%esi),%esi
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
switch (args->command) {
109d48: 3d 7f 66 04 40 cmp $0x4004667f,%eax
109d4d: 0f 84 91 01 00 00 je 109ee4 <rtems_termios_ioctl+0x230><== NEVER TAKEN
109d53: 0f 87 c7 01 00 00 ja 109f20 <rtems_termios_ioctl+0x26c>
109d59: 83 f8 05 cmp $0x5,%eax
109d5c: 0f 84 2e 02 00 00 je 109f90 <rtems_termios_ioctl+0x2dc>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
109d62: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
109d68: c1 e0 05 shl $0x5,%eax
109d6b: 8b 80 f8 1a 13 00 mov 0x131af8(%eax),%eax
109d71: 85 c0 test %eax,%eax
109d73: 0f 84 2f 02 00 00 je 109fa8 <rtems_termios_ioctl+0x2f4><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
109d79: 89 74 24 04 mov %esi,0x4(%esp)
109d7d: 89 1c 24 mov %ebx,(%esp)
109d80: ff d0 call *%eax
109d82: 89 c5 mov %eax,%ebp
109d84: eb aa jmp 109d30 <rtems_termios_ioctl+0x7c>
109d86: 66 90 xchg %ax,%ax
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
109d88: 8b 76 08 mov 0x8(%esi),%esi
109d8b: 8d 43 30 lea 0x30(%ebx),%eax
109d8e: 89 44 24 1c mov %eax,0x1c(%esp)
109d92: b9 09 00 00 00 mov $0x9,%ecx
109d97: 89 c7 mov %eax,%edi
109d99: 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) &&
109d9b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109da1: f6 c4 02 test $0x2,%ah
109da4: 74 46 je 109dec <rtems_termios_ioctl+0x138>
109da6: f6 43 31 04 testb $0x4,0x31(%ebx)
109daa: 75 40 jne 109dec <rtems_termios_ioctl+0x138>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
109dac: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109db2: 25 ef fd ff ff and $0xfffffdef,%eax
109db7: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
109dbd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109dc3: a8 20 test $0x20,%al
109dc5: 74 25 je 109dec <rtems_termios_ioctl+0x138><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
109dc7: 9c pushf <== NOT EXECUTED
109dc8: fa cli <== NOT EXECUTED
109dc9: 5e pop %esi <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
109dca: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109dd0: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
109dd3: 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) {
109dd9: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED
109ddf: 85 c0 test %eax,%eax <== NOT EXECUTED
109de1: 0f 85 3f 02 00 00 jne 10a026 <rtems_termios_ioctl+0x372><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
109de7: 56 push %esi <== NOT EXECUTED
109de8: 9d popf <== NOT EXECUTED
109de9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
109dec: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109df2: f6 c4 04 test $0x4,%ah
109df5: 74 24 je 109e1b <rtems_termios_ioctl+0x167>
109df7: f6 43 31 10 testb $0x10,0x31(%ebx)
109dfb: 75 1e jne 109e1b <rtems_termios_ioctl+0x167><== NEVER TAKEN
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
109dfd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109e03: 80 e4 fb and $0xfb,%ah
109e06: 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);
109e0c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109e12: 83 e0 fd and $0xfffffffd,%eax
109e15: 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)) {
109e1b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109e21: f6 c4 01 test $0x1,%ah
109e24: 8b 43 38 mov 0x38(%ebx),%eax
109e27: 74 46 je 109e6f <rtems_termios_ioctl+0x1bb><== ALWAYS TAKEN
109e29: 85 c0 test %eax,%eax <== NOT EXECUTED
109e2b: 0f 88 cb 01 00 00 js 109ffc <rtems_termios_ioctl+0x348><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
109e31: 8b 93 b8 00 00 00 mov 0xb8(%ebx),%edx <== NOT EXECUTED
109e37: 80 e6 fe and $0xfe,%dh <== NOT EXECUTED
109e3a: 89 93 b8 00 00 00 mov %edx,0xb8(%ebx) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
109e40: 8b 93 b8 00 00 00 mov 0xb8(%ebx),%edx <== NOT EXECUTED
109e46: 83 e2 04 and $0x4,%edx <== NOT EXECUTED
109e49: 74 15 je 109e60 <rtems_termios_ioctl+0x1ac><== NOT EXECUTED
109e4b: 8b 93 b0 00 00 00 mov 0xb0(%ebx),%edx <== NOT EXECUTED
109e51: 85 d2 test %edx,%edx <== NOT EXECUTED
109e53: 74 0b je 109e60 <rtems_termios_ioctl+0x1ac><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
109e55: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
109e58: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
109e5b: ff d2 call *%edx <== NOT EXECUTED
109e5d: 8b 43 38 mov 0x38(%ebx),%eax <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
109e60: 8b 93 b8 00 00 00 mov 0xb8(%ebx),%edx <== NOT EXECUTED
109e66: 83 e2 fb and $0xfffffffb,%edx <== NOT EXECUTED
109e69: 89 93 b8 00 00 00 mov %edx,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) {
109e6f: 85 c0 test %eax,%eax
109e71: 0f 88 85 01 00 00 js 109ffc <rtems_termios_ioctl+0x348><== NEVER TAKEN
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
109e77: 8b 43 30 mov 0x30(%ebx),%eax
109e7a: f6 c4 10 test $0x10,%ah
109e7d: 74 0f je 109e8e <rtems_termios_ioctl+0x1da>
tty->flow_ctrl |= FL_MDXOF;
109e7f: 8b 93 b8 00 00 00 mov 0xb8(%ebx),%edx
109e85: 80 ce 04 or $0x4,%dh
109e88: 89 93 b8 00 00 00 mov %edx,0xb8(%ebx)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
109e8e: f6 c4 04 test $0x4,%ah
109e91: 74 0f je 109ea2 <rtems_termios_ioctl+0x1ee>
tty->flow_ctrl |= FL_MDXON;
109e93: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109e99: 80 cc 02 or $0x2,%ah
109e9c: 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) {
109ea2: f6 43 3c 02 testb $0x2,0x3c(%ebx)
109ea6: 0f 84 08 01 00 00 je 109fb4 <rtems_termios_ioctl+0x300>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
109eac: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
109eb3: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
109eba: c7 43 74 00 00 00 00 movl $0x0,0x74(%ebx)
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
109ec1: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
109ec7: 85 c0 test %eax,%eax
109ec9: 0f 84 61 fe ff ff je 109d30 <rtems_termios_ioctl+0x7c><== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
109ecf: 8b 54 24 1c mov 0x1c(%esp),%edx
109ed3: 89 54 24 04 mov %edx,0x4(%esp)
109ed7: 8b 53 10 mov 0x10(%ebx),%edx
109eda: 89 14 24 mov %edx,(%esp)
109edd: ff d0 call *%eax
109edf: e9 4c fe ff ff jmp 109d30 <rtems_termios_ioctl+0x7c>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
109ee4: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
109ee7: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED
if ( rawnc < 0 )
109eea: 29 d0 sub %edx,%eax <== NOT EXECUTED
109eec: 0f 88 fe 00 00 00 js 109ff0 <rtems_termios_ioctl+0x33c><== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
109ef2: 8b 56 08 mov 0x8(%esi),%edx <== NOT EXECUTED
109ef5: 03 43 20 add 0x20(%ebx),%eax <== NOT EXECUTED
109ef8: 2b 43 24 sub 0x24(%ebx),%eax <== NOT EXECUTED
109efb: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
break;
109efd: e9 2e fe ff ff jmp 109d30 <rtems_termios_ioctl+0x7c><== NOT EXECUTED
109f02: 66 90 xchg %ax,%ax <== NOT EXECUTED
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
switch (args->command) {
109f04: 48 dec %eax
109f05: 0f 85 57 fe ff ff jne 109d62 <rtems_termios_ioctl+0xae><== NEVER TAKEN
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
109f0b: 8b 46 08 mov 0x8(%esi),%eax
109f0e: 8d 73 30 lea 0x30(%ebx),%esi
109f11: b9 09 00 00 00 mov $0x9,%ecx
109f16: 89 c7 mov %eax,%edi
109f18: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
break;
109f1a: e9 11 fe ff ff jmp 109d30 <rtems_termios_ioctl+0x7c>
109f1f: 90 nop
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
switch (args->command) {
109f20: 3d 1a 74 04 40 cmp $0x4004741a,%eax
109f25: 74 59 je 109f80 <rtems_termios_ioctl+0x2cc>
109f27: 3d 1b 74 04 80 cmp $0x8004741b,%eax
109f2c: 0f 85 30 fe ff ff jne 109d62 <rtems_termios_ioctl+0xae><== NEVER TAKEN
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
109f32: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
109f38: c1 e0 05 shl $0x5,%eax
109f3b: 8b 80 e4 1a 13 00 mov 0x131ae4(%eax),%eax
109f41: 85 c0 test %eax,%eax
109f43: 74 07 je 109f4c <rtems_termios_ioctl+0x298>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
109f45: 89 1c 24 mov %ebx,(%esp)
109f48: ff d0 call *%eax
109f4a: 89 c5 mov %eax,%ebp
}
tty->t_line=*(int*)(args->buffer);
109f4c: 8b 46 08 mov 0x8(%esi),%eax
109f4f: 8b 00 mov (%eax),%eax
109f51: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
tty->t_sc = NULL; /* ensure that no more valid data */
109f57: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx)
109f5e: 00 00 00
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
109f61: c1 e0 05 shl $0x5,%eax
109f64: 8b 80 e0 1a 13 00 mov 0x131ae0(%eax),%eax
109f6a: 85 c0 test %eax,%eax
109f6c: 0f 84 be fd ff ff je 109d30 <rtems_termios_ioctl+0x7c>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
109f72: 89 1c 24 mov %ebx,(%esp)
109f75: ff d0 call *%eax
109f77: 89 c5 mov %eax,%ebp
109f79: e9 b2 fd ff ff jmp 109d30 <rtems_termios_ioctl+0x7c>
109f7e: 66 90 xchg %ax,%ax
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
109f80: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx
109f86: 8b 46 08 mov 0x8(%esi),%eax
109f89: 89 10 mov %edx,(%eax)
break;
109f8b: e9 a0 fd ff ff jmp 109d30 <rtems_termios_ioctl+0x7c>
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
109f90: 8b 07 mov (%edi),%eax
109f92: 8b 57 04 mov 0x4(%edi),%edx
109f95: 89 83 d4 00 00 00 mov %eax,0xd4(%ebx)
109f9b: 89 93 d8 00 00 00 mov %edx,0xd8(%ebx)
break;
109fa1: e9 8a fd ff ff jmp 109d30 <rtems_termios_ioctl+0x7c>
109fa6: 66 90 xchg %ax,%ax
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;
109fa8: bd 0a 00 00 00 mov $0xa,%ebp <== NOT EXECUTED
109fad: e9 7e fd ff ff jmp 109d30 <rtems_termios_ioctl+0x7c><== NOT EXECUTED
109fb2: 66 90 xchg %ax,%ax <== NOT EXECUTED
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] *
109fb4: 0f b6 73 46 movzbl 0x46(%ebx),%esi
rtems_clock_get_ticks_per_second() / 10;
109fb8: e8 13 13 00 00 call 10b2d0 <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] *
109fbd: 0f af c6 imul %esi,%eax
rtems_clock_get_ticks_per_second() / 10;
109fc0: ba cd cc cc cc mov $0xcccccccd,%edx
109fc5: f7 e2 mul %edx
109fc7: c1 ea 03 shr $0x3,%edx
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] *
109fca: 89 53 54 mov %edx,0x54(%ebx)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
109fcd: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
109fd1: 74 3d je 10a010 <rtems_termios_ioctl+0x35c>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
109fd3: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
109fda: 89 53 70 mov %edx,0x70(%ebx)
if (tty->termios.c_cc[VMIN])
109fdd: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
109fe1: 0f 85 d3 fe ff ff jne 109eba <rtems_termios_ioctl+0x206>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
109fe7: 89 53 74 mov %edx,0x74(%ebx)
109fea: e9 d2 fe ff ff jmp 109ec1 <rtems_termios_ioctl+0x20d>
109fef: 90 nop
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
109ff0: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED
109ff3: 01 d0 add %edx,%eax <== NOT EXECUTED
109ff5: e9 f8 fe ff ff jmp 109ef2 <rtems_termios_ioctl+0x23e><== NOT EXECUTED
109ffa: 66 90 xchg %ax,%ax <== 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) {
tty->flow_ctrl |= FL_MDRTS;
109ffc: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a002: 80 cc 01 or $0x1,%ah <== NOT EXECUTED
10a005: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
10a00b: e9 67 fe ff ff jmp 109e77 <rtems_termios_ioctl+0x1c3><== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
10a010: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
10a014: 0f 85 92 fe ff ff jne 109eac <rtems_termios_ioctl+0x1f8><== NEVER TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
10a01a: c7 43 6c 01 00 00 00 movl $0x1,0x6c(%ebx)
10a021: e9 9b fe ff ff jmp 109ec1 <rtems_termios_ioctl+0x20d>
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)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
10a026: 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)(
10a02c: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) <== NOT EXECUTED
10a033: 00
10a034: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
10a037: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
10a03b: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10a03e: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10a041: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10a047: e9 9b fd ff ff jmp 109de7 <rtems_termios_ioctl+0x133><== NOT EXECUTED
00109624 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
109624: 55 push %ebp
109625: 57 push %edi
109626: 56 push %esi
109627: 53 push %ebx
109628: 83 ec 3c sub $0x3c,%esp
10962b: 8b 6c 24 50 mov 0x50(%esp),%ebp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
10962f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
109636: 00
109637: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10963e: 00
10963f: a1 6c 1e 13 00 mov 0x131e6c,%eax
109644: 89 04 24 mov %eax,(%esp)
109647: e8 30 23 00 00 call 10b97c <rtems_semaphore_obtain>
10964c: 89 44 24 2c mov %eax,0x2c(%esp)
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
109650: 85 c0 test %eax,%eax
109652: 75 73 jne 1096c7 <rtems_termios_open+0xa3><== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
109654: 8b 3d 74 1e 13 00 mov 0x131e74,%edi
10965a: 85 ff test %edi,%edi
10965c: 74 76 je 1096d4 <rtems_termios_open+0xb0>
10965e: 89 fb mov %edi,%ebx
109660: 8b 44 24 54 mov 0x54(%esp),%eax
109664: eb 08 jmp 10966e <rtems_termios_open+0x4a>
109666: 66 90 xchg %ax,%ax
109668: 8b 1b mov (%ebx),%ebx
10966a: 85 db test %ebx,%ebx
10966c: 74 66 je 1096d4 <rtems_termios_open+0xb0><== ALWAYS TAKEN
if ((tty->major == major) && (tty->minor == minor))
10966e: 39 6b 0c cmp %ebp,0xc(%ebx)
109671: 75 f5 jne 109668 <rtems_termios_open+0x44>
109673: 39 43 10 cmp %eax,0x10(%ebx)
109676: 75 f0 jne 109668 <rtems_termios_open+0x44>
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
109678: 8b 54 24 58 mov 0x58(%esp),%edx
10967c: 8b 02 mov (%edx),%eax
10967e: 89 58 2c mov %ebx,0x2c(%eax)
if (!tty->refcount++) {
109681: 8b 43 08 mov 0x8(%ebx),%eax
109684: 8d 50 01 lea 0x1(%eax),%edx
109687: 89 53 08 mov %edx,0x8(%ebx)
10968a: 85 c0 test %eax,%eax
10968c: 75 2c jne 1096ba <rtems_termios_open+0x96>
if (tty->device.firstOpen)
10968e: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax
109694: 85 c0 test %eax,%eax
109696: 74 15 je 1096ad <rtems_termios_open+0x89>
(*tty->device.firstOpen)(major, minor, arg);
109698: 8b 54 24 58 mov 0x58(%esp),%edx
10969c: 89 54 24 08 mov %edx,0x8(%esp)
1096a0: 8b 54 24 54 mov 0x54(%esp),%edx
1096a4: 89 54 24 04 mov %edx,0x4(%esp)
1096a8: 89 2c 24 mov %ebp,(%esp)
1096ab: ff d0 call *%eax
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
1096ad: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
1096b4: 0f 84 85 02 00 00 je 10993f <rtems_termios_open+0x31b>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
1096ba: a1 6c 1e 13 00 mov 0x131e6c,%eax
1096bf: 89 04 24 mov %eax,(%esp)
1096c2: e8 e1 23 00 00 call 10baa8 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
1096c7: 8b 44 24 2c mov 0x2c(%esp),%eax
1096cb: 83 c4 3c add $0x3c,%esp
1096ce: 5b pop %ebx
1096cf: 5e pop %esi
1096d0: 5f pop %edi
1096d1: 5d pop %ebp
1096d2: c3 ret
1096d3: 90 nop
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
1096d4: c7 44 24 04 e8 00 00 movl $0xe8,0x4(%esp)
1096db: 00
1096dc: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1096e3: e8 00 e0 ff ff call 1076e8 <calloc>
1096e8: 89 c3 mov %eax,%ebx
if (tty == NULL) {
1096ea: 85 c0 test %eax,%eax
1096ec: 0f 84 ae 02 00 00 je 1099a0 <rtems_termios_open+0x37c>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
1096f2: a1 d4 fa 12 00 mov 0x12fad4,%eax
1096f7: 89 43 64 mov %eax,0x64(%ebx)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
1096fa: 8b 43 64 mov 0x64(%ebx),%eax
1096fd: 89 04 24 mov %eax,(%esp)
109700: e8 4b e5 ff ff call 107c50 <malloc>
109705: 89 c6 mov %eax,%esi
109707: 89 43 58 mov %eax,0x58(%ebx)
if (tty->rawInBuf.theBuf == NULL) {
10970a: 85 c0 test %eax,%eax
10970c: 0f 84 86 02 00 00 je 109998 <rtems_termios_open+0x374>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
109712: a1 d8 fa 12 00 mov 0x12fad8,%eax
109717: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
10971d: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
109723: 89 04 24 mov %eax,(%esp)
109726: e8 25 e5 ff ff call 107c50 <malloc>
10972b: 89 c2 mov %eax,%edx
10972d: 89 43 7c mov %eax,0x7c(%ebx)
if (tty->rawOutBuf.theBuf == NULL) {
109730: 85 c0 test %eax,%eax
109732: 0f 84 58 02 00 00 je 109990 <rtems_termios_open+0x36c>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
109738: a1 dc fa 12 00 mov 0x12fadc,%eax
10973d: 89 04 24 mov %eax,(%esp)
109740: 89 54 24 28 mov %edx,0x28(%esp)
109744: e8 07 e5 ff ff call 107c50 <malloc>
109749: 89 43 1c mov %eax,0x1c(%ebx)
if (tty->cbuf == NULL) {
10974c: 85 c0 test %eax,%eax
10974e: 8b 54 24 28 mov 0x28(%esp),%edx
109752: 0f 84 30 02 00 00 je 109988 <rtems_termios_open+0x364>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
109758: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx)
10975f: 00 00 00
tty->tty_snd.sw_arg = NULL;
109762: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx)
109769: 00 00 00
tty->tty_rcv.sw_pfn = NULL;
10976c: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx)
109773: 00 00 00
tty->tty_rcv.sw_arg = NULL;
109776: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
10977d: 00 00 00
tty->tty_rcvwakeup = 0;
109780: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
109787: 00 00 00
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
10978a: 89 3b mov %edi,(%ebx)
tty->back = NULL;
10978c: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
if (rtems_termios_ttyHead != NULL)
109793: 85 ff test %edi,%edi
109795: 74 03 je 10979a <rtems_termios_open+0x176>
rtems_termios_ttyHead->back = tty;
109797: 89 5f 04 mov %ebx,0x4(%edi)
rtems_termios_ttyHead = tty;
10979a: 89 1d 74 1e 13 00 mov %ebx,0x131e74
if (rtems_termios_ttyTail == NULL)
1097a0: 8b 15 70 1e 13 00 mov 0x131e70,%edx
1097a6: 85 d2 test %edx,%edx
1097a8: 0f 84 ee 02 00 00 je 109a9c <rtems_termios_open+0x478>
rtems_termios_ttyTail = tty;
tty->minor = minor;
1097ae: 8b 54 24 54 mov 0x54(%esp),%edx
1097b2: 89 53 10 mov %edx,0x10(%ebx)
tty->major = major;
1097b5: 89 6b 0c mov %ebp,0xc(%ebx)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
1097b8: 8d 43 14 lea 0x14(%ebx),%eax
1097bb: 89 44 24 10 mov %eax,0x10(%esp)
1097bf: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
1097c6: 00
1097c7: c7 44 24 08 54 00 00 movl $0x54,0x8(%esp)
1097ce: 00
1097cf: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
1097d6: 00
rtems_build_name ('T', 'R', 'i', c),
1097d7: 0f be 05 e0 fa 12 00 movsbl 0x12fae0,%eax
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
1097de: 0d 00 69 52 54 or $0x54526900,%eax
1097e3: 89 04 24 mov %eax,(%esp)
1097e6: e8 dd 1e 00 00 call 10b6c8 <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)
1097eb: 85 c0 test %eax,%eax
1097ed: 0f 85 0e 02 00 00 jne 109a01 <rtems_termios_open+0x3dd>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
1097f3: 8d 43 18 lea 0x18(%ebx),%eax
1097f6: 89 44 24 10 mov %eax,0x10(%esp)
1097fa: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
109801: 00
109802: c7 44 24 08 54 00 00 movl $0x54,0x8(%esp)
109809: 00
10980a: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
109811: 00
rtems_build_name ('T', 'R', 'o', c),
109812: 0f be 05 e0 fa 12 00 movsbl 0x12fae0,%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 (
109819: 0d 00 6f 52 54 or $0x54526f00,%eax
10981e: 89 04 24 mov %eax,(%esp)
109821: e8 a2 1e 00 00 call 10b6c8 <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)
109826: 85 c0 test %eax,%eax
109828: 0f 85 d3 01 00 00 jne 109a01 <rtems_termios_open+0x3dd>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
10982e: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax
109834: 89 44 24 10 mov %eax,0x10(%esp)
109838: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10983f: 00
109840: c7 44 24 08 20 00 00 movl $0x20,0x8(%esp)
109847: 00
109848: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10984f: 00
rtems_build_name ('T', 'R', 'x', c),
109850: 0f be 05 e0 fa 12 00 movsbl 0x12fae0,%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 (
109857: 0d 00 78 52 54 or $0x54527800,%eax
10985c: 89 04 24 mov %eax,(%esp)
10985f: e8 64 1e 00 00 call 10b6c8 <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)
109864: 85 c0 test %eax,%eax
109866: 0f 85 95 01 00 00 jne 109a01 <rtems_termios_open+0x3dd>
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
10986c: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
109873: 00 00 00
/*
* Set callbacks
*/
tty->device = *callbacks;
109876: 8d bb 98 00 00 00 lea 0x98(%ebx),%edi
10987c: b9 08 00 00 00 mov $0x8,%ecx
109881: 8b 74 24 5c mov 0x5c(%esp),%esi
109885: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
109887: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
10988e: 0f 84 78 01 00 00 je 109a0c <rtems_termios_open+0x3e8>
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
109894: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
10989a: 85 c0 test %eax,%eax
10989c: 0f 84 24 01 00 00 je 1099c6 <rtems_termios_open+0x3a2>
1098a2: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
1098a9: 0f 84 17 01 00 00 je 1099c6 <rtems_termios_open+0x3a2>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
1098af: c7 43 30 02 25 00 00 movl $0x2502,0x30(%ebx)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
1098b6: c7 43 34 05 18 00 00 movl $0x1805,0x34(%ebx)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
1098bd: c7 43 38 bd 08 00 00 movl $0x8bd,0x38(%ebx)
tty->termios.c_lflag =
1098c4: c7 43 3c 3b 82 00 00 movl $0x823b,0x3c(%ebx)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
1098cb: c6 43 41 03 movb $0x3,0x41(%ebx)
tty->termios.c_cc[VQUIT] = '\034';
1098cf: c6 43 42 1c movb $0x1c,0x42(%ebx)
tty->termios.c_cc[VERASE] = '\177';
1098d3: c6 43 43 7f movb $0x7f,0x43(%ebx)
tty->termios.c_cc[VKILL] = '\025';
1098d7: c6 43 44 15 movb $0x15,0x44(%ebx)
tty->termios.c_cc[VEOF] = '\004';
1098db: c6 43 45 04 movb $0x4,0x45(%ebx)
tty->termios.c_cc[VEOL] = '\000';
1098df: c6 43 4c 00 movb $0x0,0x4c(%ebx)
tty->termios.c_cc[VEOL2] = '\000';
1098e3: c6 43 51 00 movb $0x0,0x51(%ebx)
tty->termios.c_cc[VSTART] = '\021';
1098e7: c6 43 49 11 movb $0x11,0x49(%ebx)
tty->termios.c_cc[VSTOP] = '\023';
1098eb: c6 43 4a 13 movb $0x13,0x4a(%ebx)
tty->termios.c_cc[VSUSP] = '\032';
1098ef: c6 43 4b 1a movb $0x1a,0x4b(%ebx)
tty->termios.c_cc[VREPRINT] = '\022';
1098f3: c6 43 4d 12 movb $0x12,0x4d(%ebx)
tty->termios.c_cc[VDISCARD] = '\017';
1098f7: c6 43 4e 0f movb $0xf,0x4e(%ebx)
tty->termios.c_cc[VWERASE] = '\027';
1098fb: c6 43 4f 17 movb $0x17,0x4f(%ebx)
tty->termios.c_cc[VLNEXT] = '\026';
1098ff: c6 43 50 16 movb $0x16,0x50(%ebx)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
109903: c7 83 b8 00 00 00 00 movl $0x0,0xb8(%ebx)
10990a: 00 00 00
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
10990d: 8b 43 64 mov 0x64(%ebx),%eax
109910: d1 e8 shr %eax
109912: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
tty->highwater = tty->rawInBuf.Size * 3/4;
109918: 8b 43 64 mov 0x64(%ebx),%eax
10991b: 8d 04 40 lea (%eax,%eax,2),%eax
10991e: c1 e8 02 shr $0x2,%eax
109921: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx)
/*
* Bump name characer
*/
if (c++ == 'z')
109927: a0 e0 fa 12 00 mov 0x12fae0,%al
10992c: 3c 7a cmp $0x7a,%al
10992e: 0f 84 86 00 00 00 je 1099ba <rtems_termios_open+0x396>
109934: 40 inc %eax
109935: a2 e0 fa 12 00 mov %al,0x12fae0
10993a: e9 39 fd ff ff jmp 109678 <rtems_termios_open+0x54>
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
10993f: 89 5c 24 08 mov %ebx,0x8(%esp)
109943: c7 44 24 04 f8 ad 10 movl $0x10adf8,0x4(%esp)
10994a: 00
10994b: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax
109951: 89 04 24 mov %eax,(%esp)
109954: e8 df 24 00 00 call 10be38 <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
109959: 85 c0 test %eax,%eax
10995b: 0f 85 a0 00 00 00 jne 109a01 <rtems_termios_open+0x3dd><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
109961: 89 5c 24 08 mov %ebx,0x8(%esp)
109965: c7 44 24 04 5c 95 10 movl $0x10955c,0x4(%esp)
10996c: 00
10996d: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax
109973: 89 04 24 mov %eax,(%esp)
109976: e8 bd 24 00 00 call 10be38 <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
10997b: 85 c0 test %eax,%eax
10997d: 0f 84 37 fd ff ff je 1096ba <rtems_termios_open+0x96><== ALWAYS TAKEN
109983: eb 7c jmp 109a01 <rtems_termios_open+0x3dd><== NOT EXECUTED
109985: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
109988: 89 14 24 mov %edx,(%esp)
10998b: e8 ac df ff ff call 10793c <free>
free((void *)(tty->rawInBuf.theBuf));
109990: 89 34 24 mov %esi,(%esp)
109993: e8 a4 df ff ff call 10793c <free>
free(tty);
109998: 89 1c 24 mov %ebx,(%esp)
10999b: e8 9c df ff ff call 10793c <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
1099a0: a1 6c 1e 13 00 mov 0x131e6c,%eax
1099a5: 89 04 24 mov %eax,(%esp)
1099a8: e8 fb 20 00 00 call 10baa8 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
1099ad: c7 44 24 2c 1a 00 00 movl $0x1a,0x2c(%esp)
1099b4: 00
1099b5: e9 0d fd ff ff jmp 1096c7 <rtems_termios_open+0xa3>
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
c = 'a';
1099ba: c6 05 e0 fa 12 00 61 movb $0x61,0x12fae0
1099c1: e9 b2 fc ff ff jmp 109678 <rtems_termios_open+0x54>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
1099c6: 8d 43 68 lea 0x68(%ebx),%eax
1099c9: 89 44 24 10 mov %eax,0x10(%esp)
1099cd: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
1099d4: 00
1099d5: c7 44 24 08 24 00 00 movl $0x24,0x8(%esp)
1099dc: 00
1099dd: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1099e4: 00
rtems_build_name ('T', 'R', 'r', c),
1099e5: 0f be 05 e0 fa 12 00 movsbl 0x12fae0,%eax
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
1099ec: 0d 00 72 52 54 or $0x54527200,%eax
1099f1: 89 04 24 mov %eax,(%esp)
1099f4: e8 cf 1c 00 00 call 10b6c8 <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)
1099f9: 85 c0 test %eax,%eax
1099fb: 0f 84 ae fe ff ff je 1098af <rtems_termios_open+0x28b>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
109a01: 89 04 24 mov %eax,(%esp)
109a04: e8 ab 26 00 00 call 10c0b4 <rtems_fatal_error_occurred>
109a09: 8d 76 00 lea 0x0(%esi),%esi
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
109a0c: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax
109a12: 89 44 24 14 mov %eax,0x14(%esp)
109a16: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
109a1d: 00
109a1e: c7 44 24 0c 00 05 00 movl $0x500,0xc(%esp)
109a25: 00
109a26: c7 44 24 08 00 04 00 movl $0x400,0x8(%esp)
109a2d: 00
109a2e: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp)
109a35: 00
rtems_build_name ('T', 'x', 'T', c),
109a36: 0f be 05 e0 fa 12 00 movsbl 0x12fae0,%eax
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
109a3d: 0d 00 54 78 54 or $0x54785400,%eax
109a42: 89 04 24 mov %eax,(%esp)
109a45: e8 fe 20 00 00 call 10bb48 <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)
109a4a: 85 c0 test %eax,%eax
109a4c: 75 b3 jne 109a01 <rtems_termios_open+0x3dd><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
109a4e: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax
109a54: 89 44 24 14 mov %eax,0x14(%esp)
109a58: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
109a5f: 00
109a60: c7 44 24 0c 00 05 00 movl $0x500,0xc(%esp)
109a67: 00
109a68: c7 44 24 08 00 04 00 movl $0x400,0x8(%esp)
109a6f: 00
109a70: c7 44 24 04 09 00 00 movl $0x9,0x4(%esp)
109a77: 00
rtems_build_name ('R', 'x', 'T', c),
109a78: 0f be 05 e0 fa 12 00 movsbl 0x12fae0,%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 (
109a7f: 0d 00 54 78 52 or $0x52785400,%eax
109a84: 89 04 24 mov %eax,(%esp)
109a87: e8 bc 20 00 00 call 10bb48 <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)
109a8c: 85 c0 test %eax,%eax
109a8e: 0f 84 00 fe ff ff je 109894 <rtems_termios_open+0x270><== ALWAYS TAKEN
109a94: e9 68 ff ff ff jmp 109a01 <rtems_termios_open+0x3dd><== NOT EXECUTED
109a99: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
109a9c: 89 1d 70 1e 13 00 mov %ebx,0x131e70
109aa2: e9 07 fd ff ff jmp 1097ae <rtems_termios_open+0x18a>
0010a04c <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, size_t len, struct rtems_termios_tty *tty)
{
10a04c: 55 push %ebp
10a04d: 57 push %edi
10a04e: 56 push %esi
10a04f: 53 push %ebx
10a050: 83 ec 2c sub $0x2c,%esp
10a053: 8b 74 24 40 mov 0x40(%esp),%esi
10a057: 8b 4c 24 44 mov 0x44(%esp),%ecx
10a05b: 89 4c 24 18 mov %ecx,0x18(%esp)
10a05f: 8b 6c 24 48 mov 0x48(%esp),%ebp
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
10a063: 8b 85 b4 00 00 00 mov 0xb4(%ebp),%eax
10a069: 85 c0 test %eax,%eax
10a06b: 0f 84 f7 00 00 00 je 10a168 <rtems_termios_puts+0x11c>
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
10a071: 8b bd 80 00 00 00 mov 0x80(%ebp),%edi
while (len) {
10a077: 8b 44 24 18 mov 0x18(%esp),%eax
10a07b: 85 c0 test %eax,%eax
10a07d: 0f 84 b2 00 00 00 je 10a135 <rtems_termios_puts+0xe9><== NEVER TAKEN
10a083: 90 nop
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
10a084: 8d 47 01 lea 0x1(%edi),%eax
10a087: 8b 8d 88 00 00 00 mov 0x88(%ebp),%ecx
10a08d: 31 d2 xor %edx,%edx
10a08f: f7 f1 div %ecx
10a091: 89 54 24 1c mov %edx,0x1c(%esp)
10a095: 89 d7 mov %edx,%edi
rtems_interrupt_disable (level);
10a097: 9c pushf
10a098: fa cli
10a099: 5a pop %edx
while (newHead == tty->rawOutBuf.Tail) {
10a09a: 8b 9d 84 00 00 00 mov 0x84(%ebp),%ebx
10a0a0: 39 fb cmp %edi,%ebx
10a0a2: 75 3f jne 10a0e3 <rtems_termios_puts+0x97>
tty->rawOutBufState = rob_wait;
10a0a4: c7 85 94 00 00 00 02 movl $0x2,0x94(%ebp)
10a0ab: 00 00 00
rtems_interrupt_enable (level);
10a0ae: 52 push %edx
10a0af: 9d popf
sc = rtems_semaphore_obtain(
10a0b0: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10a0b7: 00
10a0b8: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10a0bf: 00
10a0c0: 8b 85 8c 00 00 00 mov 0x8c(%ebp),%eax
10a0c6: 89 04 24 mov %eax,(%esp)
10a0c9: e8 ae 18 00 00 call 10b97c <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
10a0ce: 85 c0 test %eax,%eax
10a0d0: 0f 85 b0 00 00 00 jne 10a186 <rtems_termios_puts+0x13a><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
10a0d6: 9c pushf
10a0d7: fa cli
10a0d8: 5a pop %edx
* 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) {
10a0d9: 8b 85 84 00 00 00 mov 0x84(%ebp),%eax
10a0df: 39 d8 cmp %ebx,%eax
10a0e1: 74 c1 je 10a0a4 <rtems_termios_puts+0x58><== NEVER TAKEN
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++;
10a0e3: 8b 85 80 00 00 00 mov 0x80(%ebp),%eax
10a0e9: 8b 5d 7c mov 0x7c(%ebp),%ebx
10a0ec: 8a 0e mov (%esi),%cl
10a0ee: 88 0c 03 mov %cl,(%ebx,%eax,1)
10a0f1: 46 inc %esi
tty->rawOutBuf.Head = newHead;
10a0f2: 8b 44 24 1c mov 0x1c(%esp),%eax
10a0f6: 89 85 80 00 00 00 mov %eax,0x80(%ebp)
if (tty->rawOutBufState == rob_idle) {
10a0fc: 8b 85 94 00 00 00 mov 0x94(%ebp),%eax
10a102: 85 c0 test %eax,%eax
10a104: 75 23 jne 10a129 <rtems_termios_puts+0xdd>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
10a106: 8b 85 b8 00 00 00 mov 0xb8(%ebp),%eax
10a10c: a8 10 test $0x10,%al
10a10e: 74 2d je 10a13d <rtems_termios_puts+0xf1><== ALWAYS TAKEN
(*tty->device.write)(
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;
10a110: 8b 85 b8 00 00 00 mov 0xb8(%ebp),%eax <== NOT EXECUTED
10a116: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
10a119: 89 85 b8 00 00 00 mov %eax,0xb8(%ebp) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
10a11f: c7 85 94 00 00 00 01 movl $0x1,0x94(%ebp)
10a126: 00 00 00
}
rtems_interrupt_enable (level);
10a129: 52 push %edx
10a12a: 9d popf
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
10a12b: ff 4c 24 18 decl 0x18(%esp)
10a12f: 0f 85 4f ff ff ff jne 10a084 <rtems_termios_puts+0x38>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
10a135: 83 c4 2c add $0x2c,%esp
10a138: 5b pop %ebx
10a139: 5e pop %esi
10a13a: 5f pop %edi
10a13b: 5d pop %ebp
10a13c: c3 ret
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
10a13d: 8b 85 84 00 00 00 mov 0x84(%ebp),%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)(
10a143: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10a14a: 00
10a14b: 03 45 7c add 0x7c(%ebp),%eax
10a14e: 89 44 24 04 mov %eax,0x4(%esp)
10a152: 8b 45 10 mov 0x10(%ebp),%eax
10a155: 89 04 24 mov %eax,(%esp)
10a158: 89 54 24 14 mov %edx,0x14(%esp)
10a15c: ff 95 a4 00 00 00 call *0xa4(%ebp)
10a162: 8b 54 24 14 mov 0x14(%esp),%edx
10a166: eb b7 jmp 10a11f <rtems_termios_puts+0xd3>
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
10a168: 89 4c 24 48 mov %ecx,0x48(%esp)
10a16c: 89 74 24 44 mov %esi,0x44(%esp)
10a170: 8b 45 10 mov 0x10(%ebp),%eax
10a173: 89 44 24 40 mov %eax,0x40(%esp)
10a177: 8b 85 a4 00 00 00 mov 0xa4(%ebp),%eax
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
10a17d: 83 c4 2c add $0x2c,%esp
10a180: 5b pop %ebx
10a181: 5e pop %esi
10a182: 5f pop %edi
10a183: 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);
10a184: ff e0 jmp *%eax
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
10a186: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10a189: e8 26 1f 00 00 call 10c0b4 <rtems_fatal_error_occurred><== NOT EXECUTED
0010a774 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
10a774: 55 push %ebp
10a775: 57 push %edi
10a776: 56 push %esi
10a777: 53 push %ebx
10a778: 83 ec 3c sub $0x3c,%esp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10a77b: 8b 4c 24 50 mov 0x50(%esp),%ecx
10a77f: 8b 01 mov (%ecx),%eax
10a781: 8b 58 2c mov 0x2c(%eax),%ebx
uint32_t count = args->count;
10a784: 8b 49 10 mov 0x10(%ecx),%ecx
10a787: 89 4c 24 24 mov %ecx,0x24(%esp)
char *buffer = args->buffer;
10a78b: 8b 4c 24 50 mov 0x50(%esp),%ecx
10a78f: 8b 49 0c mov 0xc(%ecx),%ecx
10a792: 89 4c 24 28 mov %ecx,0x28(%esp)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10a796: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10a79d: 00
10a79e: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10a7a5: 00
10a7a6: 8b 43 14 mov 0x14(%ebx),%eax
10a7a9: 89 04 24 mov %eax,(%esp)
10a7ac: e8 cb 11 00 00 call 10b97c <rtems_semaphore_obtain>
10a7b1: 89 44 24 20 mov %eax,0x20(%esp)
if (sc != RTEMS_SUCCESSFUL)
10a7b5: 85 c0 test %eax,%eax
10a7b7: 75 39 jne 10a7f2 <rtems_termios_read+0x7e><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
10a7b9: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10a7bf: c1 e0 05 shl $0x5,%eax
10a7c2: 8b 80 e8 1a 13 00 mov 0x131ae8(%eax),%eax
10a7c8: 85 c0 test %eax,%eax
10a7ca: 74 34 je 10a800 <rtems_termios_read+0x8c>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
10a7cc: 8b 4c 24 50 mov 0x50(%esp),%ecx
10a7d0: 89 4c 24 04 mov %ecx,0x4(%esp)
10a7d4: 89 1c 24 mov %ebx,(%esp)
10a7d7: ff d0 call *%eax
10a7d9: 89 44 24 20 mov %eax,0x20(%esp)
tty->tty_rcvwakeup = 0;
10a7dd: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10a7e4: 00 00 00
rtems_semaphore_release (tty->isem);
10a7e7: 8b 43 14 mov 0x14(%ebx),%eax
10a7ea: 89 04 24 mov %eax,(%esp)
10a7ed: e8 b6 12 00 00 call 10baa8 <rtems_semaphore_release>
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
10a7f2: 8b 44 24 20 mov 0x20(%esp),%eax
10a7f6: 83 c4 3c add $0x3c,%esp
10a7f9: 5b pop %ebx
10a7fa: 5e pop %esi
10a7fb: 5f pop %edi
10a7fc: 5d pop %ebp
10a7fd: c3 ret
10a7fe: 66 90 xchg %ax,%ax
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
10a800: 8b 43 20 mov 0x20(%ebx),%eax
10a803: 39 43 24 cmp %eax,0x24(%ebx)
10a806: 74 70 je 10a878 <rtems_termios_read+0x104><== ALWAYS TAKEN
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
10a808: 8b 74 24 24 mov 0x24(%esp),%esi
10a80c: 85 f6 test %esi,%esi
10a80e: 74 31 je 10a841 <rtems_termios_read+0xcd><== NEVER TAKEN
10a810: 8b 43 24 mov 0x24(%ebx),%eax
10a813: 3b 43 20 cmp 0x20(%ebx),%eax
10a816: 7d 31 jge 10a849 <rtems_termios_read+0xd5>
}
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
10a818: 8b 4c 24 28 mov 0x28(%esp),%ecx
10a81c: 29 c1 sub %eax,%ecx
10a81e: 8b 54 24 24 mov 0x24(%esp),%edx
10a822: 89 cf mov %ecx,%edi
10a824: eb 0b jmp 10a831 <rtems_termios_read+0xbd>
10a826: 66 90 xchg %ax,%ax
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
10a828: 39 43 20 cmp %eax,0x20(%ebx)
10a82b: 0f 8e df 01 00 00 jle 10aa10 <rtems_termios_read+0x29c>
*buffer++ = tty->cbuf[tty->cindex++];
10a831: 8b 73 1c mov 0x1c(%ebx),%esi
10a834: 8a 0c 06 mov (%esi,%eax,1),%cl
10a837: 88 0c 07 mov %cl,(%edi,%eax,1)
10a83a: 40 inc %eax
10a83b: 89 43 24 mov %eax,0x24(%ebx)
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
10a83e: 4a dec %edx
10a83f: 75 e7 jne 10a828 <rtems_termios_read+0xb4>
10a841: c7 44 24 24 00 00 00 movl $0x0,0x24(%esp)
10a848: 00
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
10a849: 8b 4c 24 50 mov 0x50(%esp),%ecx
10a84d: 8b 41 10 mov 0x10(%ecx),%eax
10a850: 2b 44 24 24 sub 0x24(%esp),%eax
10a854: 89 41 18 mov %eax,0x18(%ecx)
tty->tty_rcvwakeup = 0;
10a857: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10a85e: 00 00 00
rtems_semaphore_release (tty->isem);
10a861: 8b 43 14 mov 0x14(%ebx),%eax
10a864: 89 04 24 mov %eax,(%esp)
10a867: e8 3c 12 00 00 call 10baa8 <rtems_semaphore_release>
return sc;
}
10a86c: 8b 44 24 20 mov 0x20(%esp),%eax
10a870: 83 c4 3c add $0x3c,%esp
10a873: 5b pop %ebx
10a874: 5e pop %esi
10a875: 5f pop %edi
10a876: 5d pop %ebp
10a877: c3 ret
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
10a878: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
10a87f: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
tty->read_start_column = tty->column;
10a886: 8b 43 28 mov 0x28(%ebx),%eax
10a889: 89 43 2c mov %eax,0x2c(%ebx)
if (tty->device.pollRead != NULL &&
10a88c: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
10a892: 85 c0 test %eax,%eax
10a894: 74 0e je 10a8a4 <rtems_termios_read+0x130>
10a896: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx
10a89c: 85 d2 test %edx,%edx
10a89e: 0f 84 75 01 00 00 je 10aa19 <rtems_termios_read+0x2a5>
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
10a8a4: 8b 7b 74 mov 0x74(%ebx),%edi
rtems_status_code sc;
int wait = 1;
10a8a7: be 01 00 00 00 mov $0x1,%esi
== (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);
10a8ac: 8d 4b 49 lea 0x49(%ebx),%ecx
10a8af: 89 4c 24 2c mov %ecx,0x2c(%esp)
10a8b3: 90 nop
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a8b4: 8b 53 5c mov 0x5c(%ebx),%edx
10a8b7: 8b 43 60 mov 0x60(%ebx),%eax
10a8ba: 39 c2 cmp %eax,%edx
10a8bc: 0f 84 ca 00 00 00 je 10a98c <rtems_termios_read+0x218>
(tty->ccount < (CBUFSIZE-1))) {
10a8c2: a1 dc fa 12 00 mov 0x12fadc,%eax
10a8c7: 48 dec %eax
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a8c8: 3b 43 20 cmp 0x20(%ebx),%eax
10a8cb: 0f 86 bb 00 00 00 jbe 10a98c <rtems_termios_read+0x218><== NEVER TAKEN
10a8d1: 8d 76 00 lea 0x0(%esi),%esi
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
10a8d4: 8b 43 5c mov 0x5c(%ebx),%eax
10a8d7: 8b 4b 64 mov 0x64(%ebx),%ecx
10a8da: 40 inc %eax
10a8db: 31 d2 xor %edx,%edx
10a8dd: f7 f1 div %ecx
c = tty->rawInBuf.theBuf[newHead];
10a8df: 8b 43 58 mov 0x58(%ebx),%eax
10a8e2: 8a 0c 10 mov (%eax,%edx,1),%cl
tty->rawInBuf.Head = newHead;
10a8e5: 89 53 5c mov %edx,0x5c(%ebx)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
10a8e8: 8b 43 60 mov 0x60(%ebx),%eax
10a8eb: 8b 6b 64 mov 0x64(%ebx),%ebp
% tty->rawInBuf.Size)
10a8ee: 8b 7b 64 mov 0x64(%ebx),%edi
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)
10a8f1: 01 e8 add %ebp,%eax
10a8f3: 29 d0 sub %edx,%eax
% tty->rawInBuf.Size)
10a8f5: 31 d2 xor %edx,%edx
10a8f7: f7 f7 div %edi
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)
10a8f9: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx
10a8ff: 73 5b jae 10a95c <rtems_termios_read+0x1e8><== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
10a901: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a907: 83 e0 fe and $0xfffffffe,%eax
10a90a: 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))
10a910: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a916: 25 02 02 00 00 and $0x202,%eax
10a91b: 3d 02 02 00 00 cmp $0x202,%eax
10a920: 0f 84 a6 00 00 00 je 10a9cc <rtems_termios_read+0x258><== NEVER TAKEN
&& ((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);
} else if (tty->flow_ctrl & FL_MDRTS) {
10a926: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a92c: f6 c4 01 test $0x1,%ah
10a92f: 74 2b je 10a95c <rtems_termios_read+0x1e8><== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
10a931: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a937: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
10a93a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
10a940: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
10a946: 85 c0 test %eax,%eax <== NOT EXECUTED
10a948: 74 12 je 10a95c <rtems_termios_read+0x1e8><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
10a94a: 8b 53 10 mov 0x10(%ebx),%edx <== NOT EXECUTED
10a94d: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
10a950: 88 4c 24 1c mov %cl,0x1c(%esp) <== NOT EXECUTED
10a954: ff d0 call *%eax <== NOT EXECUTED
10a956: 8a 4c 24 1c mov 0x1c(%esp),%cl <== NOT EXECUTED
10a95a: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
10a95c: 0f b6 c1 movzbl %cl,%eax
10a95f: 89 da mov %ebx,%edx
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
10a961: f6 43 3c 02 testb $0x2,0x3c(%ebx)
10a965: 74 51 je 10a9b8 <rtems_termios_read+0x244><== NEVER TAKEN
if (siproc (c, tty))
10a967: e8 e4 fc ff ff call 10a650 <siproc>
10a96c: 85 c0 test %eax,%eax
10a96e: 75 56 jne 10a9c6 <rtems_termios_read+0x252>
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
10a970: 8b 7b 70 mov 0x70(%ebx),%edi
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a973: 8b 53 5c mov 0x5c(%ebx),%edx
10a976: 8b 43 60 mov 0x60(%ebx),%eax
10a979: 39 c2 cmp %eax,%edx
10a97b: 74 0f je 10a98c <rtems_termios_read+0x218>
(tty->ccount < (CBUFSIZE-1))) {
10a97d: a1 dc fa 12 00 mov 0x12fadc,%eax
10a982: 48 dec %eax
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a983: 39 43 20 cmp %eax,0x20(%ebx)
10a986: 0f 82 48 ff ff ff jb 10a8d4 <rtems_termios_read+0x160><== ALWAYS TAKEN
}
/*
* Wait for characters
*/
if ( wait ) {
10a98c: 85 f6 test %esi,%esi
10a98e: 0f 84 74 fe ff ff je 10a808 <rtems_termios_read+0x94>
sc = rtems_semaphore_obtain(
10a994: 89 7c 24 08 mov %edi,0x8(%esp)
10a998: 8b 43 6c mov 0x6c(%ebx),%eax
10a99b: 89 44 24 04 mov %eax,0x4(%esp)
10a99f: 8b 43 68 mov 0x68(%ebx),%eax
10a9a2: 89 04 24 mov %eax,(%esp)
10a9a5: e8 d2 0f 00 00 call 10b97c <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
10a9aa: 85 c0 test %eax,%eax
10a9ac: 0f 84 02 ff ff ff je 10a8b4 <rtems_termios_read+0x140>
10a9b2: e9 51 fe ff ff jmp 10a808 <rtems_termios_read+0x94>
10a9b7: 90 nop
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
10a9b8: e8 93 fc ff ff call 10a650 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
10a9bd: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED
10a9c1: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
10a9c4: 7c aa jl 10a970 <rtems_termios_read+0x1fc><== NOT EXECUTED
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
10a9c6: 31 f6 xor %esi,%esi
10a9c8: eb a6 jmp 10a970 <rtems_termios_read+0x1fc>
10a9ca: 66 90 xchg %ax,%ax
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
10a9cc: 8b bb 94 00 00 00 mov 0x94(%ebx),%edi <== NOT EXECUTED
10a9d2: 85 ff test %edi,%edi <== NOT EXECUTED
10a9d4: 74 0e je 10a9e4 <rtems_termios_read+0x270><== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
10a9d6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a9dc: a8 20 test $0x20,%al <== NOT EXECUTED
10a9de: 0f 84 42 ff ff ff je 10a926 <rtems_termios_read+0x1b2><== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
10a9e4: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) <== NOT EXECUTED
10a9eb: 00
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
10a9ec: 8b 44 24 2c mov 0x2c(%esp),%eax <== NOT EXECUTED
10a9f0: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
10a9f4: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10a9f7: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10a9fa: 88 4c 24 1c mov %cl,0x1c(%esp) <== NOT EXECUTED
10a9fe: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10aa04: 8a 4c 24 1c mov 0x1c(%esp),%cl <== NOT EXECUTED
10aa08: e9 4f ff ff ff jmp 10a95c <rtems_termios_read+0x1e8><== NOT EXECUTED
10aa0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10aa10: 89 54 24 24 mov %edx,0x24(%esp)
10aa14: e9 30 fe ff ff jmp 10a849 <rtems_termios_read+0xd5>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
10aa19: f6 43 3c 02 testb $0x2,0x3c(%ebx)
10aa1d: 75 1f jne 10aa3e <rtems_termios_read+0x2ca>
10aa1f: eb 37 jmp 10aa58 <rtems_termios_read+0x2e4>
10aa21: 8d 76 00 lea 0x0(%esi),%esi
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
10aa24: 25 ff 00 00 00 and $0xff,%eax
10aa29: 89 da mov %ebx,%edx
10aa2b: e8 20 fc ff ff call 10a650 <siproc>
10aa30: 85 c0 test %eax,%eax
10aa32: 0f 85 d0 fd ff ff jne 10a808 <rtems_termios_read+0x94>
10aa38: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
{
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
10aa3e: 8b 53 10 mov 0x10(%ebx),%edx
10aa41: 89 14 24 mov %edx,(%esp)
10aa44: ff d0 call *%eax
if (n < 0) {
10aa46: 85 c0 test %eax,%eax
10aa48: 79 da jns 10aa24 <rtems_termios_read+0x2b0>
rtems_task_wake_after (1);
10aa4a: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10aa51: e8 62 14 00 00 call 10beb8 <rtems_task_wake_after>
10aa56: eb e0 jmp 10aa38 <rtems_termios_read+0x2c4>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
10aa58: e8 83 08 00 00 call 10b2e0 <rtems_clock_get_ticks_since_boot>
10aa5d: 89 c6 mov %eax,%esi
10aa5f: 90 nop
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
10aa60: 8b 53 10 mov 0x10(%ebx),%edx
10aa63: 89 14 24 mov %edx,(%esp)
10aa66: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (n < 0) {
10aa6c: 85 c0 test %eax,%eax
10aa6e: 78 28 js 10aa98 <rtems_termios_read+0x324>
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
10aa70: 25 ff 00 00 00 and $0xff,%eax
10aa75: 89 da mov %ebx,%edx
10aa77: e8 d4 fb ff ff call 10a650 <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
10aa7c: 8a 43 47 mov 0x47(%ebx),%al
10aa7f: 0f b6 d0 movzbl %al,%edx
10aa82: 39 53 20 cmp %edx,0x20(%ebx)
10aa85: 0f 8d 7d fd ff ff jge 10a808 <rtems_termios_read+0x94>
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
10aa8b: 84 c0 test %al,%al
10aa8d: 74 d1 je 10aa60 <rtems_termios_read+0x2ec><== NEVER TAKEN
10aa8f: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
10aa93: 74 cb je 10aa60 <rtems_termios_read+0x2ec><== NEVER TAKEN
10aa95: eb c1 jmp 10aa58 <rtems_termios_read+0x2e4>
10aa97: 90 nop
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
10aa98: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
10aa9c: 74 1c je 10aaba <rtems_termios_read+0x346><== NEVER TAKEN
if (tty->termios.c_cc[VTIME] && tty->ccount) {
10aa9e: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
10aaa2: 74 08 je 10aaac <rtems_termios_read+0x338><== NEVER TAKEN
10aaa4: 8b 6b 20 mov 0x20(%ebx),%ebp
10aaa7: 85 ed test %ebp,%ebp
10aaa9: 75 19 jne 10aac4 <rtems_termios_read+0x350>
10aaab: 90 nop
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
10aaac: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10aab3: e8 00 14 00 00 call 10beb8 <rtems_task_wake_after>
10aab8: eb a6 jmp 10aa60 <rtems_termios_read+0x2ec>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
10aaba: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
10aabe: 0f 84 44 fd ff ff je 10a808 <rtems_termios_read+0x94><== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
10aac4: e8 17 08 00 00 call 10b2e0 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
10aac9: 29 f0 sub %esi,%eax
10aacb: 3b 43 54 cmp 0x54(%ebx),%eax
10aace: 76 dc jbe 10aaac <rtems_termios_read+0x338>
10aad0: e9 33 fd ff ff jmp 10a808 <rtems_termios_read+0x94>
00109310 <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)
{
109310: 57 push %edi
109311: 56 push %esi
109312: 53 push %ebx
109313: 83 ec 10 sub $0x10,%esp
109316: 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))
109318: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax
10931e: 25 03 04 00 00 and $0x403,%eax
109323: 3d 01 04 00 00 cmp $0x401,%eax
109328: 0f 84 5e 01 00 00 je 10948c <rtems_termios_refill_transmitter+0x17c><== NEVER TAKEN
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
10932e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109334: 83 e0 03 and $0x3,%eax
109337: 83 f8 02 cmp $0x2,%eax
10933a: 0f 84 90 01 00 00 je 1094d0 <rtems_termios_refill_transmitter+0x1c0><== NEVER TAKEN
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
109340: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
109346: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
10934c: 39 c2 cmp %eax,%edx
10934e: 0f 84 a8 00 00 00 je 1093fc <rtems_termios_refill_transmitter+0xec>
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
109354: 9c pushf
109355: fa cli
109356: 58 pop %eax
len = tty->t_dqlen;
109357: 8b b3 90 00 00 00 mov 0x90(%ebx),%esi
tty->t_dqlen = 0;
10935d: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx)
109364: 00 00 00
rtems_interrupt_enable(level);
109367: 50 push %eax
109368: 9d popf
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
109369: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
10936f: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
109375: 01 f0 add %esi,%eax
109377: 31 d2 xor %edx,%edx
109379: f7 f1 div %ecx
10937b: 89 d6 mov %edx,%esi
tty->rawOutBuf.Tail = newTail;
10937d: 89 93 84 00 00 00 mov %edx,0x84(%ebx)
if (tty->rawOutBufState == rob_wait) {
109383: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
10938a: 0f 84 e8 00 00 00 je 109478 <rtems_termios_refill_transmitter+0x168>
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
109390: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
109396: 39 f0 cmp %esi,%eax
109398: 74 7a je 109414 <rtems_termios_refill_transmitter+0x104>
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
10939a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1093a0: 25 10 02 00 00 and $0x210,%eax
1093a5: 3d 10 02 00 00 cmp $0x210,%eax
1093aa: 0f 84 64 01 00 00 je 109514 <rtems_termios_refill_transmitter+0x204><== NEVER TAKEN
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
1093b0: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
1093b6: 39 c6 cmp %eax,%esi
1093b8: 0f 87 92 00 00 00 ja 109450 <rtems_termios_refill_transmitter+0x140>
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
1093be: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi
1093c4: 29 f7 sub %esi,%edi
/* 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)) {
1093c6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1093cc: f6 c4 06 test $0x6,%ah
1093cf: 0f 85 92 00 00 00 jne 109467 <rtems_termios_refill_transmitter+0x157>
1093d5: 89 f8 mov %edi,%eax
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
1093d7: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
1093de: 00 00 00
(*tty->device.write)(
1093e1: 89 44 24 08 mov %eax,0x8(%esp)
1093e5: 8b 43 7c mov 0x7c(%ebx),%eax
1093e8: 01 f0 add %esi,%eax
1093ea: 89 44 24 04 mov %eax,0x4(%esp)
1093ee: 8b 43 10 mov 0x10(%ebx),%eax
1093f1: 89 04 24 mov %eax,(%esp)
1093f4: ff 93 a4 00 00 00 call *0xa4(%ebx)
1093fa: eb 44 jmp 109440 <rtems_termios_refill_transmitter+0x130>
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
1093fc: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
109403: 0f 84 33 01 00 00 je 10953c <rtems_termios_refill_transmitter+0x22c><== NEVER TAKEN
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
109409: 31 ff xor %edi,%edi
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10940b: 89 f8 mov %edi,%eax
10940d: 83 c4 10 add $0x10,%esp
109410: 5b pop %ebx
109411: 5e pop %esi
109412: 5f pop %edi
109413: c3 ret
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
109414: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
10941b: 00 00 00
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
10941e: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax
109424: 85 c0 test %eax,%eax
109426: 0f 84 28 01 00 00 je 109554 <rtems_termios_refill_transmitter+0x244><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
10942c: 8b 93 d8 00 00 00 mov 0xd8(%ebx),%edx <== NOT EXECUTED
109432: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
109436: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
109439: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
10943c: ff d0 call *%eax <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
10943e: 31 ff xor %edi,%edi <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
109440: 89 b3 84 00 00 00 mov %esi,0x84(%ebx)
}
return nToSend;
}
109446: 89 f8 mov %edi,%eax
109448: 83 c4 10 add $0x10,%esp
10944b: 5b pop %ebx
10944c: 5e pop %esi
10944d: 5f pop %edi
10944e: c3 ret
10944f: 90 nop
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
109450: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi
109456: 29 f7 sub %esi,%edi
else
nToSend = tty->rawOutBuf.Head - newTail;
/* 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)) {
109458: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10945e: f6 c4 06 test $0x6,%ah
109461: 0f 84 6e ff ff ff je 1093d5 <rtems_termios_refill_transmitter+0xc5><== ALWAYS TAKEN
109467: b8 01 00 00 00 mov $0x1,%eax
nToSend = 1;
10946c: bf 01 00 00 00 mov $0x1,%edi
109471: e9 61 ff ff ff jmp 1093d7 <rtems_termios_refill_transmitter+0xc7>
109476: 66 90 xchg %ax,%ax
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
109478: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
10947e: 89 04 24 mov %eax,(%esp)
109481: e8 22 26 00 00 call 10baa8 <rtems_semaphore_release>
109486: e9 05 ff ff ff jmp 109390 <rtems_termios_refill_transmitter+0x80>
10948b: 90 nop
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
10948c: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) <== NOT EXECUTED
109493: 00
109494: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED
109497: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
10949b: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10949e: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1094a1: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
1094a7: 9c pushf <== NOT EXECUTED
1094a8: fa cli <== NOT EXECUTED
1094a9: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
1094aa: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
1094b0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1094b6: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
1094b9: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
1094bf: 52 push %edx <== NOT EXECUTED
1094c0: 9d popf <== NOT EXECUTED
nToSend = 1;
1094c1: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
1094c6: 89 f8 mov %edi,%eax <== NOT EXECUTED
1094c8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1094cb: 5b pop %ebx <== NOT EXECUTED
1094cc: 5e pop %esi <== NOT EXECUTED
1094cd: 5f pop %edi <== NOT EXECUTED
1094ce: c3 ret <== NOT EXECUTED
1094cf: 90 nop <== NOT EXECUTED
* 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);
1094d0: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) <== NOT EXECUTED
1094d7: 00
1094d8: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED
1094db: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
1094df: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
1094e2: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1094e5: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
1094eb: 9c pushf <== NOT EXECUTED
1094ec: fa cli <== NOT EXECUTED
1094ed: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
1094ee: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
1094f4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1094fa: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
1094fd: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
109503: 52 push %edx <== NOT EXECUTED
109504: 9d popf <== NOT EXECUTED
nToSend = 1;
109505: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10950a: 89 f8 mov %edi,%eax <== NOT EXECUTED
10950c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10950f: 5b pop %ebx <== NOT EXECUTED
109510: 5e pop %esi <== NOT EXECUTED
109511: 5f pop %edi <== NOT EXECUTED
109512: c3 ret <== NOT EXECUTED
109513: 90 nop <== NOT EXECUTED
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
109514: 9c pushf <== NOT EXECUTED
109515: fa cli <== NOT EXECUTED
109516: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
109517: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10951d: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
109520: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
109526: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED
10952d: 00 00 00
rtems_interrupt_enable(level);
109530: 52 push %edx <== NOT EXECUTED
109531: 9d popf <== NOT EXECUTED
nToSend = 0;
109532: 31 ff xor %edi,%edi <== NOT EXECUTED
109534: e9 07 ff ff ff jmp 109440 <rtems_termios_refill_transmitter+0x130><== NOT EXECUTED
109539: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
10953c: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax <== NOT EXECUTED
109542: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
109545: e8 5e 25 00 00 call 10baa8 <rtems_semaphore_release><== NOT EXECUTED
}
return 0;
10954a: 31 ff xor %edi,%edi <== NOT EXECUTED
10954c: e9 ba fe ff ff jmp 10940b <rtems_termios_refill_transmitter+0xfb><== NOT EXECUTED
109551: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
109554: 31 ff xor %edi,%edi
109556: e9 e5 fe ff ff jmp 109440 <rtems_termios_refill_transmitter+0x130>
0010adf8 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
10adf8: 57 push %edi
10adf9: 56 push %esi
10adfa: 53 push %ebx
10adfb: 83 ec 20 sub $0x20,%esp
10adfe: 8b 5c 24 30 mov 0x30(%esp),%ebx
10ae02: 8d 74 24 1c lea 0x1c(%esp),%esi
10ae06: 8d 7c 24 1b lea 0x1b(%esp),%edi
10ae0a: eb 11 jmp 10ae1d <rtems_termios_rxdaemon+0x25>
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
10ae0c: 8b 43 10 mov 0x10(%ebx),%eax
10ae0f: 89 04 24 mov %eax,(%esp)
10ae12: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (c != EOF) {
10ae18: 83 f8 ff cmp $0xffffffff,%eax
10ae1b: 75 3f jne 10ae5c <rtems_termios_rxdaemon+0x64>
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
10ae1d: 89 74 24 0c mov %esi,0xc(%esp)
10ae21: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10ae28: 00
10ae29: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
10ae30: 00
10ae31: c7 04 24 03 00 00 00 movl $0x3,(%esp)
10ae38: e8 fb 04 00 00 call 10b338 <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) {
10ae3d: f6 44 24 1c 01 testb $0x1,0x1c(%esp)
10ae42: 74 c8 je 10ae0c <rtems_termios_rxdaemon+0x14><== ALWAYS TAKEN
tty->rxTaskId = 0;
10ae44: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED
10ae4b: 00 00 00
rtems_task_delete(RTEMS_SELF);
10ae4e: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED
10ae55: e8 5e 0e 00 00 call 10bcb8 <rtems_task_delete> <== NOT EXECUTED
10ae5a: eb b0 jmp 10ae0c <rtems_termios_rxdaemon+0x14><== NOT EXECUTED
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
10ae5c: 88 44 24 1b mov %al,0x1b(%esp)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
10ae60: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10ae67: 00
10ae68: 89 7c 24 04 mov %edi,0x4(%esp)
10ae6c: 89 1c 24 mov %ebx,(%esp)
10ae6f: e8 88 fc ff ff call 10aafc <rtems_termios_enqueue_raw_characters>
10ae74: eb a7 jmp 10ae1d <rtems_termios_rxdaemon+0x25>
0010955c <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
10955c: 56 push %esi
10955d: 53 push %ebx
10955e: 83 ec 24 sub $0x24,%esp
109561: 8b 5c 24 30 mov 0x30(%esp),%ebx
109565: 8d 74 24 1c lea 0x1c(%esp),%esi
109569: eb 20 jmp 10958b <rtems_termios_txdaemon+0x2f>
10956b: 90 nop
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
10956c: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx
109572: c1 e2 05 shl $0x5,%edx
109575: 8b 82 f4 1a 13 00 mov 0x131af4(%edx),%eax
10957b: 85 c0 test %eax,%eax
10957d: 74 05 je 109584 <rtems_termios_txdaemon+0x28>
rtems_termios_linesw[tty->t_line].l_start(tty);
10957f: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
109582: ff d0 call *%eax <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
109584: 89 d8 mov %ebx,%eax
109586: e8 85 fd ff ff call 109310 <rtems_termios_refill_transmitter>
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
10958b: 89 74 24 0c mov %esi,0xc(%esp)
10958f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
109596: 00
109597: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
10959e: 00
10959f: c7 04 24 03 00 00 00 movl $0x3,(%esp)
1095a6: e8 8d 1d 00 00 call 10b338 <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) {
1095ab: f6 44 24 1c 01 testb $0x1,0x1c(%esp)
1095b0: 74 ba je 10956c <rtems_termios_txdaemon+0x10>
tty->txTaskId = 0;
1095b2: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED
1095b9: 00 00 00
rtems_task_delete(RTEMS_SELF);
1095bc: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED
1095c3: e8 f0 26 00 00 call 10bcb8 <rtems_task_delete> <== NOT EXECUTED
1095c8: eb a2 jmp 10956c <rtems_termios_txdaemon+0x10><== NOT EXECUTED
0010a6b0 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
10a6b0: 55 push %ebp
10a6b1: 57 push %edi
10a6b2: 56 push %esi
10a6b3: 53 push %ebx
10a6b4: 83 ec 2c sub $0x2c,%esp
10a6b7: 8b 6c 24 40 mov 0x40(%esp),%ebp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10a6bb: 8b 45 00 mov 0x0(%ebp),%eax
10a6be: 8b 58 2c mov 0x2c(%eax),%ebx
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10a6c1: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10a6c8: 00
10a6c9: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10a6d0: 00
10a6d1: 8b 43 18 mov 0x18(%ebx),%eax
10a6d4: 89 04 24 mov %eax,(%esp)
10a6d7: e8 a0 12 00 00 call 10b97c <rtems_semaphore_obtain>
10a6dc: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL)
10a6de: 85 c0 test %eax,%eax
10a6e0: 75 29 jne 10a70b <rtems_termios_write+0x5b><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
10a6e2: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10a6e8: c1 e0 05 shl $0x5,%eax
10a6eb: 8b 80 ec 1a 13 00 mov 0x131aec(%eax),%eax
10a6f1: 85 c0 test %eax,%eax
10a6f3: 74 23 je 10a718 <rtems_termios_write+0x68>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
10a6f5: 89 6c 24 04 mov %ebp,0x4(%esp)
10a6f9: 89 1c 24 mov %ebx,(%esp)
10a6fc: ff d0 call *%eax
10a6fe: 89 c7 mov %eax,%edi
rtems_semaphore_release (tty->osem);
10a700: 8b 43 18 mov 0x18(%ebx),%eax
10a703: 89 04 24 mov %eax,(%esp)
10a706: e8 9d 13 00 00 call 10baa8 <rtems_semaphore_release>
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
10a70b: 89 f8 mov %edi,%eax
10a70d: 83 c4 2c add $0x2c,%esp
10a710: 5b pop %ebx
10a711: 5e pop %esi
10a712: 5f pop %edi
10a713: 5d pop %ebp
10a714: c3 ret
10a715: 8d 76 00 lea 0x0(%esi),%esi
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
10a718: f6 43 34 01 testb $0x1,0x34(%ebx)
10a71c: 74 3a je 10a758 <rtems_termios_write+0xa8><== NEVER TAKEN
uint32_t count = args->count;
10a71e: 8b 45 10 mov 0x10(%ebp),%eax
10a721: 89 44 24 1c mov %eax,0x1c(%esp)
char *buffer = args->buffer;
10a725: 8b 75 0c mov 0xc(%ebp),%esi
while (count--)
10a728: 85 c0 test %eax,%eax
10a72a: 74 44 je 10a770 <rtems_termios_write+0xc0><== NEVER TAKEN
oproc (*buffer++, tty);
10a72c: 0f b6 06 movzbl (%esi),%eax
10a72f: 46 inc %esi
10a730: 89 da mov %ebx,%edx
10a732: e8 59 fa ff ff call 10a190 <oproc>
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
10a737: ff 4c 24 1c decl 0x1c(%esp)
10a73b: 75 ef jne 10a72c <rtems_termios_write+0x7c>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
10a73d: 8b 45 10 mov 0x10(%ebp),%eax
10a740: 89 45 18 mov %eax,0x18(%ebp)
}
rtems_semaphore_release (tty->osem);
10a743: 8b 43 18 mov 0x18(%ebx),%eax
10a746: 89 04 24 mov %eax,(%esp)
10a749: e8 5a 13 00 00 call 10baa8 <rtems_semaphore_release>
return sc;
}
10a74e: 89 f8 mov %edi,%eax
10a750: 83 c4 2c add $0x2c,%esp
10a753: 5b pop %ebx
10a754: 5e pop %esi
10a755: 5f pop %edi
10a756: 5d pop %ebp
10a757: c3 ret
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
10a758: 89 5c 24 08 mov %ebx,0x8(%esp) <== NOT EXECUTED
10a75c: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
10a75f: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
10a763: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10a766: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10a769: e8 de f8 ff ff call 10a04c <rtems_termios_puts> <== NOT EXECUTED
10a76e: eb cd jmp 10a73d <rtems_termios_write+0x8d><== NOT EXECUTED
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
10a770: 31 c0 xor %eax,%eax <== NOT EXECUTED
10a772: eb cc jmp 10a740 <rtems_termios_write+0x90><== NOT EXECUTED
0011b6b8 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
11b6b8: 83 ec 2c sub $0x2c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
11b6bb: 8d 44 24 1c lea 0x1c(%esp),%eax
11b6bf: 89 44 24 08 mov %eax,0x8(%esp)
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
11b6c3: 8b 44 24 30 mov 0x30(%esp),%eax
11b6c7: 89 44 24 04 mov %eax,0x4(%esp)
11b6cb: c7 04 24 e0 f4 14 00 movl $0x14f4e0,(%esp)
11b6d2: e8 09 2e 00 00 call 11e4e0 <_Objects_Get>
switch ( location ) {
11b6d7: 8b 54 24 1c mov 0x1c(%esp),%edx
11b6db: 85 d2 test %edx,%edx
11b6dd: 75 1d jne 11b6fc <rtems_timer_cancel+0x44>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
11b6df: 83 78 38 04 cmpl $0x4,0x38(%eax)
11b6e3: 74 0b je 11b6f0 <rtems_timer_cancel+0x38><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
11b6e5: 83 c0 10 add $0x10,%eax
11b6e8: 89 04 24 mov %eax,(%esp)
11b6eb: e8 b0 49 00 00 call 1200a0 <_Watchdog_Remove>
_Thread_Enable_dispatch();
11b6f0: e8 af 3a 00 00 call 11f1a4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11b6f5: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11b6f7: 83 c4 2c add $0x2c,%esp
11b6fa: c3 ret
11b6fb: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11b6fc: b8 04 00 00 00 mov $0x4,%eax
}
11b701: 83 c4 2c add $0x2c,%esp
11b704: c3 ret
0011bc38 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
11bc38: 57 push %edi
11bc39: 56 push %esi
11bc3a: 53 push %ebx
11bc3b: 83 ec 20 sub $0x20,%esp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
11bc3e: 8b 1d 20 f5 14 00 mov 0x14f520,%ebx
if ( !timer_server )
11bc44: 85 db test %ebx,%ebx
11bc46: 74 3c je 11bc84 <rtems_timer_server_fire_when+0x4c>
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
11bc48: 80 3d 94 ea 14 00 00 cmpb $0x0,0x14ea94
11bc4f: 75 0f jne 11bc60 <rtems_timer_server_fire_when+0x28><== ALWAYS TAKEN
return RTEMS_NOT_DEFINED;
11bc51: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11bc56: 83 c4 20 add $0x20,%esp
11bc59: 5b pop %ebx
11bc5a: 5e pop %esi
11bc5b: 5f pop %edi
11bc5c: c3 ret
11bc5d: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
11bc60: 8b 54 24 38 mov 0x38(%esp),%edx
11bc64: 85 d2 test %edx,%edx
11bc66: 74 28 je 11bc90 <rtems_timer_server_fire_when+0x58>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
11bc68: 8b 44 24 34 mov 0x34(%esp),%eax
11bc6c: 89 04 24 mov %eax,(%esp)
11bc6f: e8 98 cc ff ff call 11890c <_TOD_Validate>
11bc74: 84 c0 test %al,%al
11bc76: 75 24 jne 11bc9c <rtems_timer_server_fire_when+0x64>
return RTEMS_INVALID_CLOCK;
11bc78: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11bc7d: 83 c4 20 add $0x20,%esp
11bc80: 5b pop %ebx
11bc81: 5e pop %esi
11bc82: 5f pop %edi
11bc83: c3 ret
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
11bc84: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11bc89: 83 c4 20 add $0x20,%esp
11bc8c: 5b pop %ebx
11bc8d: 5e pop %esi
11bc8e: 5f pop %edi
11bc8f: c3 ret
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
11bc90: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11bc95: 83 c4 20 add $0x20,%esp
11bc98: 5b pop %ebx
11bc99: 5e pop %esi
11bc9a: 5f pop %edi
11bc9b: c3 ret
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
11bc9c: 8b 54 24 34 mov 0x34(%esp),%edx
11bca0: 89 14 24 mov %edx,(%esp)
11bca3: e8 d4 cb ff ff call 11887c <_TOD_To_seconds>
11bca8: 89 c6 mov %eax,%esi
11bcaa: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
11bcb1: 3b
11bcb2: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
11bcb9: 00
11bcba: a1 80 ea 14 00 mov 0x14ea80,%eax
11bcbf: 8b 15 84 ea 14 00 mov 0x14ea84,%edx
11bcc5: 89 04 24 mov %eax,(%esp)
11bcc8: 89 54 24 04 mov %edx,0x4(%esp)
11bccc: e8 73 52 01 00 call 130f44 <__divdi3>
if ( seconds <= _TOD_Seconds_since_epoch() )
11bcd1: 39 c6 cmp %eax,%esi
11bcd3: 76 a3 jbe 11bc78 <rtems_timer_server_fire_when+0x40>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
11bcd5: 8d 44 24 1c lea 0x1c(%esp),%eax
11bcd9: 89 44 24 08 mov %eax,0x8(%esp)
11bcdd: 8b 54 24 30 mov 0x30(%esp),%edx
11bce1: 89 54 24 04 mov %edx,0x4(%esp)
11bce5: c7 04 24 e0 f4 14 00 movl $0x14f4e0,(%esp)
11bcec: e8 ef 27 00 00 call 11e4e0 <_Objects_Get>
11bcf1: 89 c7 mov %eax,%edi
switch ( location ) {
11bcf3: 8b 44 24 1c mov 0x1c(%esp),%eax
11bcf7: 85 c0 test %eax,%eax
11bcf9: 75 70 jne 11bd6b <rtems_timer_server_fire_when+0x133>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
11bcfb: 8d 47 10 lea 0x10(%edi),%eax
11bcfe: 89 04 24 mov %eax,(%esp)
11bd01: e8 9a 43 00 00 call 1200a0 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
11bd06: 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;
11bd0d: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
11bd14: 8b 44 24 38 mov 0x38(%esp),%eax
11bd18: 89 47 2c mov %eax,0x2c(%edi)
the_watchdog->id = id;
11bd1b: 8b 54 24 30 mov 0x30(%esp),%edx
11bd1f: 89 57 30 mov %edx,0x30(%edi)
the_watchdog->user_data = user_data;
11bd22: 8b 44 24 3c mov 0x3c(%esp),%eax
11bd26: 89 47 34 mov %eax,0x34(%edi)
11bd29: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
11bd30: 3b
11bd31: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
11bd38: 00
11bd39: a1 80 ea 14 00 mov 0x14ea80,%eax
11bd3e: 8b 15 84 ea 14 00 mov 0x14ea84,%edx
11bd44: 89 04 24 mov %eax,(%esp)
11bd47: 89 54 24 04 mov %edx,0x4(%esp)
11bd4b: e8 f4 51 01 00 call 130f44 <__divdi3>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
11bd50: 29 c6 sub %eax,%esi
11bd52: 89 77 1c mov %esi,0x1c(%edi)
(*timer_server->schedule_operation)( timer_server, the_timer );
11bd55: 89 7c 24 04 mov %edi,0x4(%esp)
11bd59: 89 1c 24 mov %ebx,(%esp)
11bd5c: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
11bd5f: e8 40 34 00 00 call 11f1a4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11bd64: 31 c0 xor %eax,%eax
11bd66: e9 eb fe ff ff jmp 11bc56 <rtems_timer_server_fire_when+0x1e>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11bd6b: b8 04 00 00 00 mov $0x4,%eax
11bd70: e9 e1 fe ff ff jmp 11bc56 <rtems_timer_server_fire_when+0x1e>
0010773c <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
10773c: 55 push %ebp
10773d: 57 push %edi
10773e: 56 push %esi
10773f: 53 push %ebx
107740: 83 ec 2c sub $0x2c,%esp
107743: 89 c3 mov %eax,%ebx
107745: 89 d5 mov %edx,%ebp
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
107747: a9 00 00 00 20 test $0x20000000,%eax
10774c: 74 30 je 10777e <rtems_verror+0x42>
if (rtems_panic_in_progress++)
10774e: 8b 15 10 1e 13 00 mov 0x131e10,%edx
107754: 8d 42 01 lea 0x1(%edx),%eax
107757: a3 10 1e 13 00 mov %eax,0x131e10
10775c: 85 d2 test %edx,%edx
10775e: 74 15 je 107775 <rtems_verror+0x39> <== ALWAYS TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
107760: a1 44 1f 13 00 mov 0x131f44,%eax <== NOT EXECUTED
107765: 40 inc %eax <== NOT EXECUTED
107766: a3 44 1f 13 00 mov %eax,0x131f44 <== NOT EXECUTED
return _Thread_Dispatch_disable_level;
10776b: a1 44 1f 13 00 mov 0x131f44,%eax <== NOT EXECUTED
void _Thread_Disable_dispatch( void );
#else
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
_Thread_Dispatch_increment_disable_level();
RTEMS_COMPILER_MEMORY_BARRIER();
107770: a1 10 1e 13 00 mov 0x131e10,%eax <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
107775: 83 f8 02 cmp $0x2,%eax
107778: 0f 8f b6 00 00 00 jg 107834 <rtems_verror+0xf8> <== NEVER TAKEN
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
10777e: a1 00 fd 12 00 mov 0x12fd00,%eax
107783: 8b 40 08 mov 0x8(%eax),%eax
107786: 89 04 24 mov %eax,(%esp)
107789: 89 4c 24 1c mov %ecx,0x1c(%esp)
10778d: e8 d6 c7 00 00 call 113f68 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
107792: 89 df mov %ebx,%edi
107794: 81 e7 ff ff ff 8f and $0x8fffffff,%edi
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
10779a: 81 e3 00 00 00 40 and $0x40000000,%ebx
1077a0: 8b 4c 24 1c mov 0x1c(%esp),%ecx
1077a4: 0f 85 c2 00 00 00 jne 10786c <rtems_verror+0x130>
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
1077aa: 31 f6 xor %esi,%esi
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
1077ac: 89 4c 24 08 mov %ecx,0x8(%esp)
1077b0: 89 6c 24 04 mov %ebp,0x4(%esp)
1077b4: a1 00 fd 12 00 mov 0x12fd00,%eax
1077b9: 8b 40 0c mov 0xc(%eax),%eax
1077bc: 89 04 24 mov %eax,(%esp)
1077bf: e8 fc 41 01 00 call 11b9c0 <vfprintf>
1077c4: 89 c3 mov %eax,%ebx
if (status)
1077c6: 85 ff test %edi,%edi
1077c8: 75 76 jne 107840 <rtems_verror+0x104>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
1077ca: 83 fe 00 cmp $0x0,%esi
1077cd: 74 31 je 107800 <rtems_verror+0xc4>
if ((local_errno > 0) && *strerror(local_errno))
1077cf: 7e 11 jle 1077e2 <rtems_verror+0xa6>
1077d1: 89 34 24 mov %esi,(%esp)
1077d4: e8 9f d5 00 00 call 114d78 <strerror>
1077d9: 80 38 00 cmpb $0x0,(%eax)
1077dc: 0f 85 9e 00 00 00 jne 107880 <rtems_verror+0x144> <== ALWAYS TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
1077e2: 89 74 24 08 mov %esi,0x8(%esp)
1077e6: c7 44 24 04 c4 23 12 movl $0x1223c4,0x4(%esp)
1077ed: 00
1077ee: a1 00 fd 12 00 mov 0x12fd00,%eax
1077f3: 8b 40 0c mov 0xc(%eax),%eax
1077f6: 89 04 24 mov %eax,(%esp)
1077f9: e8 2a cb 00 00 call 114328 <fprintf>
1077fe: 01 c3 add %eax,%ebx
}
chars_written += fprintf(stderr, "\n");
107800: c7 44 24 04 a1 1d 12 movl $0x121da1,0x4(%esp)
107807: 00
107808: a1 00 fd 12 00 mov 0x12fd00,%eax
10780d: 8b 40 0c mov 0xc(%eax),%eax
107810: 89 04 24 mov %eax,(%esp)
107813: e8 10 cb 00 00 call 114328 <fprintf>
107818: 01 c3 add %eax,%ebx
(void) fflush(stderr);
10781a: a1 00 fd 12 00 mov 0x12fd00,%eax
10781f: 8b 40 0c mov 0xc(%eax),%eax
107822: 89 04 24 mov %eax,(%esp)
107825: e8 3e c7 00 00 call 113f68 <fflush>
return chars_written;
}
10782a: 89 d8 mov %ebx,%eax
10782c: 83 c4 2c add $0x2c,%esp
10782f: 5b pop %ebx
107830: 5e pop %esi
107831: 5f pop %edi
107832: 5d pop %ebp
107833: c3 ret
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
107834: 31 db xor %ebx,%ebx
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
return chars_written;
}
107836: 89 d8 mov %ebx,%eax <== NOT EXECUTED
107838: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
10783b: 5b pop %ebx <== NOT EXECUTED
10783c: 5e pop %esi <== NOT EXECUTED
10783d: 5f pop %edi <== NOT EXECUTED
10783e: 5d pop %ebp <== NOT EXECUTED
10783f: c3 ret <== NOT EXECUTED
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
107840: 89 3c 24 mov %edi,(%esp)
107843: e8 d8 fe ff ff call 107720 <rtems_status_text>
107848: 89 44 24 08 mov %eax,0x8(%esp)
10784c: c7 44 24 04 a9 23 12 movl $0x1223a9,0x4(%esp)
107853: 00
107854: a1 00 fd 12 00 mov 0x12fd00,%eax
107859: 8b 40 0c mov 0xc(%eax),%eax
10785c: 89 04 24 mov %eax,(%esp)
10785f: e8 c4 ca 00 00 call 114328 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
107864: 01 c3 add %eax,%ebx
107866: e9 5f ff ff ff jmp 1077ca <rtems_verror+0x8e>
10786b: 90 nop
(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;
10786c: 89 4c 24 1c mov %ecx,0x1c(%esp)
107870: e8 8b c3 00 00 call 113c00 <__errno>
107875: 8b 30 mov (%eax),%esi
107877: 8b 4c 24 1c mov 0x1c(%esp),%ecx
10787b: e9 2c ff ff ff jmp 1077ac <rtems_verror+0x70>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
107880: 89 34 24 mov %esi,(%esp)
107883: e8 f0 d4 00 00 call 114d78 <strerror>
107888: 89 44 24 08 mov %eax,0x8(%esp)
10788c: c7 44 24 04 b7 23 12 movl $0x1223b7,0x4(%esp)
107893: 00
107894: e9 55 ff ff ff jmp 1077ee <rtems_verror+0xb2>
001296f8 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
1296f8: 55 push %ebp
1296f9: 57 push %edi
1296fa: 56 push %esi
1296fb: 53 push %ebx
1296fc: 83 ec 2c sub $0x2c,%esp
1296ff: 89 c3 mov %eax,%ebx
129701: 89 54 24 1c mov %edx,0x1c(%esp)
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
129705: 31 ff xor %edi,%edi
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
129707: bd ff ff ff 7f mov $0x7fffffff,%ebp
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
12970c: 31 f6 xor %esi,%esi
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
12970e: ff 4b 04 decl 0x4(%ebx)
129711: 78 45 js 129758 <scanInt+0x60> <== NEVER TAKEN
129713: 8b 03 mov (%ebx),%eax
129715: 0f b6 10 movzbl (%eax),%edx
129718: 40 inc %eax
129719: 89 03 mov %eax,(%ebx)
if (c == ':')
12971b: 83 fa 3a cmp $0x3a,%edx
12971e: 74 50 je 129770 <scanInt+0x78>
break;
if (sign == 0) {
129720: 85 ff test %edi,%edi
129722: 75 0a jne 12972e <scanInt+0x36>
if (c == '-') {
129724: 83 fa 2d cmp $0x2d,%edx
129727: 74 7f je 1297a8 <scanInt+0xb0>
sign = -1;
limit++;
continue;
}
sign = 1;
129729: bf 01 00 00 00 mov $0x1,%edi
}
if (!isdigit(c))
12972e: a1 54 6c 17 00 mov 0x176c54,%eax
129733: f6 44 10 01 04 testb $0x4,0x1(%eax,%edx,1)
129738: 74 62 je 12979c <scanInt+0xa4>
return 0;
d = c - '0';
12973a: 8d 4a d0 lea -0x30(%edx),%ecx
if ((i > (limit / 10))
12973d: b8 cd cc cc cc mov $0xcccccccd,%eax
129742: f7 e5 mul %ebp
129744: c1 ea 03 shr $0x3,%edx
129747: 39 d6 cmp %edx,%esi
129749: 77 51 ja 12979c <scanInt+0xa4>
|| ((i == (limit / 10)) && (d > (limit % 10))))
12974b: 74 3f je 12978c <scanInt+0x94>
return 0;
i = i * 10 + d;
12974d: 8d 04 b6 lea (%esi,%esi,4),%eax
129750: 8d 34 41 lea (%ecx,%eax,2),%esi
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
129753: ff 4b 04 decl 0x4(%ebx)
129756: 79 bb jns 129713 <scanInt+0x1b> <== ALWAYS TAKEN
129758: 89 5c 24 04 mov %ebx,0x4(%esp) <== NOT EXECUTED
12975c: a1 60 6c 17 00 mov 0x176c60,%eax <== NOT EXECUTED
129761: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
129764: e8 d7 7a 01 00 call 141240 <__srget_r> <== NOT EXECUTED
129769: 89 c2 mov %eax,%edx <== NOT EXECUTED
if (c == ':')
12976b: 83 fa 3a cmp $0x3a,%edx <== NOT EXECUTED
12976e: 75 b0 jne 129720 <scanInt+0x28> <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
129770: 85 ff test %edi,%edi
129772: 74 28 je 12979c <scanInt+0xa4> <== NEVER TAKEN
return 0;
*val = i * sign;
129774: 0f af f7 imul %edi,%esi
129777: 8b 54 24 1c mov 0x1c(%esp),%edx
12977b: 89 32 mov %esi,(%edx)
return 1;
12977d: b8 01 00 00 00 mov $0x1,%eax
}
129782: 83 c4 2c add $0x2c,%esp
129785: 5b pop %ebx
129786: 5e pop %esi
129787: 5f pop %edi
129788: 5d pop %ebp
129789: c3 ret
12978a: 66 90 xchg %ax,%ax
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
12978c: 8d 04 b6 lea (%esi,%esi,4),%eax
12978f: d1 e0 shl %eax
129791: 89 ea mov %ebp,%edx
129793: 29 c2 sub %eax,%edx
129795: 39 d1 cmp %edx,%ecx
129797: 76 b4 jbe 12974d <scanInt+0x55> <== NEVER TAKEN
129799: 8d 76 00 lea 0x0(%esi),%esi
continue;
}
sign = 1;
}
if (!isdigit(c))
return 0;
12979c: 31 c0 xor %eax,%eax
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
12979e: 83 c4 2c add $0x2c,%esp
1297a1: 5b pop %ebx
1297a2: 5e pop %esi
1297a3: 5f pop %edi
1297a4: 5d pop %ebp
1297a5: c3 ret
1297a6: 66 90 xchg %ax,%ax
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
1297a8: 45 inc %ebp
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
1297a9: bf ff ff ff ff mov $0xffffffff,%edi
limit++;
continue;
1297ae: e9 5b ff ff ff jmp 12970e <scanInt+0x16>
001297b4 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
1297b4: 57 push %edi
1297b5: 56 push %esi
1297b6: 53 push %ebx
1297b7: 83 ec 10 sub $0x10,%esp
1297ba: 89 c3 mov %eax,%ebx
1297bc: 89 ce mov %ecx,%esi
1297be: 8b 7c 24 20 mov 0x20(%esp),%edi
int c;
*name = *bufp;
1297c2: 8b 01 mov (%ecx),%eax
1297c4: 89 02 mov %eax,(%edx)
1297c6: eb 24 jmp 1297ec <scanString+0x38>
for (;;) {
c = getc(fp);
1297c8: 8b 13 mov (%ebx),%edx
1297ca: 0f b6 02 movzbl (%edx),%eax
1297cd: 42 inc %edx
1297ce: 89 13 mov %edx,(%ebx)
if (c == ':') {
1297d0: 83 f8 3a cmp $0x3a,%eax
1297d3: 74 33 je 129808 <scanString+0x54>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
1297d5: 83 f8 0a cmp $0xa,%eax
1297d8: 74 4e je 129828 <scanString+0x74>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
1297da: 83 f8 ff cmp $0xffffffff,%eax
1297dd: 74 51 je 129830 <scanString+0x7c>
return 0;
if (*nleft < 2)
1297df: 83 3f 01 cmpl $0x1,(%edi)
1297e2: 76 4c jbe 129830 <scanString+0x7c>
return 0;
**bufp = c;
1297e4: 8b 16 mov (%esi),%edx
1297e6: 88 02 mov %al,(%edx)
++(*bufp);
1297e8: ff 06 incl (%esi)
--(*nleft);
1297ea: ff 0f decl (%edi)
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
1297ec: ff 4b 04 decl 0x4(%ebx)
1297ef: 79 d7 jns 1297c8 <scanString+0x14>
1297f1: 89 5c 24 04 mov %ebx,0x4(%esp)
1297f5: a1 60 6c 17 00 mov 0x176c60,%eax
1297fa: 89 04 24 mov %eax,(%esp)
1297fd: e8 3e 7a 01 00 call 141240 <__srget_r>
if (c == ':') {
129802: 83 f8 3a cmp $0x3a,%eax
129805: 75 ce jne 1297d5 <scanString+0x21> <== ALWAYS TAKEN
129807: 90 nop
if (nlFlag)
129808: 8b 54 24 24 mov 0x24(%esp),%edx
12980c: 85 d2 test %edx,%edx
12980e: 75 20 jne 129830 <scanString+0x7c>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
129810: 8b 06 mov (%esi),%eax
129812: c6 00 00 movb $0x0,(%eax)
++(*bufp);
129815: ff 06 incl (%esi)
--(*nleft);
129817: ff 0f decl (%edi)
return 1;
129819: b8 01 00 00 00 mov $0x1,%eax
}
12981e: 83 c4 10 add $0x10,%esp
129821: 5b pop %ebx
129822: 5e pop %esi
129823: 5f pop %edi
129824: c3 ret
129825: 8d 76 00 lea 0x0(%esi),%esi
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
129828: 8b 44 24 24 mov 0x24(%esp),%eax
12982c: 85 c0 test %eax,%eax
12982e: 75 e0 jne 129810 <scanString+0x5c>
*name = *bufp;
for (;;) {
c = getc(fp);
if (c == ':') {
if (nlFlag)
return 0;
129830: 31 c0 xor %eax,%eax
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
129832: 83 c4 10 add $0x10,%esp
129835: 5b pop %ebx
129836: 5e pop %esi
129837: 5f pop %edi
129838: c3 ret
0012983c <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
12983c: 56 push %esi
12983d: 53 push %ebx
12983e: 83 ec 34 sub $0x34,%esp
129841: 89 c3 mov %eax,%ebx
129843: 89 d6 mov %edx,%esi
129845: 89 4c 24 1c mov %ecx,0x1c(%esp)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
129849: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
129850: 00
129851: 8d 44 24 40 lea 0x40(%esp),%eax
129855: 89 04 24 mov %eax,(%esp)
129858: 8d 4c 24 1c lea 0x1c(%esp),%ecx
12985c: 89 d8 mov %ebx,%eax
12985e: e8 51 ff ff ff call 1297b4 <scanString>
129863: 85 c0 test %eax,%eax
129865: 75 09 jne 129870 <scangr+0x34>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
129867: 31 c0 xor %eax,%eax
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
129869: 83 c4 34 add $0x34,%esp
12986c: 5b pop %ebx
12986d: 5e pop %esi
12986e: c3 ret
12986f: 90 nop
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
129870: 8d 56 04 lea 0x4(%esi),%edx
129873: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
12987a: 00
12987b: 8d 44 24 40 lea 0x40(%esp),%eax
12987f: 89 04 24 mov %eax,(%esp)
129882: 8d 4c 24 1c lea 0x1c(%esp),%ecx
129886: 89 d8 mov %ebx,%eax
129888: e8 27 ff ff ff call 1297b4 <scanString>
12988d: 85 c0 test %eax,%eax
12988f: 74 d6 je 129867 <scangr+0x2b> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
129891: 8d 54 24 28 lea 0x28(%esp),%edx
129895: 89 d8 mov %ebx,%eax
129897: e8 5c fe ff ff call 1296f8 <scanInt>
12989c: 85 c0 test %eax,%eax
12989e: 74 c7 je 129867 <scangr+0x2b> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
1298a0: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
1298a7: 00
1298a8: 8d 44 24 40 lea 0x40(%esp),%eax
1298ac: 89 04 24 mov %eax,(%esp)
1298af: 8d 4c 24 1c lea 0x1c(%esp),%ecx
1298b3: 8d 54 24 2c lea 0x2c(%esp),%edx
1298b7: 89 d8 mov %ebx,%eax
1298b9: e8 f6 fe ff ff call 1297b4 <scanString>
1298be: 85 c0 test %eax,%eax
1298c0: 74 a5 je 129867 <scangr+0x2b> <== NEVER TAKEN
return 0;
grp->gr_gid = grgid;
1298c2: 8b 44 24 28 mov 0x28(%esp),%eax
1298c6: 66 89 46 08 mov %ax,0x8(%esi)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
1298ca: 8b 5c 24 2c mov 0x2c(%esp),%ebx
1298ce: 8a 03 mov (%ebx),%al
1298d0: 84 c0 test %al,%al
1298d2: 0f 84 83 00 00 00 je 12995b <scangr+0x11f> <== NEVER TAKEN
1298d8: 89 da mov %ebx,%edx
1298da: b9 01 00 00 00 mov $0x1,%ecx
1298df: eb 0a jmp 1298eb <scangr+0xaf>
1298e1: 8d 76 00 lea 0x0(%esi),%esi
1298e4: 42 inc %edx
1298e5: 8a 02 mov (%edx),%al
1298e7: 84 c0 test %al,%al
1298e9: 74 09 je 1298f4 <scangr+0xb8>
if(*cp == ',')
1298eb: 3c 2c cmp $0x2c,%al
1298ed: 75 f5 jne 1298e4 <scangr+0xa8>
memcount++;
1298ef: 41 inc %ecx
1298f0: eb f2 jmp 1298e4 <scangr+0xa8>
1298f2: 66 90 xchg %ax,%ax
1298f4: 8d 04 8d 13 00 00 00 lea 0x13(,%ecx,4),%eax
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
1298fb: 39 44 24 40 cmp %eax,0x40(%esp)
1298ff: 0f 82 62 ff ff ff jb 129867 <scangr+0x2b> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
129905: 8b 44 24 1c mov 0x1c(%esp),%eax
129909: 83 c0 0f add $0xf,%eax
12990c: 83 e0 f0 and $0xfffffff0,%eax
12990f: 89 46 0c mov %eax,0xc(%esi)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
129912: 89 18 mov %ebx,(%eax)
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
129914: 8b 44 24 2c mov 0x2c(%esp),%eax
129918: 8a 10 mov (%eax),%dl
12991a: 84 d2 test %dl,%dl
12991c: 74 44 je 129962 <scangr+0x126> <== NEVER TAKEN
}
/*
* Extract a single group record from the database
*/
static int scangr(
12991e: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
12991f: b9 01 00 00 00 mov $0x1,%ecx
129924: eb 09 jmp 12992f <scangr+0xf3>
129926: 66 90 xchg %ax,%ax
129928: 8a 10 mov (%eax),%dl
12992a: 40 inc %eax
12992b: 84 d2 test %dl,%dl
12992d: 74 15 je 129944 <scangr+0x108>
if(*cp == ',') {
12992f: 80 fa 2c cmp $0x2c,%dl
129932: 75 f4 jne 129928 <scangr+0xec>
*cp = '\0';
129934: c6 40 ff 00 movb $0x0,-0x1(%eax)
grp->gr_mem[memcount++] = cp + 1;
129938: 8b 56 0c mov 0xc(%esi),%edx
12993b: 89 04 8a mov %eax,(%edx,%ecx,4)
12993e: 41 inc %ecx
12993f: eb e7 jmp 129928 <scangr+0xec>
129941: 8d 76 00 lea 0x0(%esi),%esi
129944: c1 e1 02 shl $0x2,%ecx
}
}
grp->gr_mem[memcount] = NULL;
129947: 8b 46 0c mov 0xc(%esi),%eax
12994a: c7 04 08 00 00 00 00 movl $0x0,(%eax,%ecx,1)
return 1;
129951: b8 01 00 00 00 mov $0x1,%eax
129956: e9 0e ff ff ff jmp 129869 <scangr+0x2d>
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
12995b: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED
129960: eb 99 jmp 1298fb <scangr+0xbf> <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
129962: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED
129967: eb de jmp 129947 <scangr+0x10b> <== NOT EXECUTED
0012996c <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
12996c: 56 push %esi
12996d: 53 push %ebx
12996e: 83 ec 34 sub $0x34,%esp
129971: 89 c3 mov %eax,%ebx
129973: 89 d6 mov %edx,%esi
129975: 89 4c 24 1c mov %ecx,0x1c(%esp)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
129979: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
129980: 00
129981: 8d 44 24 40 lea 0x40(%esp),%eax
129985: 89 04 24 mov %eax,(%esp)
129988: 8d 4c 24 1c lea 0x1c(%esp),%ecx
12998c: 89 d8 mov %ebx,%eax
12998e: e8 21 fe ff ff call 1297b4 <scanString>
129993: 85 c0 test %eax,%eax
129995: 75 09 jne 1299a0 <scanpw+0x34>
|| !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;
129997: 31 c0 xor %eax,%eax
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
}
129999: 83 c4 34 add $0x34,%esp
12999c: 5b pop %ebx
12999d: 5e pop %esi
12999e: c3 ret
12999f: 90 nop
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
1299a0: 8d 56 04 lea 0x4(%esi),%edx
1299a3: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1299aa: 00
1299ab: 8d 44 24 40 lea 0x40(%esp),%eax
1299af: 89 04 24 mov %eax,(%esp)
1299b2: 8d 4c 24 1c lea 0x1c(%esp),%ecx
1299b6: 89 d8 mov %ebx,%eax
1299b8: e8 f7 fd ff ff call 1297b4 <scanString>
1299bd: 85 c0 test %eax,%eax
1299bf: 74 d6 je 129997 <scanpw+0x2b> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
1299c1: 8d 54 24 28 lea 0x28(%esp),%edx
1299c5: 89 d8 mov %ebx,%eax
1299c7: e8 2c fd ff ff call 1296f8 <scanInt>
1299cc: 85 c0 test %eax,%eax
1299ce: 74 c7 je 129997 <scanpw+0x2b>
|| !scanInt(fp, &pwgid)
1299d0: 8d 54 24 2c lea 0x2c(%esp),%edx
1299d4: 89 d8 mov %ebx,%eax
1299d6: e8 1d fd ff ff call 1296f8 <scanInt>
1299db: 85 c0 test %eax,%eax
1299dd: 74 b8 je 129997 <scanpw+0x2b>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
1299df: 8d 56 0c lea 0xc(%esi),%edx
1299e2: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1299e9: 00
1299ea: 8d 44 24 40 lea 0x40(%esp),%eax
1299ee: 89 04 24 mov %eax,(%esp)
1299f1: 8d 4c 24 1c lea 0x1c(%esp),%ecx
1299f5: 89 d8 mov %ebx,%eax
1299f7: e8 b8 fd ff ff call 1297b4 <scanString>
1299fc: 85 c0 test %eax,%eax
1299fe: 74 97 je 129997 <scanpw+0x2b> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
129a00: 8d 56 10 lea 0x10(%esi),%edx
129a03: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
129a0a: 00
129a0b: 8d 44 24 40 lea 0x40(%esp),%eax
129a0f: 89 04 24 mov %eax,(%esp)
129a12: 8d 4c 24 1c lea 0x1c(%esp),%ecx
129a16: 89 d8 mov %ebx,%eax
129a18: e8 97 fd ff ff call 1297b4 <scanString>
129a1d: 85 c0 test %eax,%eax
129a1f: 0f 84 72 ff ff ff je 129997 <scanpw+0x2b> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
129a25: 8d 56 14 lea 0x14(%esi),%edx
129a28: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
129a2f: 00
129a30: 8d 44 24 40 lea 0x40(%esp),%eax
129a34: 89 04 24 mov %eax,(%esp)
129a37: 8d 4c 24 1c lea 0x1c(%esp),%ecx
129a3b: 89 d8 mov %ebx,%eax
129a3d: e8 72 fd ff ff call 1297b4 <scanString>
129a42: 85 c0 test %eax,%eax
129a44: 0f 84 4d ff ff ff je 129997 <scanpw+0x2b> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
129a4a: 8d 56 18 lea 0x18(%esi),%edx
129a4d: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
129a54: 00
129a55: 8d 44 24 40 lea 0x40(%esp),%eax
129a59: 89 04 24 mov %eax,(%esp)
129a5c: 8d 4c 24 1c lea 0x1c(%esp),%ecx
129a60: 89 d8 mov %ebx,%eax
129a62: e8 4d fd ff ff call 1297b4 <scanString>
129a67: 85 c0 test %eax,%eax
129a69: 0f 84 28 ff ff ff je 129997 <scanpw+0x2b>
return 0;
pwd->pw_uid = pwuid;
129a6f: 8b 44 24 28 mov 0x28(%esp),%eax
129a73: 66 89 46 08 mov %ax,0x8(%esi)
pwd->pw_gid = pwgid;
129a77: 8b 44 24 2c mov 0x2c(%esp),%eax
129a7b: 66 89 46 0a mov %ax,0xa(%esi)
return 1;
129a7f: b8 01 00 00 00 mov $0x1,%eax
129a84: e9 10 ff ff ff jmp 129999 <scanpw+0x2d>
0010c180 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
10c180: 83 ec 0c sub $0xc,%esp
10c183: 8b 44 24 10 mov 0x10(%esp),%eax
switch ( policy ) {
10c187: 85 c0 test %eax,%eax
10c189: 78 16 js 10c1a1 <sched_get_priority_max+0x21>
10c18b: 83 f8 02 cmp $0x2,%eax
10c18e: 7f 0c jg 10c19c <sched_get_priority_max+0x1c>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
10c190: 0f b6 05 cc ed 12 00 movzbl 0x12edcc,%eax
10c197: 48 dec %eax
}
10c198: 83 c4 0c add $0xc,%esp
10c19b: c3 ret
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
10c19c: 83 f8 04 cmp $0x4,%eax
10c19f: 74 ef je 10c190 <sched_get_priority_max+0x10><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10c1a1: e8 52 86 00 00 call 1147f8 <__errno>
10c1a6: c7 00 16 00 00 00 movl $0x16,(%eax)
10c1ac: b8 ff ff ff ff mov $0xffffffff,%eax
10c1b1: eb e5 jmp 10c198 <sched_get_priority_max+0x18>
0010c1b4 <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
10c1b4: 83 ec 0c sub $0xc,%esp
10c1b7: 8b 44 24 10 mov 0x10(%esp),%eax
switch ( policy ) {
10c1bb: 85 c0 test %eax,%eax
10c1bd: 78 16 js 10c1d5 <sched_get_priority_min+0x21>
10c1bf: 83 f8 02 cmp $0x2,%eax
10c1c2: 7f 0c jg 10c1d0 <sched_get_priority_min+0x1c><== NEVER TAKEN
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
10c1c4: b8 01 00 00 00 mov $0x1,%eax
}
10c1c9: 83 c4 0c add $0xc,%esp
10c1cc: c3 ret
10c1cd: 8d 76 00 lea 0x0(%esi),%esi
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
10c1d0: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
10c1d3: 74 ef je 10c1c4 <sched_get_priority_min+0x10><== NOT EXECUTED
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10c1d5: e8 1e 86 00 00 call 1147f8 <__errno>
10c1da: c7 00 16 00 00 00 movl $0x16,(%eax)
10c1e0: b8 ff ff ff ff mov $0xffffffff,%eax
10c1e5: eb e2 jmp 10c1c9 <sched_get_priority_min+0x15>
0010c1e8 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
10c1e8: 56 push %esi
10c1e9: 53 push %ebx
10c1ea: 83 ec 14 sub $0x14,%esp
10c1ed: 8b 74 24 20 mov 0x20(%esp),%esi
10c1f1: 8b 5c 24 24 mov 0x24(%esp),%ebx
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10c1f5: 85 f6 test %esi,%esi
10c1f7: 75 1f jne 10c218 <sched_rr_get_interval+0x30><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
10c1f9: 85 db test %ebx,%ebx
10c1fb: 74 36 je 10c233 <sched_rr_get_interval+0x4b>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
10c1fd: 89 5c 24 04 mov %ebx,0x4(%esp)
10c201: a1 78 32 13 00 mov 0x133278,%eax
10c206: 89 04 24 mov %eax,(%esp)
10c209: e8 66 35 00 00 call 10f774 <_Timespec_From_ticks>
return 0;
10c20e: 31 c0 xor %eax,%eax
}
10c210: 83 c4 14 add $0x14,%esp
10c213: 5b pop %ebx
10c214: 5e pop %esi
10c215: c3 ret
10c216: 66 90 xchg %ax,%ax
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10c218: e8 6f bd ff ff call 107f8c <getpid>
10c21d: 39 f0 cmp %esi,%eax
10c21f: 74 d8 je 10c1f9 <sched_rr_get_interval+0x11>
rtems_set_errno_and_return_minus_one( ESRCH );
10c221: e8 d2 85 00 00 call 1147f8 <__errno>
10c226: c7 00 03 00 00 00 movl $0x3,(%eax)
10c22c: b8 ff ff ff ff mov $0xffffffff,%eax
10c231: eb dd jmp 10c210 <sched_rr_get_interval+0x28>
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c233: e8 c0 85 00 00 call 1147f8 <__errno>
10c238: c7 00 16 00 00 00 movl $0x16,(%eax)
10c23e: b8 ff ff ff ff mov $0xffffffff,%eax
10c243: eb cb jmp 10c210 <sched_rr_get_interval+0x28>
0010c6c8 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
10c6c8: 55 push %ebp
10c6c9: 57 push %edi
10c6ca: 56 push %esi
10c6cb: 53 push %ebx
10c6cc: 83 ec 3c sub $0x3c,%esp
10c6cf: 8b 74 24 50 mov 0x50(%esp),%esi
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10c6d3: a1 64 60 13 00 mov 0x136064,%eax
10c6d8: 40 inc %eax
10c6d9: a3 64 60 13 00 mov %eax,0x136064
return _Thread_Dispatch_disable_level;
10c6de: a1 64 60 13 00 mov 0x136064,%eax
Objects_Locations location;
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10c6e3: 8b 7c 24 54 mov 0x54(%esp),%edi
10c6e7: 81 e7 00 02 00 00 and $0x200,%edi
10c6ed: 0f 85 9d 00 00 00 jne 10c790 <sem_open+0xc8>
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
10c6f3: 31 ed xor %ebp,%ebp
mode = va_arg( arg, mode_t );
value = va_arg( arg, unsigned int );
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id, &name_len );
10c6f5: 8d 44 24 2c lea 0x2c(%esp),%eax
10c6f9: 89 44 24 0c mov %eax,0xc(%esp)
10c6fd: 8d 44 24 20 lea 0x20(%esp),%eax
10c701: 89 44 24 08 mov %eax,0x8(%esp)
const char *name,
Objects_Id *id,
size_t *len
)
{
return _POSIX_Name_to_id( &_POSIX_Semaphore_Information, name, id, len );
10c705: 89 74 24 04 mov %esi,0x4(%esp)
10c709: c7 04 24 80 63 13 00 movl $0x136380,(%esp)
10c710: e8 3b f9 ff ff call 10c050 <_POSIX_Name_to_id>
10c715: 89 c3 mov %eax,%ebx
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
10c717: 85 c0 test %eax,%eax
10c719: 74 25 je 10c740 <sem_open+0x78>
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
10c71b: 83 f8 02 cmp $0x2,%eax
10c71e: 75 04 jne 10c724 <sem_open+0x5c>
10c720: 85 ff test %edi,%edi
10c722: 75 78 jne 10c79c <sem_open+0xd4>
_Thread_Enable_dispatch();
10c724: e8 8f 33 00 00 call 10fab8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
10c729: e8 e2 92 00 00 call 115a10 <__errno>
10c72e: 89 18 mov %ebx,(%eax)
10c730: b8 ff ff ff ff mov $0xffffffff,%eax
the_semaphore->Semaphore_id = the_semaphore->Object.id;
return &the_semaphore->Semaphore_id;
#else
return (sem_t *)&the_semaphore->Object.id;
#endif
}
10c735: 83 c4 3c add $0x3c,%esp
10c738: 5b pop %ebx
10c739: 5e pop %esi
10c73a: 5f pop %edi
10c73b: 5d pop %ebp
10c73c: c3 ret
10c73d: 8d 76 00 lea 0x0(%esi),%esi
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10c740: 8b 44 24 54 mov 0x54(%esp),%eax
10c744: 25 00 0a 00 00 and $0xa00,%eax
10c749: 3d 00 0a 00 00 cmp $0xa00,%eax
10c74e: 0f 84 80 00 00 00 je 10c7d4 <sem_open+0x10c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( (sem_t *) &the_semaphore_id, &location );
10c754: 8d 44 24 28 lea 0x28(%esp),%eax
10c758: 89 44 24 08 mov %eax,0x8(%esp)
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
10c75c: 8b 44 24 20 mov 0x20(%esp),%eax
10c760: 89 44 24 04 mov %eax,0x4(%esp)
10c764: c7 04 24 80 63 13 00 movl $0x136380,(%esp)
10c76b: e8 24 26 00 00 call 10ed94 <_Objects_Get>
10c770: 89 44 24 24 mov %eax,0x24(%esp)
the_semaphore->open_count += 1;
10c774: ff 40 18 incl 0x18(%eax)
_Thread_Enable_dispatch();
10c777: e8 3c 33 00 00 call 10fab8 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10c77c: e8 37 33 00 00 call 10fab8 <_Thread_Enable_dispatch>
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
return &the_semaphore->Semaphore_id;
#else
return (sem_t *)&the_semaphore->Object.id;
10c781: 8b 44 24 24 mov 0x24(%esp),%eax
10c785: 83 c0 08 add $0x8,%eax
#endif
}
10c788: 83 c4 3c add $0x3c,%esp
10c78b: 5b pop %ebx
10c78c: 5e pop %esi
10c78d: 5f pop %edi
10c78e: 5d pop %ebp
10c78f: c3 ret
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = va_arg( arg, mode_t );
value = va_arg( arg, unsigned int );
10c790: 8b 6c 24 5c mov 0x5c(%esp),%ebp
10c794: e9 5c ff ff ff jmp 10c6f5 <sem_open+0x2d>
10c799: 8d 76 00 lea 0x0(%esi),%esi
/*
* At this point, the semaphore does not exist and everything has been
* checked. We should go ahead and create a semaphore.
*/
status =_POSIX_Semaphore_Create_support(
10c79c: 8d 44 24 24 lea 0x24(%esp),%eax
10c7a0: 89 44 24 10 mov %eax,0x10(%esp)
10c7a4: 89 6c 24 0c mov %ebp,0xc(%esp)
10c7a8: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10c7af: 00
10c7b0: 8b 44 24 2c mov 0x2c(%esp),%eax
10c7b4: 89 44 24 04 mov %eax,0x4(%esp)
10c7b8: 89 34 24 mov %esi,(%esp)
10c7bb: e8 88 63 00 00 call 112b48 <_POSIX_Semaphore_Create_support>
10c7c0: 89 c3 mov %eax,%ebx
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
10c7c2: e8 f1 32 00 00 call 10fab8 <_Thread_Enable_dispatch>
if ( status == -1 )
10c7c7: 43 inc %ebx
10c7c8: 75 b7 jne 10c781 <sem_open+0xb9> <== ALWAYS TAKEN
return SEM_FAILED;
10c7ca: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10c7cf: eb b7 jmp 10c788 <sem_open+0xc0> <== NOT EXECUTED
10c7d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
10c7d4: e8 df 32 00 00 call 10fab8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
10c7d9: e8 32 92 00 00 call 115a10 <__errno>
10c7de: c7 00 11 00 00 00 movl $0x11,(%eax)
10c7e4: b8 ff ff ff ff mov $0xffffffff,%eax
10c7e9: eb 9d jmp 10c788 <sem_open+0xc0>
0010f424 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
10f424: 83 ec 2c sub $0x2c,%esp
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10f427: 8d 44 24 1c lea 0x1c(%esp),%eax
10f42b: 89 44 24 04 mov %eax,0x4(%esp)
10f42f: 8b 44 24 34 mov 0x34(%esp),%eax
10f433: 89 04 24 mov %eax,(%esp)
10f436: e8 d5 53 00 00 call 114810 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10f43b: 83 f8 03 cmp $0x3,%eax
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10f43e: 8b 44 24 1c mov 0x1c(%esp),%eax
10f442: 89 44 24 08 mov %eax,0x8(%esp)
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10f446: 74 18 je 10f460 <sem_timedwait+0x3c> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10f448: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) <== NOT EXECUTED
10f44f: 00
10f450: 8b 44 24 30 mov 0x30(%esp),%eax <== NOT EXECUTED
10f454: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10f457: e8 cc 5f 00 00 call 115428 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
10f45c: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
10f45f: c3 ret <== NOT EXECUTED
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10f460: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10f467: 00
10f468: 8b 44 24 30 mov 0x30(%esp),%eax
10f46c: 89 04 24 mov %eax,(%esp)
10f46f: e8 b4 5f 00 00 call 115428 <_POSIX_Semaphore_Wait_support>
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
10f474: 83 c4 2c add $0x2c,%esp
10f477: c3 ret
0010bf94 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
10bf94: 55 push %ebp
10bf95: 57 push %edi
10bf96: 56 push %esi
10bf97: 53 push %ebx
10bf98: 83 ec 1c sub $0x1c,%esp
10bf9b: 8b 5c 24 30 mov 0x30(%esp),%ebx
10bf9f: 8b 44 24 38 mov 0x38(%esp),%eax
ISR_Level level;
if ( oact )
10bfa3: 85 c0 test %eax,%eax
10bfa5: 74 13 je 10bfba <sigaction+0x26>
*oact = _POSIX_signals_Vectors[ sig ];
10bfa7: 8d 14 5b lea (%ebx,%ebx,2),%edx
10bfaa: 8d 34 95 a0 48 13 00 lea 0x1348a0(,%edx,4),%esi
10bfb1: b9 03 00 00 00 mov $0x3,%ecx
10bfb6: 89 c7 mov %eax,%edi
10bfb8: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !sig )
10bfba: 85 db test %ebx,%ebx
10bfbc: 74 72 je 10c030 <sigaction+0x9c>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10bfbe: 8d 43 ff lea -0x1(%ebx),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
10bfc1: 83 f8 1f cmp $0x1f,%eax
10bfc4: 77 6a ja 10c030 <sigaction+0x9c>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
10bfc6: 83 fb 09 cmp $0x9,%ebx
10bfc9: 74 65 je 10c030 <sigaction+0x9c>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
10bfcb: 8b 54 24 34 mov 0x34(%esp),%edx
10bfcf: 85 d2 test %edx,%edx
10bfd1: 74 59 je 10c02c <sigaction+0x98> <== NEVER TAKEN
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
10bfd3: 9c pushf
10bfd4: fa cli
10bfd5: 5d pop %ebp
if ( act->sa_handler == SIG_DFL ) {
10bfd6: 8b 44 24 34 mov 0x34(%esp),%eax
10bfda: 8b 40 08 mov 0x8(%eax),%eax
10bfdd: 85 c0 test %eax,%eax
10bfdf: 74 2b je 10c00c <sigaction+0x78>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
10bfe1: 89 1c 24 mov %ebx,(%esp)
10bfe4: e8 9b 57 00 00 call 111784 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
10bfe9: 8d 04 5b lea (%ebx,%ebx,2),%eax
10bfec: 8d 04 85 a0 48 13 00 lea 0x1348a0(,%eax,4),%eax
10bff3: b9 03 00 00 00 mov $0x3,%ecx
10bff8: 89 c7 mov %eax,%edi
10bffa: 8b 74 24 34 mov 0x34(%esp),%esi
10bffe: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_ISR_Enable( level );
10c000: 55 push %ebp
10c001: 9d popf
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
10c002: 31 c0 xor %eax,%eax
}
10c004: 83 c4 1c add $0x1c,%esp
10c007: 5b pop %ebx
10c008: 5e pop %esi
10c009: 5f pop %edi
10c00a: 5d pop %ebp
10c00b: c3 ret
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
10c00c: 8d 34 5b lea (%ebx,%ebx,2),%esi
10c00f: c1 e6 02 shl $0x2,%esi
10c012: 8d 86 a0 48 13 00 lea 0x1348a0(%esi),%eax
10c018: 81 c6 40 4d 12 00 add $0x124d40,%esi
10c01e: b9 03 00 00 00 mov $0x3,%ecx
10c023: 89 c7 mov %eax,%edi
10c025: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10c027: eb d7 jmp 10c000 <sigaction+0x6c>
10c029: 8d 76 00 lea 0x0(%esi),%esi
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
10c02c: 31 c0 xor %eax,%eax <== NOT EXECUTED
10c02e: eb d4 jmp 10c004 <sigaction+0x70> <== NOT EXECUTED
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
10c030: e8 ef 8a 00 00 call 114b24 <__errno>
10c035: c7 00 16 00 00 00 movl $0x16,(%eax)
10c03b: b8 ff ff ff ff mov $0xffffffff,%eax
10c040: eb c2 jmp 10c004 <sigaction+0x70>
0010c49c <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
10c49c: 55 push %ebp
10c49d: 57 push %edi
10c49e: 56 push %esi
10c49f: 53 push %ebx
10c4a0: 83 ec 4c sub $0x4c,%esp
10c4a3: 8b 74 24 60 mov 0x60(%esp),%esi
10c4a7: 8b 5c 24 64 mov 0x64(%esp),%ebx
10c4ab: 8b 7c 24 68 mov 0x68(%esp),%edi
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
10c4af: 85 f6 test %esi,%esi
10c4b1: 0f 84 b1 01 00 00 je 10c668 <sigtimedwait+0x1cc>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
10c4b7: 85 ff test %edi,%edi
10c4b9: 0f 84 4d 01 00 00 je 10c60c <sigtimedwait+0x170>
if ( !_Timespec_Is_valid( timeout ) )
10c4bf: 89 3c 24 mov %edi,(%esp)
10c4c2: e8 c5 36 00 00 call 10fb8c <_Timespec_Is_valid>
10c4c7: 84 c0 test %al,%al
10c4c9: 0f 84 99 01 00 00 je 10c668 <sigtimedwait+0x1cc>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
10c4cf: 89 3c 24 mov %edi,(%esp)
10c4d2: e8 d9 36 00 00 call 10fbb0 <_Timespec_To_ticks>
if ( !interval )
10c4d7: 85 c0 test %eax,%eax
10c4d9: 0f 84 89 01 00 00 je 10c668 <sigtimedwait+0x1cc> <== NEVER TAKEN
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c4df: 85 db test %ebx,%ebx
10c4e1: 0f 84 2f 01 00 00 je 10c616 <sigtimedwait+0x17a> <== NEVER TAKEN
the_thread = _Thread_Executing;
10c4e7: 8b 15 6c 4d 13 00 mov 0x134d6c,%edx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10c4ed: 8b ba e8 00 00 00 mov 0xe8(%edx),%edi
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
10c4f3: 9c pushf
10c4f4: fa cli
10c4f5: 8f 44 24 2c popl 0x2c(%esp)
if ( *set & api->signals_pending ) {
10c4f9: 8b 0e mov (%esi),%ecx
10c4fb: 8b af d4 00 00 00 mov 0xd4(%edi),%ebp
10c501: 85 e9 test %ebp,%ecx
10c503: 0f 85 17 01 00 00 jne 10c620 <sigtimedwait+0x184>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
10c509: 8b 2d e8 4f 13 00 mov 0x134fe8,%ebp
10c50f: 85 e9 test %ebp,%ecx
10c511: 0f 85 ad 00 00 00 jne 10c5c4 <sigtimedwait+0x128>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
10c517: c7 03 ff ff ff ff movl $0xffffffff,(%ebx)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10c51d: 8b 0d e4 47 13 00 mov 0x1347e4,%ecx
10c523: 41 inc %ecx
10c524: 89 0d e4 47 13 00 mov %ecx,0x1347e4
return _Thread_Dispatch_disable_level;
10c52a: 8b 0d e4 47 13 00 mov 0x1347e4,%ecx
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
10c530: c7 42 44 80 4f 13 00 movl $0x134f80,0x44(%edx)
the_thread->Wait.return_code = EINTR;
10c537: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx)
the_thread->Wait.option = *set;
10c53e: 8b 0e mov (%esi),%ecx
10c540: 89 4a 30 mov %ecx,0x30(%edx)
the_thread->Wait.return_argument = the_info;
10c543: 89 5a 28 mov %ebx,0x28(%edx)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c546: c7 05 b0 4f 13 00 01 movl $0x1,0x134fb0
10c54d: 00 00 00
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
10c550: ff 74 24 2c pushl 0x2c(%esp)
10c554: 9d popf
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
10c555: c7 44 24 08 cc f9 10 movl $0x10f9cc,0x8(%esp)
10c55c: 00
10c55d: 89 44 24 04 mov %eax,0x4(%esp)
10c561: c7 04 24 80 4f 13 00 movl $0x134f80,(%esp)
10c568: e8 37 31 00 00 call 10f6a4 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10c56d: e8 5e 2c 00 00 call 10f1d0 <_Thread_Enable_dispatch>
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
10c572: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
10c579: 00
10c57a: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10c581: 00
10c582: 89 5c 24 08 mov %ebx,0x8(%esp)
10c586: 8b 03 mov (%ebx),%eax
10c588: 89 44 24 04 mov %eax,0x4(%esp)
10c58c: 89 3c 24 mov %edi,(%esp)
10c58f: e8 60 5a 00 00 call 111ff4 <_POSIX_signals_Clear_signals>
/* Set errno only if return code is not EINTR or
* if EINTR was caused by a signal being caught, which
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
10c594: a1 6c 4d 13 00 mov 0x134d6c,%eax
10c599: 83 78 34 04 cmpl $0x4,0x34(%eax)
10c59d: 0f 85 dd 00 00 00 jne 10c680 <sigtimedwait+0x1e4>
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
10c5a3: 8b 2b mov (%ebx),%ebp
10c5a5: 8d 4d ff lea -0x1(%ebp),%ecx
10c5a8: b8 01 00 00 00 mov $0x1,%eax
10c5ad: d3 e0 shl %cl,%eax
10c5af: 85 06 test %eax,(%esi)
10c5b1: 0f 84 c9 00 00 00 je 10c680 <sigtimedwait+0x1e4> <== NEVER TAKEN
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
10c5b7: 89 e8 mov %ebp,%eax
10c5b9: 83 c4 4c add $0x4c,%esp
10c5bc: 5b pop %ebx
10c5bd: 5e pop %esi
10c5be: 5f pop %edi
10c5bf: 5d pop %ebp
10c5c0: c3 ret
10c5c1: 8d 76 00 lea 0x0(%esi),%esi
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
10c5c4: 89 e8 mov %ebp,%eax
10c5c6: e8 91 fe ff ff call 10c45c <_POSIX_signals_Get_lowest>
10c5cb: 89 c5 mov %eax,%ebp
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
10c5cd: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
10c5d4: 00
10c5d5: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
10c5dc: 00
10c5dd: 89 5c 24 08 mov %ebx,0x8(%esp)
10c5e1: 89 44 24 04 mov %eax,0x4(%esp)
10c5e5: 89 3c 24 mov %edi,(%esp)
10c5e8: e8 07 5a 00 00 call 111ff4 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
10c5ed: ff 74 24 2c pushl 0x2c(%esp)
10c5f1: 9d popf
the_info->si_signo = signo;
10c5f2: 89 2b mov %ebp,(%ebx)
the_info->si_code = SI_USER;
10c5f4: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10c5fb: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
10c602: 89 e8 mov %ebp,%eax
10c604: 83 c4 4c add $0x4c,%esp
10c607: 5b pop %ebx
10c608: 5e pop %esi
10c609: 5f pop %edi
10c60a: 5d pop %ebp
10c60b: c3 ret
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
10c60c: 31 c0 xor %eax,%eax
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c60e: 85 db test %ebx,%ebx
10c610: 0f 85 d1 fe ff ff jne 10c4e7 <sigtimedwait+0x4b>
10c616: 8d 5c 24 34 lea 0x34(%esp),%ebx
10c61a: e9 c8 fe ff ff jmp 10c4e7 <sigtimedwait+0x4b>
10c61f: 90 nop
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
10c620: 89 e8 mov %ebp,%eax
10c622: e8 35 fe ff ff call 10c45c <_POSIX_signals_Get_lowest>
10c627: 89 03 mov %eax,(%ebx)
_POSIX_signals_Clear_signals(
10c629: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
10c630: 00
10c631: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10c638: 00
10c639: 89 5c 24 08 mov %ebx,0x8(%esp)
10c63d: 89 44 24 04 mov %eax,0x4(%esp)
10c641: 89 3c 24 mov %edi,(%esp)
10c644: e8 ab 59 00 00 call 111ff4 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
10c649: ff 74 24 2c pushl 0x2c(%esp)
10c64d: 9d popf
the_info->si_code = SI_USER;
10c64e: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10c655: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return the_info->si_signo;
10c65c: 8b 2b mov (%ebx),%ebp
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
10c65e: 89 e8 mov %ebp,%eax
10c660: 83 c4 4c add $0x4c,%esp
10c663: 5b pop %ebx
10c664: 5e pop %esi
10c665: 5f pop %edi
10c666: 5d pop %ebp
10c667: c3 ret
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c668: e8 f3 8b 00 00 call 115260 <__errno>
10c66d: c7 00 16 00 00 00 movl $0x16,(%eax)
10c673: bd ff ff ff ff mov $0xffffffff,%ebp
10c678: e9 3a ff ff ff jmp 10c5b7 <sigtimedwait+0x11b>
10c67d: 8d 76 00 lea 0x0(%esi),%esi
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
errno = _Thread_Executing->Wait.return_code;
10c680: e8 db 8b 00 00 call 115260 <__errno>
10c685: 8b 15 6c 4d 13 00 mov 0x134d6c,%edx
10c68b: 8b 52 34 mov 0x34(%edx),%edx
10c68e: 89 10 mov %edx,(%eax)
return -1;
10c690: bd ff ff ff ff mov $0xffffffff,%ebp
10c695: e9 1d ff ff ff jmp 10c5b7 <sigtimedwait+0x11b>
0010e548 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
10e548: 53 push %ebx
10e549: 83 ec 18 sub $0x18,%esp
10e54c: 8b 5c 24 24 mov 0x24(%esp),%ebx
int status;
status = sigtimedwait( set, NULL, NULL );
10e550: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10e557: 00
10e558: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10e55f: 00
10e560: 8b 44 24 20 mov 0x20(%esp),%eax
10e564: 89 04 24 mov %eax,(%esp)
10e567: e8 b8 fd ff ff call 10e324 <sigtimedwait>
if ( status != -1 ) {
10e56c: 83 f8 ff cmp $0xffffffff,%eax
10e56f: 74 0f je 10e580 <sigwait+0x38>
if ( sig )
10e571: 85 db test %ebx,%ebx
10e573: 74 17 je 10e58c <sigwait+0x44> <== NEVER TAKEN
*sig = status;
10e575: 89 03 mov %eax,(%ebx)
return 0;
10e577: 31 c0 xor %eax,%eax
}
return errno;
}
10e579: 83 c4 18 add $0x18,%esp
10e57c: 5b pop %ebx
10e57d: c3 ret
10e57e: 66 90 xchg %ax,%ax
if ( sig )
*sig = status;
return 0;
}
return errno;
10e580: e8 9b 88 00 00 call 116e20 <__errno>
10e585: 8b 00 mov (%eax),%eax
}
10e587: 83 c4 18 add $0x18,%esp
10e58a: 5b pop %ebx
10e58b: c3 ret
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
10e58c: 31 c0 xor %eax,%eax
}
return errno;
}
10e58e: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
10e591: 5b pop %ebx <== NOT EXECUTED
10e592: c3 ret <== NOT EXECUTED
0010a650 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
10a650: 56 push %esi
10a651: 53 push %ebx
10a652: 83 ec 14 sub $0x14,%esp
10a655: 89 d3 mov %edx,%ebx
10a657: 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)) {
10a659: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx)
10a660: 75 12 jne 10a674 <siproc+0x24> <== 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);
10a662: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
10a665: 89 da mov %ebx,%edx <== NOT EXECUTED
}
return i;
}
10a667: 83 c4 14 add $0x14,%esp <== NOT EXECUTED
10a66a: 5b pop %ebx <== NOT EXECUTED
10a66b: 5e pop %esi <== 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);
10a66c: e9 47 fe ff ff jmp 10a4b8 <iproc> <== NOT EXECUTED
10a671: 8d 76 00 lea 0x0(%esi),%esi <== 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);
10a674: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10a67b: 00
10a67c: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10a683: 00
10a684: 8b 42 18 mov 0x18(%edx),%eax
10a687: 89 04 24 mov %eax,(%esp)
10a68a: e8 ed 12 00 00 call 10b97c <rtems_semaphore_obtain>
i = iproc (c, tty);
10a68f: 89 f2 mov %esi,%edx
10a691: 0f b6 c2 movzbl %dl,%eax
10a694: 89 da mov %ebx,%edx
10a696: e8 1d fe ff ff call 10a4b8 <iproc>
10a69b: 89 c6 mov %eax,%esi
rtems_semaphore_release (tty->osem);
10a69d: 8b 43 18 mov 0x18(%ebx),%eax
10a6a0: 89 04 24 mov %eax,(%esp)
10a6a3: e8 00 14 00 00 call 10baa8 <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
10a6a8: 89 f0 mov %esi,%eax
10a6aa: 83 c4 14 add $0x14,%esp
10a6ad: 5b pop %ebx
10a6ae: 5e pop %esi
10a6af: c3 ret
0010a0cc <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
10a0cc: 53 push %ebx
10a0cd: 83 ec 18 sub $0x18,%esp
10a0d0: 8b 44 24 20 mov 0x20(%esp),%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;
10a0d4: 8b 90 e0 00 00 00 mov 0xe0(%eax),%edx
if ( this_reent ) {
10a0da: 85 d2 test %edx,%edx
10a0dc: 74 33 je 10a111 <sync_per_thread+0x45> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
10a0de: 8b 0d 2c 44 13 00 mov 0x13442c,%ecx
10a0e4: 8b 99 e0 00 00 00 mov 0xe0(%ecx),%ebx
_Thread_Executing->libc_reent = this_reent;
10a0ea: 89 91 e0 00 00 00 mov %edx,0xe0(%ecx)
_fwalk (t->libc_reent, sync_wrapper);
10a0f0: c7 44 24 04 18 a1 10 movl $0x10a118,0x4(%esp)
10a0f7: 00
10a0f8: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax
10a0fe: 89 04 24 mov %eax,(%esp)
10a101: e8 f6 b7 00 00 call 1158fc <_fwalk>
_Thread_Executing->libc_reent = current_reent;
10a106: a1 2c 44 13 00 mov 0x13442c,%eax
10a10b: 89 98 e0 00 00 00 mov %ebx,0xe0(%eax)
}
}
10a111: 83 c4 18 add $0x18,%esp
10a114: 5b pop %ebx
10a115: c3 ret
0010b2d0 <sysconf>:
*/
long sysconf(
int name
)
{
10b2d0: 83 ec 0c sub $0xc,%esp
10b2d3: 8b 4c 24 10 mov 0x10(%esp),%ecx
if ( name == _SC_CLK_TCK )
10b2d7: 83 f9 02 cmp $0x2,%ecx
10b2da: 74 38 je 10b314 <sysconf+0x44>
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
10b2dc: 83 f9 04 cmp $0x4,%ecx
10b2df: 74 47 je 10b328 <sysconf+0x58>
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
10b2e1: 83 f9 33 cmp $0x33,%ecx
10b2e4: 74 22 je 10b308 <sysconf+0x38>
return 1024;
if ( name == _SC_PAGESIZE )
10b2e6: 83 f9 08 cmp $0x8,%ecx
10b2e9: 74 49 je 10b334 <sysconf+0x64>
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
return RTEMS_FILESYSTEM_SYMLOOP_MAX;
10b2eb: b8 20 00 00 00 mov $0x20,%eax
return 1024;
if ( name == _SC_PAGESIZE )
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
10b2f0: 83 f9 4f cmp $0x4f,%ecx
10b2f3: 74 18 je 10b30d <sysconf+0x3d> <== NEVER TAKEN
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10b2f5: e8 5a 8c 00 00 call 113f54 <__errno>
10b2fa: c7 00 16 00 00 00 movl $0x16,(%eax)
10b300: b8 ff ff ff ff mov $0xffffffff,%eax
10b305: eb 06 jmp 10b30d <sysconf+0x3d>
10b307: 90 nop
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
return 1024;
10b308: b8 00 04 00 00 mov $0x400,%eax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b30d: 83 c4 0c add $0xc,%esp
10b310: c3 ret
10b311: 8d 76 00 lea 0x0(%esi),%esi
long sysconf(
int name
)
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
10b314: b8 40 42 0f 00 mov $0xf4240,%eax
10b319: 31 d2 xor %edx,%edx
10b31b: f7 35 f0 dd 12 00 divl 0x12ddf0
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b321: 83 c4 0c add $0xc,%esp
10b324: c3 ret
10b325: 8d 76 00 lea 0x0(%esi),%esi
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
10b328: a1 60 df 12 00 mov 0x12df60,%eax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b32d: 83 c4 0c add $0xc,%esp
10b330: c3 ret
10b331: 8d 76 00 lea 0x0(%esi),%esi
if ( name == _SC_GETPW_R_SIZE_MAX )
return 1024;
if ( name == _SC_PAGESIZE )
return PAGE_SIZE;
10b334: b8 00 10 00 00 mov $0x1000,%eax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b339: 83 c4 0c add $0xc,%esp
10b33c: c3 ret
00118898 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
118898: 56 push %esi
118899: 53 push %ebx
11889a: 83 ec 14 sub $0x14,%esp
11889d: 8b 5c 24 20 mov 0x20(%esp),%ebx
1188a1: 8b 44 24 24 mov 0x24(%esp),%eax
1188a5: 8b 74 24 28 mov 0x28(%esp),%esi
switch (opt) {
1188a9: 85 c0 test %eax,%eax
1188ab: 74 37 je 1188e4 <tcsetattr+0x4c>
1188ad: 48 dec %eax
1188ae: 74 18 je 1188c8 <tcsetattr+0x30>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
1188b0: e8 97 46 00 00 call 11cf4c <__errno>
1188b5: c7 00 86 00 00 00 movl $0x86,(%eax)
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
1188bb: b8 ff ff ff ff mov $0xffffffff,%eax
1188c0: 83 c4 14 add $0x14,%esp
1188c3: 5b pop %ebx
1188c4: 5e pop %esi
1188c5: c3 ret
1188c6: 66 90 xchg %ax,%ax
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
1188c8: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
1188cf: 00
1188d0: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
1188d7: 00
1188d8: 89 1c 24 mov %ebx,(%esp)
1188db: e8 8c f7 ff ff call 11806c <ioctl>
1188e0: 85 c0 test %eax,%eax
1188e2: 78 d7 js 1188bb <tcsetattr+0x23> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
1188e4: 89 74 24 28 mov %esi,0x28(%esp)
1188e8: c7 44 24 24 02 00 00 movl $0x2,0x24(%esp)
1188ef: 00
1188f0: 89 5c 24 20 mov %ebx,0x20(%esp)
}
}
1188f4: 83 c4 14 add $0x14,%esp
1188f7: 5b pop %ebx
1188f8: 5e pop %esi
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
1188f9: e9 6e f7 ff ff jmp 11806c <ioctl>
0010c7ec <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
10c7ec: 56 push %esi
10c7ed: 53 push %ebx
10c7ee: 83 ec 14 sub $0x14,%esp
10c7f1: 8b 5c 24 24 mov 0x24(%esp),%ebx
10c7f5: 8b 74 24 28 mov 0x28(%esp),%esi
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
10c7f9: 83 7c 24 20 01 cmpl $0x1,0x20(%esp)
10c7fe: 0f 85 dc 00 00 00 jne 10c8e0 <timer_create+0xf4>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
10c804: 85 f6 test %esi,%esi
10c806: 0f 84 d4 00 00 00 je 10c8e0 <timer_create+0xf4>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
10c80c: 85 db test %ebx,%ebx
10c80e: 74 21 je 10c831 <timer_create+0x45>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
10c810: 8b 03 mov (%ebx),%eax
10c812: 48 dec %eax
10c813: 83 f8 01 cmp $0x1,%eax
10c816: 0f 87 c4 00 00 00 ja 10c8e0 <timer_create+0xf4> <== NEVER TAKEN
( evp->sigev_notify != SIGEV_SIGNAL ) ) {
/* The value of the field sigev_notify is not valid */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !evp->sigev_signo )
10c81c: 8b 43 04 mov 0x4(%ebx),%eax
10c81f: 85 c0 test %eax,%eax
10c821: 0f 84 b9 00 00 00 je 10c8e0 <timer_create+0xf4> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10c827: 48 dec %eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
10c828: 83 f8 1f cmp $0x1f,%eax
10c82b: 0f 87 af 00 00 00 ja 10c8e0 <timer_create+0xf4> <== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10c831: a1 64 60 13 00 mov 0x136064,%eax
10c836: 40 inc %eax
10c837: a3 64 60 13 00 mov %eax,0x136064
return _Thread_Dispatch_disable_level;
10c83c: a1 64 60 13 00 mov 0x136064,%eax
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void )
{
return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
10c841: c7 04 24 c0 63 13 00 movl $0x1363c0,(%esp)
10c848: e8 8f 20 00 00 call 10e8dc <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
10c84d: 85 c0 test %eax,%eax
10c84f: 0f 84 a1 00 00 00 je 10c8f6 <timer_create+0x10a>
rtems_set_errno_and_return_minus_one( EAGAIN );
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
10c855: c6 40 3c 02 movb $0x2,0x3c(%eax)
ptimer->thread_id = _Thread_Executing->Object.id;
10c859: 8b 15 2c 66 13 00 mov 0x13662c,%edx
10c85f: 8b 52 08 mov 0x8(%edx),%edx
10c862: 89 50 38 mov %edx,0x38(%eax)
if ( evp != NULL ) {
10c865: 85 db test %ebx,%ebx
10c867: 74 11 je 10c87a <timer_create+0x8e>
ptimer->inf.sigev_notify = evp->sigev_notify;
10c869: 8b 13 mov (%ebx),%edx
10c86b: 89 50 40 mov %edx,0x40(%eax)
ptimer->inf.sigev_signo = evp->sigev_signo;
10c86e: 8b 53 04 mov 0x4(%ebx),%edx
10c871: 89 50 44 mov %edx,0x44(%eax)
ptimer->inf.sigev_value = evp->sigev_value;
10c874: 8b 53 08 mov 0x8(%ebx),%edx
10c877: 89 50 48 mov %edx,0x48(%eax)
}
ptimer->overrun = 0;
10c87a: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
ptimer->timer_data.it_value.tv_sec = 0;
10c881: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
ptimer->timer_data.it_value.tv_nsec = 0;
10c888: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
ptimer->timer_data.it_interval.tv_sec = 0;
10c88f: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
ptimer->timer_data.it_interval.tv_nsec = 0;
10c896: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c89d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10c8a4: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10c8ab: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10c8b2: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c8b9: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10c8bc: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c8bf: 8b 0d dc 63 13 00 mov 0x1363dc,%ecx
10c8c5: 89 04 99 mov %eax,(%ecx,%ebx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10c8c8: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
10c8cf: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10c8d1: e8 e2 31 00 00 call 10fab8 <_Thread_Enable_dispatch>
return 0;
10c8d6: 31 c0 xor %eax,%eax
}
10c8d8: 83 c4 14 add $0x14,%esp
10c8db: 5b pop %ebx
10c8dc: 5e pop %esi
10c8dd: c3 ret
10c8de: 66 90 xchg %ax,%ax
if ( !evp->sigev_signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
10c8e0: e8 2b 91 00 00 call 115a10 <__errno>
10c8e5: c7 00 16 00 00 00 movl $0x16,(%eax)
10c8eb: b8 ff ff ff ff mov $0xffffffff,%eax
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10c8f0: 83 c4 14 add $0x14,%esp
10c8f3: 5b pop %ebx
10c8f4: 5e pop %esi
10c8f5: c3 ret
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
10c8f6: e8 bd 31 00 00 call 10fab8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
10c8fb: e8 10 91 00 00 call 115a10 <__errno>
10c900: c7 00 0b 00 00 00 movl $0xb,(%eax)
10c906: b8 ff ff ff ff mov $0xffffffff,%eax
10c90b: eb cb jmp 10c8d8 <timer_create+0xec>
0010b4e4 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
10b4e4: 55 push %ebp
10b4e5: 57 push %edi
10b4e6: 56 push %esi
10b4e7: 53 push %ebx
10b4e8: 83 ec 6c sub $0x6c,%esp
10b4eb: 8b 9c 24 84 00 00 00 mov 0x84(%esp),%ebx
10b4f2: 8b ac 24 88 00 00 00 mov 0x88(%esp),%ebp
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
10b4f9: 85 ed test %ebp,%ebp
10b4fb: 0f 84 ef 01 00 00 je 10b6f0 <timer_settime+0x20c> <== NEVER TAKEN
/*
* First, it verifies if the structure "value" is correct
* if the number of nanoseconds is not correct return EINVAL
*/
if ( !_Timespec_Is_valid( &(value->it_value) ) ) {
10b501: 8d 45 08 lea 0x8(%ebp),%eax
10b504: 89 04 24 mov %eax,(%esp)
10b507: e8 c4 38 00 00 call 10edd0 <_Timespec_Is_valid>
10b50c: 84 c0 test %al,%al
10b50e: 0f 84 dc 01 00 00 je 10b6f0 <timer_settime+0x20c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
10b514: 89 2c 24 mov %ebp,(%esp)
10b517: e8 b4 38 00 00 call 10edd0 <_Timespec_Is_valid>
10b51c: 84 c0 test %al,%al
10b51e: 0f 84 cc 01 00 00 je 10b6f0 <timer_settime+0x20c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
10b524: 83 fb 04 cmp $0x4,%ebx
10b527: 0f 84 2f 01 00 00 je 10b65c <timer_settime+0x178>
10b52d: 85 db test %ebx,%ebx
10b52f: 0f 85 bb 01 00 00 jne 10b6f0 <timer_settime+0x20c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10b535: 8d 44 24 50 lea 0x50(%esp),%eax
10b539: 89 44 24 2c mov %eax,0x2c(%esp)
10b53d: b9 04 00 00 00 mov $0x4,%ecx
10b542: 89 c7 mov %eax,%edi
10b544: 89 ee mov %ebp,%esi
10b546: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* If the function reaches this point, then it will be necessary to do
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
10b548: 8d 44 24 3c lea 0x3c(%esp),%eax
10b54c: 89 44 24 08 mov %eax,0x8(%esp)
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
10b550: 8b 84 24 80 00 00 00 mov 0x80(%esp),%eax
10b557: 89 44 24 04 mov %eax,0x4(%esp)
10b55b: c7 04 24 e0 2f 13 00 movl $0x132fe0,(%esp)
10b562: e8 69 22 00 00 call 10d7d0 <_Objects_Get>
10b567: 89 c3 mov %eax,%ebx
switch ( location ) {
10b569: 8b 44 24 3c mov 0x3c(%esp),%eax
10b56d: 85 c0 test %eax,%eax
10b56f: 0f 85 7b 01 00 00 jne 10b6f0 <timer_settime+0x20c> <== NEVER TAKEN
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
10b575: 8b 7c 24 58 mov 0x58(%esp),%edi
10b579: 85 ff test %edi,%edi
10b57b: 75 0c jne 10b589 <timer_settime+0xa5>
10b57d: 8b 74 24 5c mov 0x5c(%esp),%esi
10b581: 85 f6 test %esi,%esi
10b583: 0f 84 7f 01 00 00 je 10b708 <timer_settime+0x224>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
10b589: 89 2c 24 mov %ebp,(%esp)
10b58c: e8 c3 38 00 00 call 10ee54 <_Timespec_To_ticks>
10b591: 89 43 64 mov %eax,0x64(%ebx)
initial_period = _Timespec_To_ticks( &normalize.it_value );
10b594: 8d 44 24 58 lea 0x58(%esp),%eax
10b598: 89 04 24 mov %eax,(%esp)
10b59b: e8 b4 38 00 00 call 10ee54 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
10b5a0: 89 5c 24 10 mov %ebx,0x10(%esp)
10b5a4: c7 44 24 0c 54 b7 10 movl $0x10b754,0xc(%esp)
10b5ab: 00
10b5ac: 8b 53 08 mov 0x8(%ebx),%edx
10b5af: 89 54 24 08 mov %edx,0x8(%esp)
10b5b3: 89 44 24 04 mov %eax,0x4(%esp)
10b5b7: 8d 43 10 lea 0x10(%ebx),%eax
10b5ba: 89 04 24 mov %eax,(%esp)
10b5bd: e8 fe 5e 00 00 call 1114c0 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
10b5c2: 84 c0 test %al,%al
10b5c4: 0f 84 81 00 00 00 je 10b64b <timer_settime+0x167>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
10b5ca: 8d 43 54 lea 0x54(%ebx),%eax
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
10b5cd: 8b 94 24 8c 00 00 00 mov 0x8c(%esp),%edx
10b5d4: 85 d2 test %edx,%edx
10b5d6: 74 10 je 10b5e8 <timer_settime+0x104>
*ovalue = ptimer->timer_data;
10b5d8: b9 04 00 00 00 mov $0x4,%ecx
10b5dd: 8b bc 24 8c 00 00 00 mov 0x8c(%esp),%edi
10b5e4: 89 c6 mov %eax,%esi
10b5e6: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ptimer->timer_data = normalize;
10b5e8: b9 04 00 00 00 mov $0x4,%ecx
10b5ed: 89 c7 mov %eax,%edi
10b5ef: 8b 74 24 2c mov 0x2c(%esp),%esi
10b5f3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10b5f5: c6 43 3c 03 movb $0x3,0x3c(%ebx)
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
10b5f9: 8d 44 24 40 lea 0x40(%esp),%eax
10b5fd: 89 04 24 mov %eax,(%esp)
10b600: e8 5b 18 00 00 call 10ce60 <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
10b605: 8b 74 24 40 mov 0x40(%esp),%esi
10b609: 8b 7c 24 44 mov 0x44(%esp),%edi
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
10b60d: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b614: 3b
10b615: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b61c: 00
10b61d: 89 34 24 mov %esi,(%esp)
10b620: 89 7c 24 04 mov %edi,0x4(%esp)
10b624: e8 9b 53 01 00 call 1209c4 <__divdi3>
10b629: 89 43 6c mov %eax,0x6c(%ebx)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
10b62c: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b633: 3b
10b634: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b63b: 00
10b63c: 89 34 24 mov %esi,(%esp)
10b63f: 89 7c 24 04 mov %edi,0x4(%esp)
10b643: e8 d0 54 01 00 call 120b18 <__moddi3>
10b648: 89 43 70 mov %eax,0x70(%ebx)
_TOD_Get( &ptimer->time );
_Thread_Enable_dispatch();
10b64b: e8 c4 2d 00 00 call 10e414 <_Thread_Enable_dispatch>
return 0;
10b650: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b652: 83 c4 6c add $0x6c,%esp
10b655: 5b pop %ebx
10b656: 5e pop %esi
10b657: 5f pop %edi
10b658: 5d pop %ebp
10b659: c3 ret
10b65a: 66 90 xchg %ax,%ax
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10b65c: 8d 44 24 50 lea 0x50(%esp),%eax
10b660: 89 44 24 2c mov %eax,0x2c(%esp)
10b664: 89 c7 mov %eax,%edi
10b666: 89 ee mov %ebp,%esi
10b668: 89 d9 mov %ebx,%ecx
10b66a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
10b66c: 8d 44 24 40 lea 0x40(%esp),%eax
10b670: 89 04 24 mov %eax,(%esp)
10b673: e8 e8 17 00 00 call 10ce60 <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
10b678: 8b 74 24 40 mov 0x40(%esp),%esi
10b67c: 8b 7c 24 44 mov 0x44(%esp),%edi
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
10b680: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b687: 3b
10b688: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b68f: 00
10b690: 89 34 24 mov %esi,(%esp)
10b693: 89 7c 24 04 mov %edi,0x4(%esp)
10b697: e8 28 53 01 00 call 1209c4 <__divdi3>
10b69c: 89 44 24 48 mov %eax,0x48(%esp)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
10b6a0: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b6a7: 3b
10b6a8: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b6af: 00
10b6b0: 89 34 24 mov %esi,(%esp)
10b6b3: 89 7c 24 04 mov %edi,0x4(%esp)
10b6b7: e8 5c 54 01 00 call 120b18 <__moddi3>
10b6bc: 89 44 24 4c mov %eax,0x4c(%esp)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
10b6c0: 8d 74 24 48 lea 0x48(%esp),%esi
10b6c4: 89 74 24 04 mov %esi,0x4(%esp)
10b6c8: 8d 5c 24 58 lea 0x58(%esp),%ebx
10b6cc: 89 1c 24 mov %ebx,(%esp)
10b6cf: e8 20 37 00 00 call 10edf4 <_Timespec_Less_than>
10b6d4: 84 c0 test %al,%al
10b6d6: 75 18 jne 10b6f0 <timer_settime+0x20c>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
10b6d8: 89 5c 24 08 mov %ebx,0x8(%esp)
10b6dc: 89 5c 24 04 mov %ebx,0x4(%esp)
10b6e0: 89 34 24 mov %esi,(%esp)
10b6e3: e8 30 37 00 00 call 10ee18 <_Timespec_Subtract>
10b6e8: e9 5b fe ff ff jmp 10b548 <timer_settime+0x64>
10b6ed: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b6f0: e8 b7 8d 00 00 call 1144ac <__errno>
10b6f5: c7 00 16 00 00 00 movl $0x16,(%eax)
10b6fb: b8 ff ff ff ff mov $0xffffffff,%eax
10b700: e9 4d ff ff ff jmp 10b652 <timer_settime+0x16e>
10b705: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
10b708: 8d 43 10 lea 0x10(%ebx),%eax
10b70b: 89 04 24 mov %eax,(%esp)
10b70e: e8 01 3b 00 00 call 10f214 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
10b713: 8d 43 54 lea 0x54(%ebx),%eax
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
10b716: 8b 8c 24 8c 00 00 00 mov 0x8c(%esp),%ecx
10b71d: 85 c9 test %ecx,%ecx
10b71f: 74 10 je 10b731 <timer_settime+0x24d>
*ovalue = ptimer->timer_data;
10b721: b9 04 00 00 00 mov $0x4,%ecx
10b726: 8b bc 24 8c 00 00 00 mov 0x8c(%esp),%edi
10b72d: 89 c6 mov %eax,%esi
10b72f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* The new data are set */
ptimer->timer_data = normalize;
10b731: b9 04 00 00 00 mov $0x4,%ecx
10b736: 89 c7 mov %eax,%edi
10b738: 8b 74 24 2c mov 0x2c(%esp),%esi
10b73c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10b73e: c6 43 3c 04 movb $0x4,0x3c(%ebx)
/* Returns with success */
_Thread_Enable_dispatch();
10b742: e8 cd 2c 00 00 call 10e414 <_Thread_Enable_dispatch>
return 0;
10b747: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b749: 83 c4 6c add $0x6c,%esp
10b74c: 5b pop %ebx
10b74d: 5e pop %esi
10b74e: 5f pop %edi
10b74f: 5d pop %ebp
10b750: c3 ret
0010b5f4 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
10b5f4: 56 push %esi
10b5f5: 53 push %ebx
10b5f6: 83 ec 34 sub $0x34,%esp
10b5f9: 8b 5c 24 40 mov 0x40(%esp),%ebx
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
10b5fd: a1 bc 45 13 00 mov 0x1345bc,%eax
10b602: 85 c0 test %eax,%eax
10b604: 0f 84 8a 00 00 00 je 10b694 <ualarm+0xa0>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
10b60a: c7 04 24 a0 45 13 00 movl $0x1345a0,(%esp)
10b611: e8 16 3a 00 00 call 10f02c <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
10b616: 83 e8 02 sub $0x2,%eax
10b619: 83 f8 01 cmp $0x1,%eax
10b61c: 0f 86 a2 00 00 00 jbe 10b6c4 <ualarm+0xd0> <== ALWAYS TAKEN
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
10b622: 31 f6 xor %esi,%esi
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
10b624: 85 db test %ebx,%ebx
10b626: 74 64 je 10b68c <ualarm+0x98>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
10b628: ba 83 de 1b 43 mov $0x431bde83,%edx
10b62d: 89 d8 mov %ebx,%eax
10b62f: f7 e2 mul %edx
10b631: c1 ea 12 shr $0x12,%edx
10b634: 89 54 24 28 mov %edx,0x28(%esp)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
10b638: 8d 04 92 lea (%edx,%edx,4),%eax
10b63b: 8d 04 80 lea (%eax,%eax,4),%eax
10b63e: 8d 04 80 lea (%eax,%eax,4),%eax
10b641: 8d 04 80 lea (%eax,%eax,4),%eax
10b644: 8d 04 80 lea (%eax,%eax,4),%eax
10b647: 8d 04 80 lea (%eax,%eax,4),%eax
10b64a: c1 e0 06 shl $0x6,%eax
10b64d: 29 c3 sub %eax,%ebx
10b64f: 8d 04 9b lea (%ebx,%ebx,4),%eax
10b652: 8d 04 80 lea (%eax,%eax,4),%eax
10b655: 8d 04 80 lea (%eax,%eax,4),%eax
10b658: c1 e0 03 shl $0x3,%eax
10b65b: 89 44 24 2c mov %eax,0x2c(%esp)
ticks = _Timespec_To_ticks( &tp );
10b65f: 8d 5c 24 28 lea 0x28(%esp),%ebx
10b663: 89 1c 24 mov %ebx,(%esp)
10b666: e8 91 35 00 00 call 10ebfc <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
10b66b: 89 1c 24 mov %ebx,(%esp)
10b66e: e8 89 35 00 00 call 10ebfc <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b673: a3 ac 45 13 00 mov %eax,0x1345ac
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b678: c7 44 24 04 a0 45 13 movl $0x1345a0,0x4(%esp)
10b67f: 00
10b680: c7 04 24 a8 3c 13 00 movl $0x133ca8,(%esp)
10b687: e8 84 38 00 00 call 10ef10 <_Watchdog_Insert>
}
return remaining;
}
10b68c: 89 f0 mov %esi,%eax
10b68e: 83 c4 34 add $0x34,%esp
10b691: 5b pop %ebx
10b692: 5e pop %esi
10b693: c3 ret
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b694: c7 05 a8 45 13 00 00 movl $0x0,0x1345a8
10b69b: 00 00 00
the_watchdog->routine = routine;
10b69e: c7 05 bc 45 13 00 b8 movl $0x10b5b8,0x1345bc
10b6a5: b5 10 00
the_watchdog->id = id;
10b6a8: c7 05 c0 45 13 00 00 movl $0x0,0x1345c0
10b6af: 00 00 00
the_watchdog->user_data = user_data;
10b6b2: c7 05 c4 45 13 00 00 movl $0x0,0x1345c4
10b6b9: 00 00 00
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
10b6bc: 31 f6 xor %esi,%esi
10b6be: e9 61 ff ff ff jmp 10b624 <ualarm+0x30>
10b6c3: 90 nop
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
10b6c4: a1 b4 45 13 00 mov 0x1345b4,%eax
10b6c9: 03 05 ac 45 13 00 add 0x1345ac,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10b6cf: 8d 54 24 28 lea 0x28(%esp),%edx
10b6d3: 89 54 24 04 mov %edx,0x4(%esp)
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
10b6d7: 2b 05 b8 45 13 00 sub 0x1345b8,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10b6dd: 89 04 24 mov %eax,(%esp)
10b6e0: e8 cf 34 00 00 call 10ebb4 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
10b6e5: 8b 44 24 28 mov 0x28(%esp),%eax
10b6e9: 8d 04 80 lea (%eax,%eax,4),%eax
10b6ec: 8d 04 80 lea (%eax,%eax,4),%eax
10b6ef: 8d 04 80 lea (%eax,%eax,4),%eax
10b6f2: 8d 04 80 lea (%eax,%eax,4),%eax
10b6f5: 8d 04 80 lea (%eax,%eax,4),%eax
10b6f8: 8d 34 80 lea (%eax,%eax,4),%esi
10b6fb: c1 e6 06 shl $0x6,%esi
remaining += tp.tv_nsec / 1000;
10b6fe: b9 d3 4d 62 10 mov $0x10624dd3,%ecx
10b703: 8b 44 24 2c mov 0x2c(%esp),%eax
10b707: f7 e9 imul %ecx
10b709: 89 44 24 18 mov %eax,0x18(%esp)
10b70d: 89 54 24 1c mov %edx,0x1c(%esp)
10b711: 8b 4c 24 1c mov 0x1c(%esp),%ecx
10b715: c1 f9 06 sar $0x6,%ecx
10b718: 8b 44 24 2c mov 0x2c(%esp),%eax
10b71c: 99 cltd
10b71d: 29 d1 sub %edx,%ecx
10b71f: 01 ce add %ecx,%esi
10b721: e9 fe fe ff ff jmp 10b624 <ualarm+0x30>
0010b2c4 <unmount>:
return mt_entry == root->mt_entry || mt_entry == current->mt_entry;
}
int unmount( const char *path )
{
10b2c4: 57 push %edi
10b2c5: 56 push %esi
10b2c6: 53 push %ebx
10b2c7: 83 ec 50 sub $0x50,%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 =
10b2ca: c7 44 24 08 18 00 00 movl $0x18,0x8(%esp)
10b2d1: 00
10b2d2: 8b 44 24 60 mov 0x60(%esp),%eax
10b2d6: 89 44 24 04 mov %eax,0x4(%esp)
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
10b2da: 8d 7c 24 18 lea 0x18(%esp),%edi
10b2de: 89 3c 24 mov %edi,(%esp)
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 =
10b2e1: e8 b2 dd ff ff call 109098 <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;
10b2e6: 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)(
10b2e9: 8b 53 0c mov 0xc(%ebx),%edx
10b2ec: 8b 4b 24 mov 0x24(%ebx),%ecx
10b2ef: 89 4c 24 04 mov %ecx,0x4(%esp)
10b2f3: 89 04 24 mov %eax,(%esp)
10b2f6: ff 52 10 call *0x10(%edx)
if ( rtems_filesystem_location_is_root( currentloc ) ) {
10b2f9: 84 c0 test %al,%al
10b2fb: 0f 84 9d 00 00 00 je 10b39e <unmount+0xda>
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;
10b301: a1 60 f2 12 00 mov 0x12f260,%eax
const rtems_filesystem_location_info_t *current =
&rtems_filesystem_current->location;
10b306: 8b 10 mov (%eax),%edx
return mt_entry == root->mt_entry || mt_entry == current->mt_entry;
10b308: 8b 40 04 mov 0x4(%eax),%eax
10b30b: 3b 58 14 cmp 0x14(%eax),%ebx
10b30e: 74 7c je 10b38c <unmount+0xc8>
10b310: 3b 5a 14 cmp 0x14(%edx),%ebx
10b313: 74 77 je 10b38c <unmount+0xc8>
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;
10b315: 8b 43 20 mov 0x20(%ebx),%eax
10b318: 8b 40 14 mov 0x14(%eax),%eax
rv = (*mt_point_ops->unmount_h)( mt_entry );
10b31b: 8b 40 0c mov 0xc(%eax),%eax
10b31e: 89 1c 24 mov %ebx,(%esp)
10b321: ff 50 38 call *0x38(%eax)
10b324: 89 c6 mov %eax,%esi
if ( rv == 0 ) {
10b326: 85 c0 test %eax,%eax
10b328: 74 12 je 10b33c <unmount+0x78>
} else {
errno = EACCES;
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
10b32a: 89 3c 24 mov %edi,(%esp)
10b32d: e8 52 de ff ff call 109184 <rtems_filesystem_eval_path_cleanup>
rtems_fatal_error_occurred( 0xdeadbeef );
}
}
return rv;
}
10b332: 89 f0 mov %esi,%eax
10b334: 83 c4 50 add $0x50,%esp
10b337: 5b pop %ebx
10b338: 5e pop %esi
10b339: 5f pop %edi
10b33a: c3 ret
10b33b: 90 nop
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 );
if ( rv == 0 ) {
rtems_id self_task_id = rtems_task_self();
10b33c: e8 3b 0f 00 00 call 10c27c <rtems_task_self>
rtems_filesystem_mt_entry_declare_lock_context( lock_context );
rtems_filesystem_mt_entry_lock( lock_context );
10b341: 9c pushf
10b342: fa cli
10b343: 5a pop %edx
mt_entry->unmount_task = self_task_id;
10b344: 89 43 3c mov %eax,0x3c(%ebx)
mt_entry->mounted = false;
10b347: c6 43 28 00 movb $0x0,0x28(%ebx)
rtems_filesystem_mt_entry_unlock( lock_context );
10b34b: 52 push %edx
10b34c: 9d popf
} else {
errno = EACCES;
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
10b34d: 89 3c 24 mov %edi,(%esp)
10b350: e8 2f de ff ff call 109184 <rtems_filesystem_eval_path_cleanup>
if ( rv == 0 ) {
rtems_event_set out;
rtems_status_code sc = rtems_event_receive(
10b355: 8d 44 24 14 lea 0x14(%esp),%eax
10b359: 89 44 24 0c mov %eax,0xc(%esp)
10b35d: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10b364: 00
10b365: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10b36c: 00
10b36d: c7 04 24 02 00 00 00 movl $0x2,(%esp)
10b374: e8 5b 04 00 00 call 10b7d4 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out
);
if ( sc != RTEMS_SUCCESSFUL ) {
10b379: 85 c0 test %eax,%eax
10b37b: 74 b5 je 10b332 <unmount+0x6e> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
10b37d: c7 04 24 ef be ad de movl $0xdeadbeef,(%esp) <== NOT EXECUTED
10b384: e8 7b 11 00 00 call 10c504 <rtems_fatal_error_occurred><== NOT EXECUTED
10b389: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
mt_entry->unmount_task = self_task_id;
mt_entry->mounted = false;
rtems_filesystem_mt_entry_unlock( lock_context );
}
} else {
errno = EBUSY;
10b38c: e8 c7 8c 00 00 call 114058 <__errno>
10b391: c7 00 10 00 00 00 movl $0x10,(%eax)
rv = -1;
10b397: be ff ff ff ff mov $0xffffffff,%esi
10b39c: eb 8c jmp 10b32a <unmount+0x66>
}
} else {
errno = EACCES;
10b39e: e8 b5 8c 00 00 call 114058 <__errno>
10b3a3: c7 00 0d 00 00 00 movl $0xd,(%eax)
rv = -1;
10b3a9: be ff ff ff ff mov $0xffffffff,%esi
10b3ae: e9 77 ff ff ff jmp 10b32a <unmount+0x66>
0010afa0 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
10afa0: 55 push %ebp
10afa1: 57 push %edi
10afa2: 56 push %esi
10afa3: 53 push %ebx
10afa4: 83 ec 5c sub $0x5c,%esp
10afa7: 8b 5c 24 70 mov 0x70(%esp),%ebx
for (; *fmt != '\0'; fmt++) {
10afab: 0f be 03 movsbl (%ebx),%eax
10afae: 84 c0 test %al,%al
10afb0: 0f 84 96 01 00 00 je 10b14c <vprintk+0x1ac> <== NEVER TAKEN
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
10afb6: 8d 54 24 3b lea 0x3b(%esp),%edx
10afba: 89 54 24 1c mov %edx,0x1c(%esp)
10afbe: eb 19 jmp 10afd9 <vprintk+0x39>
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
rtems_putc(*fmt);
10afc0: 89 04 24 mov %eax,(%esp)
10afc3: e8 24 52 00 00 call 1101ec <rtems_putc>
continue;
10afc8: 89 dd mov %ebx,%ebp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
10afca: 8d 5d 01 lea 0x1(%ebp),%ebx
10afcd: 0f be 45 01 movsbl 0x1(%ebp),%eax
10afd1: 84 c0 test %al,%al
10afd3: 0f 84 73 01 00 00 je 10b14c <vprintk+0x1ac>
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
10afd9: 3c 25 cmp $0x25,%al
10afdb: 75 e3 jne 10afc0 <vprintk+0x20>
rtems_putc(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
10afdd: 0f be 43 01 movsbl 0x1(%ebx),%eax
10afe1: 3c 30 cmp $0x30,%al
10afe3: 0f 84 b7 01 00 00 je 10b1a0 <vprintk+0x200>
if (*fmt != '%') {
rtems_putc(*fmt);
continue;
}
fmt++;
10afe9: 8d 6b 01 lea 0x1(%ebx),%ebp
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
10afec: c6 44 24 28 20 movb $0x20,0x28(%esp)
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
10aff1: 3c 2d cmp $0x2d,%al
10aff3: 0f 84 97 01 00 00 je 10b190 <vprintk+0x1f0>
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
10aff9: c6 44 24 20 00 movb $0x0,0x20(%esp)
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10affe: 8d 50 d0 lea -0x30(%eax),%edx
10b001: 31 f6 xor %esi,%esi
10b003: 80 fa 09 cmp $0x9,%dl
10b006: 77 14 ja 10b01c <vprintk+0x7c>
width *= 10;
10b008: 8d 14 b6 lea (%esi,%esi,4),%edx
width += ((unsigned) *fmt - '0');
10b00b: 8d 74 50 d0 lea -0x30(%eax,%edx,2),%esi
fmt++;
10b00f: 45 inc %ebp
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10b010: 0f be 45 00 movsbl 0x0(%ebp),%eax
10b014: 8d 50 d0 lea -0x30(%eax),%edx
10b017: 80 fa 09 cmp $0x9,%dl
10b01a: 76 ec jbe 10b008 <vprintk+0x68>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
10b01c: 3c 6c cmp $0x6c,%al
10b01e: 0f 84 40 01 00 00 je 10b164 <vprintk+0x1c4>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
10b024: 3c 63 cmp $0x63,%al
10b026: 0f 84 45 01 00 00 je 10b171 <vprintk+0x1d1>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
rtems_putc(chr);
continue;
}
if ( c == 's' ) {
10b02c: 3c 73 cmp $0x73,%al
10b02e: 0f 84 80 01 00 00 je 10b1b4 <vprintk+0x214>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
10b034: 3c 6f cmp $0x6f,%al
10b036: 0f 84 18 01 00 00 je 10b154 <vprintk+0x1b4>
10b03c: 3c 4f cmp $0x4f,%al
10b03e: 0f 84 10 01 00 00 je 10b154 <vprintk+0x1b4>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
10b044: 3c 69 cmp $0x69,%al
10b046: 74 44 je 10b08c <vprintk+0xec>
10b048: 3c 49 cmp $0x49,%al
10b04a: 74 40 je 10b08c <vprintk+0xec>
10b04c: 3c 64 cmp $0x64,%al
10b04e: 74 3c je 10b08c <vprintk+0xec>
c == 'd' || c == 'D' ) {
10b050: 3c 44 cmp $0x44,%al
10b052: 74 38 je 10b08c <vprintk+0xec>
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
10b054: 3c 75 cmp $0x75,%al
10b056: 0f 84 0a 02 00 00 je 10b266 <vprintk+0x2c6>
10b05c: 3c 55 cmp $0x55,%al
10b05e: 0f 84 02 02 00 00 je 10b266 <vprintk+0x2c6>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
10b064: 3c 78 cmp $0x78,%al
10b066: 0f 84 3d 02 00 00 je 10b2a9 <vprintk+0x309>
10b06c: 3c 58 cmp $0x58,%al
10b06e: 0f 84 35 02 00 00 je 10b2a9 <vprintk+0x309>
base = 16; sign = false;
} else if ( c == 'p' ) {
10b074: 3c 70 cmp $0x70,%al
10b076: 0f 84 2d 02 00 00 je 10b2a9 <vprintk+0x309>
base = 16; sign = false; lflag = true;
} else {
rtems_putc(c);
10b07c: 89 04 24 mov %eax,(%esp)
10b07f: e8 68 51 00 00 call 1101ec <rtems_putc>
continue;
10b084: e9 41 ff ff ff jmp 10afca <vprintk+0x2a>
10b089: 8d 76 00 lea 0x0(%esi),%esi
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
10b08c: b0 01 mov $0x1,%al
10b08e: c7 44 24 20 0a 00 00 movl $0xa,0x20(%esp)
10b095: 00
} else {
rtems_putc(c);
continue;
}
printNum(
10b096: 8b 54 24 74 mov 0x74(%esp),%edx
10b09a: 8b 1a mov (%edx),%ebx
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
10b09c: 83 c2 04 add $0x4,%edx
10b09f: 89 54 24 74 mov %edx,0x74(%esp)
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
10b0a3: 84 c0 test %al,%al
10b0a5: 74 08 je 10b0af <vprintk+0x10f>
10b0a7: 85 db test %ebx,%ebx
10b0a9: 0f 88 c6 01 00 00 js 10b275 <vprintk+0x2d5>
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10b0af: 89 d8 mov %ebx,%eax
10b0b1: 31 d2 xor %edx,%edx
10b0b3: f7 74 24 20 divl 0x20(%esp)
10b0b7: 89 c1 mov %eax,%ecx
10b0b9: 85 c0 test %eax,%eax
10b0bb: 0f 84 da 01 00 00 je 10b29b <vprintk+0x2fb>
10b0c1: 8a 44 24 20 mov 0x20(%esp),%al
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
10b0c5: 31 ff xor %edi,%edi
10b0c7: 89 74 24 2c mov %esi,0x2c(%esp)
10b0cb: 8b 74 24 20 mov 0x20(%esp),%esi
10b0cf: 89 da mov %ebx,%edx
10b0d1: 88 c3 mov %al,%bl
10b0d3: eb 05 jmp 10b0da <vprintk+0x13a>
10b0d5: 8d 76 00 lea 0x0(%esi),%esi
while ((n = unsigned_num / base) > 0) {
10b0d8: 89 c1 mov %eax,%ecx
toPrint[count++] = (char) (unsigned_num - (n * base));
10b0da: 88 d8 mov %bl,%al
10b0dc: f6 e1 mul %cl
10b0de: 29 c2 sub %eax,%edx
10b0e0: 88 54 3c 3c mov %dl,0x3c(%esp,%edi,1)
10b0e4: 47 inc %edi
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10b0e5: 89 c8 mov %ecx,%eax
10b0e7: 31 d2 xor %edx,%edx
10b0e9: f7 f6 div %esi
10b0eb: 89 ca mov %ecx,%edx
10b0ed: 85 c0 test %eax,%eax
10b0ef: 75 e7 jne 10b0d8 <vprintk+0x138>
10b0f1: 8b 74 24 2c mov 0x2c(%esp),%esi
10b0f5: 8d 5f 01 lea 0x1(%edi),%ebx
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
10b0f8: 88 4c 3c 3c mov %cl,0x3c(%esp,%edi,1)
for (n=maxwidth ; n > count; n-- )
10b0fc: 39 f3 cmp %esi,%ebx
10b0fe: 73 15 jae 10b115 <vprintk+0x175>
10b100: 0f be 7c 24 28 movsbl 0x28(%esp),%edi
10b105: 8d 76 00 lea 0x0(%esi),%esi
rtems_putc(lead);
10b108: 89 3c 24 mov %edi,(%esp)
10b10b: e8 dc 50 00 00 call 1101ec <rtems_putc>
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
10b110: 4e dec %esi
10b111: 39 f3 cmp %esi,%ebx
10b113: 72 f3 jb 10b108 <vprintk+0x168>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
10b115: 8d 74 1c 3b lea 0x3b(%esp,%ebx,1),%esi
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
rtems_putc(lead);
for (n = 0; n < count; n++) {
10b119: 85 db test %ebx,%ebx
10b11b: 0f 84 a9 fe ff ff je 10afca <vprintk+0x2a> <== NEVER TAKEN
10b121: 8d 76 00 lea 0x0(%esi),%esi
rtems_putc("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
10b124: 0f be 06 movsbl (%esi),%eax
10b127: 0f be 80 f4 2a 12 00 movsbl 0x122af4(%eax),%eax
10b12e: 89 04 24 mov %eax,(%esp)
10b131: e8 b6 50 00 00 call 1101ec <rtems_putc>
10b136: 4e dec %esi
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
rtems_putc(lead);
for (n = 0; n < count; n++) {
10b137: 3b 74 24 1c cmp 0x1c(%esp),%esi
10b13b: 75 e7 jne 10b124 <vprintk+0x184>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
10b13d: 8d 5d 01 lea 0x1(%ebp),%ebx
10b140: 0f be 45 01 movsbl 0x1(%ebp),%eax
10b144: 84 c0 test %al,%al
10b146: 0f 85 8d fe ff ff jne 10afd9 <vprintk+0x39> <== ALWAYS TAKEN
sign,
width,
lead
);
}
}
10b14c: 83 c4 5c add $0x5c,%esp
10b14f: 5b pop %ebx
10b150: 5e pop %esi
10b151: 5f pop %edi
10b152: 5d pop %ebp
10b153: c3 ret
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
10b154: 31 c0 xor %eax,%eax
10b156: c7 44 24 20 08 00 00 movl $0x8,0x20(%esp)
10b15d: 00
10b15e: e9 33 ff ff ff jmp 10b096 <vprintk+0xf6>
10b163: 90 nop
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
10b164: 0f be 45 01 movsbl 0x1(%ebp),%eax
10b168: 45 inc %ebp
}
if ( c == 'c' ) {
10b169: 3c 63 cmp $0x63,%al
10b16b: 0f 85 bb fe ff ff jne 10b02c <vprintk+0x8c> <== ALWAYS TAKEN
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
10b171: 8b 5c 24 74 mov 0x74(%esp),%ebx
10b175: 83 c3 04 add $0x4,%ebx
rtems_putc(chr);
10b178: 8b 54 24 74 mov 0x74(%esp),%edx
10b17c: 0f be 02 movsbl (%edx),%eax
10b17f: 89 04 24 mov %eax,(%esp)
10b182: e8 65 50 00 00 call 1101ec <rtems_putc>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
10b187: 89 5c 24 74 mov %ebx,0x74(%esp)
rtems_putc(chr);
continue;
10b18b: e9 3a fe ff ff jmp 10afca <vprintk+0x2a>
10b190: 0f be 45 01 movsbl 0x1(%ebp),%eax
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
10b194: 45 inc %ebp
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
10b195: c6 44 24 20 01 movb $0x1,0x20(%esp)
10b19a: e9 5f fe ff ff jmp 10affe <vprintk+0x5e>
10b19f: 90 nop
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
10b1a0: 8d 6b 02 lea 0x2(%ebx),%ebp
10b1a3: 0f be 43 02 movsbl 0x2(%ebx),%eax
rtems_putc(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
10b1a7: c6 44 24 28 30 movb $0x30,0x28(%esp)
10b1ac: e9 40 fe ff ff jmp 10aff1 <vprintk+0x51>
10b1b1: 8d 76 00 lea 0x0(%esi),%esi
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
10b1b4: 8b 44 24 74 mov 0x74(%esp),%eax
10b1b8: 83 c0 04 add $0x4,%eax
10b1bb: 89 44 24 28 mov %eax,0x28(%esp)
10b1bf: 8b 54 24 74 mov 0x74(%esp),%edx
10b1c3: 8b 02 mov (%edx),%eax
if ( str == NULL ) {
10b1c5: 85 c0 test %eax,%eax
10b1c7: 0f 84 eb 00 00 00 je 10b2b8 <vprintk+0x318>
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
10b1cd: 31 db xor %ebx,%ebx
10b1cf: 80 38 00 cmpb $0x0,(%eax)
10b1d2: 74 07 je 10b1db <vprintk+0x23b>
10b1d4: 43 inc %ebx
10b1d5: 80 3c 18 00 cmpb $0x0,(%eax,%ebx,1)
10b1d9: 75 f9 jne 10b1d4 <vprintk+0x234>
;
/* leading spaces */
if ( !minus )
10b1db: 80 7c 24 20 00 cmpb $0x0,0x20(%esp)
10b1e0: 75 1f jne 10b201 <vprintk+0x261>
for ( i=len ; i<width ; i++ )
10b1e2: 39 f3 cmp %esi,%ebx
10b1e4: 73 1b jae 10b201 <vprintk+0x261>
10b1e6: 89 df mov %ebx,%edi
10b1e8: 89 44 24 24 mov %eax,0x24(%esp)
rtems_putc(' ');
10b1ec: c7 04 24 20 00 00 00 movl $0x20,(%esp)
10b1f3: e8 f4 4f 00 00 call 1101ec <rtems_putc>
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
10b1f8: 47 inc %edi
10b1f9: 39 f7 cmp %esi,%edi
10b1fb: 72 ef jb 10b1ec <vprintk+0x24c>
10b1fd: 8b 44 24 24 mov 0x24(%esp),%eax
rtems_putc(' ');
/* no width option */
if (width == 0) {
10b201: 85 f6 test %esi,%esi
10b203: 75 0a jne 10b20f <vprintk+0x26f>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10b205: 85 db test %ebx,%ebx
10b207: 0f 84 b5 00 00 00 je 10b2c2 <vprintk+0x322>
10b20d: 89 de mov %ebx,%esi
10b20f: 0f be 10 movsbl (%eax),%edx
10b212: 84 d2 test %dl,%dl
10b214: 74 26 je 10b23c <vprintk+0x29c> <== NEVER TAKEN
rtems_putc(*str);
10b216: 89 14 24 mov %edx,(%esp)
10b219: 89 44 24 18 mov %eax,0x18(%esp)
10b21d: e8 ca 4f 00 00 call 1101ec <rtems_putc>
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10b222: 8b 44 24 18 mov 0x18(%esp),%eax
10b226: 8d 78 01 lea 0x1(%eax),%edi
10b229: eb 0a jmp 10b235 <vprintk+0x295>
10b22b: 90 nop
rtems_putc(*str);
10b22c: 89 04 24 mov %eax,(%esp)
10b22f: e8 b8 4f 00 00 call 1101ec <rtems_putc>
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10b234: 47 inc %edi
10b235: 0f be 07 movsbl (%edi),%eax
10b238: 84 c0 test %al,%al
10b23a: 75 f0 jne 10b22c <vprintk+0x28c>
rtems_putc(*str);
/* trailing spaces */
if ( minus )
10b23c: 80 7c 24 20 00 cmpb $0x0,0x20(%esp)
10b241: 74 16 je 10b259 <vprintk+0x2b9>
for ( i=len ; i<width ; i++ )
10b243: 39 f3 cmp %esi,%ebx
10b245: 73 7b jae 10b2c2 <vprintk+0x322>
10b247: 90 nop
rtems_putc(' ');
10b248: c7 04 24 20 00 00 00 movl $0x20,(%esp)
10b24f: e8 98 4f 00 00 call 1101ec <rtems_putc>
for ( i=0 ; i<width && *str ; str++ )
rtems_putc(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
10b254: 43 inc %ebx
10b255: 39 f3 cmp %esi,%ebx
10b257: 72 ef jb 10b248 <vprintk+0x2a8>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
10b259: 8b 44 24 28 mov 0x28(%esp),%eax
10b25d: 89 44 24 74 mov %eax,0x74(%esp)
10b261: e9 64 fd ff ff jmp 10afca <vprintk+0x2a>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
10b266: 31 c0 xor %eax,%eax
10b268: c7 44 24 20 0a 00 00 movl $0xa,0x20(%esp)
10b26f: 00
10b270: e9 21 fe ff ff jmp 10b096 <vprintk+0xf6>
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
rtems_putc('-');
10b275: c7 04 24 2d 00 00 00 movl $0x2d,(%esp)
10b27c: e8 6b 4f 00 00 call 1101ec <rtems_putc>
unsigned_num = (unsigned long) -num;
10b281: f7 db neg %ebx
if (maxwidth) maxwidth--;
10b283: 83 fe 01 cmp $0x1,%esi
10b286: 83 d6 ff adc $0xffffffff,%esi
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10b289: 89 d8 mov %ebx,%eax
10b28b: 31 d2 xor %edx,%edx
10b28d: f7 74 24 20 divl 0x20(%esp)
10b291: 89 c1 mov %eax,%ecx
10b293: 85 c0 test %eax,%eax
10b295: 0f 85 26 fe ff ff jne 10b0c1 <vprintk+0x121> <== ALWAYS TAKEN
10b29b: 89 d9 mov %ebx,%ecx
10b29d: bb 01 00 00 00 mov $0x1,%ebx
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
10b2a2: 31 ff xor %edi,%edi
10b2a4: e9 4f fe ff ff jmp 10b0f8 <vprintk+0x158>
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
10b2a9: 31 c0 xor %eax,%eax
10b2ab: c7 44 24 20 10 00 00 movl $0x10,0x20(%esp)
10b2b2: 00
10b2b3: e9 de fd ff ff jmp 10b096 <vprintk+0xf6>
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
10b2b8: b8 41 2a 12 00 mov $0x122a41,%eax
10b2bd: e9 0b ff ff ff jmp 10b1cd <vprintk+0x22d>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
10b2c2: 8b 54 24 28 mov 0x28(%esp),%edx
10b2c6: 89 54 24 74 mov %edx,0x74(%esp)
10b2ca: e9 fb fc ff ff jmp 10afca <vprintk+0x2a>
00120624 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
120624: 53 push %ebx
120625: 83 ec 08 sub $0x8,%esp
120628: 8b 44 24 10 mov 0x10(%esp),%eax
12062c: 8b 54 24 14 mov 0x14(%esp),%edx
120630: 8b 4c 24 18 mov 0x18(%esp),%ecx
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
120634: 3b 05 60 db 12 00 cmp 0x12db60,%eax
12063a: 73 44 jae 120680 <write+0x5c>
iop = rtems_libio_iop( fd );
12063c: 8d 04 40 lea (%eax,%eax,2),%eax
12063f: c1 e0 04 shl $0x4,%eax
120642: 03 05 14 1e 13 00 add 0x131e14,%eax
rtems_libio_check_is_open( iop );
120648: 8b 58 0c mov 0xc(%eax),%ebx
12064b: f6 c7 01 test $0x1,%bh
12064e: 74 30 je 120680 <write+0x5c>
rtems_libio_check_buffer( buffer );
120650: 85 d2 test %edx,%edx
120652: 74 3e je 120692 <write+0x6e> <== NEVER TAKEN
rtems_libio_check_count( count );
120654: 85 c9 test %ecx,%ecx
120656: 74 20 je 120678 <write+0x54>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
120658: 83 e3 04 and $0x4,%ebx
12065b: 74 23 je 120680 <write+0x5c>
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
12065d: 8b 58 20 mov 0x20(%eax),%ebx
120660: 89 4c 24 18 mov %ecx,0x18(%esp)
120664: 89 54 24 14 mov %edx,0x14(%esp)
120668: 89 44 24 10 mov %eax,0x10(%esp)
12066c: 8b 43 0c mov 0xc(%ebx),%eax
}
12066f: 83 c4 08 add $0x8,%esp
120672: 5b pop %ebx
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 );
120673: ff e0 jmp *%eax
120675: 8d 76 00 lea 0x0(%esi),%esi
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 );
120678: 31 c0 xor %eax,%eax
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
}
12067a: 83 c4 08 add $0x8,%esp
12067d: 5b pop %ebx
12067e: c3 ret
12067f: 90 nop
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 );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
120680: e8 7b 35 ff ff call 113c00 <__errno>
120685: c7 00 09 00 00 00 movl $0x9,(%eax)
12068b: b8 ff ff ff ff mov $0xffffffff,%eax
120690: eb e8 jmp 12067a <write+0x56>
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
120692: e8 69 35 ff ff call 113c00 <__errno> <== NOT EXECUTED
120697: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
12069d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1206a2: eb d6 jmp 12067a <write+0x56> <== NOT EXECUTED
0010bfc8 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
10bfc8: 55 push %ebp
10bfc9: 57 push %edi
10bfca: 56 push %esi
10bfcb: 53 push %ebx
10bfcc: 83 ec 1c sub $0x1c,%esp
10bfcf: 8b 54 24 30 mov 0x30(%esp),%edx
10bfd3: 8b 5c 24 34 mov 0x34(%esp),%ebx
10bfd7: 8b 44 24 38 mov 0x38(%esp),%eax
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
10bfdb: 3b 15 80 e5 12 00 cmp 0x12e580,%edx
10bfe1: 0f 83 c3 00 00 00 jae 10c0aa <writev+0xe2> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
10bfe7: 8d 3c 52 lea (%edx,%edx,2),%edi
10bfea: c1 e7 04 shl $0x4,%edi
10bfed: 03 3d 34 28 13 00 add 0x132834,%edi
rtems_libio_check_is_open( iop );
10bff3: 8b 57 0c mov 0xc(%edi),%edx
10bff6: f6 c6 01 test $0x1,%dh
10bff9: 0f 84 ab 00 00 00 je 10c0aa <writev+0xe2>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
10bfff: 83 e2 04 and $0x4,%edx
10c002: 0f 84 a2 00 00 00 je 10c0aa <writev+0xe2> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
10c008: 85 db test %ebx,%ebx
10c00a: 0f 84 80 00 00 00 je 10c090 <writev+0xc8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
10c010: 85 c0 test %eax,%eax
10c012: 7e 7c jle 10c090 <writev+0xc8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
10c014: 3d 00 04 00 00 cmp $0x400,%eax
10c019: 7f 75 jg 10c090 <writev+0xc8> <== NEVER TAKEN
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
10c01b: 8d 34 c3 lea (%ebx,%eax,8),%esi
10c01e: 89 d8 mov %ebx,%eax
10c020: bd 01 00 00 00 mov $0x1,%ebp
10c025: 31 d2 xor %edx,%edx
10c027: eb 05 jmp 10c02e <writev+0x66>
10c029: 8d 76 00 lea 0x0(%esi),%esi
* 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++ ) {
10c02c: 89 ca mov %ecx,%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 )
10c02e: 8b 08 mov (%eax),%ecx
10c030: 85 c9 test %ecx,%ecx
10c032: 74 5c je 10c090 <writev+0xc8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
10c034: 8b 48 04 mov 0x4(%eax),%ecx
10c037: 85 c9 test %ecx,%ecx
10c039: 74 02 je 10c03d <writev+0x75>
all_zeros = false;
10c03b: 31 ed xor %ebp,%ebp
/* check for wrap */
old = total;
total += iov[v].iov_len;
10c03d: 01 d1 add %edx,%ecx
if ( total < old || total > SSIZE_MAX )
10c03f: 39 d1 cmp %edx,%ecx
10c041: 7c 4d jl 10c090 <writev+0xc8>
10c043: 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++ ) {
10c046: 39 f0 cmp %esi,%eax
10c048: 75 e2 jne 10c02c <writev+0x64>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
10c04a: 89 e8 mov %ebp,%eax
return 0;
10c04c: 31 ed xor %ebp,%ebp
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
10c04e: 84 c0 test %al,%al
10c050: 75 4e jne 10c0a0 <writev+0xd8>
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
10c052: 8b 53 04 mov 0x4(%ebx),%edx
10c055: 85 d2 test %edx,%edx
10c057: 75 11 jne 10c06a <writev+0xa2> <== ALWAYS TAKEN
10c059: 8d 76 00 lea 0x0(%esi),%esi
10c05c: 83 c3 08 add $0x8,%ebx
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
10c05f: 39 f3 cmp %esi,%ebx
10c061: 74 3d je 10c0a0 <writev+0xd8>
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
10c063: 8b 53 04 mov 0x4(%ebx),%edx
10c066: 85 d2 test %edx,%edx
10c068: 74 f2 je 10c05c <writev+0x94> <== NEVER TAKEN
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
10c06a: 8b 47 20 mov 0x20(%edi),%eax
10c06d: 89 54 24 08 mov %edx,0x8(%esp)
10c071: 8b 13 mov (%ebx),%edx
10c073: 89 54 24 04 mov %edx,0x4(%esp)
10c077: 89 3c 24 mov %edi,(%esp)
10c07a: ff 50 0c call *0xc(%eax)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
10c07d: 83 f8 00 cmp $0x0,%eax
10c080: 7c 3a jl 10c0bc <writev+0xf4> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
10c082: 74 02 je 10c086 <writev+0xbe> <== NEVER TAKEN
total += bytes;
10c084: 01 c5 add %eax,%ebp
}
if (bytes != iov[ v ].iov_len)
10c086: 3b 43 04 cmp 0x4(%ebx),%eax
10c089: 74 d1 je 10c05c <writev+0x94> <== ALWAYS TAKEN
10c08b: eb 13 jmp 10c0a0 <writev+0xd8> <== NOT EXECUTED
10c08d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
10c090: e8 8f 86 00 00 call 114724 <__errno>
10c095: c7 00 16 00 00 00 movl $0x16,(%eax)
10c09b: bd ff ff ff ff mov $0xffffffff,%ebp
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10c0a0: 89 e8 mov %ebp,%eax
10c0a2: 83 c4 1c add $0x1c,%esp
10c0a5: 5b pop %ebx
10c0a6: 5e pop %esi
10c0a7: 5f pop %edi
10c0a8: 5d pop %ebp
10c0a9: c3 ret
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
10c0aa: e8 75 86 00 00 call 114724 <__errno>
10c0af: c7 00 09 00 00 00 movl $0x9,(%eax)
10c0b5: bd ff ff ff ff mov $0xffffffff,%ebp
10c0ba: eb e4 jmp 10c0a0 <writev+0xd8>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
10c0bc: bd ff ff ff ff mov $0xffffffff,%ebp <== NOT EXECUTED
10c0c1: eb dd jmp 10c0a0 <writev+0xd8> <== NOT EXECUTED