RTEMS 4.11Annotated Report
Fri Oct 8 18:31:02 2010
0010d448 <IMFS_Set_handlers>:
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
10d448: 55 push %ebp
10d449: 89 e5 mov %esp,%ebp
10d44b: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
10d44e: 8b 50 10 mov 0x10(%eax),%edx
10d451: 8b 52 34 mov 0x34(%edx),%edx
switch( node->type ) {
10d454: 8b 08 mov (%eax),%ecx
10d456: 8b 49 4c mov 0x4c(%ecx),%ecx
10d459: 49 dec %ecx
10d45a: 83 f9 06 cmp $0x6,%ecx
10d45d: 77 29 ja 10d488 <IMFS_Set_handlers+0x40><== NEVER TAKEN
10d45f: ff 24 8d 30 db 11 00 jmp *0x11db30(,%ecx,4)
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
10d466: 8b 52 0c mov 0xc(%edx),%edx
10d469: eb 1a jmp 10d485 <IMFS_Set_handlers+0x3d>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
10d46b: c7 40 08 54 db 11 00 movl $0x11db54,0x8(%eax)
break;
10d472: eb 14 jmp 10d488 <IMFS_Set_handlers+0x40>
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
10d474: c7 40 08 c4 db 11 00 movl $0x11dbc4,0x8(%eax)
break;
10d47b: eb 0b jmp 10d488 <IMFS_Set_handlers+0x40>
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
10d47d: 8b 52 08 mov 0x8(%edx),%edx
10d480: eb 03 jmp 10d485 <IMFS_Set_handlers+0x3d>
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
10d482: 8b 52 10 mov 0x10(%edx),%edx
10d485: 89 50 08 mov %edx,0x8(%eax)
break;
}
return 0;
}
10d488: 31 c0 xor %eax,%eax
10d48a: c9 leave
10d48b: c3 ret
0010d2fd <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
10d2fd: 55 push %ebp
10d2fe: 89 e5 mov %esp,%ebp
10d300: 57 push %edi
10d301: 56 push %esi
10d302: 53 push %ebx
10d303: 83 ec 1c sub $0x1c,%esp
10d306: 8b 4d 08 mov 0x8(%ebp),%ecx
10d309: 8b 5d 0c mov 0xc(%ebp),%ebx
10d30c: 8b 75 18 mov 0x18(%ebp),%esi
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
10d30f: 31 c0 xor %eax,%eax
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
10d311: 85 c9 test %ecx,%ecx
10d313: 0f 84 f4 00 00 00 je 10d40d <IMFS_create_node+0x110><== NEVER TAKEN
return NULL;
parent = parent_loc->node_access;
10d319: 8b 11 mov (%ecx),%edx
fs_info = parent_loc->mt_entry->fs_info;
10d31b: 8b 49 10 mov 0x10(%ecx),%ecx
10d31e: 8b 79 34 mov 0x34(%ecx),%edi
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
10d321: 83 fb 07 cmp $0x7,%ebx
10d324: 75 0d jne 10d333 <IMFS_create_node+0x36>
10d326: 81 7f 10 c8 da 11 00 cmpl $0x11dac8,0x10(%edi)
10d32d: 0f 84 da 00 00 00 je 10d40d <IMFS_create_node+0x110>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
10d333: 50 push %eax
10d334: a1 50 10 12 00 mov 0x121050,%eax
10d339: 8b 40 2c mov 0x2c(%eax),%eax
10d33c: f7 d0 not %eax
10d33e: 23 45 14 and 0x14(%ebp),%eax
10d341: 50 push %eax
10d342: ff 75 10 pushl 0x10(%ebp)
10d345: 53 push %ebx
10d346: 89 55 e4 mov %edx,-0x1c(%ebp)
10d349: e8 46 ff ff ff call 10d294 <IMFS_allocate_node>
if ( !node )
10d34e: 83 c4 10 add $0x10,%esp
10d351: 85 c0 test %eax,%eax
10d353: 8b 55 e4 mov -0x1c(%ebp),%edx
10d356: 0f 84 b1 00 00 00 je 10d40d <IMFS_create_node+0x110>
return NULL;
/*
* Set the type specific information
*/
if ( type == IMFS_DIRECTORY ) {
10d35c: 83 fb 01 cmp $0x1,%ebx
10d35f: 75 15 jne 10d376 <IMFS_create_node+0x79>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10d361: 8d 48 54 lea 0x54(%eax),%ecx
10d364: 89 48 50 mov %ecx,0x50(%eax)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
10d367: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
rtems_chain_initialize_empty(&node->info.directory.Entries);
10d36e: 8d 48 50 lea 0x50(%eax),%ecx
10d371: 89 48 58 mov %ecx,0x58(%eax)
10d374: eb 75 jmp 10d3eb <IMFS_create_node+0xee>
} else if ( type == IMFS_HARD_LINK ) {
10d376: 83 fb 03 cmp $0x3,%ebx
10d379: 74 05 je 10d380 <IMFS_create_node+0x83>
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
10d37b: 83 fb 04 cmp $0x4,%ebx
10d37e: 75 07 jne 10d387 <IMFS_create_node+0x8a>
node->info.sym_link.name = info->sym_link.name;
10d380: 8b 0e mov (%esi),%ecx
10d382: 89 48 50 mov %ecx,0x50(%eax)
10d385: eb 64 jmp 10d3eb <IMFS_create_node+0xee>
} else if ( type == IMFS_DEVICE ) {
10d387: 83 fb 02 cmp $0x2,%ebx
10d38a: 75 0d jne 10d399 <IMFS_create_node+0x9c>
node->info.device.major = info->device.major;
10d38c: 8b 0e mov (%esi),%ecx
10d38e: 89 48 50 mov %ecx,0x50(%eax)
node->info.device.minor = info->device.minor;
10d391: 8b 4e 04 mov 0x4(%esi),%ecx
10d394: 89 48 54 mov %ecx,0x54(%eax)
10d397: eb 52 jmp 10d3eb <IMFS_create_node+0xee>
} else if ( type == IMFS_LINEAR_FILE ) {
10d399: 83 fb 06 cmp $0x6,%ebx
10d39c: 75 17 jne 10d3b5 <IMFS_create_node+0xb8>
node->info.linearfile.size = 0;
10d39e: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10d3a5: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.linearfile.direct = 0;
10d3ac: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
10d3b3: eb 36 jmp 10d3eb <IMFS_create_node+0xee>
} else if ( type == IMFS_MEMORY_FILE ) {
10d3b5: 83 fb 05 cmp $0x5,%ebx
10d3b8: 75 25 jne 10d3df <IMFS_create_node+0xe2>
node->info.file.size = 0;
10d3ba: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10d3c1: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.file.indirect = 0;
10d3c8: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
node->info.file.doubly_indirect = 0;
10d3cf: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
node->info.file.triply_indirect = 0;
10d3d6: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
10d3dd: eb 0c jmp 10d3eb <IMFS_create_node+0xee>
} else if ( type == IMFS_FIFO ) {
10d3df: 83 fb 07 cmp $0x7,%ebx
10d3e2: 75 07 jne 10d3eb <IMFS_create_node+0xee> <== NEVER TAKEN
node->info.fifo.pipe = NULL;
10d3e4: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
10d3eb: 89 50 08 mov %edx,0x8(%eax)
node->st_ino = ++fs_info->ino_count;
10d3ee: 8b 4f 04 mov 0x4(%edi),%ecx
10d3f1: 41 inc %ecx
10d3f2: 89 4f 04 mov %ecx,0x4(%edi)
10d3f5: 89 48 38 mov %ecx,0x38(%eax)
10d3f8: 53 push %ebx
10d3f9: 53 push %ebx
10d3fa: 50 push %eax
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
10d3fb: 83 c2 50 add $0x50,%edx
10d3fe: 52 push %edx
10d3ff: 89 45 e4 mov %eax,-0x1c(%ebp)
10d402: e8 69 d5 ff ff call 10a970 <_Chain_Append>
return node;
10d407: 83 c4 10 add $0x10,%esp
10d40a: 8b 45 e4 mov -0x1c(%ebp),%eax
}
10d40d: 8d 65 f4 lea -0xc(%ebp),%esp
10d410: 5b pop %ebx
10d411: 5e pop %esi
10d412: 5f pop %edi
10d413: c9 leave
10d414: c3 ret
0010d502 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
10d502: 55 push %ebp
10d503: 89 e5 mov %esp,%ebp
10d505: 57 push %edi
10d506: 56 push %esi
10d507: 53 push %ebx
10d508: 83 ec 5c sub $0x5c,%esp
10d50b: 8b 5d 14 mov 0x14(%ebp),%ebx
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
10d50e: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp)
10d515: 74 0d je 10d524 <IMFS_eval_path+0x22> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO );
10d517: e8 9c 2c 00 00 call 1101b8 <__errno> <== NOT EXECUTED
10d51c: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
10d522: eb 42 jmp 10d566 <IMFS_eval_path+0x64> <== NOT EXECUTED
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10d524: 8b 3b mov (%ebx),%edi
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
int len;
IMFS_token_types type = IMFS_CURRENT_DIR;
10d526: be 01 00 00 00 mov $0x1,%esi
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
10d52b: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp)
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
10d532: e9 29 01 00 00 jmp 10d660 <IMFS_eval_path+0x15e>
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
10d537: 8d 45 e4 lea -0x1c(%ebp),%eax
10d53a: 50 push %eax
10d53b: 8d 4d af lea -0x51(%ebp),%ecx
10d53e: 51 push %ecx
10d53f: ff 75 0c pushl 0xc(%ebp)
10d542: 8b 45 08 mov 0x8(%ebp),%eax
10d545: 03 45 a4 add -0x5c(%ebp),%eax
10d548: 50 push %eax
10d549: e8 b2 05 00 00 call 10db00 <IMFS_get_token>
10d54e: 89 c6 mov %eax,%esi
pathnamelen -= len;
10d550: 8b 55 e4 mov -0x1c(%ebp),%edx
i += len;
if ( !pathloc->node_access )
10d553: 83 c4 10 add $0x10,%esp
10d556: 83 3b 00 cmpl $0x0,(%ebx)
10d559: 75 13 jne 10d56e <IMFS_eval_path+0x6c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOENT );
10d55b: e8 58 2c 00 00 call 1101b8 <__errno>
10d560: c7 00 02 00 00 00 movl $0x2,(%eax)
10d566: 83 cf ff or $0xffffffff,%edi
10d569: e9 75 01 00 00 jmp 10d6e3 <IMFS_eval_path+0x1e1>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
10d56e: 85 c0 test %eax,%eax
10d570: 74 21 je 10d593 <IMFS_eval_path+0x91>
if ( node->type == IMFS_DIRECTORY )
10d572: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10d576: 75 1b jne 10d593 <IMFS_eval_path+0x91>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
10d578: 57 push %edi
10d579: 57 push %edi
10d57a: 6a 01 push $0x1
10d57c: 53 push %ebx
10d57d: 89 55 a0 mov %edx,-0x60(%ebp)
10d580: e8 07 ff ff ff call 10d48c <IMFS_evaluate_permission>
10d585: 83 c4 10 add $0x10,%esp
10d588: 85 c0 test %eax,%eax
10d58a: 8b 55 a0 mov -0x60(%ebp),%edx
10d58d: 0f 84 3e 01 00 00 je 10d6d1 <IMFS_eval_path+0x1cf>
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
10d593: 29 55 0c sub %edx,0xc(%ebp)
i += len;
10d596: 01 55 a4 add %edx,-0x5c(%ebp)
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
10d599: 8b 3b mov (%ebx),%edi
switch( type ) {
10d59b: 83 fe 03 cmp $0x3,%esi
10d59e: 74 38 je 10d5d8 <IMFS_eval_path+0xd6>
10d5a0: 83 fe 04 cmp $0x4,%esi
10d5a3: 0f 84 a7 00 00 00 je 10d650 <IMFS_eval_path+0x14e>
10d5a9: 83 fe 02 cmp $0x2,%esi
10d5ac: 0f 85 ae 00 00 00 jne 10d660 <IMFS_eval_path+0x15e>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10d5b2: a1 50 10 12 00 mov 0x121050,%eax
10d5b7: 3b 78 18 cmp 0x18(%eax),%edi
10d5ba: 0f 84 a0 00 00 00 je 10d660 <IMFS_eval_path+0x15e>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
10d5c0: 8b 43 10 mov 0x10(%ebx),%eax
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
10d5c3: 3b 78 1c cmp 0x1c(%eax),%edi
10d5c6: 75 0b jne 10d5d3 <IMFS_eval_path+0xd1>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
10d5c8: 8d 7d d0 lea -0x30(%ebp),%edi
10d5cb: 8d 70 08 lea 0x8(%eax),%esi
10d5ce: e9 ad 00 00 00 jmp 10d680 <IMFS_eval_path+0x17e>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
10d5d3: 8b 7f 08 mov 0x8(%edi),%edi
10d5d6: eb 6c jmp 10d644 <IMFS_eval_path+0x142>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
10d5d8: 8b 47 4c mov 0x4c(%edi),%eax
10d5db: 83 f8 03 cmp $0x3,%eax
10d5de: 75 11 jne 10d5f1 <IMFS_eval_path+0xef>
IMFS_evaluate_hard_link( pathloc, 0 );
10d5e0: 51 push %ecx
10d5e1: 51 push %ecx
10d5e2: 6a 00 push $0x0
10d5e4: 53 push %ebx
10d5e5: e8 d9 fe ff ff call 10d4c3 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
10d5ea: 8b 3b mov (%ebx),%edi
10d5ec: 83 c4 10 add $0x10,%esp
10d5ef: eb 1d jmp 10d60e <IMFS_eval_path+0x10c>
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
10d5f1: 83 f8 04 cmp $0x4,%eax
10d5f4: 75 18 jne 10d60e <IMFS_eval_path+0x10c>
result = IMFS_evaluate_sym_link( pathloc, 0 );
10d5f6: 52 push %edx
10d5f7: 52 push %edx
10d5f8: 6a 00 push $0x0
10d5fa: 53 push %ebx
10d5fb: e8 ed 00 00 00 call 10d6ed <IMFS_evaluate_sym_link>
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
10d600: 8b 3b mov (%ebx),%edi
if ( result == -1 )
10d602: 83 c4 10 add $0x10,%esp
10d605: 83 f8 ff cmp $0xffffffff,%eax
10d608: 0f 84 d3 00 00 00 je 10d6e1 <IMFS_eval_path+0x1df> <== NEVER TAKEN
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10d60e: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10d612: 74 10 je 10d624 <IMFS_eval_path+0x122>
rtems_set_errno_and_return_minus_one( ENOTDIR );
10d614: e8 9f 2b 00 00 call 1101b8 <__errno>
10d619: c7 00 14 00 00 00 movl $0x14,(%eax)
10d61f: e9 42 ff ff ff jmp 10d566 <IMFS_eval_path+0x64>
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
10d624: 8b 47 5c mov 0x5c(%edi),%eax
10d627: 85 c0 test %eax,%eax
10d629: 74 08 je 10d633 <IMFS_eval_path+0x131>
newloc = node->info.directory.mt_fs->mt_fs_root;
10d62b: 8d 7d d0 lea -0x30(%ebp),%edi
10d62e: 8d 70 1c lea 0x1c(%eax),%esi
10d631: eb 4d jmp 10d680 <IMFS_eval_path+0x17e>
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10d633: 50 push %eax
10d634: 50 push %eax
10d635: 8d 45 af lea -0x51(%ebp),%eax
10d638: 50 push %eax
10d639: 57 push %edi
10d63a: e8 55 04 00 00 call 10da94 <IMFS_find_match_in_dir>
10d63f: 89 c7 mov %eax,%edi
if ( !node )
10d641: 83 c4 10 add $0x10,%esp
10d644: 85 ff test %edi,%edi
10d646: 0f 84 0f ff ff ff je 10d55b <IMFS_eval_path+0x59>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
10d64c: 89 3b mov %edi,(%ebx)
10d64e: eb 10 jmp 10d660 <IMFS_eval_path+0x15e>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
10d650: e8 63 2b 00 00 call 1101b8 <__errno>
10d655: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10d65b: e9 06 ff ff ff jmp 10d566 <IMFS_eval_path+0x64>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
10d660: 83 fe 04 cmp $0x4,%esi
10d663: 74 08 je 10d66d <IMFS_eval_path+0x16b> <== NEVER TAKEN
10d665: 85 f6 test %esi,%esi
10d667: 0f 85 ca fe ff ff jne 10d537 <IMFS_eval_path+0x35>
* new fs root node and let let the mounted filesystem set the handlers.
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
10d66d: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10d671: 75 41 jne 10d6b4 <IMFS_eval_path+0x1b2>
if ( node->info.directory.mt_fs != NULL ) {
10d673: 8b 77 5c mov 0x5c(%edi),%esi
10d676: 85 f6 test %esi,%esi
10d678: 74 3a je 10d6b4 <IMFS_eval_path+0x1b2>
newloc = node->info.directory.mt_fs->mt_fs_root;
10d67a: 8d 7d d0 lea -0x30(%ebp),%edi
10d67d: 83 c6 1c add $0x1c,%esi
10d680: b9 05 00 00 00 mov $0x5,%ecx
10d685: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10d687: 8d 75 d0 lea -0x30(%ebp),%esi
10d68a: b1 05 mov $0x5,%cl
10d68c: 89 df mov %ebx,%edi
10d68e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
10d690: 8b 45 e4 mov -0x1c(%ebp),%eax
10d693: 8b 53 0c mov 0xc(%ebx),%edx
10d696: 53 push %ebx
10d697: ff 75 10 pushl 0x10(%ebp)
10d69a: 8b 4d 0c mov 0xc(%ebp),%ecx
10d69d: 01 c1 add %eax,%ecx
10d69f: 51 push %ecx
10d6a0: 8b 4d a4 mov -0x5c(%ebp),%ecx
10d6a3: 29 c1 sub %eax,%ecx
10d6a5: 8b 45 08 mov 0x8(%ebp),%eax
10d6a8: 01 c8 add %ecx,%eax
10d6aa: 50 push %eax
10d6ab: ff 12 call *(%edx)
10d6ad: 89 c7 mov %eax,%edi
10d6af: 83 c4 10 add $0x10,%esp
10d6b2: eb 2f jmp 10d6e3 <IMFS_eval_path+0x1e1>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
10d6b4: 83 ec 0c sub $0xc,%esp
10d6b7: 53 push %ebx
10d6b8: e8 8b fd ff ff call 10d448 <IMFS_Set_handlers>
10d6bd: 89 c7 mov %eax,%edi
10d6bf: 5a pop %edx
10d6c0: 59 pop %ecx
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
10d6c1: ff 75 10 pushl 0x10(%ebp)
10d6c4: 53 push %ebx
10d6c5: e8 c2 fd ff ff call 10d48c <IMFS_evaluate_permission>
10d6ca: 83 c4 10 add $0x10,%esp
10d6cd: 85 c0 test %eax,%eax
10d6cf: 75 12 jne 10d6e3 <IMFS_eval_path+0x1e1>
rtems_set_errno_and_return_minus_one( EACCES );
10d6d1: e8 e2 2a 00 00 call 1101b8 <__errno>
10d6d6: c7 00 0d 00 00 00 movl $0xd,(%eax)
10d6dc: e9 85 fe ff ff jmp 10d566 <IMFS_eval_path+0x64>
10d6e1: 89 c7 mov %eax,%edi <== NOT EXECUTED
return result;
}
10d6e3: 89 f8 mov %edi,%eax
10d6e5: 8d 65 f4 lea -0xc(%ebp),%esp
10d6e8: 5b pop %ebx
10d6e9: 5e pop %esi
10d6ea: 5f pop %edi
10d6eb: c9 leave
10d6ec: c3 ret
0010d7e1 <IMFS_evaluate_for_make>:
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
10d7e1: 55 push %ebp
10d7e2: 89 e5 mov %esp,%ebp
10d7e4: 57 push %edi
10d7e5: 56 push %esi
10d7e6: 53 push %ebx
10d7e7: 83 ec 5c sub $0x5c,%esp
10d7ea: 8b 55 0c mov 0xc(%ebp),%edx
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10d7ed: 8b 1a mov (%edx),%ebx
/*
* Get the path length.
*/
pathlen = strlen( path );
10d7ef: 31 c0 xor %eax,%eax
10d7f1: 83 c9 ff or $0xffffffff,%ecx
10d7f4: 8b 7d 08 mov 0x8(%ebp),%edi
10d7f7: f2 ae repnz scas %es:(%edi),%al
10d7f9: f7 d1 not %ecx
10d7fb: 49 dec %ecx
10d7fc: 89 4d a0 mov %ecx,-0x60(%ebp)
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
10d7ff: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp)
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
10d806: 8d 7d af lea -0x51(%ebp),%edi
10d809: 89 d6 mov %edx,%esi
10d80b: 8d 45 e4 lea -0x1c(%ebp),%eax
10d80e: 50 push %eax
10d80f: 57 push %edi
10d810: ff 75 a0 pushl -0x60(%ebp)
10d813: 8b 45 08 mov 0x8(%ebp),%eax
10d816: 03 45 a4 add -0x5c(%ebp),%eax
10d819: 50 push %eax
10d81a: e8 e1 02 00 00 call 10db00 <IMFS_get_token>
10d81f: 89 c2 mov %eax,%edx
pathlen -= len;
10d821: 8b 4d e4 mov -0x1c(%ebp),%ecx
10d824: 29 4d a0 sub %ecx,-0x60(%ebp)
i += len;
if ( !pathloc->node_access )
10d827: 83 c4 10 add $0x10,%esp
10d82a: 83 3e 00 cmpl $0x0,(%esi)
10d82d: 0f 84 79 01 00 00 je 10d9ac <IMFS_evaluate_for_make+0x1cb><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
10d833: 85 c0 test %eax,%eax
10d835: 74 36 je 10d86d <IMFS_evaluate_for_make+0x8c>
if ( node->type == IMFS_DIRECTORY )
10d837: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10d83b: 75 30 jne 10d86d <IMFS_evaluate_for_make+0x8c>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
10d83d: 53 push %ebx
10d83e: 53 push %ebx
10d83f: 6a 01 push $0x1
10d841: 56 push %esi
10d842: 89 45 9c mov %eax,-0x64(%ebp)
10d845: 89 4d 98 mov %ecx,-0x68(%ebp)
10d848: e8 3f fc ff ff call 10d48c <IMFS_evaluate_permission>
10d84d: 83 c4 10 add $0x10,%esp
10d850: 85 c0 test %eax,%eax
10d852: 8b 55 9c mov -0x64(%ebp),%edx
10d855: 8b 4d 98 mov -0x68(%ebp),%ecx
10d858: 75 13 jne 10d86d <IMFS_evaluate_for_make+0x8c>
rtems_set_errno_and_return_minus_one( EACCES );
10d85a: e8 59 29 00 00 call 1101b8 <__errno>
10d85f: c7 00 0d 00 00 00 movl $0xd,(%eax)
10d865: 83 cb ff or $0xffffffff,%ebx
10d868: e9 99 01 00 00 jmp 10da06 <IMFS_evaluate_for_make+0x225>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
10d86d: 01 4d a4 add %ecx,-0x5c(%ebp)
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
10d870: 8b 1e mov (%esi),%ebx
switch( type ) {
10d872: 83 fa 02 cmp $0x2,%edx
10d875: 74 1f je 10d896 <IMFS_evaluate_for_make+0xb5>
10d877: 77 0a ja 10d883 <IMFS_evaluate_for_make+0xa2>
10d879: 85 d2 test %edx,%edx
10d87b: 0f 84 d9 00 00 00 je 10d95a <IMFS_evaluate_for_make+0x179>
10d881: eb 88 jmp 10d80b <IMFS_evaluate_for_make+0x2a>
10d883: 83 fa 03 cmp $0x3,%edx
10d886: 74 40 je 10d8c8 <IMFS_evaluate_for_make+0xe7>
10d888: 83 fa 04 cmp $0x4,%edx
10d88b: 0f 85 7a ff ff ff jne 10d80b <IMFS_evaluate_for_make+0x2a><== NEVER TAKEN
10d891: e9 d4 00 00 00 jmp 10d96a <IMFS_evaluate_for_make+0x189>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10d896: a1 50 10 12 00 mov 0x121050,%eax
10d89b: 3b 58 18 cmp 0x18(%eax),%ebx
10d89e: 0f 84 67 ff ff ff je 10d80b <IMFS_evaluate_for_make+0x2a>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
10d8a4: 8b 46 10 mov 0x10(%esi),%eax
10d8a7: 3b 58 1c cmp 0x1c(%eax),%ebx
10d8aa: 75 0c jne 10d8b8 <IMFS_evaluate_for_make+0xd7>
10d8ac: 89 f2 mov %esi,%edx
10d8ae: 89 c6 mov %eax,%esi
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
10d8b0: 8d 7d d0 lea -0x30(%ebp),%edi
10d8b3: 83 c6 08 add $0x8,%esi
10d8b6: eb 5a jmp 10d912 <IMFS_evaluate_for_make+0x131>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
10d8b8: 8b 5b 08 mov 0x8(%ebx),%ebx
10d8bb: 85 db test %ebx,%ebx
10d8bd: 0f 85 90 00 00 00 jne 10d953 <IMFS_evaluate_for_make+0x172>
10d8c3: e9 e4 00 00 00 jmp 10d9ac <IMFS_evaluate_for_make+0x1cb>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
10d8c8: 8b 43 4c mov 0x4c(%ebx),%eax
10d8cb: 83 f8 03 cmp $0x3,%eax
10d8ce: 74 05 je 10d8d5 <IMFS_evaluate_for_make+0xf4>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
10d8d0: 83 f8 04 cmp $0x4,%eax
10d8d3: 75 16 jne 10d8eb <IMFS_evaluate_for_make+0x10a>
result = IMFS_evaluate_link( pathloc, 0 );
10d8d5: 50 push %eax
10d8d6: 50 push %eax
10d8d7: 6a 00 push $0x0
10d8d9: 56 push %esi
10d8da: e8 7f fe ff ff call 10d75e <IMFS_evaluate_link>
if ( result == -1 )
10d8df: 83 c4 10 add $0x10,%esp
10d8e2: 83 f8 ff cmp $0xffffffff,%eax
10d8e5: 0f 84 19 01 00 00 je 10da04 <IMFS_evaluate_for_make+0x223><== NEVER TAKEN
return -1;
}
node = pathloc->node_access;
10d8eb: 8b 06 mov (%esi),%eax
if ( !node )
10d8ed: 85 c0 test %eax,%eax
10d8ef: 0f 84 e9 00 00 00 je 10d9de <IMFS_evaluate_for_make+0x1fd><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10d8f5: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10d8f9: 0f 85 df 00 00 00 jne 10d9de <IMFS_evaluate_for_make+0x1fd>
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
10d8ff: 8b 50 5c mov 0x5c(%eax),%edx
10d902: 85 d2 test %edx,%edx
10d904: 74 3b je 10d941 <IMFS_evaluate_for_make+0x160>
10d906: 89 f0 mov %esi,%eax
10d908: 89 d6 mov %edx,%esi
10d90a: 89 c2 mov %eax,%edx
newloc = node->info.directory.mt_fs->mt_fs_root;
10d90c: 8d 7d d0 lea -0x30(%ebp),%edi
10d90f: 83 c6 1c add $0x1c,%esi
10d912: b9 05 00 00 00 mov $0x5,%ecx
10d917: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10d919: 8d 75 d0 lea -0x30(%ebp),%esi
10d91c: b1 05 mov $0x5,%cl
10d91e: 89 d7 mov %edx,%edi
10d920: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
10d922: 56 push %esi
10d923: 8b 42 0c mov 0xc(%edx),%eax
10d926: ff 75 10 pushl 0x10(%ebp)
10d929: 52 push %edx
10d92a: 8b 55 a4 mov -0x5c(%ebp),%edx
10d92d: 2b 55 e4 sub -0x1c(%ebp),%edx
10d930: 03 55 08 add 0x8(%ebp),%edx
10d933: 52 push %edx
10d934: ff 50 04 call *0x4(%eax)
10d937: 89 c3 mov %eax,%ebx
10d939: 83 c4 10 add $0x10,%esp
10d93c: e9 c5 00 00 00 jmp 10da06 <IMFS_evaluate_for_make+0x225>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10d941: 53 push %ebx
10d942: 53 push %ebx
10d943: 57 push %edi
10d944: 50 push %eax
10d945: e8 4a 01 00 00 call 10da94 <IMFS_find_match_in_dir>
10d94a: 89 c3 mov %eax,%ebx
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
10d94c: 83 c4 10 add $0x10,%esp
10d94f: 85 c0 test %eax,%eax
10d951: 74 27 je 10d97a <IMFS_evaluate_for_make+0x199>
done = true;
else
pathloc->node_access = node;
10d953: 89 1e mov %ebx,(%esi)
10d955: e9 b1 fe ff ff jmp 10d80b <IMFS_evaluate_for_make+0x2a>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
10d95a: e8 59 28 00 00 call 1101b8 <__errno>
10d95f: c7 00 11 00 00 00 movl $0x11,(%eax)
10d965: e9 fb fe ff ff jmp 10d865 <IMFS_evaluate_for_make+0x84>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
10d96a: e8 49 28 00 00 call 1101b8 <__errno>
10d96f: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10d975: e9 eb fe ff ff jmp 10d865 <IMFS_evaluate_for_make+0x84>
10d97a: 89 f2 mov %esi,%edx
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
10d97c: 8b 45 a4 mov -0x5c(%ebp),%eax
10d97f: 2b 45 e4 sub -0x1c(%ebp),%eax
10d982: 03 45 08 add 0x8(%ebp),%eax
10d985: 8b 4d 10 mov 0x10(%ebp),%ecx
10d988: 89 01 mov %eax,(%ecx)
* pathloc is returned with a pointer to the parent of the new node.
* name is returned with a pointer to the first character in the
* new node name. The parent node is verified to be a directory.
*/
int IMFS_evaluate_for_make(
10d98a: 8b 5d 08 mov 0x8(%ebp),%ebx
10d98d: 03 5d a4 add -0x5c(%ebp),%ebx
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
10d990: eb 2a jmp 10d9bc <IMFS_evaluate_for_make+0x1db>
if ( !IMFS_is_separator( path[ i ] ) )
10d992: 83 ec 0c sub $0xc,%esp
10d995: 0f be c0 movsbl %al,%eax
10d998: 50 push %eax
10d999: 89 55 9c mov %edx,-0x64(%ebp)
10d99c: e8 4f a6 ff ff call 107ff0 <rtems_filesystem_is_separator>
10d9a1: 43 inc %ebx
10d9a2: 83 c4 10 add $0x10,%esp
10d9a5: 85 c0 test %eax,%eax
10d9a7: 8b 55 9c mov -0x64(%ebp),%edx
10d9aa: 75 10 jne 10d9bc <IMFS_evaluate_for_make+0x1db>
rtems_set_errno_and_return_minus_one( ENOENT );
10d9ac: e8 07 28 00 00 call 1101b8 <__errno>
10d9b1: c7 00 02 00 00 00 movl $0x2,(%eax)
10d9b7: e9 a9 fe ff ff jmp 10d865 <IMFS_evaluate_for_make+0x84>
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
10d9bc: 8a 03 mov (%ebx),%al
10d9be: 84 c0 test %al,%al
10d9c0: 75 d0 jne 10d992 <IMFS_evaluate_for_make+0x1b1>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
10d9c2: 83 ec 0c sub $0xc,%esp
10d9c5: 52 push %edx
10d9c6: 89 55 9c mov %edx,-0x64(%ebp)
10d9c9: e8 7a fa ff ff call 10d448 <IMFS_Set_handlers>
10d9ce: 89 c3 mov %eax,%ebx
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
10d9d0: 8b 55 9c mov -0x64(%ebp),%edx
10d9d3: 8b 02 mov (%edx),%eax
10d9d5: 83 c4 10 add $0x10,%esp
10d9d8: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10d9dc: 74 10 je 10d9ee <IMFS_evaluate_for_make+0x20d><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
10d9de: e8 d5 27 00 00 call 1101b8 <__errno>
10d9e3: c7 00 14 00 00 00 movl $0x14,(%eax)
10d9e9: e9 77 fe ff ff jmp 10d865 <IMFS_evaluate_for_make+0x84>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
10d9ee: 51 push %ecx
10d9ef: 51 push %ecx
10d9f0: 6a 03 push $0x3
10d9f2: 52 push %edx
10d9f3: e8 94 fa ff ff call 10d48c <IMFS_evaluate_permission>
10d9f8: 83 c4 10 add $0x10,%esp
10d9fb: 85 c0 test %eax,%eax
10d9fd: 75 07 jne 10da06 <IMFS_evaluate_for_make+0x225>
10d9ff: e9 56 fe ff ff jmp 10d85a <IMFS_evaluate_for_make+0x79>
10da04: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10da06: 89 d8 mov %ebx,%eax
10da08: 8d 65 f4 lea -0xc(%ebp),%esp
10da0b: 5b pop %ebx
10da0c: 5e pop %esi
10da0d: 5f pop %edi
10da0e: c9 leave
10da0f: c3 ret
0010d48c <IMFS_evaluate_permission>:
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
10d48c: 55 push %ebp
10d48d: 89 e5 mov %esp,%ebp
10d48f: 83 ec 08 sub $0x8,%esp
10d492: 8b 45 0c mov 0xc(%ebp),%eax
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
10d495: a9 f8 ff ff ff test $0xfffffff8,%eax
10d49a: 74 10 je 10d4ac <IMFS_evaluate_permission+0x20><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
10d49c: e8 17 2d 00 00 call 1101b8 <__errno> <== NOT EXECUTED
10d4a1: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10d4a7: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10d4aa: eb 15 jmp 10d4c1 <IMFS_evaluate_permission+0x35><== NOT EXECUTED
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
10d4ac: c1 e0 06 shl $0x6,%eax
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
10d4af: 8b 55 08 mov 0x8(%ebp),%edx
10d4b2: 8b 12 mov (%edx),%edx
10d4b4: 8b 52 30 mov 0x30(%edx),%edx
10d4b7: 21 c2 and %eax,%edx
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
10d4b9: 39 c2 cmp %eax,%edx
10d4bb: 0f 94 c0 sete %al
10d4be: 0f b6 c0 movzbl %al,%eax
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
10d4c1: c9 leave
10d4c2: c3 ret
00107b18 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
107b18: 55 push %ebp
107b19: 89 e5 mov %esp,%ebp
107b1b: 53 push %ebx
107b1c: 83 ec 10 sub $0x10,%esp
107b1f: 8b 45 08 mov 0x8(%ebp),%eax
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
107b22: 50 push %eax
107b23: ff 75 14 pushl 0x14(%ebp)
107b26: ff 75 10 pushl 0x10(%ebp)
107b29: ff 75 0c pushl 0xc(%ebp)
107b2c: 8b 40 18 mov 0x18(%eax),%eax
107b2f: ff 70 50 pushl 0x50(%eax)
107b32: e8 f0 83 00 00 call 10ff27 <pipe_lseek>
107b37: 89 c3 mov %eax,%ebx
107b39: 99 cltd
IMFS_FIFO_RETURN(err);
107b3a: 83 c4 20 add $0x20,%esp
107b3d: 85 d2 test %edx,%edx
107b3f: 79 0e jns 107b4f <IMFS_fifo_lseek+0x37> <== NEVER TAKEN
107b41: e8 16 a0 00 00 call 111b5c <__errno>
107b46: f7 db neg %ebx
107b48: 89 18 mov %ebx,(%eax)
107b4a: 83 c8 ff or $0xffffffff,%eax
107b4d: 89 c2 mov %eax,%edx
}
107b4f: 8b 5d fc mov -0x4(%ebp),%ebx
107b52: c9 leave
107b53: c3 ret
00107bb4 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
107bb4: 55 push %ebp
107bb5: 89 e5 mov %esp,%ebp
107bb7: 56 push %esi
107bb8: 53 push %ebx
107bb9: 83 ec 10 sub $0x10,%esp
107bbc: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
107bbf: 8b 70 18 mov 0x18(%eax),%esi
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
107bc2: 50 push %eax
107bc3: ff 75 10 pushl 0x10(%ebp)
107bc6: ff 75 0c pushl 0xc(%ebp)
107bc9: ff 76 50 pushl 0x50(%esi)
107bcc: e8 61 81 00 00 call 10fd32 <pipe_write>
107bd1: 89 c3 mov %eax,%ebx
if (err > 0) {
107bd3: 83 c4 10 add $0x10,%esp
107bd6: 83 f8 00 cmp $0x0,%eax
107bd9: 7e 1b jle 107bf6 <IMFS_fifo_write+0x42>
IMFS_mtime_ctime_update(jnode);
107bdb: 50 push %eax
107bdc: 50 push %eax
107bdd: 6a 00 push $0x0
107bdf: 8d 45 f0 lea -0x10(%ebp),%eax
107be2: 50 push %eax
107be3: e8 c4 0d 00 00 call 1089ac <gettimeofday>
107be8: 8b 45 f0 mov -0x10(%ebp),%eax
107beb: 89 46 44 mov %eax,0x44(%esi)
107bee: 89 46 48 mov %eax,0x48(%esi)
107bf1: 83 c4 10 add $0x10,%esp
107bf4: eb 0e jmp 107c04 <IMFS_fifo_write+0x50>
}
IMFS_FIFO_RETURN(err);
107bf6: 74 0c je 107c04 <IMFS_fifo_write+0x50> <== NEVER TAKEN
107bf8: e8 5f 9f 00 00 call 111b5c <__errno>
107bfd: f7 db neg %ebx
107bff: 89 18 mov %ebx,(%eax)
107c01: 83 cb ff or $0xffffffff,%ebx
}
107c04: 89 d8 mov %ebx,%eax
107c06: 8d 65 f8 lea -0x8(%ebp),%esp
107c09: 5b pop %ebx
107c0a: 5e pop %esi
107c0b: c9 leave
107c0c: c3 ret
0010da94 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
10da94: 55 push %ebp
10da95: 89 e5 mov %esp,%ebp
10da97: 57 push %edi
10da98: 56 push %esi
10da99: 53 push %ebx
10da9a: 83 ec 14 sub $0x14,%esp
10da9d: 8b 5d 08 mov 0x8(%ebp),%ebx
10daa0: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
10daa3: 68 4c db 11 00 push $0x11db4c
10daa8: 57 push %edi
10daa9: e8 ce 33 00 00 call 110e7c <strcmp>
10daae: 83 c4 10 add $0x10,%esp
10dab1: 85 c0 test %eax,%eax
10dab3: 74 40 je 10daf5 <IMFS_find_match_in_dir+0x61><== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
10dab5: 51 push %ecx
10dab6: 51 push %ecx
10dab7: 68 4e db 11 00 push $0x11db4e
10dabc: 57 push %edi
10dabd: e8 ba 33 00 00 call 110e7c <strcmp>
10dac2: 83 c4 10 add $0x10,%esp
10dac5: 85 c0 test %eax,%eax
10dac7: 75 05 jne 10dace <IMFS_find_match_in_dir+0x3a><== ALWAYS TAKEN
return directory->Parent;
10dac9: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED
10dacc: eb 27 jmp 10daf5 <IMFS_find_match_in_dir+0x61><== NOT EXECUTED
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
10dace: 8b 73 50 mov 0x50(%ebx),%esi
10dad1: 83 c3 54 add $0x54,%ebx
10dad4: eb 15 jmp 10daeb <IMFS_find_match_in_dir+0x57>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
if ( !strcmp( name, the_jnode->name ) )
10dad6: 8d 46 0c lea 0xc(%esi),%eax
10dad9: 52 push %edx
10dada: 52 push %edx
10dadb: 50 push %eax
10dadc: 57 push %edi
10dadd: e8 9a 33 00 00 call 110e7c <strcmp>
10dae2: 83 c4 10 add $0x10,%esp
10dae5: 85 c0 test %eax,%eax
10dae7: 74 0a je 10daf3 <IMFS_find_match_in_dir+0x5f>
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
10dae9: 8b 36 mov (%esi),%esi
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
10daeb: 39 de cmp %ebx,%esi
10daed: 75 e7 jne 10dad6 <IMFS_find_match_in_dir+0x42>
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
10daef: 31 db xor %ebx,%ebx
10daf1: eb 02 jmp 10daf5 <IMFS_find_match_in_dir+0x61>
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
10daf3: 89 f3 mov %esi,%ebx
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
10daf5: 89 d8 mov %ebx,%eax
10daf7: 8d 65 f4 lea -0xc(%ebp),%esp
10dafa: 5b pop %ebx
10dafb: 5e pop %esi
10dafc: 5f pop %edi
10dafd: c9 leave
10dafe: c3 ret
0010da10 <IMFS_fsunmount>:
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
10da10: 55 push %ebp
10da11: 89 e5 mov %esp,%ebp
10da13: 57 push %edi
10da14: 56 push %esi
10da15: 53 push %ebx
10da16: 83 ec 2c sub $0x2c,%esp
10da19: 8b 45 08 mov 0x8(%ebp),%eax
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
10da1c: 8b 58 1c mov 0x1c(%eax),%ebx
loc = temp_mt_entry->mt_fs_root;
10da1f: 8d 7d d4 lea -0x2c(%ebp),%edi
10da22: 8d 70 1c lea 0x1c(%eax),%esi
10da25: b9 05 00 00 00 mov $0x5,%ecx
10da2a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
10da2c: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
10da33: 8d 75 d4 lea -0x2c(%ebp),%esi
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
10da36: 8b 7b 08 mov 0x8(%ebx),%edi
loc.node_access = (void *)jnode;
10da39: 89 5d d4 mov %ebx,-0x2c(%ebp)
IMFS_Set_handlers( &loc );
10da3c: 83 ec 0c sub $0xc,%esp
10da3f: 56 push %esi
10da40: e8 03 fa ff ff call 10d448 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
10da45: 83 c4 10 add $0x10,%esp
10da48: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10da4c: 75 08 jne 10da56 <IMFS_fsunmount+0x46>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10da4e: 8d 43 54 lea 0x54(%ebx),%eax
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
10da51: 39 43 50 cmp %eax,0x50(%ebx)
10da54: 75 13 jne 10da69 <IMFS_fsunmount+0x59>
result = IMFS_unlink( NULL, &loc );
10da56: 50 push %eax
10da57: 50 push %eax
10da58: 56 push %esi
10da59: 6a 00 push $0x0
10da5b: e8 74 94 ff ff call 106ed4 <IMFS_unlink>
if (result != 0)
10da60: 83 c4 10 add $0x10,%esp
10da63: 85 c0 test %eax,%eax
10da65: 75 1d jne 10da84 <IMFS_fsunmount+0x74> <== NEVER TAKEN
return -1;
jnode = next;
10da67: 89 fb mov %edi,%ebx
}
if ( jnode != NULL ) {
10da69: 85 db test %ebx,%ebx
10da6b: 74 1c je 10da89 <IMFS_fsunmount+0x79>
if ( jnode->type == IMFS_DIRECTORY ) {
10da6d: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10da71: 75 c3 jne 10da36 <IMFS_fsunmount+0x26> <== NEVER TAKEN
10da73: 8d 43 54 lea 0x54(%ebx),%eax
if ( jnode_has_children( jnode ) )
10da76: 39 43 50 cmp %eax,0x50(%ebx)
10da79: 74 bb je 10da36 <IMFS_fsunmount+0x26>
jnode = jnode_get_first_child( jnode );
10da7b: 8b 5b 50 mov 0x50(%ebx),%ebx
}
}
} while (jnode != NULL);
10da7e: 85 db test %ebx,%ebx
10da80: 75 b4 jne 10da36 <IMFS_fsunmount+0x26> <== ALWAYS TAKEN
10da82: eb 05 jmp 10da89 <IMFS_fsunmount+0x79> <== NOT EXECUTED
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
10da84: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10da87: eb 02 jmp 10da8b <IMFS_fsunmount+0x7b> <== NOT EXECUTED
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
10da89: 31 c0 xor %eax,%eax
}
10da8b: 8d 65 f4 lea -0xc(%ebp),%esp
10da8e: 5b pop %ebx
10da8f: 5e pop %esi
10da90: 5f pop %edi
10da91: c9 leave
10da92: c3 ret
0010db00 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
10db00: 55 push %ebp
10db01: 89 e5 mov %esp,%ebp
10db03: 57 push %edi
10db04: 56 push %esi
10db05: 53 push %ebx
10db06: 83 ec 1c sub $0x1c,%esp
10db09: 8b 7d 08 mov 0x8(%ebp),%edi
10db0c: 8b 75 10 mov 0x10(%ebp),%esi
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
10db0f: 8a 17 mov (%edi),%dl
int pathlen,
char *token,
int *token_len
)
{
register int i = 0;
10db11: 31 db xor %ebx,%ebx
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
10db13: eb 10 jmp 10db25 <IMFS_get_token+0x25>
token[i] = c;
10db15: 88 14 1e mov %dl,(%esi,%ebx,1)
if ( i == IMFS_NAME_MAX )
10db18: 83 fb 20 cmp $0x20,%ebx
10db1b: 0f 84 86 00 00 00 je 10dba7 <IMFS_get_token+0xa7>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
10db21: 43 inc %ebx
10db22: 8a 14 1f mov (%edi,%ebx,1),%dl
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
10db25: 83 ec 0c sub $0xc,%esp
10db28: 0f be c2 movsbl %dl,%eax
10db2b: 50 push %eax
10db2c: 88 55 e4 mov %dl,-0x1c(%ebp)
10db2f: e8 bc a4 ff ff call 107ff0 <rtems_filesystem_is_separator>
10db34: 83 c4 10 add $0x10,%esp
10db37: 85 c0 test %eax,%eax
10db39: 8a 55 e4 mov -0x1c(%ebp),%dl
10db3c: 75 05 jne 10db43 <IMFS_get_token+0x43>
10db3e: 3b 5d 0c cmp 0xc(%ebp),%ebx
10db41: 7c d2 jl 10db15 <IMFS_get_token+0x15>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
10db43: 85 db test %ebx,%ebx
10db45: 75 10 jne 10db57 <IMFS_get_token+0x57>
token[i] = c;
10db47: 88 16 mov %dl,(%esi)
if ( (token[i] != '\0') && pathlen ) {
10db49: 84 d2 test %dl,%dl
10db4b: 74 06 je 10db53 <IMFS_get_token+0x53>
10db4d: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10db51: 75 16 jne 10db69 <IMFS_get_token+0x69>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
10db53: 31 ff xor %edi,%edi
10db55: eb 1c jmp 10db73 <IMFS_get_token+0x73>
char *token,
int *token_len
)
{
register int i = 0;
IMFS_token_types type = IMFS_NAME;
10db57: bf 03 00 00 00 mov $0x3,%edi
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
10db5c: 80 7c 1e ff 00 cmpb $0x0,-0x1(%esi,%ebx,1)
10db61: 74 10 je 10db73 <IMFS_get_token+0x73> <== NEVER TAKEN
token[i] = '\0';
10db63: c6 04 1e 00 movb $0x0,(%esi,%ebx,1)
10db67: eb 0a jmp 10db73 <IMFS_get_token+0x73>
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
10db69: bf 01 00 00 00 mov $0x1,%edi
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
10db6e: bb 01 00 00 00 mov $0x1,%ebx
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
10db73: 8b 45 14 mov 0x14(%ebp),%eax
10db76: 89 18 mov %ebx,(%eax)
/*
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
10db78: 83 ff 03 cmp $0x3,%edi
10db7b: 75 3d jne 10dbba <IMFS_get_token+0xba>
if ( strcmp( token, "..") == 0 )
10db7d: 52 push %edx
10db7e: 52 push %edx
10db7f: 68 51 db 11 00 push $0x11db51
10db84: 56 push %esi
10db85: e8 f2 32 00 00 call 110e7c <strcmp>
10db8a: 83 c4 10 add $0x10,%esp
10db8d: 85 c0 test %eax,%eax
10db8f: 74 1d je 10dbae <IMFS_get_token+0xae>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
10db91: 50 push %eax
10db92: 50 push %eax
10db93: 68 52 db 11 00 push $0x11db52
10db98: 56 push %esi
10db99: e8 de 32 00 00 call 110e7c <strcmp>
10db9e: 83 c4 10 add $0x10,%esp
10dba1: 85 c0 test %eax,%eax
10dba3: 74 10 je 10dbb5 <IMFS_get_token+0xb5>
10dba5: eb 13 jmp 10dbba <IMFS_get_token+0xba>
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
if ( i == IMFS_NAME_MAX )
return IMFS_INVALID_TOKEN;
10dba7: bf 04 00 00 00 mov $0x4,%edi
10dbac: eb 0c jmp 10dbba <IMFS_get_token+0xba>
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
10dbae: bf 02 00 00 00 mov $0x2,%edi
10dbb3: eb 05 jmp 10dbba <IMFS_get_token+0xba>
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
10dbb5: bf 01 00 00 00 mov $0x1,%edi
}
return type;
}
10dbba: 89 f8 mov %edi,%eax
10dbbc: 8d 65 f4 lea -0xc(%ebp),%esp
10dbbf: 5b pop %ebx
10dbc0: 5e pop %esi
10dbc1: 5f pop %edi
10dbc2: c9 leave
10dbc3: c3 ret
00106b6c <IMFS_initialize_support>:
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
106b6c: 55 push %ebp
106b6d: 89 e5 mov %esp,%ebp
106b6f: 57 push %edi
106b70: 56 push %esi
106b71: 53 push %ebx
106b72: 83 ec 1c sub $0x1c,%esp
106b75: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
106b78: a1 48 f1 11 00 mov 0x11f148,%eax
106b7d: b9 06 00 00 00 mov $0x6,%ecx
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
106b82: ba 10 00 00 00 mov $0x10,%edx
if (bit_mask == requested_bytes_per_block) {
106b87: 39 c2 cmp %eax,%edx
106b89: 74 0c je 106b97 <IMFS_initialize_support+0x2b>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
106b8b: 7f 05 jg 106b92 <IMFS_initialize_support+0x26>
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
106b8d: d1 e2 shl %edx
106b8f: 49 dec %ecx
106b90: 75 f5 jne 106b87 <IMFS_initialize_support+0x1b><== ALWAYS TAKEN
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
106b92: b8 80 00 00 00 mov $0x80,%eax
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
106b97: a3 10 2e 12 00 mov %eax,0x122e10
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
106b9c: e8 74 68 00 00 call 10d415 <IMFS_create_root_node>
106ba1: 89 c2 mov %eax,%edx
106ba3: 89 43 1c mov %eax,0x1c(%ebx)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
106ba6: 8b 45 14 mov 0x14(%ebp),%eax
106ba9: 89 43 24 mov %eax,0x24(%ebx)
temp_mt_entry->mt_fs_root.ops = op_table;
106bac: 8b 45 0c mov 0xc(%ebp),%eax
106baf: 89 43 28 mov %eax,0x28(%ebx)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
106bb2: 8d 7b 38 lea 0x38(%ebx),%edi
106bb5: be 00 db 11 00 mov $0x11db00,%esi
106bba: b9 0c 00 00 00 mov $0xc,%ecx
106bbf: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
106bc1: 50 push %eax
106bc2: 50 push %eax
106bc3: 6a 14 push $0x14
106bc5: 6a 01 push $0x1
106bc7: 89 55 e4 mov %edx,-0x1c(%ebp)
106bca: e8 fd 05 00 00 call 1071cc <calloc>
if ( !fs_info ) {
106bcf: 83 c4 10 add $0x10,%esp
106bd2: 85 c0 test %eax,%eax
106bd4: 8b 55 e4 mov -0x1c(%ebp),%edx
106bd7: 75 1c jne 106bf5 <IMFS_initialize_support+0x89>
free(temp_mt_entry->mt_fs_root.node_access);
106bd9: 83 ec 0c sub $0xc,%esp
106bdc: 52 push %edx
106bdd: e8 56 07 00 00 call 107338 <free>
rtems_set_errno_and_return_minus_one(ENOMEM);
106be2: e8 d1 95 00 00 call 1101b8 <__errno>
106be7: c7 00 0c 00 00 00 movl $0xc,(%eax)
106bed: 83 c4 10 add $0x10,%esp
106bf0: 83 c8 ff or $0xffffffff,%eax
106bf3: eb 34 jmp 106c29 <IMFS_initialize_support+0xbd>
}
temp_mt_entry->fs_info = fs_info;
106bf5: 89 43 34 mov %eax,0x34(%ebx)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
106bf8: 8b 0d 14 2e 12 00 mov 0x122e14,%ecx
106bfe: 89 08 mov %ecx,(%eax)
106c00: 41 inc %ecx
106c01: 89 0d 14 2e 12 00 mov %ecx,0x122e14
fs_info->ino_count = 1;
106c07: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
fs_info->memfile_handlers = memfile_handlers;
106c0e: 8b 4d 10 mov 0x10(%ebp),%ecx
106c11: 89 48 08 mov %ecx,0x8(%eax)
fs_info->directory_handlers = directory_handlers;
106c14: 8b 4d 14 mov 0x14(%ebp),%ecx
106c17: 89 48 0c mov %ecx,0xc(%eax)
fs_info->fifo_handlers = fifo_handlers;
106c1a: 8b 4d 18 mov 0x18(%ebp),%ecx
106c1d: 89 48 10 mov %ecx,0x10(%eax)
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
106c20: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx)
return 0;
106c27: 31 c0 xor %eax,%eax
}
106c29: 8d 65 f4 lea -0xc(%ebp),%esp
106c2c: 5b pop %ebx
106c2d: 5e pop %esi
106c2e: 5f pop %edi
106c2f: c9 leave
106c30: c3 ret
0010f506 <IMFS_memfile_extend>:
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
10f506: 55 push %ebp
10f507: 89 e5 mov %esp,%ebp
10f509: 57 push %edi
10f50a: 56 push %esi
10f50b: 53 push %ebx
10f50c: 83 ec 2c sub $0x2c,%esp
10f50f: 8b 7d 08 mov 0x8(%ebp),%edi
10f512: 8b 5d 0c mov 0xc(%ebp),%ebx
10f515: 8b 75 10 mov 0x10(%ebp),%esi
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
10f518: a1 10 2e 12 00 mov 0x122e10,%eax
10f51d: 89 c1 mov %eax,%ecx
10f51f: c1 e9 02 shr $0x2,%ecx
10f522: 8d 51 01 lea 0x1(%ecx),%edx
10f525: 0f af d1 imul %ecx,%edx
10f528: 42 inc %edx
10f529: 0f af d1 imul %ecx,%edx
10f52c: 4a dec %edx
10f52d: 0f af d0 imul %eax,%edx
10f530: 83 fe 00 cmp $0x0,%esi
10f533: 7c 16 jl 10f54b <IMFS_memfile_extend+0x45><== NEVER TAKEN
10f535: 7f 04 jg 10f53b <IMFS_memfile_extend+0x35><== NEVER TAKEN
10f537: 39 d3 cmp %edx,%ebx
10f539: 72 10 jb 10f54b <IMFS_memfile_extend+0x45>
rtems_set_errno_and_return_minus_one( EINVAL );
10f53b: e8 78 0c 00 00 call 1101b8 <__errno>
10f540: c7 00 16 00 00 00 movl $0x16,(%eax)
10f546: e9 92 00 00 00 jmp 10f5dd <IMFS_memfile_extend+0xd7>
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
10f54b: 8b 57 50 mov 0x50(%edi),%edx
10f54e: 8b 4f 54 mov 0x54(%edi),%ecx
10f551: 89 55 e0 mov %edx,-0x20(%ebp)
10f554: 89 4d e4 mov %ecx,-0x1c(%ebp)
10f557: 39 ce cmp %ecx,%esi
10f559: 0f 8c 8f 00 00 00 jl 10f5ee <IMFS_memfile_extend+0xe8><== NEVER TAKEN
10f55f: 7f 08 jg 10f569 <IMFS_memfile_extend+0x63><== NEVER TAKEN
10f561: 39 d3 cmp %edx,%ebx
10f563: 0f 86 85 00 00 00 jbe 10f5ee <IMFS_memfile_extend+0xe8>
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
10f569: 89 45 d8 mov %eax,-0x28(%ebp)
10f56c: 89 c1 mov %eax,%ecx
10f56e: c1 f9 1f sar $0x1f,%ecx
10f571: 89 4d dc mov %ecx,-0x24(%ebp)
10f574: ff 75 dc pushl -0x24(%ebp)
10f577: ff 75 d8 pushl -0x28(%ebp)
10f57a: 56 push %esi
10f57b: 53 push %ebx
10f57c: e8 ef bb 00 00 call 11b170 <__divdi3>
10f581: 83 c4 10 add $0x10,%esp
10f584: 89 45 d4 mov %eax,-0x2c(%ebp)
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
10f587: ff 75 dc pushl -0x24(%ebp)
10f58a: ff 75 d8 pushl -0x28(%ebp)
10f58d: ff 75 e4 pushl -0x1c(%ebp)
10f590: ff 75 e0 pushl -0x20(%ebp)
10f593: e8 d8 bb 00 00 call 11b170 <__divdi3>
10f598: 83 c4 10 add $0x10,%esp
10f59b: 89 45 e0 mov %eax,-0x20(%ebp)
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
10f59e: 89 c2 mov %eax,%edx
10f5a0: eb 41 jmp 10f5e3 <IMFS_memfile_extend+0xdd>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
10f5a2: 51 push %ecx
10f5a3: 51 push %ecx
10f5a4: 52 push %edx
10f5a5: 57 push %edi
10f5a6: 89 55 d0 mov %edx,-0x30(%ebp)
10f5a9: e8 99 fd ff ff call 10f347 <IMFS_memfile_addblock>
10f5ae: 83 c4 10 add $0x10,%esp
10f5b1: 85 c0 test %eax,%eax
10f5b3: 8b 55 d0 mov -0x30(%ebp),%edx
10f5b6: 74 2a je 10f5e2 <IMFS_memfile_extend+0xdc>
10f5b8: eb 13 jmp 10f5cd <IMFS_memfile_extend+0xc7>
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
10f5ba: 50 push %eax
10f5bb: 50 push %eax
10f5bc: 52 push %edx
10f5bd: 57 push %edi
10f5be: 89 55 d0 mov %edx,-0x30(%ebp)
10f5c1: e8 16 ff ff ff call 10f4dc <IMFS_memfile_remove_block>
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
10f5c6: 8b 55 d0 mov -0x30(%ebp),%edx
10f5c9: 4a dec %edx
10f5ca: 83 c4 10 add $0x10,%esp
10f5cd: 3b 55 e0 cmp -0x20(%ebp),%edx
10f5d0: 73 e8 jae 10f5ba <IMFS_memfile_extend+0xb4>
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
10f5d2: e8 e1 0b 00 00 call 1101b8 <__errno>
10f5d7: c7 00 1c 00 00 00 movl $0x1c,(%eax)
10f5dd: 83 c8 ff or $0xffffffff,%eax
10f5e0: eb 0e jmp 10f5f0 <IMFS_memfile_extend+0xea>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
10f5e2: 42 inc %edx
10f5e3: 3b 55 d4 cmp -0x2c(%ebp),%edx
10f5e6: 76 ba jbe 10f5a2 <IMFS_memfile_extend+0x9c>
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
10f5e8: 89 5f 50 mov %ebx,0x50(%edi)
10f5eb: 89 77 54 mov %esi,0x54(%edi)
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
return 0;
10f5ee: 31 c0 xor %eax,%eax
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
10f5f0: 8d 65 f4 lea -0xc(%ebp),%esp
10f5f3: 5b pop %ebx
10f5f4: 5e pop %esi
10f5f5: 5f pop %edi
10f5f6: c9 leave
10f5f7: c3 ret
0010f04c <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
10f04c: 55 push %ebp
10f04d: 89 e5 mov %esp,%ebp
10f04f: 57 push %edi
10f050: 56 push %esi
10f051: 53 push %ebx
10f052: 83 ec 1c sub $0x1c,%esp
10f055: 8b 75 08 mov 0x8(%ebp),%esi
10f058: 8b 7d 0c mov 0xc(%ebp),%edi
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
10f05b: 8b 0d 10 2e 12 00 mov 0x122e10,%ecx
10f061: c1 e9 02 shr $0x2,%ecx
10f064: 8d 41 ff lea -0x1(%ecx),%eax
10f067: 39 c7 cmp %eax,%edi
10f069: 77 40 ja 10f0ab <IMFS_memfile_get_block_pointer+0x5f>
p = info->indirect;
10f06b: 8b 46 58 mov 0x58(%esi),%eax
if ( malloc_it ) {
10f06e: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10f072: 74 25 je 10f099 <IMFS_memfile_get_block_pointer+0x4d>
if ( !p ) {
10f074: 85 c0 test %eax,%eax
10f076: 75 12 jne 10f08a <IMFS_memfile_get_block_pointer+0x3e>
p = memfile_alloc_block();
10f078: e8 ad ff ff ff call 10f02a <memfile_alloc_block>
if ( !p )
return 0;
10f07d: 31 db xor %ebx,%ebx
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
10f07f: 85 c0 test %eax,%eax
10f081: 0f 84 f7 00 00 00 je 10f17e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
info->indirect = p;
10f087: 89 46 58 mov %eax,0x58(%esi)
}
return &info->indirect[ my_block ];
10f08a: 8d 1c bd 00 00 00 00 lea 0x0(,%edi,4),%ebx
10f091: 03 5e 58 add 0x58(%esi),%ebx
10f094: e9 e5 00 00 00 jmp 10f17e <IMFS_memfile_get_block_pointer+0x132>
}
if ( !p )
return 0;
10f099: 31 db xor %ebx,%ebx
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
10f09b: 85 c0 test %eax,%eax
10f09d: 0f 84 db 00 00 00 je 10f17e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
return &info->indirect[ my_block ];
10f0a3: 8d 1c b8 lea (%eax,%edi,4),%ebx
10f0a6: e9 d3 00 00 00 jmp 10f17e <IMFS_memfile_get_block_pointer+0x132>
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
10f0ab: 8d 41 01 lea 0x1(%ecx),%eax
10f0ae: 0f af c1 imul %ecx,%eax
10f0b1: 8d 50 ff lea -0x1(%eax),%edx
10f0b4: 39 d7 cmp %edx,%edi
10f0b6: 77 40 ja 10f0f8 <IMFS_memfile_get_block_pointer+0xac>
my_block -= FIRST_DOUBLY_INDIRECT;
10f0b8: 29 cf sub %ecx,%edi
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
10f0ba: 89 f8 mov %edi,%eax
10f0bc: 31 d2 xor %edx,%edx
10f0be: f7 f1 div %ecx
10f0c0: 89 55 e4 mov %edx,-0x1c(%ebp)
10f0c3: 89 c7 mov %eax,%edi
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
10f0c5: 8b 46 5c mov 0x5c(%esi),%eax
if ( malloc_it ) {
10f0c8: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10f0cc: 74 1b je 10f0e9 <IMFS_memfile_get_block_pointer+0x9d>
if ( !p ) {
10f0ce: 85 c0 test %eax,%eax
10f0d0: 75 12 jne 10f0e4 <IMFS_memfile_get_block_pointer+0x98>
p = memfile_alloc_block();
10f0d2: e8 53 ff ff ff call 10f02a <memfile_alloc_block>
if ( !p )
return 0;
10f0d7: 31 db xor %ebx,%ebx
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
10f0d9: 85 c0 test %eax,%eax
10f0db: 0f 84 9d 00 00 00 je 10f17e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
info->doubly_indirect = p;
10f0e1: 89 46 5c mov %eax,0x5c(%esi)
}
p1 = (block_p *)p[ doubly ];
10f0e4: 8d 34 b8 lea (%eax,%edi,4),%esi
10f0e7: eb 65 jmp 10f14e <IMFS_memfile_get_block_pointer+0x102>
return (block_p *)&p1[ singly ];
}
if ( !p )
return 0;
10f0e9: 31 db xor %ebx,%ebx
}
return (block_p *)&p1[ singly ];
}
if ( !p )
10f0eb: 85 c0 test %eax,%eax
10f0ed: 0f 84 8b 00 00 00 je 10f17e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
p = (block_p *)p[ doubly ];
10f0f3: 8b 04 b8 mov (%eax,%edi,4),%eax
10f0f6: eb 7c jmp 10f174 <IMFS_memfile_get_block_pointer+0x128>
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
10f0f8: 8d 50 01 lea 0x1(%eax),%edx
10f0fb: 0f af d1 imul %ecx,%edx
10f0fe: 4a dec %edx
}
/*
* This means the requested block number is out of range.
*/
return 0;
10f0ff: 31 db xor %ebx,%ebx
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
10f101: 39 d7 cmp %edx,%edi
10f103: 77 79 ja 10f17e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
10f105: 29 c7 sub %eax,%edi
10f107: 89 f8 mov %edi,%eax
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
10f109: 31 d2 xor %edx,%edx
10f10b: f7 f1 div %ecx
10f10d: 89 55 e4 mov %edx,-0x1c(%ebp)
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
10f110: 31 d2 xor %edx,%edx
10f112: f7 f1 div %ecx
10f114: 89 55 e0 mov %edx,-0x20(%ebp)
10f117: 89 c7 mov %eax,%edi
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
10f119: 8b 46 60 mov 0x60(%esi),%eax
if ( malloc_it ) {
10f11c: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10f120: 74 41 je 10f163 <IMFS_memfile_get_block_pointer+0x117>
if ( !p ) {
10f122: 85 c0 test %eax,%eax
10f124: 75 0c jne 10f132 <IMFS_memfile_get_block_pointer+0xe6>
p = memfile_alloc_block();
10f126: e8 ff fe ff ff call 10f02a <memfile_alloc_block>
if ( !p )
10f12b: 85 c0 test %eax,%eax
10f12d: 74 4f je 10f17e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
info->triply_indirect = p;
10f12f: 89 46 60 mov %eax,0x60(%esi)
}
p1 = (block_p *) p[ triply ];
10f132: 8d 34 b8 lea (%eax,%edi,4),%esi
10f135: 8b 06 mov (%esi),%eax
if ( !p1 ) {
10f137: 85 c0 test %eax,%eax
10f139: 75 0d jne 10f148 <IMFS_memfile_get_block_pointer+0xfc>
p1 = memfile_alloc_block();
10f13b: e8 ea fe ff ff call 10f02a <memfile_alloc_block>
if ( !p1 )
return 0;
10f140: 31 db xor %ebx,%ebx
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
10f142: 85 c0 test %eax,%eax
10f144: 74 38 je 10f17e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
p[ triply ] = (block_p) p1;
10f146: 89 06 mov %eax,(%esi)
}
p2 = (block_p *)p1[ doubly ];
10f148: 8b 55 e0 mov -0x20(%ebp),%edx
10f14b: 8d 34 90 lea (%eax,%edx,4),%esi
10f14e: 8b 06 mov (%esi),%eax
if ( !p2 ) {
10f150: 85 c0 test %eax,%eax
10f152: 75 24 jne 10f178 <IMFS_memfile_get_block_pointer+0x12c>
p2 = memfile_alloc_block();
10f154: e8 d1 fe ff ff call 10f02a <memfile_alloc_block>
if ( !p2 )
return 0;
10f159: 31 db xor %ebx,%ebx
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
10f15b: 85 c0 test %eax,%eax
10f15d: 74 1f je 10f17e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
p1[ doubly ] = (block_p) p2;
10f15f: 89 06 mov %eax,(%esi)
10f161: eb 15 jmp 10f178 <IMFS_memfile_get_block_pointer+0x12c>
}
return (block_p *)&p2[ singly ];
}
if ( !p )
10f163: 85 c0 test %eax,%eax
10f165: 74 17 je 10f17e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
p1 = (block_p *) p[ triply ];
10f167: 8b 04 b8 mov (%eax,%edi,4),%eax
if ( !p1 )
10f16a: 85 c0 test %eax,%eax
10f16c: 74 10 je 10f17e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
p2 = (block_p *)p1[ doubly ];
10f16e: 8b 55 e0 mov -0x20(%ebp),%edx
10f171: 8b 04 90 mov (%eax,%edx,4),%eax
if ( !p2 )
10f174: 85 c0 test %eax,%eax
10f176: 74 06 je 10f17e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
return (block_p *)&p2[ singly ];
10f178: 8b 55 e4 mov -0x1c(%ebp),%edx
10f17b: 8d 1c 90 lea (%eax,%edx,4),%ebx
/*
* This means the requested block number is out of range.
*/
return 0;
}
10f17e: 89 d8 mov %ebx,%eax
10f180: 83 c4 1c add $0x1c,%esp
10f183: 5b pop %ebx
10f184: 5e pop %esi
10f185: 5f pop %edi
10f186: c9 leave
10f187: c3 ret
0010f188 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
10f188: 55 push %ebp
10f189: 89 e5 mov %esp,%ebp
10f18b: 57 push %edi
10f18c: 56 push %esi
10f18d: 53 push %ebx
10f18e: 83 ec 4c sub $0x4c,%esp
10f191: 8b 75 0c mov 0xc(%ebp),%esi
10f194: 8b 7d 10 mov 0x10(%ebp),%edi
10f197: 8b 5d 18 mov 0x18(%ebp),%ebx
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
10f19a: 8b 45 08 mov 0x8(%ebp),%eax
10f19d: 83 78 4c 06 cmpl $0x6,0x4c(%eax)
10f1a1: 75 3f jne 10f1e2 <IMFS_memfile_read+0x5a>
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
10f1a3: 8b 48 58 mov 0x58(%eax),%ecx
if (my_length > (the_jnode->info.linearfile.size - start))
10f1a6: 89 c2 mov %eax,%edx
10f1a8: 8b 40 50 mov 0x50(%eax),%eax
10f1ab: 8b 52 54 mov 0x54(%edx),%edx
10f1ae: 89 45 b0 mov %eax,-0x50(%ebp)
10f1b1: 89 55 b4 mov %edx,-0x4c(%ebp)
10f1b4: 29 f0 sub %esi,%eax
10f1b6: 19 fa sbb %edi,%edx
10f1b8: 89 45 d0 mov %eax,-0x30(%ebp)
10f1bb: 89 55 d4 mov %edx,-0x2c(%ebp)
10f1be: 31 c0 xor %eax,%eax
10f1c0: 39 d0 cmp %edx,%eax
10f1c2: 7c 0e jl 10f1d2 <IMFS_memfile_read+0x4a><== NEVER TAKEN
10f1c4: 7f 05 jg 10f1cb <IMFS_memfile_read+0x43><== NEVER TAKEN
10f1c6: 3b 5d d0 cmp -0x30(%ebp),%ebx
10f1c9: 76 07 jbe 10f1d2 <IMFS_memfile_read+0x4a><== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
10f1cb: 8b 55 b0 mov -0x50(%ebp),%edx
10f1ce: 29 f2 sub %esi,%edx
10f1d0: eb 02 jmp 10f1d4 <IMFS_memfile_read+0x4c>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
10f1d2: 89 da mov %ebx,%edx <== NOT EXECUTED
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
10f1d4: 01 ce add %ecx,%esi
10f1d6: 8b 7d 14 mov 0x14(%ebp),%edi
10f1d9: 89 d1 mov %edx,%ecx
10f1db: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10f1dd: e9 1d 01 00 00 jmp 10f2ff <IMFS_memfile_read+0x177>
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
10f1e2: 89 f0 mov %esi,%eax
if ( last_byte > the_jnode->info.file.size )
10f1e4: 8b 55 08 mov 0x8(%ebp),%edx
10f1e7: 8b 52 50 mov 0x50(%edx),%edx
10f1ea: 89 55 cc mov %edx,-0x34(%ebp)
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
10f1ed: 8d 0c 33 lea (%ebx,%esi,1),%ecx
10f1f0: 89 4d d0 mov %ecx,-0x30(%ebp)
if ( last_byte > the_jnode->info.file.size )
10f1f3: 31 c9 xor %ecx,%ecx
10f1f5: 8b 55 08 mov 0x8(%ebp),%edx
10f1f8: 3b 4a 54 cmp 0x54(%edx),%ecx
10f1fb: 7c 14 jl 10f211 <IMFS_memfile_read+0x89><== NEVER TAKEN
10f1fd: 7f 08 jg 10f207 <IMFS_memfile_read+0x7f><== NEVER TAKEN
10f1ff: 8b 4d cc mov -0x34(%ebp),%ecx
10f202: 39 4d d0 cmp %ecx,-0x30(%ebp)
10f205: 76 0a jbe 10f211 <IMFS_memfile_read+0x89>
my_length = the_jnode->info.file.size - start;
10f207: 8b 55 cc mov -0x34(%ebp),%edx
10f20a: 29 c2 sub %eax,%edx
10f20c: 89 55 d0 mov %edx,-0x30(%ebp)
10f20f: eb 03 jmp 10f214 <IMFS_memfile_read+0x8c>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
10f211: 89 5d d0 mov %ebx,-0x30(%ebp)
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
10f214: 8b 0d 10 2e 12 00 mov 0x122e10,%ecx
10f21a: 89 4d c4 mov %ecx,-0x3c(%ebp)
10f21d: 89 c8 mov %ecx,%eax
10f21f: 99 cltd
10f220: 89 d3 mov %edx,%ebx
10f222: 52 push %edx
10f223: 51 push %ecx
10f224: 57 push %edi
10f225: 56 push %esi
10f226: 89 4d c0 mov %ecx,-0x40(%ebp)
10f229: e8 8e c0 00 00 call 11b2bc <__moddi3>
10f22e: 83 c4 10 add $0x10,%esp
10f231: 89 45 cc mov %eax,-0x34(%ebp)
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
10f234: 8b 4d c0 mov -0x40(%ebp),%ecx
10f237: 53 push %ebx
10f238: 51 push %ecx
10f239: 57 push %edi
10f23a: 56 push %esi
10f23b: e8 30 bf 00 00 call 11b170 <__divdi3>
10f240: 83 c4 10 add $0x10,%esp
10f243: 89 c3 mov %eax,%ebx
if ( start_offset ) {
10f245: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10f249: 74 3d je 10f288 <IMFS_memfile_read+0x100>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10f24b: 57 push %edi
10f24c: 6a 00 push $0x0
10f24e: 50 push %eax
10f24f: ff 75 08 pushl 0x8(%ebp)
10f252: e8 f5 fd ff ff call 10f04c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10f257: 83 c4 10 add $0x10,%esp
return copied;
10f25a: 31 d2 xor %edx,%edx
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
10f25c: 85 c0 test %eax,%eax
10f25e: 0f 84 ba 00 00 00 je 10f31e <IMFS_memfile_read+0x196><== NEVER TAKEN
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
10f264: 8b 4d c4 mov -0x3c(%ebp),%ecx
10f267: 2b 4d cc sub -0x34(%ebp),%ecx
10f26a: 8b 55 d0 mov -0x30(%ebp),%edx
10f26d: 39 ca cmp %ecx,%edx
10f26f: 76 02 jbe 10f273 <IMFS_memfile_read+0xeb>
10f271: 89 ca mov %ecx,%edx
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
10f273: 8b 75 cc mov -0x34(%ebp),%esi
10f276: 03 30 add (%eax),%esi
dest += to_copy;
10f278: 8b 7d 14 mov 0x14(%ebp),%edi
10f27b: 89 d1 mov %edx,%ecx
10f27d: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10f27f: 89 7d cc mov %edi,-0x34(%ebp)
block++;
10f282: 43 inc %ebx
my_length -= to_copy;
10f283: 29 55 d0 sub %edx,-0x30(%ebp)
10f286: eb 08 jmp 10f290 <IMFS_memfile_read+0x108>
unsigned int last_byte;
unsigned int copied;
unsigned int start_offset;
unsigned char *dest;
dest = destination;
10f288: 8b 45 14 mov 0x14(%ebp),%eax
10f28b: 89 45 cc mov %eax,-0x34(%ebp)
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
10f28e: 31 d2 xor %edx,%edx
}
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
10f290: 8b 0d 10 2e 12 00 mov 0x122e10,%ecx
10f296: 89 4d c8 mov %ecx,-0x38(%ebp)
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10f299: eb 2f jmp 10f2ca <IMFS_memfile_read+0x142>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10f29b: 56 push %esi
10f29c: 6a 00 push $0x0
10f29e: 53 push %ebx
10f29f: ff 75 08 pushl 0x8(%ebp)
10f2a2: 89 55 c0 mov %edx,-0x40(%ebp)
10f2a5: e8 a2 fd ff ff call 10f04c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10f2aa: 83 c4 10 add $0x10,%esp
10f2ad: 85 c0 test %eax,%eax
10f2af: 8b 55 c0 mov -0x40(%ebp),%edx
10f2b2: 74 6a je 10f31e <IMFS_memfile_read+0x196><== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
10f2b4: 8b 30 mov (%eax),%esi
10f2b6: 8b 7d cc mov -0x34(%ebp),%edi
10f2b9: 8b 4d c8 mov -0x38(%ebp),%ecx
10f2bc: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
dest += to_copy;
10f2be: 89 7d cc mov %edi,-0x34(%ebp)
block++;
10f2c1: 43 inc %ebx
my_length -= to_copy;
10f2c2: 8b 7d c8 mov -0x38(%ebp),%edi
10f2c5: 29 7d d0 sub %edi,-0x30(%ebp)
copied += to_copy;
10f2c8: 01 fa add %edi,%edx
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10f2ca: 8b 45 d0 mov -0x30(%ebp),%eax
10f2cd: 3b 05 10 2e 12 00 cmp 0x122e10,%eax
10f2d3: 73 c6 jae 10f29b <IMFS_memfile_read+0x113>
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
10f2d5: 85 c0 test %eax,%eax
10f2d7: 74 26 je 10f2ff <IMFS_memfile_read+0x177>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10f2d9: 51 push %ecx
10f2da: 6a 00 push $0x0
10f2dc: 53 push %ebx
10f2dd: ff 75 08 pushl 0x8(%ebp)
10f2e0: 89 55 c0 mov %edx,-0x40(%ebp)
10f2e3: e8 64 fd ff ff call 10f04c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10f2e8: 83 c4 10 add $0x10,%esp
10f2eb: 85 c0 test %eax,%eax
10f2ed: 8b 55 c0 mov -0x40(%ebp),%edx
10f2f0: 74 2c je 10f31e <IMFS_memfile_read+0x196><== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
10f2f2: 8b 30 mov (%eax),%esi
10f2f4: 8b 7d cc mov -0x34(%ebp),%edi
10f2f7: 8b 4d d0 mov -0x30(%ebp),%ecx
10f2fa: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
copied += my_length;
10f2fc: 03 55 d0 add -0x30(%ebp),%edx
}
IMFS_update_atime( the_jnode );
10f2ff: 50 push %eax
10f300: 50 push %eax
10f301: 6a 00 push $0x0
10f303: 8d 45 e0 lea -0x20(%ebp),%eax
10f306: 50 push %eax
10f307: 89 55 c0 mov %edx,-0x40(%ebp)
10f30a: e8 a1 80 ff ff call 1073b0 <gettimeofday>
10f30f: 8b 45 e0 mov -0x20(%ebp),%eax
10f312: 8b 4d 08 mov 0x8(%ebp),%ecx
10f315: 89 41 40 mov %eax,0x40(%ecx)
return copied;
10f318: 8b 55 c0 mov -0x40(%ebp),%edx
10f31b: 83 c4 10 add $0x10,%esp
}
10f31e: 89 d0 mov %edx,%eax
10f320: 8d 65 f4 lea -0xc(%ebp),%esp
10f323: 5b pop %ebx
10f324: 5e pop %esi
10f325: 5f pop %edi
10f326: c9 leave
10f327: c3 ret
0010f3e6 <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
10f3e6: 55 push %ebp
10f3e7: 89 e5 mov %esp,%ebp
10f3e9: 57 push %edi
10f3ea: 56 push %esi
10f3eb: 53 push %ebx
10f3ec: 83 ec 1c sub $0x1c,%esp
10f3ef: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
10f3f2: 8b 35 10 2e 12 00 mov 0x122e10,%esi
10f3f8: c1 ee 02 shr $0x2,%esi
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
10f3fb: 83 7b 58 00 cmpl $0x0,0x58(%ebx)
10f3ff: 74 0f je 10f410 <IMFS_memfile_remove+0x2a>
memfile_free_blocks_in_table( &info->indirect, to_free );
10f401: 57 push %edi
10f402: 57 push %edi
10f403: 56 push %esi
10f404: 8d 43 58 lea 0x58(%ebx),%eax
10f407: 50 push %eax
10f408: e8 8c ff ff ff call 10f399 <memfile_free_blocks_in_table>
10f40d: 83 c4 10 add $0x10,%esp
}
if ( info->doubly_indirect ) {
10f410: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx)
10f414: 74 3e je 10f454 <IMFS_memfile_remove+0x6e>
10f416: 31 ff xor %edi,%edi
10f418: eb 1f jmp 10f439 <IMFS_memfile_remove+0x53>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
10f41a: 8b 43 5c mov 0x5c(%ebx),%eax
10f41d: 8d 14 bd 00 00 00 00 lea 0x0(,%edi,4),%edx
10f424: 83 3c b8 00 cmpl $0x0,(%eax,%edi,4)
10f428: 74 0e je 10f438 <IMFS_memfile_remove+0x52><== NEVER TAKEN
memfile_free_blocks_in_table(
10f42a: 51 push %ecx
10f42b: 51 push %ecx
10f42c: 56 push %esi
10f42d: 01 d0 add %edx,%eax
10f42f: 50 push %eax
10f430: e8 64 ff ff ff call 10f399 <memfile_free_blocks_in_table>
10f435: 83 c4 10 add $0x10,%esp
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
10f438: 47 inc %edi
10f439: a1 10 2e 12 00 mov 0x122e10,%eax
10f43e: c1 e8 02 shr $0x2,%eax
10f441: 39 c7 cmp %eax,%edi
10f443: 72 d5 jb 10f41a <IMFS_memfile_remove+0x34>
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
(block_p **)&info->doubly_indirect[i], to_free );
}
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
10f445: 57 push %edi
10f446: 57 push %edi
10f447: 56 push %esi
10f448: 8d 43 5c lea 0x5c(%ebx),%eax
10f44b: 50 push %eax
10f44c: e8 48 ff ff ff call 10f399 <memfile_free_blocks_in_table>
10f451: 83 c4 10 add $0x10,%esp
}
if ( info->triply_indirect ) {
10f454: 83 7b 60 00 cmpl $0x0,0x60(%ebx)
10f458: 74 78 je 10f4d2 <IMFS_memfile_remove+0xec>
10f45a: 31 ff xor %edi,%edi
10f45c: eb 59 jmp 10f4b7 <IMFS_memfile_remove+0xd1>
10f45e: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax
10f465: 89 45 e4 mov %eax,-0x1c(%ebp)
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
10f468: 8b 43 60 mov 0x60(%ebx),%eax
10f46b: 8b 04 b8 mov (%eax,%edi,4),%eax
if ( !p ) /* ensure we have a valid pointer */
10f46e: 85 c0 test %eax,%eax
10f470: 74 51 je 10f4c3 <IMFS_memfile_remove+0xdd><== NEVER TAKEN
10f472: 31 d2 xor %edx,%edx
10f474: eb 21 jmp 10f497 <IMFS_memfile_remove+0xb1>
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
10f476: 83 38 00 cmpl $0x0,(%eax)
10f479: 74 18 je 10f493 <IMFS_memfile_remove+0xad><== NEVER TAKEN
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
10f47b: 51 push %ecx
10f47c: 51 push %ecx
10f47d: 56 push %esi
10f47e: 50 push %eax
10f47f: 89 45 dc mov %eax,-0x24(%ebp)
10f482: 89 55 e0 mov %edx,-0x20(%ebp)
10f485: e8 0f ff ff ff call 10f399 <memfile_free_blocks_in_table>
10f48a: 83 c4 10 add $0x10,%esp
10f48d: 8b 55 e0 mov -0x20(%ebp),%edx
10f490: 8b 45 dc mov -0x24(%ebp),%eax
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
10f493: 42 inc %edx
10f494: 83 c0 04 add $0x4,%eax
10f497: 8b 0d 10 2e 12 00 mov 0x122e10,%ecx
10f49d: c1 e9 02 shr $0x2,%ecx
10f4a0: 39 ca cmp %ecx,%edx
10f4a2: 72 d2 jb 10f476 <IMFS_memfile_remove+0x90>
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
10f4a4: 52 push %edx
10f4a5: 52 push %edx
10f4a6: 56 push %esi
10f4a7: 8b 45 e4 mov -0x1c(%ebp),%eax
10f4aa: 03 43 60 add 0x60(%ebx),%eax
10f4ad: 50 push %eax
10f4ae: e8 e6 fe ff ff call 10f399 <memfile_free_blocks_in_table>
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
10f4b3: 47 inc %edi
10f4b4: 83 c4 10 add $0x10,%esp
10f4b7: a1 10 2e 12 00 mov 0x122e10,%eax
10f4bc: c1 e8 02 shr $0x2,%eax
10f4bf: 39 c7 cmp %eax,%edi
10f4c1: 72 9b jb 10f45e <IMFS_memfile_remove+0x78>
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
10f4c3: 50 push %eax
10f4c4: 50 push %eax
10f4c5: 56 push %esi
(block_p **)&info->triply_indirect, to_free );
10f4c6: 83 c3 60 add $0x60,%ebx
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
10f4c9: 53 push %ebx
10f4ca: e8 ca fe ff ff call 10f399 <memfile_free_blocks_in_table>
10f4cf: 83 c4 10 add $0x10,%esp
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
10f4d2: 31 c0 xor %eax,%eax
10f4d4: 8d 65 f4 lea -0xc(%ebp),%esp
10f4d7: 5b pop %ebx
10f4d8: 5e pop %esi
10f4d9: 5f pop %edi
10f4da: c9 leave
10f4db: c3 ret
0010f5f8 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
10f5f8: 55 push %ebp
10f5f9: 89 e5 mov %esp,%ebp
10f5fb: 57 push %edi
10f5fc: 56 push %esi
10f5fd: 53 push %ebx
10f5fe: 83 ec 3c sub $0x3c,%esp
10f601: 8b 75 0c mov 0xc(%ebp),%esi
10f604: 8b 7d 10 mov 0x10(%ebp),%edi
/*
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
10f607: 8b 4d 18 mov 0x18(%ebp),%ecx
10f60a: 01 f1 add %esi,%ecx
if ( last_byte > the_jnode->info.file.size ) {
10f60c: 89 c8 mov %ecx,%eax
10f60e: 31 d2 xor %edx,%edx
10f610: 8b 5d 08 mov 0x8(%ebp),%ebx
10f613: 3b 53 54 cmp 0x54(%ebx),%edx
10f616: 7c 2c jl 10f644 <IMFS_memfile_write+0x4c><== NEVER TAKEN
10f618: 7f 05 jg 10f61f <IMFS_memfile_write+0x27><== NEVER TAKEN
10f61a: 3b 4b 50 cmp 0x50(%ebx),%ecx
10f61d: 76 25 jbe 10f644 <IMFS_memfile_write+0x4c><== NEVER TAKEN
status = IMFS_memfile_extend( the_jnode, last_byte );
10f61f: 51 push %ecx
10f620: 52 push %edx
10f621: 50 push %eax
10f622: ff 75 08 pushl 0x8(%ebp)
10f625: e8 dc fe ff ff call 10f506 <IMFS_memfile_extend>
if ( status )
10f62a: 83 c4 10 add $0x10,%esp
10f62d: 85 c0 test %eax,%eax
10f62f: 74 13 je 10f644 <IMFS_memfile_write+0x4c>
rtems_set_errno_and_return_minus_one( ENOSPC );
10f631: e8 82 0b 00 00 call 1101b8 <__errno>
10f636: c7 00 1c 00 00 00 movl $0x1c,(%eax)
10f63c: 83 cb ff or $0xffffffff,%ebx
10f63f: e9 03 01 00 00 jmp 10f747 <IMFS_memfile_write+0x14f>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
10f644: a1 10 2e 12 00 mov 0x122e10,%eax
10f649: 89 45 c8 mov %eax,-0x38(%ebp)
10f64c: 99 cltd
10f64d: 89 d3 mov %edx,%ebx
10f64f: 52 push %edx
10f650: 50 push %eax
10f651: 57 push %edi
10f652: 56 push %esi
10f653: 89 45 c4 mov %eax,-0x3c(%ebp)
10f656: e8 61 bc 00 00 call 11b2bc <__moddi3>
10f65b: 83 c4 10 add $0x10,%esp
10f65e: 89 45 cc mov %eax,-0x34(%ebp)
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
10f661: 8b 4d c4 mov -0x3c(%ebp),%ecx
10f664: 53 push %ebx
10f665: 51 push %ecx
10f666: 57 push %edi
10f667: 56 push %esi
10f668: e8 03 bb 00 00 call 11b170 <__divdi3>
10f66d: 83 c4 10 add $0x10,%esp
10f670: 89 45 d0 mov %eax,-0x30(%ebp)
if ( start_offset ) {
10f673: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10f677: 74 44 je 10f6bd <IMFS_memfile_write+0xc5>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10f679: 52 push %edx
10f67a: 6a 00 push $0x0
10f67c: 50 push %eax
10f67d: ff 75 08 pushl 0x8(%ebp)
10f680: e8 c7 f9 ff ff call 10f04c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10f685: 83 c4 10 add $0x10,%esp
return copied;
10f688: 31 db xor %ebx,%ebx
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
10f68a: 85 c0 test %eax,%eax
10f68c: 0f 84 b5 00 00 00 je 10f747 <IMFS_memfile_write+0x14f><== NEVER TAKEN
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
10f692: 8b 55 c8 mov -0x38(%ebp),%edx
10f695: 2b 55 cc sub -0x34(%ebp),%edx
10f698: 3b 55 18 cmp 0x18(%ebp),%edx
10f69b: 76 03 jbe 10f6a0 <IMFS_memfile_write+0xa8>
10f69d: 8b 55 18 mov 0x18(%ebp),%edx
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
10f6a0: 8b 00 mov (%eax),%eax
10f6a2: 03 45 cc add -0x34(%ebp),%eax
src += to_copy;
10f6a5: 89 c7 mov %eax,%edi
10f6a7: 8b 75 14 mov 0x14(%ebp),%esi
10f6aa: 89 d1 mov %edx,%ecx
10f6ac: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
10f6ae: ff 45 d0 incl -0x30(%ebp)
my_length -= to_copy;
10f6b1: 8b 5d 18 mov 0x18(%ebp),%ebx
10f6b4: 29 d3 sub %edx,%ebx
10f6b6: 89 5d d4 mov %ebx,-0x2c(%ebp)
copied += to_copy;
10f6b9: 89 d3 mov %edx,%ebx
10f6bb: eb 0b jmp 10f6c8 <IMFS_memfile_write+0xd0>
unsigned int last_byte;
unsigned int start_offset;
int copied;
const unsigned char *src;
src = source;
10f6bd: 8b 75 14 mov 0x14(%ebp),%esi
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
10f6c0: 8b 45 18 mov 0x18(%ebp),%eax
10f6c3: 89 45 d4 mov %eax,-0x2c(%ebp)
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
10f6c6: 31 db xor %ebx,%ebx
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
10f6c8: 8b 15 10 2e 12 00 mov 0x122e10,%edx
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10f6ce: eb 2b jmp 10f6fb <IMFS_memfile_write+0x103>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10f6d0: 50 push %eax
10f6d1: 6a 00 push $0x0
10f6d3: ff 75 d0 pushl -0x30(%ebp)
10f6d6: ff 75 08 pushl 0x8(%ebp)
10f6d9: 89 55 c4 mov %edx,-0x3c(%ebp)
10f6dc: e8 6b f9 ff ff call 10f04c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10f6e1: 83 c4 10 add $0x10,%esp
10f6e4: 85 c0 test %eax,%eax
10f6e6: 8b 55 c4 mov -0x3c(%ebp),%edx
10f6e9: 74 5c je 10f747 <IMFS_memfile_write+0x14f><== NEVER TAKEN
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
10f6eb: 8b 00 mov (%eax),%eax
src += to_copy;
10f6ed: 89 c7 mov %eax,%edi
10f6ef: 89 d1 mov %edx,%ecx
10f6f1: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
10f6f3: ff 45 d0 incl -0x30(%ebp)
my_length -= to_copy;
10f6f6: 29 55 d4 sub %edx,-0x2c(%ebp)
* IMFS_memfile_write
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
10f6f9: 01 d3 add %edx,%ebx
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10f6fb: 8b 45 d4 mov -0x2c(%ebp),%eax
10f6fe: 3b 05 10 2e 12 00 cmp 0x122e10,%eax
10f704: 73 ca jae 10f6d0 <IMFS_memfile_write+0xd8>
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
10f706: 85 c0 test %eax,%eax
10f708: 74 21 je 10f72b <IMFS_memfile_write+0x133>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10f70a: 57 push %edi
10f70b: 6a 00 push $0x0
10f70d: ff 75 d0 pushl -0x30(%ebp)
10f710: ff 75 08 pushl 0x8(%ebp)
10f713: e8 34 f9 ff ff call 10f04c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10f718: 83 c4 10 add $0x10,%esp
10f71b: 85 c0 test %eax,%eax
10f71d: 74 28 je 10f747 <IMFS_memfile_write+0x14f><== NEVER TAKEN
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
10f71f: 8b 00 mov (%eax),%eax
10f721: 89 c7 mov %eax,%edi
10f723: 8b 4d d4 mov -0x2c(%ebp),%ecx
10f726: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
my_length = 0;
copied += to_copy;
10f728: 03 5d d4 add -0x2c(%ebp),%ebx
}
IMFS_mtime_ctime_update( the_jnode );
10f72b: 56 push %esi
10f72c: 56 push %esi
10f72d: 6a 00 push $0x0
10f72f: 8d 45 e0 lea -0x20(%ebp),%eax
10f732: 50 push %eax
10f733: e8 78 7c ff ff call 1073b0 <gettimeofday>
10f738: 8b 45 e0 mov -0x20(%ebp),%eax
10f73b: 8b 55 08 mov 0x8(%ebp),%edx
10f73e: 89 42 44 mov %eax,0x44(%edx)
10f741: 89 42 48 mov %eax,0x48(%edx)
return copied;
10f744: 83 c4 10 add $0x10,%esp
}
10f747: 89 d8 mov %ebx,%eax
10f749: 8d 65 f4 lea -0xc(%ebp),%esp
10f74c: 5b pop %ebx
10f74d: 5e pop %esi
10f74e: 5f pop %edi
10f74f: c9 leave
10f750: c3 ret
00106d80 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
106d80: 55 push %ebp
106d81: 89 e5 mov %esp,%ebp
106d83: 83 ec 08 sub $0x8,%esp
106d86: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
106d89: 8b 42 08 mov 0x8(%edx),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
106d8c: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
106d90: 74 10 je 106da2 <IMFS_mount+0x22> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
106d92: e8 21 94 00 00 call 1101b8 <__errno> <== NOT EXECUTED
106d97: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
106d9d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
106da0: eb 05 jmp 106da7 <IMFS_mount+0x27> <== NOT EXECUTED
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
106da2: 89 50 5c mov %edx,0x5c(%eax)
return 0;
106da5: 31 c0 xor %eax,%eax
}
106da7: c9 leave
106da8: c3 ret
00109528 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
109528: 55 push %ebp
109529: 89 e5 mov %esp,%ebp
10952b: 53 push %ebx
10952c: 83 ec 0c sub $0xc,%esp
10952f: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
109532: a1 e0 70 12 00 mov 0x1270e0,%eax
109537: ff 70 08 pushl 0x8(%eax)
10953a: 8d 43 0c lea 0xc(%ebx),%eax
10953d: 50 push %eax
10953e: e8 e9 ae 00 00 call 11442c <fputs>
switch( the_jnode->type ) {
109543: 8b 43 4c mov 0x4c(%ebx),%eax
109546: 83 c4 10 add $0x10,%esp
109549: 8d 50 ff lea -0x1(%eax),%edx
10954c: 83 fa 06 cmp $0x6,%edx
10954f: 77 75 ja 1095c6 <IMFS_print_jnode+0x9e> <== NEVER TAKEN
109551: a1 e0 70 12 00 mov 0x1270e0,%eax
109556: ff 24 95 60 30 12 00 jmp *0x123060(,%edx,4)
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
10955d: 51 push %ecx
10955e: 51 push %ecx
10955f: ff 70 08 pushl 0x8(%eax)
109562: 6a 2f push $0x2f
109564: e8 17 ae 00 00 call 114380 <fputc>
109569: eb 2b jmp 109596 <IMFS_print_jnode+0x6e>
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
10956b: ff 73 54 pushl 0x54(%ebx)
10956e: ff 73 50 pushl 0x50(%ebx)
109571: 68 85 2f 12 00 push $0x122f85
109576: eb 16 jmp 10958e <IMFS_print_jnode+0x66>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
109578: ff 73 58 pushl 0x58(%ebx)
10957b: ff 73 50 pushl 0x50(%ebx)
10957e: 68 98 2f 12 00 push $0x122f98
109583: eb 09 jmp 10958e <IMFS_print_jnode+0x66>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
109585: 52 push %edx
109586: ff 73 50 pushl 0x50(%ebx)
109589: 68 a7 2f 12 00 push $0x122fa7
10958e: ff 70 08 pushl 0x8(%eax)
109591: e8 8a ad 00 00 call 114320 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
109596: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
109599: c7 45 08 91 32 12 00 movl $0x123291,0x8(%ebp)
}
1095a0: 8b 5d fc mov -0x4(%ebp),%ebx
1095a3: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
1095a4: e9 3f c6 00 00 jmp 115be8 <puts>
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
1095a9: 53 push %ebx <== NOT EXECUTED
1095aa: 53 push %ebx <== NOT EXECUTED
1095ab: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1095ae: 68 b3 2f 12 00 push $0x122fb3 <== NOT EXECUTED
1095b3: eb 0a jmp 1095bf <IMFS_print_jnode+0x97> <== NOT EXECUTED
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
1095b5: 51 push %ecx <== NOT EXECUTED
1095b6: 51 push %ecx <== NOT EXECUTED
1095b7: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1095ba: 68 c7 2f 12 00 push $0x122fc7 <== NOT EXECUTED
1095bf: e8 68 ae 00 00 call 11442c <fputs> <== NOT EXECUTED
1095c4: eb 14 jmp 1095da <IMFS_print_jnode+0xb2> <== NOT EXECUTED
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
1095c6: 52 push %edx <== NOT EXECUTED
1095c7: 50 push %eax <== NOT EXECUTED
1095c8: 68 da 2f 12 00 push $0x122fda <== NOT EXECUTED
1095cd: a1 e0 70 12 00 mov 0x1270e0,%eax <== NOT EXECUTED
1095d2: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1095d5: e8 46 ad 00 00 call 114320 <fprintf> <== NOT EXECUTED
return;
1095da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
puts("");
}
1095dd: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1095e0: c9 leave <== NOT EXECUTED
1095e1: c3 ret <== NOT EXECUTED
00106de8 <IMFS_rename>:
rtems_filesystem_location_info_t *old_parent_loc, /* IN */
rtems_filesystem_location_info_t *old_loc, /* IN */
rtems_filesystem_location_info_t *new_parent_loc, /* IN */
const char *new_name /* IN */
)
{
106de8: 55 push %ebp
106de9: 89 e5 mov %esp,%ebp
106deb: 53 push %ebx
106dec: 83 ec 18 sub $0x18,%esp
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
106def: 8b 45 0c mov 0xc(%ebp),%eax
106df2: 8b 18 mov (%eax),%ebx
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
106df4: 6a 20 push $0x20
106df6: ff 75 14 pushl 0x14(%ebp)
106df9: 8d 43 0c lea 0xc(%ebx),%eax
106dfc: 50 push %eax
106dfd: e8 8a a2 00 00 call 11108c <strncpy>
if ( the_jnode->Parent != NULL )
106e02: 83 c4 10 add $0x10,%esp
106e05: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
106e09: 74 0c je 106e17 <IMFS_rename+0x2f> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
106e0b: 83 ec 0c sub $0xc,%esp
106e0e: 53 push %ebx
106e0f: e8 80 3b 00 00 call 10a994 <_Chain_Extract>
106e14: 83 c4 10 add $0x10,%esp
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
106e17: 8b 45 10 mov 0x10(%ebp),%eax
106e1a: 8b 00 mov (%eax),%eax
the_jnode->Parent = new_parent;
106e1c: 89 43 08 mov %eax,0x8(%ebx)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
106e1f: 51 push %ecx
106e20: 51 push %ecx
106e21: 53 push %ebx
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
106e22: 83 c0 50 add $0x50,%eax
106e25: 50 push %eax
106e26: e8 45 3b 00 00 call 10a970 <_Chain_Append>
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
106e2b: 58 pop %eax
106e2c: 5a pop %edx
106e2d: 6a 00 push $0x0
106e2f: 8d 45 f0 lea -0x10(%ebp),%eax
106e32: 50 push %eax
106e33: e8 78 05 00 00 call 1073b0 <gettimeofday>
106e38: 8b 45 f0 mov -0x10(%ebp),%eax
106e3b: 89 43 48 mov %eax,0x48(%ebx)
return 0;
}
106e3e: 31 c0 xor %eax,%eax
106e40: 8b 5d fc mov -0x4(%ebp),%ebx
106e43: c9 leave
106e44: c3 ret
0010dc90 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
10dc90: 55 push %ebp
10dc91: 89 e5 mov %esp,%ebp
10dc93: 56 push %esi
10dc94: 53 push %ebx
10dc95: 8b 4d 08 mov 0x8(%ebp),%ecx
10dc98: 8b 45 0c mov 0xc(%ebp),%eax
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
10dc9b: 8b 11 mov (%ecx),%edx
switch ( the_jnode->type ) {
10dc9d: 8b 5a 4c mov 0x4c(%edx),%ebx
10dca0: 83 eb 02 sub $0x2,%ebx
10dca3: 83 fb 05 cmp $0x5,%ebx
10dca6: 77 33 ja 10dcdb <IMFS_stat+0x4b> <== NEVER TAKEN
10dca8: ff 24 9d 34 dc 11 00 jmp *0x11dc34(,%ebx,4)
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
10dcaf: 8b 5a 54 mov 0x54(%edx),%ebx
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
10dcb2: 8b 72 50 mov 0x50(%edx),%esi
10dcb5: 89 70 18 mov %esi,0x18(%eax)
10dcb8: 89 58 1c mov %ebx,0x1c(%eax)
break;
10dcbb: eb 2e jmp 10dceb <IMFS_stat+0x5b>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
10dcbd: 8b 5a 50 mov 0x50(%edx),%ebx
10dcc0: 8b 72 54 mov 0x54(%edx),%esi
10dcc3: 89 58 20 mov %ebx,0x20(%eax)
10dcc6: 89 70 24 mov %esi,0x24(%eax)
break;
10dcc9: eb 20 jmp 10dceb <IMFS_stat+0x5b>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
10dccb: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
10dcd2: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
break;
10dcd9: eb 10 jmp 10dceb <IMFS_stat+0x5b>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
10dcdb: e8 d8 24 00 00 call 1101b8 <__errno>
10dce0: c7 00 86 00 00 00 movl $0x86,(%eax)
10dce6: 83 c8 ff or $0xffffffff,%eax
10dce9: eb 47 jmp 10dd32 <IMFS_stat+0xa2>
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
10dceb: 8b 49 10 mov 0x10(%ecx),%ecx
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
10dcee: 8b 49 34 mov 0x34(%ecx),%ecx
10dcf1: 8b 09 mov (%ecx),%ecx
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
10dcf3: c7 00 fe ff 00 00 movl $0xfffe,(%eax)
10dcf9: 89 48 04 mov %ecx,0x4(%eax)
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
10dcfc: 8b 4a 30 mov 0x30(%edx),%ecx
10dcff: 89 48 0c mov %ecx,0xc(%eax)
buf->st_nlink = the_jnode->st_nlink;
10dd02: 8b 4a 34 mov 0x34(%edx),%ecx
10dd05: 66 89 48 10 mov %cx,0x10(%eax)
buf->st_ino = the_jnode->st_ino;
10dd09: 8b 4a 38 mov 0x38(%edx),%ecx
10dd0c: 89 48 08 mov %ecx,0x8(%eax)
buf->st_uid = the_jnode->st_uid;
10dd0f: 8b 4a 3c mov 0x3c(%edx),%ecx
10dd12: 66 89 48 12 mov %cx,0x12(%eax)
buf->st_gid = the_jnode->st_gid;
10dd16: 66 8b 4a 3e mov 0x3e(%edx),%cx
10dd1a: 66 89 48 14 mov %cx,0x14(%eax)
buf->st_atime = the_jnode->stat_atime;
10dd1e: 8b 4a 40 mov 0x40(%edx),%ecx
10dd21: 89 48 28 mov %ecx,0x28(%eax)
buf->st_mtime = the_jnode->stat_mtime;
10dd24: 8b 4a 44 mov 0x44(%edx),%ecx
10dd27: 89 48 30 mov %ecx,0x30(%eax)
buf->st_ctime = the_jnode->stat_ctime;
10dd2a: 8b 52 48 mov 0x48(%edx),%edx
10dd2d: 89 50 38 mov %edx,0x38(%eax)
return 0;
10dd30: 31 c0 xor %eax,%eax
}
10dd32: 5b pop %ebx
10dd33: 5e pop %esi
10dd34: c9 leave
10dd35: c3 ret
00106ed4 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
106ed4: 55 push %ebp
106ed5: 89 e5 mov %esp,%ebp
106ed7: 57 push %edi
106ed8: 56 push %esi
106ed9: 53 push %ebx
106eda: 83 ec 2c sub $0x2c,%esp
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
106edd: 8b 45 0c mov 0xc(%ebp),%eax
106ee0: 8b 18 mov (%eax),%ebx
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
106ee2: 83 7b 4c 03 cmpl $0x3,0x4c(%ebx)
106ee6: 75 7a jne 106f62 <IMFS_unlink+0x8e>
if ( !node->info.hard_link.link_node )
106ee8: 8b 43 50 mov 0x50(%ebx),%eax
106eeb: 85 c0 test %eax,%eax
106eed: 75 10 jne 106eff <IMFS_unlink+0x2b> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
106eef: e8 c4 92 00 00 call 1101b8 <__errno> <== NOT EXECUTED
106ef4: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
106efa: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
106efd: eb 75 jmp 106f74 <IMFS_unlink+0xa0> <== NOT EXECUTED
the_link = *loc;
106eff: 8d 7d cc lea -0x34(%ebp),%edi
106f02: b9 05 00 00 00 mov $0x5,%ecx
106f07: 8b 75 0c mov 0xc(%ebp),%esi
106f0a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_link.node_access = node->info.hard_link.link_node;
106f0c: 89 45 cc mov %eax,-0x34(%ebp)
IMFS_Set_handlers( &the_link );
106f0f: 83 ec 0c sub $0xc,%esp
106f12: 8d 75 cc lea -0x34(%ebp),%esi
106f15: 56 push %esi
106f16: e8 2d 65 00 00 call 10d448 <IMFS_Set_handlers>
/*
* If removing the last hard link to a node, then we need
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
106f1b: 8b 43 50 mov 0x50(%ebx),%eax
106f1e: 8b 50 34 mov 0x34(%eax),%edx
106f21: 83 c4 10 add $0x10,%esp
106f24: 66 83 fa 01 cmp $0x1,%dx
106f28: 75 1a jne 106f44 <IMFS_unlink+0x70>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
106f2a: 51 push %ecx
106f2b: 51 push %ecx
106f2c: 56 push %esi
106f2d: ff 75 08 pushl 0x8(%ebp)
106f30: 8b 45 d4 mov -0x2c(%ebp),%eax
106f33: ff 50 34 call *0x34(%eax)
106f36: 89 c2 mov %eax,%edx
if ( result != 0 )
106f38: 83 c4 10 add $0x10,%esp
return -1;
106f3b: 83 c8 ff or $0xffffffff,%eax
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
if ( result != 0 )
106f3e: 85 d2 test %edx,%edx
106f40: 74 20 je 106f62 <IMFS_unlink+0x8e>
106f42: eb 30 jmp 106f74 <IMFS_unlink+0xa0>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
106f44: 4a dec %edx
106f45: 66 89 50 34 mov %dx,0x34(%eax)
IMFS_update_ctime( node->info.hard_link.link_node );
106f49: 52 push %edx
106f4a: 52 push %edx
106f4b: 6a 00 push $0x0
106f4d: 8d 45 e0 lea -0x20(%ebp),%eax
106f50: 50 push %eax
106f51: e8 5a 04 00 00 call 1073b0 <gettimeofday>
106f56: 8b 43 50 mov 0x50(%ebx),%eax
106f59: 8b 55 e0 mov -0x20(%ebp),%edx
106f5c: 89 50 48 mov %edx,0x48(%eax)
106f5f: 83 c4 10 add $0x10,%esp
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
106f62: 50 push %eax
106f63: 50 push %eax
106f64: 8b 55 0c mov 0xc(%ebp),%edx
106f67: 8b 42 08 mov 0x8(%edx),%eax
106f6a: 52 push %edx
106f6b: ff 75 08 pushl 0x8(%ebp)
106f6e: ff 50 34 call *0x34(%eax)
return result;
106f71: 83 c4 10 add $0x10,%esp
}
106f74: 8d 65 f4 lea -0xc(%ebp),%esp
106f77: 5b pop %ebx
106f78: 5e pop %esi
106f79: 5f pop %edi
106f7a: c9 leave
106f7b: c3 ret
00106f7c <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
106f7c: 55 push %ebp
106f7d: 89 e5 mov %esp,%ebp
106f7f: 83 ec 08 sub $0x8,%esp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
106f82: 8b 45 08 mov 0x8(%ebp),%eax
106f85: 8b 40 08 mov 0x8(%eax),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
106f88: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
106f8c: 74 0d je 106f9b <IMFS_unmount+0x1f> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
106f8e: e8 25 92 00 00 call 1101b8 <__errno> <== NOT EXECUTED
106f93: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
106f99: eb 11 jmp 106fac <IMFS_unmount+0x30> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
106f9b: 83 78 5c 00 cmpl $0x0,0x5c(%eax)
106f9f: 75 10 jne 106fb1 <IMFS_unmount+0x35> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
106fa1: e8 12 92 00 00 call 1101b8 <__errno> <== NOT EXECUTED
106fa6: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
106fac: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
106faf: eb 09 jmp 106fba <IMFS_unmount+0x3e> <== NOT EXECUTED
/*
* Set the mt_fs pointer to indicate that there is no longer
* a file system mounted to this point.
*/
node->info.directory.mt_fs = NULL;
106fb1: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
return 0;
106fb8: 31 c0 xor %eax,%eax
}
106fba: c9 leave
106fbb: c3 ret
00106b28 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
106b28: 55 push %ebp <== NOT EXECUTED
106b29: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106b2b: 57 push %edi <== NOT EXECUTED
106b2c: 56 push %esi <== NOT EXECUTED
106b2d: 53 push %ebx <== NOT EXECUTED
106b2e: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
106b31: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
106b34: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED
106b37: 75 1d jne 106b56 <Stack_check_Dump_threads_usage+0x2e><== NOT EXECUTED
if (!Stack_check_Interrupt_stack.area)
106b39: 83 3d 3c 31 12 00 00 cmpl $0x0,0x12313c <== NOT EXECUTED
106b40: 0f 84 f5 00 00 00 je 106c3b <Stack_check_Dump_threads_usage+0x113><== NOT EXECUTED
return;
stack = &Stack_check_Interrupt_stack;
106b46: ba 38 31 12 00 mov $0x123138,%edx <== NOT EXECUTED
the_thread = 0;
current = 0;
106b4b: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
return;
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
106b52: 31 db xor %ebx,%ebx <== NOT EXECUTED
106b54: eb 0f jmp 106b65 <Stack_check_Dump_threads_usage+0x3d><== NOT EXECUTED
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
106b56: 8d 93 c0 00 00 00 lea 0xc0(%ebx),%edx <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
106b5c: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax <== NOT EXECUTED
106b62: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
106b65: 8b 42 04 mov 0x4(%edx),%eax <== NOT EXECUTED
106b68: 8d 48 10 lea 0x10(%eax),%ecx <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
106b6b: 8b 32 mov (%edx),%esi <== NOT EXECUTED
106b6d: 83 ee 10 sub $0x10,%esi <== NOT EXECUTED
106b70: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
106b73: 83 c0 20 add $0x20,%eax <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
106b76: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED
106b79: 8d 34 30 lea (%eax,%esi,1),%esi <== NOT EXECUTED
106b7c: eb 0b jmp 106b89 <Stack_check_Dump_threads_usage+0x61><== NOT EXECUTED
if (*base != U32_PATTERN)
106b7e: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED
106b84: 75 0b jne 106b91 <Stack_check_Dump_threads_usage+0x69><== 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++)
106b86: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
106b89: 39 f0 cmp %esi,%eax <== NOT EXECUTED
106b8b: 72 f1 jb 106b7e <Stack_check_Dump_threads_usage+0x56><== 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;
106b8d: 31 ff xor %edi,%edi <== NOT EXECUTED
106b8f: eb 0e jmp 106b9f <Stack_check_Dump_threads_usage+0x77><== NOT EXECUTED
106b91: 31 ff xor %edi,%edi <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
106b93: 85 c0 test %eax,%eax <== NOT EXECUTED
106b95: 74 08 je 106b9f <Stack_check_Dump_threads_usage+0x77><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
106b97: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
106b9a: 8d 3c 39 lea (%ecx,%edi,1),%edi <== NOT EXECUTED
106b9d: 29 c7 sub %eax,%edi <== NOT EXECUTED
else
used = 0;
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
106b9f: 85 db test %ebx,%ebx <== NOT EXECUTED
106ba1: 8b 35 14 2e 12 00 mov 0x122e14,%esi <== NOT EXECUTED
106ba7: 74 28 je 106bd1 <Stack_check_Dump_threads_usage+0xa9><== NOT EXECUTED
#endif
{
(*print_handler)(
106ba9: 50 push %eax <== NOT EXECUTED
106baa: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED
106bad: 50 push %eax <== NOT EXECUTED
106bae: 6a 05 push $0x5 <== NOT EXECUTED
106bb0: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
106bb3: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
106bb6: e8 31 37 00 00 call 10a2ec <rtems_object_get_name> <== NOT EXECUTED
106bbb: 50 push %eax <== NOT EXECUTED
106bbc: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
106bbf: 68 36 da 11 00 push $0x11da36 <== NOT EXECUTED
106bc4: ff 35 10 2e 12 00 pushl 0x122e10 <== NOT EXECUTED
106bca: ff d6 call *%esi <== NOT EXECUTED
106bcc: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
106bcf: eb 16 jmp 106be7 <Stack_check_Dump_threads_usage+0xbf><== 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 );
106bd1: 53 push %ebx <== NOT EXECUTED
106bd2: 6a ff push $0xffffffff <== NOT EXECUTED
106bd4: 68 43 da 11 00 push $0x11da43 <== NOT EXECUTED
106bd9: ff 35 10 2e 12 00 pushl 0x122e10 <== NOT EXECUTED
106bdf: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
106be2: ff d6 call *%esi <== NOT EXECUTED
106be4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106be7: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
106bea: 8b 42 04 mov 0x4(%edx),%eax <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
106bed: 51 push %ecx <== NOT EXECUTED
106bee: 51 push %ecx <== NOT EXECUTED
106bef: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
106bf2: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
106bf5: 8b 12 mov (%edx),%edx <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
106bf7: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED
106bfb: 52 push %edx <== NOT EXECUTED
106bfc: 50 push %eax <== NOT EXECUTED
106bfd: 68 51 da 11 00 push $0x11da51 <== NOT EXECUTED
106c02: ff 35 10 2e 12 00 pushl 0x122e10 <== NOT EXECUTED
106c08: ff 15 14 2e 12 00 call *0x122e14 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
106c0e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
106c11: 83 3d 18 2e 12 00 00 cmpl $0x0,0x122e18 <== NOT EXECUTED
106c18: 8b 35 14 2e 12 00 mov 0x122e14,%esi <== NOT EXECUTED
106c1e: 75 09 jne 106c29 <Stack_check_Dump_threads_usage+0x101><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
106c20: 52 push %edx <== NOT EXECUTED
106c21: 52 push %edx <== NOT EXECUTED
106c22: 68 6f da 11 00 push $0x11da6f <== NOT EXECUTED
106c27: eb 07 jmp 106c30 <Stack_check_Dump_threads_usage+0x108><== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
106c29: 50 push %eax <== NOT EXECUTED
106c2a: 57 push %edi <== NOT EXECUTED
106c2b: 68 7c da 11 00 push $0x11da7c <== NOT EXECUTED
106c30: ff 35 10 2e 12 00 pushl 0x122e10 <== NOT EXECUTED
106c36: ff d6 call *%esi <== NOT EXECUTED
106c38: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
106c3b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
106c3e: 5b pop %ebx <== NOT EXECUTED
106c3f: 5e pop %esi <== NOT EXECUTED
106c40: 5f pop %edi <== NOT EXECUTED
106c41: c9 leave <== NOT EXECUTED
106c42: c3 ret <== NOT EXECUTED
00106c43 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
106c43: 55 push %ebp
106c44: 89 e5 mov %esp,%ebp
106c46: 57 push %edi
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
106c47: 83 3d 18 2e 12 00 00 cmpl $0x0,0x122e18
106c4e: 75 5a jne 106caa <Stack_check_Initialize+0x67>
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
106c50: c7 05 28 31 12 00 0d movl $0xfeedf00d,0x123128
106c57: f0 ed fe
106c5a: c7 05 2c 31 12 00 06 movl $0xbad0d06,0x12312c
106c61: 0d ad 0b
106c64: c7 05 30 31 12 00 0d movl $0xdeadf00d,0x123130
106c6b: f0 ad de
106c6e: c7 05 34 31 12 00 06 movl $0x600d0d06,0x123134
106c75: 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) {
106c78: 8b 15 c4 34 12 00 mov 0x1234c4,%edx
106c7e: 85 d2 test %edx,%edx
106c80: 74 1e je 106ca0 <Stack_check_Initialize+0x5d><== NEVER TAKEN
106c82: 8b 0d c8 34 12 00 mov 0x1234c8,%ecx
106c88: 85 c9 test %ecx,%ecx
106c8a: 74 14 je 106ca0 <Stack_check_Initialize+0x5d><== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
106c8c: 89 15 3c 31 12 00 mov %edx,0x12313c
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
106c92: 29 d1 sub %edx,%ecx
106c94: 89 0d 38 31 12 00 mov %ecx,0x123138
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
106c9a: b0 a5 mov $0xa5,%al
106c9c: 89 d7 mov %edx,%edi
106c9e: f3 aa rep stos %al,%es:(%edi)
}
#endif
Stack_check_Initialized = 1;
106ca0: c7 05 18 2e 12 00 01 movl $0x1,0x122e18
106ca7: 00 00 00
}
106caa: 5f pop %edi
106cab: c9 leave
106cac: c3 ret
00106cfb <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)
{
106cfb: 55 push %ebp <== NOT EXECUTED
106cfc: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106cfe: 56 push %esi <== NOT EXECUTED
106cff: 53 push %ebx <== NOT EXECUTED
106d00: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
106d03: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
106d06: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
106d09: 8b b3 c4 00 00 00 mov 0xc4(%ebx),%esi <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
106d0f: 68 82 da 11 00 push $0x11da82 <== NOT EXECUTED
106d14: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED
106d17: e8 0c 16 00 00 call 108328 <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
106d1c: 5a pop %edx <== NOT EXECUTED
106d1d: 59 pop %ecx <== NOT EXECUTED
106d1e: 53 push %ebx <== NOT EXECUTED
106d1f: 68 92 da 11 00 push $0x11da92 <== NOT EXECUTED
106d24: e8 ff 15 00 00 call 108328 <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
106d29: 59 pop %ecx <== NOT EXECUTED
106d2a: 58 pop %eax <== NOT EXECUTED
106d2b: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
106d2e: 68 af da 11 00 push $0x11daaf <== NOT EXECUTED
106d33: e8 f0 15 00 00 call 108328 <printk> <== NOT EXECUTED
printk(
106d38: 58 pop %eax <== NOT EXECUTED
106d39: 5a pop %edx <== NOT EXECUTED
106d3a: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
106d3d: 68 c1 da 11 00 push $0x11dac1 <== NOT EXECUTED
106d42: e8 e1 15 00 00 call 108328 <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
106d47: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
106d4a: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
106d4d: 50 push %eax <== NOT EXECUTED
106d4e: 6a 20 push $0x20 <== NOT EXECUTED
106d50: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
106d53: e8 94 35 00 00 call 10a2ec <rtems_object_get_name> <== NOT EXECUTED
106d58: 5a pop %edx <== NOT EXECUTED
106d59: 59 pop %ecx <== NOT EXECUTED
106d5a: 50 push %eax <== NOT EXECUTED
106d5b: 68 d5 da 11 00 push $0x11dad5 <== NOT EXECUTED
106d60: e8 c3 15 00 00 call 108328 <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)
106d65: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx <== NOT EXECUTED
106d6b: 8b 83 c0 00 00 00 mov 0xc0(%ebx),%eax <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
106d71: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED
106d74: 53 push %ebx <== NOT EXECUTED
106d75: 51 push %ecx <== NOT EXECUTED
106d76: 50 push %eax <== NOT EXECUTED
106d77: 68 eb da 11 00 push $0x11daeb <== NOT EXECUTED
106d7c: e8 a7 15 00 00 call 108328 <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) {
106d81: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
106d84: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED
106d87: 84 d2 test %dl,%dl <== NOT EXECUTED
106d89: 75 17 jne 106da2 <Stack_check_report_blown_task+0xa7><== 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_area(stack);
106d8b: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
106d8e: 83 c6 18 add $0x18,%esi <== NOT EXECUTED
106d91: 56 push %esi <== NOT EXECUTED
106d92: 50 push %eax <== NOT EXECUTED
106d93: 6a 10 push $0x10 <== NOT EXECUTED
106d95: 68 1c db 11 00 push $0x11db1c <== NOT EXECUTED
106d9a: e8 89 15 00 00 call 108328 <printk> <== NOT EXECUTED
106d9f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
106da2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106da5: 68 81 00 00 00 push $0x81 <== NOT EXECUTED
106daa: e8 ed 3c 00 00 call 10aa9c <rtems_fatal_error_occurred><== NOT EXECUTED
00117300 <_CORE_message_queue_Broadcast>:
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
117300: 55 push %ebp
117301: 89 e5 mov %esp,%ebp
117303: 57 push %edi
117304: 56 push %esi
117305: 53 push %ebx
117306: 83 ec 1c sub $0x1c,%esp
117309: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
11730c: b8 01 00 00 00 mov $0x1,%eax
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
117311: 8b 55 10 mov 0x10(%ebp),%edx
117314: 3b 53 4c cmp 0x4c(%ebx),%edx
117317: 77 4e ja 117367 <_CORE_message_queue_Broadcast+0x67><== NEVER TAKEN
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
117319: 83 7b 48 00 cmpl $0x0,0x48(%ebx)
11731d: 75 09 jne 117328 <_CORE_message_queue_Broadcast+0x28>
11731f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
117326: eb 23 jmp 11734b <_CORE_message_queue_Broadcast+0x4b>
*count = 0;
117328: 8b 45 1c mov 0x1c(%ebp),%eax
11732b: c7 00 00 00 00 00 movl $0x0,(%eax)
117331: eb 32 jmp 117365 <_CORE_message_queue_Broadcast+0x65>
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
117333: ff 45 e4 incl -0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
117336: 8b 42 2c mov 0x2c(%edx),%eax
117339: 89 c7 mov %eax,%edi
11733b: 8b 75 0c mov 0xc(%ebp),%esi
11733e: 8b 4d 10 mov 0x10(%ebp),%ecx
117341: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
117343: 8b 42 28 mov 0x28(%edx),%eax
117346: 8b 55 10 mov 0x10(%ebp),%edx
117349: 89 10 mov %edx,(%eax)
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
11734b: 83 ec 0c sub $0xc,%esp
11734e: 53 push %ebx
11734f: e8 90 21 00 00 call 1194e4 <_Thread_queue_Dequeue>
117354: 89 c2 mov %eax,%edx
117356: 83 c4 10 add $0x10,%esp
117359: 85 c0 test %eax,%eax
11735b: 75 d6 jne 117333 <_CORE_message_queue_Broadcast+0x33>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
11735d: 8b 55 e4 mov -0x1c(%ebp),%edx
117360: 8b 45 1c mov 0x1c(%ebp),%eax
117363: 89 10 mov %edx,(%eax)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
117365: 31 c0 xor %eax,%eax
}
117367: 8d 65 f4 lea -0xc(%ebp),%esp
11736a: 5b pop %ebx
11736b: 5e pop %esi
11736c: 5f pop %edi
11736d: c9 leave
11736e: c3 ret
001121b8 <_CORE_message_queue_Initialize>:
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
1121b8: 55 push %ebp
1121b9: 89 e5 mov %esp,%ebp
1121bb: 57 push %edi
1121bc: 56 push %esi
1121bd: 53 push %ebx
1121be: 83 ec 1c sub $0x1c,%esp
1121c1: 8b 5d 08 mov 0x8(%ebp),%ebx
1121c4: 8b 7d 10 mov 0x10(%ebp),%edi
1121c7: 8b 55 14 mov 0x14(%ebp),%edx
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
1121ca: 89 7b 44 mov %edi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
1121cd: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
1121d4: 89 53 4c mov %edx,0x4c(%ebx)
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
1121d7: 89 d0 mov %edx,%eax
1121d9: f6 c2 03 test $0x3,%dl
1121dc: 74 0c je 1121ea <_CORE_message_queue_Initialize+0x32>
allocated_message_size += sizeof(uint32_t);
1121de: 83 c0 04 add $0x4,%eax
allocated_message_size &= ~(sizeof(uint32_t) - 1);
1121e1: 83 e0 fc and $0xfffffffc,%eax
}
if (allocated_message_size < maximum_message_size)
return false;
1121e4: 31 f6 xor %esi,%esi
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
allocated_message_size += sizeof(uint32_t);
allocated_message_size &= ~(sizeof(uint32_t) - 1);
}
if (allocated_message_size < maximum_message_size)
1121e6: 39 d0 cmp %edx,%eax
1121e8: 72 68 jb 112252 <_CORE_message_queue_Initialize+0x9a><== NEVER TAKEN
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
1121ea: 8d 50 10 lea 0x10(%eax),%edx
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
1121ed: 89 d1 mov %edx,%ecx
1121ef: 0f af cf imul %edi,%ecx
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
return false;
1121f2: 31 f6 xor %esi,%esi
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
1121f4: 39 c1 cmp %eax,%ecx
1121f6: 72 5a jb 112252 <_CORE_message_queue_Initialize+0x9a><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
1121f8: 83 ec 0c sub $0xc,%esp
1121fb: 51 push %ecx
1121fc: 89 55 e4 mov %edx,-0x1c(%ebp)
1121ff: e8 6e 25 00 00 call 114772 <_Workspace_Allocate>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
112204: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
112207: 83 c4 10 add $0x10,%esp
11220a: 85 c0 test %eax,%eax
11220c: 8b 55 e4 mov -0x1c(%ebp),%edx
11220f: 74 41 je 112252 <_CORE_message_queue_Initialize+0x9a>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
112211: 52 push %edx
112212: 57 push %edi
112213: 50 push %eax
112214: 8d 43 60 lea 0x60(%ebx),%eax
112217: 50 push %eax
112218: e8 27 3f 00 00 call 116144 <_Chain_Initialize>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11221d: 8d 43 54 lea 0x54(%ebx),%eax
112220: 89 43 50 mov %eax,0x50(%ebx)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
112223: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
the_message_queue->message_buffers,
(size_t) maximum_pending_messages,
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
11222a: 8d 43 50 lea 0x50(%ebx),%eax
11222d: 89 43 58 mov %eax,0x58(%ebx)
_Thread_queue_Initialize(
112230: 6a 06 push $0x6
112232: 68 80 00 00 00 push $0x80
112237: 8b 45 0c mov 0xc(%ebp),%eax
11223a: 83 38 01 cmpl $0x1,(%eax)
11223d: 0f 94 c0 sete %al
112240: 0f b6 c0 movzbl %al,%eax
112243: 50 push %eax
112244: 53 push %ebx
112245: e8 06 1c 00 00 call 113e50 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
11224a: 83 c4 20 add $0x20,%esp
11224d: be 01 00 00 00 mov $0x1,%esi
}
112252: 89 f0 mov %esi,%eax
112254: 8d 65 f4 lea -0xc(%ebp),%esp
112257: 5b pop %ebx
112258: 5e pop %esi
112259: 5f pop %edi
11225a: c9 leave
11225b: c3 ret
0011225c <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
11225c: 55 push %ebp
11225d: 89 e5 mov %esp,%ebp
11225f: 57 push %edi
112260: 56 push %esi
112261: 53 push %ebx
112262: 83 ec 2c sub $0x2c,%esp
112265: 8b 45 08 mov 0x8(%ebp),%eax
112268: 8b 55 0c mov 0xc(%ebp),%edx
11226b: 89 55 dc mov %edx,-0x24(%ebp)
11226e: 8b 55 10 mov 0x10(%ebp),%edx
112271: 89 55 e4 mov %edx,-0x1c(%ebp)
112274: 8b 7d 14 mov 0x14(%ebp),%edi
112277: 8b 55 1c mov 0x1c(%ebp),%edx
11227a: 89 55 d4 mov %edx,-0x2c(%ebp)
11227d: 8a 55 18 mov 0x18(%ebp),%dl
112280: 88 55 db mov %dl,-0x25(%ebp)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
112283: 8b 0d 18 b6 12 00 mov 0x12b618,%ecx
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
112289: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
_ISR_Disable( level );
112290: 9c pushf
112291: fa cli
112292: 8f 45 e0 popl -0x20(%ebp)
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
112295: 8b 50 50 mov 0x50(%eax),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
112298: 8d 58 54 lea 0x54(%eax),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
11229b: 39 da cmp %ebx,%edx
11229d: 74 47 je 1122e6 <_CORE_message_queue_Seize+0x8a>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
11229f: 8b 32 mov (%edx),%esi
the_chain->first = new_first;
1122a1: 89 70 50 mov %esi,0x50(%eax)
CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get_unprotected( &the_message_queue->Pending_messages );
1122a4: 8d 58 50 lea 0x50(%eax),%ebx
1122a7: 89 5e 04 mov %ebx,0x4(%esi)
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
1122aa: 85 d2 test %edx,%edx
1122ac: 74 38 je 1122e6 <_CORE_message_queue_Seize+0x8a><== NEVER TAKEN
the_message_queue->number_of_pending_messages -= 1;
1122ae: ff 48 48 decl 0x48(%eax)
_ISR_Enable( level );
1122b1: ff 75 e0 pushl -0x20(%ebp)
1122b4: 9d popf
*size_p = the_message->Contents.size;
1122b5: 8b 4a 08 mov 0x8(%edx),%ecx
1122b8: 89 0f mov %ecx,(%edi)
_Thread_Executing->Wait.count =
1122ba: 8b 0d 18 b6 12 00 mov 0x12b618,%ecx
1122c0: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
1122c7: 8d 72 0c lea 0xc(%edx),%esi
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
1122ca: 8b 0f mov (%edi),%ecx
1122cc: 8b 7d e4 mov -0x1c(%ebp),%edi
1122cf: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
1122d1: 89 55 0c mov %edx,0xc(%ebp)
1122d4: 83 c0 60 add $0x60,%eax
1122d7: 89 45 08 mov %eax,0x8(%ebp)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
1122da: 83 c4 2c add $0x2c,%esp
1122dd: 5b pop %ebx
1122de: 5e pop %esi
1122df: 5f pop %edi
1122e0: c9 leave
1122e1: e9 52 fe ff ff jmp 112138 <_Chain_Append>
return;
}
#endif
}
if ( !wait ) {
1122e6: 80 7d db 00 cmpb $0x0,-0x25(%ebp)
1122ea: 75 13 jne 1122ff <_CORE_message_queue_Seize+0xa3>
_ISR_Enable( level );
1122ec: ff 75 e0 pushl -0x20(%ebp)
1122ef: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
1122f0: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
1122f7: 83 c4 2c add $0x2c,%esp
1122fa: 5b pop %ebx
1122fb: 5e pop %esi
1122fc: 5f pop %edi
1122fd: c9 leave
1122fe: 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;
1122ff: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
112306: 89 41 44 mov %eax,0x44(%ecx)
executing->Wait.id = id;
112309: 8b 55 dc mov -0x24(%ebp),%edx
11230c: 89 51 20 mov %edx,0x20(%ecx)
executing->Wait.return_argument_second.mutable_object = buffer;
11230f: 8b 55 e4 mov -0x1c(%ebp),%edx
112312: 89 51 2c mov %edx,0x2c(%ecx)
executing->Wait.return_argument = size_p;
112315: 89 79 28 mov %edi,0x28(%ecx)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
112318: ff 75 e0 pushl -0x20(%ebp)
11231b: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
11231c: c7 45 10 00 3f 11 00 movl $0x113f00,0x10(%ebp)
112323: 8b 55 d4 mov -0x2c(%ebp),%edx
112326: 89 55 0c mov %edx,0xc(%ebp)
112329: 89 45 08 mov %eax,0x8(%ebp)
}
11232c: 83 c4 2c add $0x2c,%esp
11232f: 5b pop %ebx
112330: 5e pop %esi
112331: 5f pop %edi
112332: c9 leave
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
112333: e9 f0 18 00 00 jmp 113c28 <_Thread_queue_Enqueue_with_handler>
0010ab59 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10ab59: 55 push %ebp
10ab5a: 89 e5 mov %esp,%ebp
10ab5c: 53 push %ebx
10ab5d: 83 ec 14 sub $0x14,%esp
10ab60: 8b 5d 08 mov 0x8(%ebp),%ebx
10ab63: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10ab66: a1 64 32 12 00 mov 0x123264,%eax
10ab6b: 85 c0 test %eax,%eax
10ab6d: 74 19 je 10ab88 <_CORE_mutex_Seize+0x2f>
10ab6f: 84 d2 test %dl,%dl
10ab71: 74 15 je 10ab88 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN
10ab73: 83 3d e4 33 12 00 01 cmpl $0x1,0x1233e4
10ab7a: 76 0c jbe 10ab88 <_CORE_mutex_Seize+0x2f>
10ab7c: 53 push %ebx
10ab7d: 6a 12 push $0x12
10ab7f: 6a 00 push $0x0
10ab81: 6a 00 push $0x0
10ab83: e8 e4 05 00 00 call 10b16c <_Internal_error_Occurred>
10ab88: 51 push %ecx
10ab89: 51 push %ecx
10ab8a: 8d 45 18 lea 0x18(%ebp),%eax
10ab8d: 50 push %eax
10ab8e: 53 push %ebx
10ab8f: 88 55 f4 mov %dl,-0xc(%ebp)
10ab92: e8 35 3c 00 00 call 10e7cc <_CORE_mutex_Seize_interrupt_trylock>
10ab97: 83 c4 10 add $0x10,%esp
10ab9a: 85 c0 test %eax,%eax
10ab9c: 8a 55 f4 mov -0xc(%ebp),%dl
10ab9f: 74 48 je 10abe9 <_CORE_mutex_Seize+0x90>
10aba1: 84 d2 test %dl,%dl
10aba3: 75 12 jne 10abb7 <_CORE_mutex_Seize+0x5e>
10aba5: ff 75 18 pushl 0x18(%ebp)
10aba8: 9d popf
10aba9: a1 a8 34 12 00 mov 0x1234a8,%eax
10abae: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
10abb5: eb 32 jmp 10abe9 <_CORE_mutex_Seize+0x90>
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10abb7: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
10abbe: a1 a8 34 12 00 mov 0x1234a8,%eax
10abc3: 89 58 44 mov %ebx,0x44(%eax)
10abc6: 8b 55 0c mov 0xc(%ebp),%edx
10abc9: 89 50 20 mov %edx,0x20(%eax)
10abcc: a1 64 32 12 00 mov 0x123264,%eax
10abd1: 40 inc %eax
10abd2: a3 64 32 12 00 mov %eax,0x123264
10abd7: ff 75 18 pushl 0x18(%ebp)
10abda: 9d popf
10abdb: 50 push %eax
10abdc: 50 push %eax
10abdd: ff 75 14 pushl 0x14(%ebp)
10abe0: 53 push %ebx
10abe1: e8 26 ff ff ff call 10ab0c <_CORE_mutex_Seize_interrupt_blocking>
10abe6: 83 c4 10 add $0x10,%esp
}
10abe9: 8b 5d fc mov -0x4(%ebp),%ebx
10abec: c9 leave
10abed: c3 ret
0010e7cc <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
10e7cc: 55 push %ebp
10e7cd: 89 e5 mov %esp,%ebp
10e7cf: 57 push %edi
10e7d0: 56 push %esi
10e7d1: 53 push %ebx
10e7d2: 83 ec 0c sub $0xc,%esp
10e7d5: 8b 55 08 mov 0x8(%ebp),%edx
10e7d8: 8b 5d 0c mov 0xc(%ebp),%ebx
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
10e7db: 8b 0d a8 34 12 00 mov 0x1234a8,%ecx
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
10e7e1: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
10e7e8: 83 7a 50 00 cmpl $0x0,0x50(%edx)
10e7ec: 0f 84 89 00 00 00 je 10e87b <_CORE_mutex_Seize_interrupt_trylock+0xaf>
the_mutex->lock = CORE_MUTEX_LOCKED;
10e7f2: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
the_mutex->holder = executing;
10e7f9: 89 4a 5c mov %ecx,0x5c(%edx)
the_mutex->holder_id = executing->Object.id;
10e7fc: 8b 41 08 mov 0x8(%ecx),%eax
10e7ff: 89 42 60 mov %eax,0x60(%edx)
the_mutex->nest_count = 1;
10e802: c7 42 54 01 00 00 00 movl $0x1,0x54(%edx)
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
10e809: 8b 42 48 mov 0x48(%edx),%eax
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10e80c: 83 f8 02 cmp $0x2,%eax
10e80f: 74 05 je 10e816 <_CORE_mutex_Seize_interrupt_trylock+0x4a>
10e811: 83 f8 03 cmp $0x3,%eax
10e814: 75 0e jne 10e824 <_CORE_mutex_Seize_interrupt_trylock+0x58>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
10e816: 8b 71 1c mov 0x1c(%ecx),%esi
10e819: 8d 7e 01 lea 0x1(%esi),%edi
10e81c: 89 79 1c mov %edi,0x1c(%ecx)
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
10e81f: 83 f8 03 cmp $0x3,%eax
10e822: 74 05 je 10e829 <_CORE_mutex_Seize_interrupt_trylock+0x5d>
_ISR_Enable( *level_p );
10e824: ff 33 pushl (%ebx)
10e826: 9d popf
10e827: eb 7c jmp 10e8a5 <_CORE_mutex_Seize_interrupt_trylock+0xd9>
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
10e829: 8b 42 4c mov 0x4c(%edx),%eax
10e82c: 39 41 14 cmp %eax,0x14(%ecx)
10e82f: 75 05 jne 10e836 <_CORE_mutex_Seize_interrupt_trylock+0x6a>
_ISR_Enable( *level_p );
10e831: ff 33 pushl (%ebx)
10e833: 9d popf
10e834: eb 6f jmp 10e8a5 <_CORE_mutex_Seize_interrupt_trylock+0xd9>
return 0;
}
if ( current > ceiling ) {
10e836: 76 26 jbe 10e85e <_CORE_mutex_Seize_interrupt_trylock+0x92>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10e838: a1 64 32 12 00 mov 0x123264,%eax
10e83d: 40 inc %eax
10e83e: a3 64 32 12 00 mov %eax,0x123264
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
10e843: ff 33 pushl (%ebx)
10e845: 9d popf
_Thread_Change_priority(
10e846: 50 push %eax
10e847: 6a 00 push $0x0
10e849: ff 72 4c pushl 0x4c(%edx)
10e84c: ff 72 5c pushl 0x5c(%edx)
10e84f: e8 f8 d0 ff ff call 10b94c <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
10e854: e8 85 d5 ff ff call 10bdde <_Thread_Enable_dispatch>
10e859: 83 c4 10 add $0x10,%esp
10e85c: eb 47 jmp 10e8a5 <_CORE_mutex_Seize_interrupt_trylock+0xd9>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
10e85e: c7 41 34 06 00 00 00 movl $0x6,0x34(%ecx)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10e865: c7 42 50 01 00 00 00 movl $0x1,0x50(%edx)
the_mutex->nest_count = 0; /* undo locking above */
10e86c: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx)
executing->resource_count--; /* undo locking above */
10e873: 89 71 1c mov %esi,0x1c(%ecx)
_ISR_Enable( *level_p );
10e876: ff 33 pushl (%ebx)
10e878: 9d popf
10e879: eb 2a jmp 10e8a5 <_CORE_mutex_Seize_interrupt_trylock+0xd9>
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
10e87b: 8b 72 5c mov 0x5c(%edx),%esi
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
10e87e: b8 01 00 00 00 mov $0x1,%eax
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
10e883: 39 ce cmp %ecx,%esi
10e885: 75 20 jne 10e8a7 <_CORE_mutex_Seize_interrupt_trylock+0xdb>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
10e887: 8b 4a 40 mov 0x40(%edx),%ecx
10e88a: 85 c9 test %ecx,%ecx
10e88c: 74 05 je 10e893 <_CORE_mutex_Seize_interrupt_trylock+0xc7>
10e88e: 49 dec %ecx
10e88f: 75 16 jne 10e8a7 <_CORE_mutex_Seize_interrupt_trylock+0xdb><== ALWAYS TAKEN
10e891: eb 08 jmp 10e89b <_CORE_mutex_Seize_interrupt_trylock+0xcf><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
10e893: ff 42 54 incl 0x54(%edx)
_ISR_Enable( *level_p );
10e896: ff 33 pushl (%ebx)
10e898: 9d popf
10e899: eb 0a jmp 10e8a5 <_CORE_mutex_Seize_interrupt_trylock+0xd9>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
10e89b: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) <== NOT EXECUTED
_ISR_Enable( *level_p );
10e8a2: ff 33 pushl (%ebx) <== NOT EXECUTED
10e8a4: 9d popf <== NOT EXECUTED
return 0;
10e8a5: 31 c0 xor %eax,%eax
10e8a7: 8d 65 f4 lea -0xc(%ebp),%esp
10e8aa: 5b pop %ebx
10e8ab: 5e pop %esi
10e8ac: 5f pop %edi
10e8ad: c9 leave
10e8ae: c3 ret
0010ad14 <_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
)
{
10ad14: 55 push %ebp
10ad15: 89 e5 mov %esp,%ebp
10ad17: 53 push %ebx
10ad18: 83 ec 10 sub $0x10,%esp
10ad1b: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10ad1e: 53 push %ebx
10ad1f: e8 14 14 00 00 call 10c138 <_Thread_queue_Dequeue>
10ad24: 89 c2 mov %eax,%edx
10ad26: 83 c4 10 add $0x10,%esp
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10ad29: 31 c0 xor %eax,%eax
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10ad2b: 85 d2 test %edx,%edx
10ad2d: 75 15 jne 10ad44 <_CORE_semaphore_Surrender+0x30>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10ad2f: 9c pushf
10ad30: fa cli
10ad31: 59 pop %ecx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10ad32: 8b 53 48 mov 0x48(%ebx),%edx
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10ad35: b0 04 mov $0x4,%al
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10ad37: 3b 53 40 cmp 0x40(%ebx),%edx
10ad3a: 73 06 jae 10ad42 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN
the_semaphore->count += 1;
10ad3c: 42 inc %edx
10ad3d: 89 53 48 mov %edx,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10ad40: 30 c0 xor %al,%al
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
10ad42: 51 push %ecx
10ad43: 9d popf
}
return status;
}
10ad44: 8b 5d fc mov -0x4(%ebp),%ebx
10ad47: c9 leave
10ad48: c3 ret
0010aed0 <_Chain_Get_with_empty_check>:
bool _Chain_Get_with_empty_check(
Chain_Control *chain,
Chain_Node **node
)
{
10aed0: 55 push %ebp
10aed1: 89 e5 mov %esp,%ebp
10aed3: 57 push %edi
10aed4: 56 push %esi
10aed5: 53 push %ebx
10aed6: 8b 45 08 mov 0x8(%ebp),%eax
10aed9: 8b 5d 0c mov 0xc(%ebp),%ebx
ISR_Level level;
bool is_empty_now;
_ISR_Disable( level );
10aedc: 9c pushf
10aedd: fa cli
10aede: 5e pop %esi
Chain_Control *the_chain,
Chain_Node **the_node
)
{
bool is_empty_now = true;
Chain_Node *first = the_chain->first;
10aedf: 8b 08 mov (%eax),%ecx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10aee1: 8d 78 04 lea 0x4(%eax),%edi
)
{
bool is_empty_now = true;
Chain_Node *first = the_chain->first;
if ( first != _Chain_Tail( the_chain ) ) {
10aee4: 39 f9 cmp %edi,%ecx
10aee6: 74 10 je 10aef8 <_Chain_Get_with_empty_check+0x28><== NEVER TAKEN
Chain_Node *new_first = first->next;
10aee8: 8b 11 mov (%ecx),%edx
the_chain->first = new_first;
10aeea: 89 10 mov %edx,(%eax)
new_first->previous = _Chain_Head( the_chain );
10aeec: 89 42 04 mov %eax,0x4(%edx)
*the_node = first;
10aeef: 89 0b mov %ecx,(%ebx)
is_empty_now = new_first == _Chain_Tail( the_chain );
10aef1: 39 fa cmp %edi,%edx
10aef3: 0f 94 c0 sete %al
10aef6: eb 08 jmp 10af00 <_Chain_Get_with_empty_check+0x30>
} else
*the_node = NULL;
10aef8: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected(
Chain_Control *the_chain,
Chain_Node **the_node
)
{
bool is_empty_now = true;
10aefe: b0 01 mov $0x1,%al <== NOT EXECUTED
is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node );
_ISR_Enable( level );
10af00: 56 push %esi
10af01: 9d popf
return is_empty_now;
}
10af02: 5b pop %ebx
10af03: 5e pop %esi
10af04: 5f pop %edi
10af05: c9 leave
10af06: c3 ret
00109d38 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
109d38: 55 push %ebp
109d39: 89 e5 mov %esp,%ebp
109d3b: 57 push %edi
109d3c: 56 push %esi
109d3d: 53 push %ebx
109d3e: 83 ec 2c sub $0x2c,%esp
109d41: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
109d44: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi
option_set = (rtems_option) the_thread->Wait.option;
109d4a: 8b 43 30 mov 0x30(%ebx),%eax
109d4d: 89 45 e0 mov %eax,-0x20(%ebp)
_ISR_Disable( level );
109d50: 9c pushf
109d51: fa cli
109d52: 58 pop %eax
pending_events = api->pending_events;
109d53: 8b 17 mov (%edi),%edx
109d55: 89 55 d4 mov %edx,-0x2c(%ebp)
event_condition = (rtems_event_set) the_thread->Wait.count;
109d58: 8b 73 24 mov 0x24(%ebx),%esi
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
109d5b: 21 f2 and %esi,%edx
109d5d: 75 07 jne 109d66 <_Event_Surrender+0x2e>
_ISR_Enable( level );
109d5f: 50 push %eax
109d60: 9d popf
return;
109d61: e9 af 00 00 00 jmp 109e15 <_Event_Surrender+0xdd>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
109d66: 83 3d a4 34 12 00 00 cmpl $0x0,0x1234a4
109d6d: 74 49 je 109db8 <_Event_Surrender+0x80>
109d6f: 3b 1d a8 34 12 00 cmp 0x1234a8,%ebx
109d75: 75 41 jne 109db8 <_Event_Surrender+0x80>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
109d77: 8b 0d b8 34 12 00 mov 0x1234b8,%ecx
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
109d7d: 83 f9 02 cmp $0x2,%ecx
109d80: 74 09 je 109d8b <_Event_Surrender+0x53> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
109d82: 8b 0d b8 34 12 00 mov 0x1234b8,%ecx
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
109d88: 49 dec %ecx
109d89: 75 2d jne 109db8 <_Event_Surrender+0x80>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
109d8b: 39 f2 cmp %esi,%edx
109d8d: 74 06 je 109d95 <_Event_Surrender+0x5d>
109d8f: f6 45 e0 02 testb $0x2,-0x20(%ebp)
109d93: 74 1f je 109db4 <_Event_Surrender+0x7c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
109d95: 89 d6 mov %edx,%esi
109d97: f7 d6 not %esi
109d99: 23 75 d4 and -0x2c(%ebp),%esi
109d9c: 89 37 mov %esi,(%edi)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
109d9e: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109da5: 8b 4b 28 mov 0x28(%ebx),%ecx
109da8: 89 11 mov %edx,(%ecx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
109daa: c7 05 b8 34 12 00 03 movl $0x3,0x1234b8
109db1: 00 00 00
}
_ISR_Enable( level );
109db4: 50 push %eax
109db5: 9d popf
return;
109db6: eb 5d jmp 109e15 <_Event_Surrender+0xdd>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
109db8: f6 43 11 01 testb $0x1,0x11(%ebx)
109dbc: 74 55 je 109e13 <_Event_Surrender+0xdb>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
109dbe: 39 f2 cmp %esi,%edx
109dc0: 74 06 je 109dc8 <_Event_Surrender+0x90>
109dc2: f6 45 e0 02 testb $0x2,-0x20(%ebp)
109dc6: 74 4b je 109e13 <_Event_Surrender+0xdb> <== NEVER TAKEN
109dc8: 89 d6 mov %edx,%esi
109dca: f7 d6 not %esi
109dcc: 23 75 d4 and -0x2c(%ebp),%esi
109dcf: 89 37 mov %esi,(%edi)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
109dd1: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109dd8: 8b 4b 28 mov 0x28(%ebx),%ecx
109ddb: 89 11 mov %edx,(%ecx)
_ISR_Flash( level );
109ddd: 50 push %eax
109dde: 9d popf
109ddf: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
109de0: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
109de4: 74 06 je 109dec <_Event_Surrender+0xb4>
_ISR_Enable( level );
109de6: 50 push %eax
109de7: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
109de8: 51 push %ecx
109de9: 51 push %ecx
109dea: eb 17 jmp 109e03 <_Event_Surrender+0xcb>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
109dec: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
109df3: 50 push %eax
109df4: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
109df5: 83 ec 0c sub $0xc,%esp
109df8: 8d 43 48 lea 0x48(%ebx),%eax
109dfb: 50 push %eax
109dfc: e8 6f 2e 00 00 call 10cc70 <_Watchdog_Remove>
109e01: 58 pop %eax
109e02: 5a pop %edx
109e03: 68 f8 ff 03 10 push $0x1003fff8
109e08: 53 push %ebx
109e09: e8 5e 1c 00 00 call 10ba6c <_Thread_Clear_state>
109e0e: 83 c4 10 add $0x10,%esp
109e11: eb 02 jmp 109e15 <_Event_Surrender+0xdd>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
109e13: 50 push %eax
109e14: 9d popf
}
109e15: 8d 65 f4 lea -0xc(%ebp),%esp
109e18: 5b pop %ebx
109e19: 5e pop %esi
109e1a: 5f pop %edi
109e1b: c9 leave
109e1c: c3 ret
00109e20 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
109e20: 55 push %ebp
109e21: 89 e5 mov %esp,%ebp
109e23: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
109e26: 8d 45 f4 lea -0xc(%ebp),%eax
109e29: 50 push %eax
109e2a: ff 75 08 pushl 0x8(%ebp)
109e2d: e8 ce 1f 00 00 call 10be00 <_Thread_Get>
switch ( location ) {
109e32: 83 c4 10 add $0x10,%esp
109e35: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
109e39: 75 49 jne 109e84 <_Event_Timeout+0x64> <== NEVER TAKEN
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
109e3b: 9c pushf
109e3c: fa cli
109e3d: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
109e3e: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
109e45: 3b 05 a8 34 12 00 cmp 0x1234a8,%eax
109e4b: 75 13 jne 109e60 <_Event_Timeout+0x40>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
109e4d: 8b 0d b8 34 12 00 mov 0x1234b8,%ecx
109e53: 49 dec %ecx
109e54: 75 0a jne 109e60 <_Event_Timeout+0x40>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
109e56: c7 05 b8 34 12 00 02 movl $0x2,0x1234b8
109e5d: 00 00 00
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
109e60: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
109e67: 52 push %edx
109e68: 9d popf
109e69: 52 push %edx
109e6a: 52 push %edx
109e6b: 68 f8 ff 03 10 push $0x1003fff8
109e70: 50 push %eax
109e71: e8 f6 1b 00 00 call 10ba6c <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
109e76: a1 64 32 12 00 mov 0x123264,%eax
109e7b: 48 dec %eax
109e7c: a3 64 32 12 00 mov %eax,0x123264
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
109e81: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
109e84: c9 leave
109e85: c3 ret
0010ee1b <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
10ee1b: 55 push %ebp
10ee1c: 89 e5 mov %esp,%ebp
10ee1e: 57 push %edi
10ee1f: 56 push %esi
10ee20: 53 push %ebx
10ee21: 83 ec 4c sub $0x4c,%esp
10ee24: 8b 5d 08 mov 0x8(%ebp),%ebx
10ee27: 8b 4d 10 mov 0x10(%ebp),%ecx
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
10ee2a: 8b 43 20 mov 0x20(%ebx),%eax
10ee2d: 89 45 c0 mov %eax,-0x40(%ebp)
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
10ee30: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
Heap_Block *extend_last_block = NULL;
10ee37: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
uintptr_t const page_size = heap->page_size;
10ee3e: 8b 53 10 mov 0x10(%ebx),%edx
10ee41: 89 55 c4 mov %edx,-0x3c(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10ee44: 8b 43 14 mov 0x14(%ebx),%eax
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
10ee47: 8b 7b 30 mov 0x30(%ebx),%edi
10ee4a: 89 7d bc mov %edi,-0x44(%ebp)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
return false;
10ee4d: 31 f6 xor %esi,%esi
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
10ee4f: 8b 7d 0c mov 0xc(%ebp),%edi
10ee52: 01 cf add %ecx,%edi
10ee54: 0f 82 d4 01 00 00 jb 10f02e <_Heap_Extend+0x213> <== NEVER TAKEN
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
10ee5a: 52 push %edx
10ee5b: 52 push %edx
10ee5c: 8d 55 e0 lea -0x20(%ebp),%edx
10ee5f: 52 push %edx
10ee60: 8d 55 e4 lea -0x1c(%ebp),%edx
10ee63: 52 push %edx
10ee64: 50 push %eax
10ee65: ff 75 c4 pushl -0x3c(%ebp)
10ee68: 51 push %ecx
10ee69: ff 75 0c pushl 0xc(%ebp)
10ee6c: e8 1e c4 ff ff call 10b28f <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
10ee71: 83 c4 20 add $0x20,%esp
10ee74: 84 c0 test %al,%al
10ee76: 0f 84 b2 01 00 00 je 10f02e <_Heap_Extend+0x213>
10ee7c: 8b 4d c0 mov -0x40(%ebp),%ecx
10ee7f: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
10ee86: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
10ee8d: 31 f6 xor %esi,%esi
10ee8f: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
10ee96: 8b 43 18 mov 0x18(%ebx),%eax
10ee99: 89 5d b8 mov %ebx,-0x48(%ebp)
10ee9c: eb 02 jmp 10eea0 <_Heap_Extend+0x85>
10ee9e: 89 c8 mov %ecx,%eax
uintptr_t const sub_area_end = start_block->prev_size;
10eea0: 8b 19 mov (%ecx),%ebx
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
10eea2: 39 c7 cmp %eax,%edi
10eea4: 76 09 jbe 10eeaf <_Heap_Extend+0x94>
10eea6: 39 5d 0c cmp %ebx,0xc(%ebp)
10eea9: 0f 82 7d 01 00 00 jb 10f02c <_Heap_Extend+0x211>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10eeaf: 39 c7 cmp %eax,%edi
10eeb1: 74 06 je 10eeb9 <_Heap_Extend+0x9e>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10eeb3: 39 df cmp %ebx,%edi
10eeb5: 72 07 jb 10eebe <_Heap_Extend+0xa3>
10eeb7: eb 08 jmp 10eec1 <_Heap_Extend+0xa6>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10eeb9: 89 4d d0 mov %ecx,-0x30(%ebp)
10eebc: eb 03 jmp 10eec1 <_Heap_Extend+0xa6>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10eebe: 89 4d c8 mov %ecx,-0x38(%ebp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10eec1: 8d 43 f8 lea -0x8(%ebx),%eax
10eec4: 89 45 d4 mov %eax,-0x2c(%ebp)
10eec7: 89 d8 mov %ebx,%eax
10eec9: 31 d2 xor %edx,%edx
10eecb: f7 75 c4 divl -0x3c(%ebp)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10eece: 29 55 d4 sub %edx,-0x2c(%ebp)
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
10eed1: 3b 5d 0c cmp 0xc(%ebp),%ebx
10eed4: 75 07 jne 10eedd <_Heap_Extend+0xc2>
start_block->prev_size = extend_area_end;
10eed6: 89 39 mov %edi,(%ecx)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
10eed8: 8b 75 d4 mov -0x2c(%ebp),%esi
10eedb: eb 08 jmp 10eee5 <_Heap_Extend+0xca>
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
10eedd: 73 06 jae 10eee5 <_Heap_Extend+0xca>
10eedf: 8b 55 d4 mov -0x2c(%ebp),%edx
10eee2: 89 55 cc mov %edx,-0x34(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10eee5: 8b 45 d4 mov -0x2c(%ebp),%eax
10eee8: 8b 48 04 mov 0x4(%eax),%ecx
10eeeb: 83 e1 fe and $0xfffffffe,%ecx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10eeee: 01 c1 add %eax,%ecx
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
10eef0: 3b 4d c0 cmp -0x40(%ebp),%ecx
10eef3: 75 a9 jne 10ee9e <_Heap_Extend+0x83>
10eef5: 8b 5d b8 mov -0x48(%ebp),%ebx
if ( extend_area_begin < heap->area_begin ) {
10eef8: 8b 55 0c mov 0xc(%ebp),%edx
10eefb: 3b 53 18 cmp 0x18(%ebx),%edx
10eefe: 73 05 jae 10ef05 <_Heap_Extend+0xea>
heap->area_begin = extend_area_begin;
10ef00: 89 53 18 mov %edx,0x18(%ebx)
10ef03: eb 08 jmp 10ef0d <_Heap_Extend+0xf2>
} else if ( heap->area_end < extend_area_end ) {
10ef05: 39 7b 1c cmp %edi,0x1c(%ebx)
10ef08: 73 03 jae 10ef0d <_Heap_Extend+0xf2>
heap->area_end = extend_area_end;
10ef0a: 89 7b 1c mov %edi,0x1c(%ebx)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
10ef0d: 8b 45 e0 mov -0x20(%ebp),%eax
10ef10: 8b 55 e4 mov -0x1c(%ebp),%edx
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
10ef13: 89 c1 mov %eax,%ecx
10ef15: 29 d1 sub %edx,%ecx
10ef17: 89 4d d4 mov %ecx,-0x2c(%ebp)
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
10ef1a: 89 3a mov %edi,(%edx)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
10ef1c: 83 c9 01 or $0x1,%ecx
10ef1f: 89 4a 04 mov %ecx,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
10ef22: 8b 4d d4 mov -0x2c(%ebp),%ecx
10ef25: 89 08 mov %ecx,(%eax)
extend_last_block->size_and_flag = 0;
10ef27: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
10ef2e: 39 53 20 cmp %edx,0x20(%ebx)
10ef31: 76 05 jbe 10ef38 <_Heap_Extend+0x11d>
heap->first_block = extend_first_block;
10ef33: 89 53 20 mov %edx,0x20(%ebx)
10ef36: eb 08 jmp 10ef40 <_Heap_Extend+0x125>
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
10ef38: 39 43 24 cmp %eax,0x24(%ebx)
10ef3b: 73 03 jae 10ef40 <_Heap_Extend+0x125>
heap->last_block = extend_last_block;
10ef3d: 89 43 24 mov %eax,0x24(%ebx)
}
if ( merge_below_block != NULL ) {
10ef40: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
10ef44: 74 3b je 10ef81 <_Heap_Extend+0x166>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
10ef46: 8b 43 10 mov 0x10(%ebx),%eax
10ef49: 89 45 d4 mov %eax,-0x2c(%ebp)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
10ef4c: 8b 4d 0c mov 0xc(%ebp),%ecx
10ef4f: 83 c1 08 add $0x8,%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
10ef52: 89 c8 mov %ecx,%eax
10ef54: 31 d2 xor %edx,%edx
10ef56: f7 75 d4 divl -0x2c(%ebp)
if ( remainder != 0 ) {
10ef59: 85 d2 test %edx,%edx
10ef5b: 74 05 je 10ef62 <_Heap_Extend+0x147> <== ALWAYS TAKEN
return value - remainder + alignment;
10ef5d: 03 4d d4 add -0x2c(%ebp),%ecx <== NOT EXECUTED
10ef60: 29 d1 sub %edx,%ecx <== NOT EXECUTED
uintptr_t const new_first_block_begin =
10ef62: 8d 51 f8 lea -0x8(%ecx),%edx
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
10ef65: 8b 45 d0 mov -0x30(%ebp),%eax
10ef68: 8b 00 mov (%eax),%eax
10ef6a: 89 41 f8 mov %eax,-0x8(%ecx)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
10ef6d: 8b 45 d0 mov -0x30(%ebp),%eax
10ef70: 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;
10ef72: 83 c8 01 or $0x1,%eax
10ef75: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
10ef78: 89 d8 mov %ebx,%eax
10ef7a: e8 81 fe ff ff call 10ee00 <_Heap_Free_block>
10ef7f: eb 14 jmp 10ef95 <_Heap_Extend+0x17a>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
10ef81: 83 7d c8 00 cmpl $0x0,-0x38(%ebp)
10ef85: 74 0e je 10ef95 <_Heap_Extend+0x17a>
_Heap_Link_below(
10ef87: 8b 55 e0 mov -0x20(%ebp),%edx
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
10ef8a: 8b 45 c8 mov -0x38(%ebp),%eax
10ef8d: 29 d0 sub %edx,%eax
10ef8f: 83 c8 01 or $0x1,%eax
10ef92: 89 42 04 mov %eax,0x4(%edx)
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
10ef95: 85 f6 test %esi,%esi
10ef97: 74 30 je 10efc9 <_Heap_Extend+0x1ae>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
10ef99: 83 ef 08 sub $0x8,%edi
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
10ef9c: 29 f7 sub %esi,%edi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10ef9e: 89 f8 mov %edi,%eax
10efa0: 31 d2 xor %edx,%edx
10efa2: f7 73 10 divl 0x10(%ebx)
10efa5: 29 d7 sub %edx,%edi
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
10efa7: 8b 46 04 mov 0x4(%esi),%eax
10efaa: 29 f8 sub %edi,%eax
| HEAP_PREV_BLOCK_USED;
10efac: 83 c8 01 or $0x1,%eax
10efaf: 89 44 37 04 mov %eax,0x4(%edi,%esi,1)
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10efb3: 8b 46 04 mov 0x4(%esi),%eax
10efb6: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
10efb9: 09 f8 or %edi,%eax
10efbb: 89 46 04 mov %eax,0x4(%esi)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
10efbe: 89 f2 mov %esi,%edx
10efc0: 89 d8 mov %ebx,%eax
10efc2: e8 39 fe ff ff call 10ee00 <_Heap_Free_block>
10efc7: eb 21 jmp 10efea <_Heap_Extend+0x1cf>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
10efc9: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10efcd: 74 1b je 10efea <_Heap_Extend+0x1cf>
_Heap_Link_above(
10efcf: 8b 4d e0 mov -0x20(%ebp),%ecx
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
10efd2: 8b 45 e4 mov -0x1c(%ebp),%eax
10efd5: 2b 45 cc sub -0x34(%ebp),%eax
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10efd8: 8b 7d cc mov -0x34(%ebp),%edi
10efdb: 8b 57 04 mov 0x4(%edi),%edx
10efde: 83 e2 01 and $0x1,%edx
block->size_and_flag = size | flag;
10efe1: 09 d0 or %edx,%eax
10efe3: 89 47 04 mov %eax,0x4(%edi)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
10efe6: 83 49 04 01 orl $0x1,0x4(%ecx)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
10efea: 85 f6 test %esi,%esi
10efec: 75 10 jne 10effe <_Heap_Extend+0x1e3>
10efee: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
10eff2: 75 0a jne 10effe <_Heap_Extend+0x1e3>
_Heap_Free_block( heap, extend_first_block );
10eff4: 8b 55 e4 mov -0x1c(%ebp),%edx
10eff7: 89 d8 mov %ebx,%eax
10eff9: e8 02 fe ff ff call 10ee00 <_Heap_Free_block>
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
10effe: 8b 53 24 mov 0x24(%ebx),%edx
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
10f001: 8b 43 20 mov 0x20(%ebx),%eax
10f004: 29 d0 sub %edx,%eax
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10f006: 8b 4a 04 mov 0x4(%edx),%ecx
10f009: 83 e1 01 and $0x1,%ecx
block->size_and_flag = size | flag;
10f00c: 09 c8 or %ecx,%eax
10f00e: 89 42 04 mov %eax,0x4(%edx)
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
10f011: 8b 43 30 mov 0x30(%ebx),%eax
10f014: 2b 45 bc sub -0x44(%ebp),%eax
/* Statistics */
stats->size += extended_size;
10f017: 01 43 2c add %eax,0x2c(%ebx)
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
10f01a: be 01 00 00 00 mov $0x1,%esi
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
10f01f: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10f023: 74 09 je 10f02e <_Heap_Extend+0x213> <== NEVER TAKEN
*extended_size_ptr = extended_size;
10f025: 8b 55 14 mov 0x14(%ebp),%edx
10f028: 89 02 mov %eax,(%edx)
10f02a: eb 02 jmp 10f02e <_Heap_Extend+0x213>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
10f02c: 31 f6 xor %esi,%esi
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
10f02e: 89 f0 mov %esi,%eax
10f030: 8d 65 f4 lea -0xc(%ebp),%esp
10f033: 5b pop %ebx
10f034: 5e pop %esi
10f035: 5f pop %edi
10f036: c9 leave
10f037: c3 ret
0010ea70 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
10ea70: 55 push %ebp
10ea71: 89 e5 mov %esp,%ebp
10ea73: 57 push %edi
10ea74: 56 push %esi
10ea75: 53 push %ebx
10ea76: 83 ec 14 sub $0x14,%esp
10ea79: 8b 4d 08 mov 0x8(%ebp),%ecx
10ea7c: 8b 45 0c mov 0xc(%ebp),%eax
10ea7f: 8d 58 f8 lea -0x8(%eax),%ebx
10ea82: 31 d2 xor %edx,%edx
10ea84: f7 71 10 divl 0x10(%ecx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10ea87: 29 d3 sub %edx,%ebx
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
10ea89: 8b 41 20 mov 0x20(%ecx),%eax
10ea8c: 89 45 ec mov %eax,-0x14(%ebp)
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10ea8f: 31 d2 xor %edx,%edx
10ea91: 39 c3 cmp %eax,%ebx
10ea93: 72 08 jb 10ea9d <_Heap_Free+0x2d>
10ea95: 31 d2 xor %edx,%edx
10ea97: 39 59 24 cmp %ebx,0x24(%ecx)
10ea9a: 0f 93 c2 setae %dl
bool next_is_free = false;
_Heap_Protection_block_check( heap, block );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10ea9d: 31 c0 xor %eax,%eax
uintptr_t next_block_size = 0;
bool next_is_free = false;
_Heap_Protection_block_check( heap, block );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
10ea9f: 85 d2 test %edx,%edx
10eaa1: 0f 84 21 01 00 00 je 10ebc8 <_Heap_Free+0x158>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10eaa7: 8b 43 04 mov 0x4(%ebx),%eax
10eaaa: 89 45 f0 mov %eax,-0x10(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10eaad: 89 c6 mov %eax,%esi
10eaaf: 83 e6 fe and $0xfffffffe,%esi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10eab2: 8d 14 33 lea (%ebx,%esi,1),%edx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10eab5: 31 ff xor %edi,%edi
10eab7: 3b 55 ec cmp -0x14(%ebp),%edx
10eaba: 72 0a jb 10eac6 <_Heap_Free+0x56> <== NEVER TAKEN
10eabc: 31 c0 xor %eax,%eax
10eabe: 39 51 24 cmp %edx,0x24(%ecx)
10eac1: 0f 93 c0 setae %al
10eac4: 89 c7 mov %eax,%edi
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
10eac6: 31 c0 xor %eax,%eax
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10eac8: 85 ff test %edi,%edi
10eaca: 0f 84 f8 00 00 00 je 10ebc8 <_Heap_Free+0x158> <== NEVER TAKEN
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10ead0: 8b 7a 04 mov 0x4(%edx),%edi
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10ead3: f7 c7 01 00 00 00 test $0x1,%edi
10ead9: 0f 84 e9 00 00 00 je 10ebc8 <_Heap_Free+0x158> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10eadf: 83 e7 fe and $0xfffffffe,%edi
10eae2: 89 7d e8 mov %edi,-0x18(%ebp)
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10eae5: 8b 41 24 mov 0x24(%ecx),%eax
10eae8: 89 45 e4 mov %eax,-0x1c(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
10eaeb: 31 c0 xor %eax,%eax
10eaed: 3b 55 e4 cmp -0x1c(%ebp),%edx
10eaf0: 74 0a je 10eafc <_Heap_Free+0x8c>
10eaf2: 31 c0 xor %eax,%eax
10eaf4: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1)
10eaf9: 0f 94 c0 sete %al
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10eafc: 88 45 e3 mov %al,-0x1d(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
10eaff: f6 45 f0 01 testb $0x1,-0x10(%ebp)
10eb03: 75 62 jne 10eb67 <_Heap_Free+0xf7>
uintptr_t const prev_size = block->prev_size;
10eb05: 8b 03 mov (%ebx),%eax
10eb07: 89 45 f0 mov %eax,-0x10(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10eb0a: 29 c3 sub %eax,%ebx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10eb0c: 31 ff xor %edi,%edi
10eb0e: 3b 5d ec cmp -0x14(%ebp),%ebx
10eb11: 72 0a jb 10eb1d <_Heap_Free+0xad> <== NEVER TAKEN
10eb13: 31 c0 xor %eax,%eax
10eb15: 39 5d e4 cmp %ebx,-0x1c(%ebp)
10eb18: 0f 93 c0 setae %al
10eb1b: 89 c7 mov %eax,%edi
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
_HAssert( false );
return( false );
10eb1d: 31 c0 xor %eax,%eax
if ( !_Heap_Is_prev_used( block ) ) {
uintptr_t const prev_size = block->prev_size;
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
10eb1f: 85 ff test %edi,%edi
10eb21: 0f 84 a1 00 00 00 je 10ebc8 <_Heap_Free+0x158> <== NEVER TAKEN
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
10eb27: f6 43 04 01 testb $0x1,0x4(%ebx)
10eb2b: 0f 84 97 00 00 00 je 10ebc8 <_Heap_Free+0x158> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
10eb31: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
10eb35: 74 1a je 10eb51 <_Heap_Free+0xe1>
uintptr_t const size = block_size + prev_size + next_block_size;
10eb37: 8b 45 e8 mov -0x18(%ebp),%eax
10eb3a: 8d 04 06 lea (%esi,%eax,1),%eax
10eb3d: 03 45 f0 add -0x10(%ebp),%eax
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
10eb40: 8b 7a 08 mov 0x8(%edx),%edi
Heap_Block *prev = block->prev;
10eb43: 8b 52 0c mov 0xc(%edx),%edx
prev->next = next;
10eb46: 89 7a 08 mov %edi,0x8(%edx)
next->prev = prev;
10eb49: 89 57 0c mov %edx,0xc(%edi)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
10eb4c: ff 49 38 decl 0x38(%ecx)
10eb4f: eb 33 jmp 10eb84 <_Heap_Free+0x114>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
10eb51: 8b 45 f0 mov -0x10(%ebp),%eax
10eb54: 8d 04 06 lea (%esi,%eax,1),%eax
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10eb57: 89 c7 mov %eax,%edi
10eb59: 83 cf 01 or $0x1,%edi
10eb5c: 89 7b 04 mov %edi,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10eb5f: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
10eb63: 89 02 mov %eax,(%edx)
10eb65: eb 56 jmp 10ebbd <_Heap_Free+0x14d>
}
} else if ( next_is_free ) { /* coalesce next */
10eb67: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
10eb6b: 74 24 je 10eb91 <_Heap_Free+0x121>
uintptr_t const size = block_size + next_block_size;
10eb6d: 8b 45 e8 mov -0x18(%ebp),%eax
10eb70: 01 f0 add %esi,%eax
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
10eb72: 8b 7a 08 mov 0x8(%edx),%edi
Heap_Block *prev = old_block->prev;
10eb75: 8b 52 0c mov 0xc(%edx),%edx
new_block->next = next;
10eb78: 89 7b 08 mov %edi,0x8(%ebx)
new_block->prev = prev;
10eb7b: 89 53 0c mov %edx,0xc(%ebx)
next->prev = new_block;
10eb7e: 89 5f 0c mov %ebx,0xc(%edi)
prev->next = new_block;
10eb81: 89 5a 08 mov %ebx,0x8(%edx)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10eb84: 89 c2 mov %eax,%edx
10eb86: 83 ca 01 or $0x1,%edx
10eb89: 89 53 04 mov %edx,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
10eb8c: 89 04 03 mov %eax,(%ebx,%eax,1)
10eb8f: eb 2c jmp 10ebbd <_Heap_Free+0x14d>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10eb91: 8b 41 08 mov 0x8(%ecx),%eax
new_block->next = next;
10eb94: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = block_before;
10eb97: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
10eb9a: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
10eb9d: 89 58 0c mov %ebx,0xc(%eax)
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
10eba0: 89 f0 mov %esi,%eax
10eba2: 83 c8 01 or $0x1,%eax
10eba5: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10eba8: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
10ebac: 89 32 mov %esi,(%edx)
/* Statistics */
++stats->free_blocks;
10ebae: 8b 41 38 mov 0x38(%ecx),%eax
10ebb1: 40 inc %eax
10ebb2: 89 41 38 mov %eax,0x38(%ecx)
if ( stats->max_free_blocks < stats->free_blocks ) {
10ebb5: 39 41 3c cmp %eax,0x3c(%ecx)
10ebb8: 73 03 jae 10ebbd <_Heap_Free+0x14d>
stats->max_free_blocks = stats->free_blocks;
10ebba: 89 41 3c mov %eax,0x3c(%ecx)
}
}
/* Statistics */
--stats->used_blocks;
10ebbd: ff 49 40 decl 0x40(%ecx)
++stats->frees;
10ebc0: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
10ebc3: 01 71 30 add %esi,0x30(%ecx)
return( true );
10ebc6: b0 01 mov $0x1,%al
}
10ebc8: 83 c4 14 add $0x14,%esp
10ebcb: 5b pop %ebx
10ebcc: 5e pop %esi
10ebcd: 5f pop %edi
10ebce: c9 leave
10ebcf: c3 ret
0011bc90 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
11bc90: 55 push %ebp
11bc91: 89 e5 mov %esp,%ebp
11bc93: 57 push %edi
11bc94: 56 push %esi
11bc95: 53 push %ebx
11bc96: 8b 5d 08 mov 0x8(%ebp),%ebx
11bc99: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
11bc9c: 8d 4e f8 lea -0x8(%esi),%ecx
11bc9f: 89 f0 mov %esi,%eax
11bca1: 31 d2 xor %edx,%edx
11bca3: 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);
11bca6: 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
11bca8: 8b 53 20 mov 0x20(%ebx),%edx
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11bcab: 31 ff xor %edi,%edi
11bcad: 39 d1 cmp %edx,%ecx
11bcaf: 72 0a jb 11bcbb <_Heap_Size_of_alloc_area+0x2b>
11bcb1: 31 c0 xor %eax,%eax
11bcb3: 39 4b 24 cmp %ecx,0x24(%ebx)
11bcb6: 0f 93 c0 setae %al
11bcb9: 89 c7 mov %eax,%edi
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
11bcbb: 31 c0 xor %eax,%eax
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
11bcbd: 85 ff test %edi,%edi
11bcbf: 74 30 je 11bcf1 <_Heap_Size_of_alloc_area+0x61>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
11bcc1: 8b 41 04 mov 0x4(%ecx),%eax
11bcc4: 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);
11bcc7: 01 c1 add %eax,%ecx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11bcc9: 31 ff xor %edi,%edi
11bccb: 39 d1 cmp %edx,%ecx
11bccd: 72 0a jb 11bcd9 <_Heap_Size_of_alloc_area+0x49><== NEVER TAKEN
11bccf: 31 c0 xor %eax,%eax
11bcd1: 39 4b 24 cmp %ecx,0x24(%ebx)
11bcd4: 0f 93 c0 setae %al
11bcd7: 89 c7 mov %eax,%edi
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
11bcd9: 31 c0 xor %eax,%eax
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
11bcdb: 85 ff test %edi,%edi
11bcdd: 74 12 je 11bcf1 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
11bcdf: f6 41 04 01 testb $0x1,0x4(%ecx)
11bce3: 74 0c je 11bcf1 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
11bce5: 29 f1 sub %esi,%ecx
11bce7: 8d 51 04 lea 0x4(%ecx),%edx
11bcea: 8b 45 10 mov 0x10(%ebp),%eax
11bced: 89 10 mov %edx,(%eax)
return true;
11bcef: b0 01 mov $0x1,%al
}
11bcf1: 5b pop %ebx
11bcf2: 5e pop %esi
11bcf3: 5f pop %edi
11bcf4: c9 leave
11bcf5: c3 ret
0010bb4a <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10bb4a: 55 push %ebp
10bb4b: 89 e5 mov %esp,%ebp
10bb4d: 57 push %edi
10bb4e: 56 push %esi
10bb4f: 53 push %ebx
10bb50: 83 ec 4c sub $0x4c,%esp
10bb53: 8b 75 08 mov 0x8(%ebp),%esi
10bb56: 8b 5d 0c mov 0xc(%ebp),%ebx
uintptr_t const page_size = heap->page_size;
10bb59: 8b 46 10 mov 0x10(%esi),%eax
10bb5c: 89 45 d8 mov %eax,-0x28(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10bb5f: 8b 4e 14 mov 0x14(%esi),%ecx
10bb62: 89 4d d4 mov %ecx,-0x2c(%ebp)
Heap_Block *const first_block = heap->first_block;
10bb65: 8b 46 20 mov 0x20(%esi),%eax
10bb68: 89 45 d0 mov %eax,-0x30(%ebp)
Heap_Block *const last_block = heap->last_block;
10bb6b: 8b 4e 24 mov 0x24(%esi),%ecx
10bb6e: 89 4d c8 mov %ecx,-0x38(%ebp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10bb71: c7 45 e4 0c bb 10 00 movl $0x10bb0c,-0x1c(%ebp)
10bb78: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10bb7c: 74 07 je 10bb85 <_Heap_Walk+0x3b>
10bb7e: c7 45 e4 11 bb 10 00 movl $0x10bb11,-0x1c(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
10bb85: b0 01 mov $0x1,%al
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10bb87: 83 3d 6c 54 12 00 03 cmpl $0x3,0x12546c
10bb8e: 0f 85 e8 02 00 00 jne 10be7c <_Heap_Walk+0x332>
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
10bb94: 52 push %edx
10bb95: ff 76 0c pushl 0xc(%esi)
10bb98: ff 76 08 pushl 0x8(%esi)
10bb9b: ff 75 c8 pushl -0x38(%ebp)
10bb9e: ff 75 d0 pushl -0x30(%ebp)
10bba1: ff 76 1c pushl 0x1c(%esi)
10bba4: ff 76 18 pushl 0x18(%esi)
10bba7: ff 75 d4 pushl -0x2c(%ebp)
10bbaa: ff 75 d8 pushl -0x28(%ebp)
10bbad: 68 dd e7 11 00 push $0x11e7dd
10bbb2: 6a 00 push $0x0
10bbb4: 53 push %ebx
10bbb5: ff 55 e4 call *-0x1c(%ebp)
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
10bbb8: 83 c4 30 add $0x30,%esp
10bbbb: 83 7d d8 00 cmpl $0x0,-0x28(%ebp)
10bbbf: 75 0b jne 10bbcc <_Heap_Walk+0x82>
(*printer)( source, true, "page size is zero\n" );
10bbc1: 50 push %eax
10bbc2: 68 6e e8 11 00 push $0x11e86e
10bbc7: e9 6b 02 00 00 jmp 10be37 <_Heap_Walk+0x2ed>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10bbcc: f6 45 d8 03 testb $0x3,-0x28(%ebp)
10bbd0: 74 0d je 10bbdf <_Heap_Walk+0x95>
(*printer)(
10bbd2: ff 75 d8 pushl -0x28(%ebp)
10bbd5: 68 81 e8 11 00 push $0x11e881
10bbda: e9 58 02 00 00 jmp 10be37 <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10bbdf: 8b 45 d4 mov -0x2c(%ebp),%eax
10bbe2: 31 d2 xor %edx,%edx
10bbe4: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10bbe7: 85 d2 test %edx,%edx
10bbe9: 74 0d je 10bbf8 <_Heap_Walk+0xae>
(*printer)(
10bbeb: ff 75 d4 pushl -0x2c(%ebp)
10bbee: 68 9f e8 11 00 push $0x11e89f
10bbf3: e9 3f 02 00 00 jmp 10be37 <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10bbf8: 8b 45 d0 mov -0x30(%ebp),%eax
10bbfb: 83 c0 08 add $0x8,%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10bbfe: 31 d2 xor %edx,%edx
10bc00: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if (
10bc03: 85 d2 test %edx,%edx
10bc05: 74 0d je 10bc14 <_Heap_Walk+0xca>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10bc07: ff 75 d0 pushl -0x30(%ebp)
10bc0a: 68 c3 e8 11 00 push $0x11e8c3
10bc0f: e9 23 02 00 00 jmp 10be37 <_Heap_Walk+0x2ed>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10bc14: 8b 45 d0 mov -0x30(%ebp),%eax
10bc17: f6 40 04 01 testb $0x1,0x4(%eax)
10bc1b: 75 0b jne 10bc28 <_Heap_Walk+0xde>
(*printer)(
10bc1d: 57 push %edi
10bc1e: 68 f4 e8 11 00 push $0x11e8f4
10bc23: e9 0f 02 00 00 jmp 10be37 <_Heap_Walk+0x2ed>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10bc28: 8b 4d c8 mov -0x38(%ebp),%ecx
10bc2b: 8b 79 04 mov 0x4(%ecx),%edi
10bc2e: 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);
10bc31: 01 cf add %ecx,%edi
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10bc33: f6 47 04 01 testb $0x1,0x4(%edi)
10bc37: 75 0b jne 10bc44 <_Heap_Walk+0xfa>
(*printer)(
10bc39: 56 push %esi
10bc3a: 68 22 e9 11 00 push $0x11e922
10bc3f: e9 f3 01 00 00 jmp 10be37 <_Heap_Walk+0x2ed>
);
return false;
}
if (
10bc44: 3b 7d d0 cmp -0x30(%ebp),%edi
10bc47: 74 0b je 10bc54 <_Heap_Walk+0x10a> <== ALWAYS TAKEN
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10bc49: 51 push %ecx <== NOT EXECUTED
10bc4a: 68 37 e9 11 00 push $0x11e937 <== NOT EXECUTED
10bc4f: e9 e3 01 00 00 jmp 10be37 <_Heap_Walk+0x2ed> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10bc54: 8b 46 10 mov 0x10(%esi),%eax
10bc57: 89 45 e0 mov %eax,-0x20(%ebp)
block = next_block;
} while ( block != first_block );
return true;
}
10bc5a: 8b 4e 08 mov 0x8(%esi),%ecx
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
10bc5d: 89 75 dc mov %esi,-0x24(%ebp)
10bc60: eb 75 jmp 10bcd7 <_Heap_Walk+0x18d>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10bc62: 31 c0 xor %eax,%eax
10bc64: 39 4e 20 cmp %ecx,0x20(%esi)
10bc67: 77 08 ja 10bc71 <_Heap_Walk+0x127>
10bc69: 31 c0 xor %eax,%eax
10bc6b: 39 4e 24 cmp %ecx,0x24(%esi)
10bc6e: 0f 93 c0 setae %al
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
10bc71: 85 c0 test %eax,%eax
10bc73: 75 0b jne 10bc80 <_Heap_Walk+0x136>
(*printer)(
10bc75: 51 push %ecx
10bc76: 68 66 e9 11 00 push $0x11e966
10bc7b: e9 b7 01 00 00 jmp 10be37 <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10bc80: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10bc83: 31 d2 xor %edx,%edx
10bc85: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if (
10bc88: 85 d2 test %edx,%edx
10bc8a: 74 0b je 10bc97 <_Heap_Walk+0x14d>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10bc8c: 51 push %ecx
10bc8d: 68 86 e9 11 00 push $0x11e986
10bc92: e9 a0 01 00 00 jmp 10be37 <_Heap_Walk+0x2ed>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10bc97: 8b 41 04 mov 0x4(%ecx),%eax
10bc9a: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10bc9d: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10bca2: 74 0b je 10bcaf <_Heap_Walk+0x165>
(*printer)(
10bca4: 51 push %ecx
10bca5: 68 b6 e9 11 00 push $0x11e9b6
10bcaa: e9 88 01 00 00 jmp 10be37 <_Heap_Walk+0x2ed>
);
return false;
}
if ( free_block->prev != prev_block ) {
10bcaf: 8b 41 0c mov 0xc(%ecx),%eax
10bcb2: 3b 45 dc cmp -0x24(%ebp),%eax
10bcb5: 74 1a je 10bcd1 <_Heap_Walk+0x187>
(*printer)(
10bcb7: 83 ec 0c sub $0xc,%esp
10bcba: 50 push %eax
10bcbb: 51 push %ecx
10bcbc: 68 d2 e9 11 00 push $0x11e9d2
10bcc1: 6a 01 push $0x1
10bcc3: 53 push %ebx
10bcc4: ff 55 e4 call *-0x1c(%ebp)
10bcc7: 83 c4 20 add $0x20,%esp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
10bcca: 31 c0 xor %eax,%eax
10bccc: e9 ab 01 00 00 jmp 10be7c <_Heap_Walk+0x332>
return false;
}
prev_block = free_block;
free_block = free_block->next;
10bcd1: 89 4d dc mov %ecx,-0x24(%ebp)
10bcd4: 8b 49 08 mov 0x8(%ecx),%ecx
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10bcd7: 39 f1 cmp %esi,%ecx
10bcd9: 75 87 jne 10bc62 <_Heap_Walk+0x118>
10bcdb: 89 5d dc mov %ebx,-0x24(%ebp)
10bcde: eb 02 jmp 10bce2 <_Heap_Walk+0x198>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10bce0: 89 df mov %ebx,%edi
return true;
}
10bce2: 8b 4f 04 mov 0x4(%edi),%ecx
10bce5: 89 4d cc mov %ecx,-0x34(%ebp)
10bce8: 83 e1 fe and $0xfffffffe,%ecx
10bceb: 89 4d e0 mov %ecx,-0x20(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10bcee: 8d 1c 0f lea (%edi,%ecx,1),%ebx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10bcf1: 31 c0 xor %eax,%eax
10bcf3: 39 5e 20 cmp %ebx,0x20(%esi)
10bcf6: 77 08 ja 10bd00 <_Heap_Walk+0x1b6> <== NEVER TAKEN
10bcf8: 31 c0 xor %eax,%eax
10bcfa: 39 5e 24 cmp %ebx,0x24(%esi)
10bcfd: 0f 93 c0 setae %al
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10bd00: 85 c0 test %eax,%eax
10bd02: 75 11 jne 10bd15 <_Heap_Walk+0x1cb>
10bd04: 89 d9 mov %ebx,%ecx
10bd06: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10bd09: 83 ec 0c sub $0xc,%esp
10bd0c: 51 push %ecx
10bd0d: 57 push %edi
10bd0e: 68 04 ea 11 00 push $0x11ea04
10bd13: eb ac jmp 10bcc1 <_Heap_Walk+0x177>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
10bd15: 3b 7d c8 cmp -0x38(%ebp),%edi
10bd18: 0f 95 c1 setne %cl
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10bd1b: 8b 45 e0 mov -0x20(%ebp),%eax
10bd1e: 31 d2 xor %edx,%edx
10bd20: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10bd23: 85 d2 test %edx,%edx
10bd25: 74 15 je 10bd3c <_Heap_Walk+0x1f2>
10bd27: 84 c9 test %cl,%cl
10bd29: 74 11 je 10bd3c <_Heap_Walk+0x1f2>
10bd2b: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10bd2e: 83 ec 0c sub $0xc,%esp
10bd31: ff 75 e0 pushl -0x20(%ebp)
10bd34: 57 push %edi
10bd35: 68 31 ea 11 00 push $0x11ea31
10bd3a: eb 85 jmp 10bcc1 <_Heap_Walk+0x177>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10bd3c: 8b 45 d4 mov -0x2c(%ebp),%eax
10bd3f: 39 45 e0 cmp %eax,-0x20(%ebp)
10bd42: 73 18 jae 10bd5c <_Heap_Walk+0x212>
10bd44: 84 c9 test %cl,%cl
10bd46: 74 14 je 10bd5c <_Heap_Walk+0x212> <== NEVER TAKEN
10bd48: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10bd4b: 52 push %edx
10bd4c: 52 push %edx
10bd4d: 50 push %eax
10bd4e: ff 75 e0 pushl -0x20(%ebp)
10bd51: 57 push %edi
10bd52: 68 5f ea 11 00 push $0x11ea5f
10bd57: e9 65 ff ff ff jmp 10bcc1 <_Heap_Walk+0x177>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10bd5c: 39 fb cmp %edi,%ebx
10bd5e: 77 18 ja 10bd78 <_Heap_Walk+0x22e>
10bd60: 84 c9 test %cl,%cl
10bd62: 74 14 je 10bd78 <_Heap_Walk+0x22e>
10bd64: 89 d9 mov %ebx,%ecx
10bd66: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10bd69: 83 ec 0c sub $0xc,%esp
10bd6c: 51 push %ecx
10bd6d: 57 push %edi
10bd6e: 68 8a ea 11 00 push $0x11ea8a
10bd73: e9 49 ff ff ff jmp 10bcc1 <_Heap_Walk+0x177>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
10bd78: 8b 4d cc mov -0x34(%ebp),%ecx
10bd7b: 83 e1 01 and $0x1,%ecx
10bd7e: 89 4d c4 mov %ecx,-0x3c(%ebp)
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10bd81: f6 43 04 01 testb $0x1,0x4(%ebx)
10bd85: 0f 85 ba 00 00 00 jne 10be45 <_Heap_Walk+0x2fb>
block = next_block;
} while ( block != first_block );
return true;
}
10bd8b: 8b 46 08 mov 0x8(%esi),%eax
10bd8e: 89 45 c0 mov %eax,-0x40(%ebp)
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
10bd91: 8b 4f 08 mov 0x8(%edi),%ecx
10bd94: 89 4d b4 mov %ecx,-0x4c(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10bd97: ba aa e7 11 00 mov $0x11e7aa,%edx
10bd9c: 3b 4e 0c cmp 0xc(%esi),%ecx
10bd9f: 74 0e je 10bdaf <_Heap_Walk+0x265>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10bda1: ba e1 e6 11 00 mov $0x11e6e1,%edx
10bda6: 39 f1 cmp %esi,%ecx
10bda8: 75 05 jne 10bdaf <_Heap_Walk+0x265>
10bdaa: ba b9 e7 11 00 mov $0x11e7b9,%edx
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
10bdaf: 8b 47 0c mov 0xc(%edi),%eax
10bdb2: 89 45 cc mov %eax,-0x34(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10bdb5: b8 c3 e7 11 00 mov $0x11e7c3,%eax
10bdba: 8b 4d c0 mov -0x40(%ebp),%ecx
10bdbd: 39 4d cc cmp %ecx,-0x34(%ebp)
10bdc0: 74 0f je 10bdd1 <_Heap_Walk+0x287>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10bdc2: b8 e1 e6 11 00 mov $0x11e6e1,%eax
10bdc7: 39 75 cc cmp %esi,-0x34(%ebp)
10bdca: 75 05 jne 10bdd1 <_Heap_Walk+0x287>
10bdcc: b8 d3 e7 11 00 mov $0x11e7d3,%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)(
10bdd1: 83 ec 0c sub $0xc,%esp
10bdd4: 52 push %edx
10bdd5: ff 75 b4 pushl -0x4c(%ebp)
10bdd8: 50 push %eax
10bdd9: ff 75 cc pushl -0x34(%ebp)
10bddc: ff 75 e0 pushl -0x20(%ebp)
10bddf: 57 push %edi
10bde0: 68 be ea 11 00 push $0x11eabe
10bde5: 6a 00 push $0x0
10bde7: ff 75 dc pushl -0x24(%ebp)
10bdea: ff 55 e4 call *-0x1c(%ebp)
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10bded: 8b 03 mov (%ebx),%eax
10bdef: 83 c4 30 add $0x30,%esp
10bdf2: 39 45 e0 cmp %eax,-0x20(%ebp)
10bdf5: 74 16 je 10be0d <_Heap_Walk+0x2c3>
10bdf7: 89 d9 mov %ebx,%ecx
10bdf9: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10bdfc: 56 push %esi
10bdfd: 51 push %ecx
10bdfe: 50 push %eax
10bdff: ff 75 e0 pushl -0x20(%ebp)
10be02: 57 push %edi
10be03: 68 f3 ea 11 00 push $0x11eaf3
10be08: e9 b4 fe ff ff jmp 10bcc1 <_Heap_Walk+0x177>
);
return false;
}
if ( !prev_used ) {
10be0d: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
10be11: 75 0b jne 10be1e <_Heap_Walk+0x2d4>
10be13: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10be16: 57 push %edi
10be17: 68 2c eb 11 00 push $0x11eb2c
10be1c: eb 19 jmp 10be37 <_Heap_Walk+0x2ed>
block = next_block;
} while ( block != first_block );
return true;
}
10be1e: 8b 46 08 mov 0x8(%esi),%eax
10be21: eb 07 jmp 10be2a <_Heap_Walk+0x2e0>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
10be23: 39 f8 cmp %edi,%eax
10be25: 74 4a je 10be71 <_Heap_Walk+0x327>
return true;
}
free_block = free_block->next;
10be27: 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 ) {
10be2a: 39 f0 cmp %esi,%eax
10be2c: 75 f5 jne 10be23 <_Heap_Walk+0x2d9>
10be2e: 8b 5d dc mov -0x24(%ebp),%ebx
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10be31: 57 push %edi
10be32: 68 97 eb 11 00 push $0x11eb97
10be37: 6a 01 push $0x1
10be39: 53 push %ebx
10be3a: ff 55 e4 call *-0x1c(%ebp)
10be3d: 83 c4 10 add $0x10,%esp
10be40: e9 85 fe ff ff jmp 10bcca <_Heap_Walk+0x180>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10be45: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
10be49: 74 0e je 10be59 <_Heap_Walk+0x30f>
(*printer)(
10be4b: 83 ec 0c sub $0xc,%esp
10be4e: ff 75 e0 pushl -0x20(%ebp)
10be51: 57 push %edi
10be52: 68 5b eb 11 00 push $0x11eb5b
10be57: eb 0d jmp 10be66 <_Heap_Walk+0x31c>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10be59: 51 push %ecx
10be5a: 51 push %ecx
10be5b: ff 37 pushl (%edi)
10be5d: ff 75 e0 pushl -0x20(%ebp)
10be60: 57 push %edi
10be61: 68 72 eb 11 00 push $0x11eb72
10be66: 6a 00 push $0x0
10be68: ff 75 dc pushl -0x24(%ebp)
10be6b: ff 55 e4 call *-0x1c(%ebp)
10be6e: 83 c4 20 add $0x20,%esp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10be71: 3b 5d d0 cmp -0x30(%ebp),%ebx
10be74: 0f 85 66 fe ff ff jne 10bce0 <_Heap_Walk+0x196>
return true;
10be7a: b0 01 mov $0x1,%al
}
10be7c: 8d 65 f4 lea -0xc(%ebp),%esp
10be7f: 5b pop %ebx
10be80: 5e pop %esi
10be81: 5f pop %edi
10be82: c9 leave
10be83: c3 ret
0010b16c <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10b16c: 55 push %ebp
10b16d: 89 e5 mov %esp,%ebp
10b16f: 53 push %ebx
10b170: 83 ec 08 sub $0x8,%esp
10b173: 8b 45 08 mov 0x8(%ebp),%eax
10b176: 8b 55 0c mov 0xc(%ebp),%edx
10b179: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10b17c: a3 fc 32 12 00 mov %eax,0x1232fc
_Internal_errors_What_happened.is_internal = is_internal;
10b181: 88 15 00 33 12 00 mov %dl,0x123300
_Internal_errors_What_happened.the_error = the_error;
10b187: 89 1d 04 33 12 00 mov %ebx,0x123304
_User_extensions_Fatal( the_source, is_internal, the_error );
10b18d: 53 push %ebx
10b18e: 0f b6 d2 movzbl %dl,%edx
10b191: 52 push %edx
10b192: 50 push %eax
10b193: e8 9f 18 00 00 call 10ca37 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10b198: c7 05 e4 33 12 00 05 movl $0x5,0x1233e4 <== NOT EXECUTED
10b19f: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10b1a2: fa cli <== NOT EXECUTED
10b1a3: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10b1a5: f4 hlt <== NOT EXECUTED
10b1a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b1a9: eb fe jmp 10b1a9 <_Internal_error_Occurred+0x3d><== NOT EXECUTED
0010b1fc <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10b1fc: 55 push %ebp
10b1fd: 89 e5 mov %esp,%ebp
10b1ff: 56 push %esi
10b200: 53 push %ebx
10b201: 8b 5d 08 mov 0x8(%ebp),%ebx
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
return NULL;
10b204: 31 c9 xor %ecx,%ecx
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
10b206: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10b20a: 74 53 je 10b25f <_Objects_Allocate+0x63><== NEVER TAKEN
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10b20c: 8d 73 20 lea 0x20(%ebx),%esi
10b20f: 83 ec 0c sub $0xc,%esp
10b212: 56 push %esi
10b213: e8 94 f7 ff ff call 10a9ac <_Chain_Get>
10b218: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10b21a: 83 c4 10 add $0x10,%esp
10b21d: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10b221: 74 3c je 10b25f <_Objects_Allocate+0x63>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10b223: 85 c0 test %eax,%eax
10b225: 75 1a jne 10b241 <_Objects_Allocate+0x45>
_Objects_Extend_information( information );
10b227: 83 ec 0c sub $0xc,%esp
10b22a: 53 push %ebx
10b22b: e8 60 00 00 00 call 10b290 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10b230: 89 34 24 mov %esi,(%esp)
10b233: e8 74 f7 ff ff call 10a9ac <_Chain_Get>
10b238: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10b23a: 83 c4 10 add $0x10,%esp
10b23d: 85 c0 test %eax,%eax
10b23f: 74 1e je 10b25f <_Objects_Allocate+0x63>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10b241: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10b245: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10b249: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10b24b: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10b24f: 31 d2 xor %edx,%edx
10b251: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10b253: c1 e0 02 shl $0x2,%eax
10b256: 03 43 30 add 0x30(%ebx),%eax
10b259: ff 08 decl (%eax)
information->inactive--;
10b25b: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10b25f: 89 c8 mov %ecx,%eax
10b261: 8d 65 f8 lea -0x8(%ebp),%esp
10b264: 5b pop %ebx
10b265: 5e pop %esi
10b266: c9 leave
10b267: c3 ret
0010b584 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10b584: 55 push %ebp
10b585: 89 e5 mov %esp,%ebp
10b587: 57 push %edi
10b588: 56 push %esi
10b589: 53 push %ebx
10b58a: 83 ec 0c sub $0xc,%esp
10b58d: 8b 75 08 mov 0x8(%ebp),%esi
10b590: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
10b593: 31 db xor %ebx,%ebx
)
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10b595: 66 85 ff test %di,%di
10b598: 74 37 je 10b5d1 <_Objects_Get_information+0x4d>
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
10b59a: 83 ec 0c sub $0xc,%esp
10b59d: 56 push %esi
10b59e: e8 2d 36 00 00 call 10ebd0 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10b5a3: 83 c4 10 add $0x10,%esp
10b5a6: 85 c0 test %eax,%eax
10b5a8: 74 27 je 10b5d1 <_Objects_Get_information+0x4d>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10b5aa: 0f b7 ff movzwl %di,%edi
10b5ad: 39 c7 cmp %eax,%edi
10b5af: 77 20 ja 10b5d1 <_Objects_Get_information+0x4d>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10b5b1: 8b 04 b5 3c 32 12 00 mov 0x12323c(,%esi,4),%eax
10b5b8: 85 c0 test %eax,%eax
10b5ba: 74 15 je 10b5d1 <_Objects_Get_information+0x4d><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10b5bc: 8b 1c b8 mov (%eax,%edi,4),%ebx
if ( !info )
10b5bf: 85 db test %ebx,%ebx
10b5c1: 74 0e je 10b5d1 <_Objects_Get_information+0x4d><== NEVER TAKEN
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
10b5c3: 31 c0 xor %eax,%eax
10b5c5: 66 83 7b 10 00 cmpw $0x0,0x10(%ebx)
10b5ca: 0f 95 c0 setne %al
10b5cd: f7 d8 neg %eax
10b5cf: 21 c3 and %eax,%ebx
#endif
return info;
}
10b5d1: 89 d8 mov %ebx,%eax
10b5d3: 8d 65 f4 lea -0xc(%ebp),%esp
10b5d6: 5b pop %ebx
10b5d7: 5e pop %esi
10b5d8: 5f pop %edi
10b5d9: c9 leave
10b5da: c3 ret
0011899c <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
11899c: 55 push %ebp
11899d: 89 e5 mov %esp,%ebp
11899f: 53 push %ebx
1189a0: 8b 55 08 mov 0x8(%ebp),%edx
1189a3: 8b 4d 10 mov 0x10(%ebp),%ecx
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
1189a6: b8 01 00 00 00 mov $0x1,%eax
1189ab: 2b 42 08 sub 0x8(%edx),%eax
1189ae: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
1189b1: 0f b7 5a 10 movzwl 0x10(%edx),%ebx
1189b5: 39 c3 cmp %eax,%ebx
1189b7: 72 12 jb 1189cb <_Objects_Get_no_protection+0x2f>
if ( (the_object = information->local_table[ index ]) != NULL ) {
1189b9: 8b 52 1c mov 0x1c(%edx),%edx
1189bc: 8b 04 82 mov (%edx,%eax,4),%eax
1189bf: 85 c0 test %eax,%eax
1189c1: 74 08 je 1189cb <_Objects_Get_no_protection+0x2f><== NEVER TAKEN
*location = OBJECTS_LOCAL;
1189c3: c7 01 00 00 00 00 movl $0x0,(%ecx)
return the_object;
1189c9: eb 08 jmp 1189d3 <_Objects_Get_no_protection+0x37>
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
1189cb: c7 01 01 00 00 00 movl $0x1,(%ecx)
return NULL;
1189d1: 31 c0 xor %eax,%eax
}
1189d3: 5b pop %ebx
1189d4: c9 leave
1189d5: c3 ret
0010c7b0 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10c7b0: 55 push %ebp
10c7b1: 89 e5 mov %esp,%ebp
10c7b3: 53 push %ebx
10c7b4: 83 ec 14 sub $0x14,%esp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10c7b7: 8b 45 08 mov 0x8(%ebp),%eax
10c7ba: 85 c0 test %eax,%eax
10c7bc: 75 08 jne 10c7c6 <_Objects_Id_to_name+0x16>
10c7be: a1 f4 54 12 00 mov 0x1254f4,%eax
10c7c3: 8b 40 08 mov 0x8(%eax),%eax
10c7c6: 89 c2 mov %eax,%edx
10c7c8: c1 ea 18 shr $0x18,%edx
10c7cb: 83 e2 07 and $0x7,%edx
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
10c7ce: 8d 4a ff lea -0x1(%edx),%ecx
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
10c7d1: bb 03 00 00 00 mov $0x3,%ebx
10c7d6: 83 f9 02 cmp $0x2,%ecx
10c7d9: 77 30 ja 10c80b <_Objects_Id_to_name+0x5b>
10c7db: eb 35 jmp 10c812 <_Objects_Id_to_name+0x62>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10c7dd: 89 c1 mov %eax,%ecx
10c7df: c1 e9 1b shr $0x1b,%ecx
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10c7e2: 8b 14 8a mov (%edx,%ecx,4),%edx
if ( !information )
10c7e5: 85 d2 test %edx,%edx
10c7e7: 74 22 je 10c80b <_Objects_Id_to_name+0x5b><== NEVER TAKEN
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
10c7e9: 51 push %ecx
10c7ea: 8d 4d f4 lea -0xc(%ebp),%ecx
10c7ed: 51 push %ecx
10c7ee: 50 push %eax
10c7ef: 52 push %edx
10c7f0: e8 63 ff ff ff call 10c758 <_Objects_Get>
if ( !the_object )
10c7f5: 83 c4 10 add $0x10,%esp
10c7f8: 85 c0 test %eax,%eax
10c7fa: 74 0f je 10c80b <_Objects_Id_to_name+0x5b>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10c7fc: 8b 50 0c mov 0xc(%eax),%edx
10c7ff: 8b 45 0c mov 0xc(%ebp),%eax
10c802: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10c804: e8 71 07 00 00 call 10cf7a <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10c809: 31 db xor %ebx,%ebx
}
10c80b: 89 d8 mov %ebx,%eax
10c80d: 8b 5d fc mov -0x4(%ebp),%ebx
10c810: c9 leave
10c811: c3 ret
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
10c812: 8b 14 95 88 52 12 00 mov 0x125288(,%edx,4),%edx
10c819: 85 d2 test %edx,%edx
10c81b: 75 c0 jne 10c7dd <_Objects_Id_to_name+0x2d>
10c81d: eb ec jmp 10c80b <_Objects_Id_to_name+0x5b>
0010b684 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
10b684: 55 push %ebp
10b685: 89 e5 mov %esp,%ebp
10b687: 57 push %edi
10b688: 56 push %esi
10b689: 53 push %ebx
10b68a: 83 ec 0c sub $0xc,%esp
10b68d: 8b 45 08 mov 0x8(%ebp),%eax
10b690: 8b 5d 0c mov 0xc(%ebp),%ebx
10b693: 8b 75 10 mov 0x10(%ebp),%esi
10b696: 8b 4d 14 mov 0x14(%ebp),%ecx
10b699: 8b 7d 20 mov 0x20(%ebp),%edi
10b69c: 0f b7 55 18 movzwl 0x18(%ebp),%edx
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
10b6a0: 89 18 mov %ebx,(%eax)
information->the_class = the_class;
10b6a2: 66 89 70 04 mov %si,0x4(%eax)
information->size = size;
10b6a6: 89 50 18 mov %edx,0x18(%eax)
information->local_table = 0;
10b6a9: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
information->inactive_per_block = 0;
10b6b0: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
information->object_blocks = 0;
10b6b7: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
information->inactive = 0;
10b6be: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax)
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
10b6c4: 66 c7 40 10 00 00 movw $0x0,0x10(%eax)
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
10b6ca: 0f b7 f6 movzwl %si,%esi
10b6cd: 8b 14 9d 3c 32 12 00 mov 0x12323c(,%ebx,4),%edx
10b6d4: 89 04 b2 mov %eax,(%edx,%esi,4)
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
10b6d7: 89 ca mov %ecx,%edx
10b6d9: c1 ea 1f shr $0x1f,%edx
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
10b6dc: 88 50 12 mov %dl,0x12(%eax)
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
10b6df: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
10b6e5: 85 d2 test %edx,%edx
10b6e7: 74 10 je 10b6f9 <_Objects_Initialize_information+0x75>
10b6e9: 85 c9 test %ecx,%ecx
10b6eb: 75 0c jne 10b6f9 <_Objects_Initialize_information+0x75>
_Internal_error_Occurred(
10b6ed: 50 push %eax
10b6ee: 6a 13 push $0x13
10b6f0: 6a 01 push $0x1
10b6f2: 6a 00 push $0x0
10b6f4: e8 73 fa ff ff call 10b16c <_Internal_error_Occurred>
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
10b6f9: 66 89 48 14 mov %cx,0x14(%eax)
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
10b6fd: c7 40 1c 1c 2f 12 00 movl $0x122f1c,0x1c(%eax)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10b704: 89 da mov %ebx,%edx
10b706: c1 e2 18 shl $0x18,%edx
10b709: 81 ca 00 00 01 00 or $0x10000,%edx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10b70f: c1 e6 1b shl $0x1b,%esi
10b712: 09 f2 or %esi,%edx
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
10b714: 31 db xor %ebx,%ebx
10b716: 85 c9 test %ecx,%ecx
10b718: 0f 95 c3 setne %bl
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10b71b: 09 da or %ebx,%edx
10b71d: 89 50 08 mov %edx,0x8(%eax)
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
10b720: 89 fa mov %edi,%edx
10b722: f6 c2 03 test $0x3,%dl
10b725: 74 06 je 10b72d <_Objects_Initialize_information+0xa9><== ALWAYS TAKEN
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
10b727: 83 c2 04 add $0x4,%edx <== NOT EXECUTED
10b72a: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
10b72d: 66 89 50 38 mov %dx,0x38(%eax)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10b731: 8d 50 24 lea 0x24(%eax),%edx
10b734: 89 50 20 mov %edx,0x20(%eax)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
10b737: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
_Chain_Initialize_empty( &information->Inactive );
10b73e: 8d 50 20 lea 0x20(%eax),%edx
10b741: 89 50 28 mov %edx,0x28(%eax)
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
10b744: 85 c9 test %ecx,%ecx
10b746: 74 0f je 10b757 <_Objects_Initialize_information+0xd3>
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10b748: 89 45 08 mov %eax,0x8(%ebp)
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10b74b: 8d 65 f4 lea -0xc(%ebp),%esp
10b74e: 5b pop %ebx
10b74f: 5e pop %esi
10b750: 5f pop %edi
10b751: c9 leave
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10b752: e9 39 fb ff ff jmp 10b290 <_Objects_Extend_information>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10b757: 8d 65 f4 lea -0xc(%ebp),%esp
10b75a: 5b pop %ebx
10b75b: 5e pop %esi
10b75c: 5f pop %edi
10b75d: c9 leave
10b75e: c3 ret
0010e4cd <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
10e4cd: 55 push %ebp
10e4ce: 89 e5 mov %esp,%ebp
10e4d0: 57 push %edi
10e4d1: 56 push %esi
10e4d2: 53 push %ebx
10e4d3: 83 ec 1c sub $0x1c,%esp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10e4d6: 8b 45 08 mov 0x8(%ebp),%eax
10e4d9: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx
if ( !api )
10e4df: 85 db test %ebx,%ebx
10e4e1: 74 45 je 10e528 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
10e4e3: 9c pushf
10e4e4: fa cli
10e4e5: 58 pop %eax
signal_set = asr->signals_posted;
10e4e6: 8b 7b 14 mov 0x14(%ebx),%edi
asr->signals_posted = 0;
10e4e9: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_ISR_Enable( level );
10e4f0: 50 push %eax
10e4f1: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
10e4f2: 85 ff test %edi,%edi
10e4f4: 74 32 je 10e528 <_RTEMS_tasks_Post_switch_extension+0x5b>
return;
asr->nest_level += 1;
10e4f6: ff 43 1c incl 0x1c(%ebx)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
10e4f9: 50 push %eax
10e4fa: 8d 75 e4 lea -0x1c(%ebp),%esi
10e4fd: 56 push %esi
10e4fe: 68 ff ff 00 00 push $0xffff
10e503: ff 73 10 pushl 0x10(%ebx)
10e506: e8 39 19 00 00 call 10fe44 <rtems_task_mode>
(*asr->handler)( signal_set );
10e50b: 89 3c 24 mov %edi,(%esp)
10e50e: ff 53 0c call *0xc(%ebx)
asr->nest_level -= 1;
10e511: ff 4b 1c decl 0x1c(%ebx)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
10e514: 83 c4 0c add $0xc,%esp
10e517: 56 push %esi
10e518: 68 ff ff 00 00 push $0xffff
10e51d: ff 75 e4 pushl -0x1c(%ebp)
10e520: e8 1f 19 00 00 call 10fe44 <rtems_task_mode>
10e525: 83 c4 10 add $0x10,%esp
}
10e528: 8d 65 f4 lea -0xc(%ebp),%esp
10e52b: 5b pop %ebx
10e52c: 5e pop %esi
10e52d: 5f pop %edi
10e52e: c9 leave
10e52f: c3 ret
0010b3a4 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10b3a4: 55 push %ebp
10b3a5: 89 e5 mov %esp,%ebp
10b3a7: 53 push %ebx
10b3a8: 83 ec 18 sub $0x18,%esp
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
10b3ab: 8d 45 f4 lea -0xc(%ebp),%eax
10b3ae: 50 push %eax
10b3af: ff 75 08 pushl 0x8(%ebp)
10b3b2: 68 74 67 12 00 push $0x126774
10b3b7: e8 f4 19 00 00 call 10cdb0 <_Objects_Get>
10b3bc: 89 c3 mov %eax,%ebx
switch ( location ) {
10b3be: 83 c4 10 add $0x10,%esp
10b3c1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10b3c5: 75 64 jne 10b42b <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10b3c7: 8b 40 40 mov 0x40(%eax),%eax
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10b3ca: f6 40 11 40 testb $0x40,0x11(%eax)
10b3ce: 74 18 je 10b3e8 <_Rate_monotonic_Timeout+0x44>
10b3d0: 8b 53 08 mov 0x8(%ebx),%edx
10b3d3: 39 50 20 cmp %edx,0x20(%eax)
10b3d6: 75 10 jne 10b3e8 <_Rate_monotonic_Timeout+0x44>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b3d8: 52 push %edx
10b3d9: 52 push %edx
10b3da: 68 f8 ff 03 10 push $0x1003fff8
10b3df: 50 push %eax
10b3e0: e8 0b 1e 00 00 call 10d1f0 <_Thread_Clear_state>
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
10b3e5: 59 pop %ecx
10b3e6: eb 10 jmp 10b3f8 <_Rate_monotonic_Timeout+0x54>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
10b3e8: 83 7b 38 01 cmpl $0x1,0x38(%ebx)
10b3ec: 75 2b jne 10b419 <_Rate_monotonic_Timeout+0x75>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
10b3ee: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
_Rate_monotonic_Initiate_statistics( the_period );
10b3f5: 83 ec 0c sub $0xc,%esp
10b3f8: 53 push %ebx
10b3f9: e8 ec fa ff ff call 10aeea <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b3fe: 8b 43 3c mov 0x3c(%ebx),%eax
10b401: 89 43 1c mov %eax,0x1c(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b404: 58 pop %eax
10b405: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
10b406: 83 c3 10 add $0x10,%ebx
10b409: 53 push %ebx
10b40a: 68 30 69 12 00 push $0x126930
10b40f: e8 5c 30 00 00 call 10e470 <_Watchdog_Insert>
10b414: 83 c4 10 add $0x10,%esp
10b417: eb 07 jmp 10b420 <_Rate_monotonic_Timeout+0x7c>
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10b419: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10b420: a1 68 68 12 00 mov 0x126868,%eax
10b425: 48 dec %eax
10b426: a3 68 68 12 00 mov %eax,0x126868
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b42b: 8b 5d fc mov -0x4(%ebp),%ebx
10b42e: c9 leave
10b42f: c3 ret
0010aca4 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10aca4: 55 push %ebp
10aca5: 89 e5 mov %esp,%ebp
10aca7: 56 push %esi
10aca8: 53 push %ebx
10aca9: 8b 4d 08 mov 0x8(%ebp),%ecx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
10acac: 8b 35 44 2d 12 00 mov 0x122d44,%esi
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
10acb2: 31 db xor %ebx,%ebx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10acb4: 85 c9 test %ecx,%ecx
10acb6: 74 57 je 10ad0f <_TOD_Validate+0x6b> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10acb8: b8 40 42 0f 00 mov $0xf4240,%eax
10acbd: 31 d2 xor %edx,%edx
10acbf: f7 f6 div %esi
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10acc1: 39 41 18 cmp %eax,0x18(%ecx)
10acc4: 73 49 jae 10ad0f <_TOD_Validate+0x6b>
(the_tod->ticks >= ticks_per_second) ||
10acc6: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10acca: 77 43 ja 10ad0f <_TOD_Validate+0x6b>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10accc: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10acd0: 77 3d ja 10ad0f <_TOD_Validate+0x6b>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10acd2: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10acd6: 77 37 ja 10ad0f <_TOD_Validate+0x6b>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10acd8: 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) ||
10acdb: 85 c0 test %eax,%eax
10acdd: 74 30 je 10ad0f <_TOD_Validate+0x6b> <== NEVER TAKEN
(the_tod->month == 0) ||
10acdf: 83 f8 0c cmp $0xc,%eax
10ace2: 77 2b ja 10ad0f <_TOD_Validate+0x6b>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10ace4: 8b 31 mov (%ecx),%esi
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
10ace6: 81 fe c3 07 00 00 cmp $0x7c3,%esi
10acec: 76 21 jbe 10ad0f <_TOD_Validate+0x6b>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10acee: 8b 51 08 mov 0x8(%ecx),%edx
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10acf1: 85 d2 test %edx,%edx
10acf3: 74 1a je 10ad0f <_TOD_Validate+0x6b> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10acf5: 83 e6 03 and $0x3,%esi
10acf8: 75 09 jne 10ad03 <_TOD_Validate+0x5f>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10acfa: 8b 04 85 d4 00 12 00 mov 0x1200d4(,%eax,4),%eax
10ad01: eb 07 jmp 10ad0a <_TOD_Validate+0x66>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10ad03: 8b 04 85 a0 00 12 00 mov 0x1200a0(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10ad0a: 39 c2 cmp %eax,%edx
10ad0c: 0f 96 c3 setbe %bl
if ( the_tod->day > days_in_month )
return false;
return true;
}
10ad0f: 88 d8 mov %bl,%al
10ad11: 5b pop %ebx
10ad12: 5e pop %esi
10ad13: c9 leave
10ad14: c3 ret
0010b94c <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10b94c: 55 push %ebp
10b94d: 89 e5 mov %esp,%ebp
10b94f: 57 push %edi
10b950: 56 push %esi
10b951: 53 push %ebx
10b952: 83 ec 28 sub $0x28,%esp
10b955: 8b 5d 08 mov 0x8(%ebp),%ebx
10b958: 8b 7d 0c mov 0xc(%ebp),%edi
10b95b: 8a 45 10 mov 0x10(%ebp),%al
10b95e: 88 45 e7 mov %al,-0x19(%ebp)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
10b961: 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 );
10b964: 53 push %ebx
10b965: e8 1a 0d 00 00 call 10c684 <_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 )
10b96a: 83 c4 10 add $0x10,%esp
10b96d: 39 7b 14 cmp %edi,0x14(%ebx)
10b970: 74 0c je 10b97e <_Thread_Change_priority+0x32>
_Thread_Set_priority( the_thread, new_priority );
10b972: 50 push %eax
10b973: 50 push %eax
10b974: 57 push %edi
10b975: 53 push %ebx
10b976: e8 d1 0b 00 00 call 10c54c <_Thread_Set_priority>
10b97b: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10b97e: 9c pushf
10b97f: fa cli
10b980: 59 pop %ecx
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
10b981: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10b984: 83 f8 04 cmp $0x4,%eax
10b987: 74 2f je 10b9b8 <_Thread_Change_priority+0x6c>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10b989: 83 e6 04 and $0x4,%esi
10b98c: 75 08 jne 10b996 <_Thread_Change_priority+0x4a><== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10b98e: 89 c2 mov %eax,%edx
10b990: 83 e2 fb and $0xfffffffb,%edx
10b993: 89 53 10 mov %edx,0x10(%ebx)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10b996: 51 push %ecx
10b997: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10b998: a9 e0 be 03 00 test $0x3bee0,%eax
10b99d: 0f 84 c0 00 00 00 je 10ba63 <_Thread_Change_priority+0x117>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10b9a3: 89 5d 0c mov %ebx,0xc(%ebp)
10b9a6: 8b 43 44 mov 0x44(%ebx),%eax
10b9a9: 89 45 08 mov %eax,0x8(%ebp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10b9ac: 8d 65 f4 lea -0xc(%ebp),%esp
10b9af: 5b pop %ebx
10b9b0: 5e pop %esi
10b9b1: 5f pop %edi
10b9b2: c9 leave
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10b9b3: e9 0c 0b 00 00 jmp 10c4c4 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10b9b8: 83 e6 04 and $0x4,%esi
10b9bb: 75 53 jne 10ba10 <_Thread_Change_priority+0xc4><== NEVER TAKEN
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
10b9bd: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10b9c4: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax
10b9ca: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx
10b9d1: 66 09 10 or %dx,(%eax)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10b9d4: 66 a1 08 33 12 00 mov 0x123308,%ax
10b9da: 0b 83 94 00 00 00 or 0x94(%ebx),%eax
10b9e0: 66 a3 08 33 12 00 mov %ax,0x123308
_Priority_bit_map_Add( &the_thread->Priority_map );
if ( prepend_it )
10b9e6: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10b9ea: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
10b9f0: 74 0e je 10ba00 <_Thread_Change_priority+0xb4>
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10b9f2: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10b9f5: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10b9f7: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10b9f9: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10b9fb: 89 5a 04 mov %ebx,0x4(%edx)
10b9fe: eb 10 jmp 10ba10 <_Thread_Change_priority+0xc4>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10ba00: 8d 50 04 lea 0x4(%eax),%edx
10ba03: 89 13 mov %edx,(%ebx)
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
10ba05: 8b 50 08 mov 0x8(%eax),%edx
the_chain->last = the_node;
10ba08: 89 58 08 mov %ebx,0x8(%eax)
old_last_node->next = the_node;
10ba0b: 89 1a mov %ebx,(%edx)
the_node->previous = old_last_node;
10ba0d: 89 53 04 mov %edx,0x4(%ebx)
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
10ba10: 51 push %ecx
10ba11: 9d popf
10ba12: fa cli
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 );
10ba13: 66 8b 1d 08 33 12 00 mov 0x123308,%bx
10ba1a: 31 c0 xor %eax,%eax
10ba1c: 89 c2 mov %eax,%edx
10ba1e: 66 0f bc d3 bsf %bx,%dx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10ba22: 0f b7 d2 movzwl %dx,%edx
10ba25: 66 8b 9c 12 78 33 12 mov 0x123378(%edx,%edx,1),%bx
10ba2c: 00
10ba2d: 66 0f bc c3 bsf %bx,%ax
return (_Priority_Bits_index( major ) << 4) +
10ba31: c1 e2 04 shl $0x4,%edx
10ba34: 0f b7 c0 movzwl %ax,%eax
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first;
10ba37: 8d 04 02 lea (%edx,%eax,1),%eax
10ba3a: 6b c0 0c imul $0xc,%eax,%eax
10ba3d: 03 05 30 32 12 00 add 0x123230,%eax
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
10ba43: 8b 10 mov (%eax),%edx
10ba45: 89 15 ac 34 12 00 mov %edx,0x1234ac
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10ba4b: a1 a8 34 12 00 mov 0x1234a8,%eax
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
10ba50: 39 d0 cmp %edx,%eax
10ba52: 74 0d je 10ba61 <_Thread_Change_priority+0x115>
10ba54: 80 78 74 00 cmpb $0x0,0x74(%eax)
10ba58: 74 07 je 10ba61 <_Thread_Change_priority+0x115>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10ba5a: c6 05 b4 34 12 00 01 movb $0x1,0x1234b4
_ISR_Enable( level );
10ba61: 51 push %ecx
10ba62: 9d popf
}
10ba63: 8d 65 f4 lea -0xc(%ebp),%esp
10ba66: 5b pop %ebx
10ba67: 5e pop %esi
10ba68: 5f pop %edi
10ba69: c9 leave
10ba6a: c3 ret
0010ba6c <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
10ba6c: 55 push %ebp
10ba6d: 89 e5 mov %esp,%ebp
10ba6f: 53 push %ebx
10ba70: 8b 45 08 mov 0x8(%ebp),%eax
10ba73: 8b 55 0c mov 0xc(%ebp),%edx
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10ba76: 9c pushf
10ba77: fa cli
10ba78: 59 pop %ecx
current_state = the_thread->current_state;
10ba79: 8b 58 10 mov 0x10(%eax),%ebx
if ( current_state & state ) {
10ba7c: 85 da test %ebx,%edx
10ba7e: 74 71 je 10baf1 <_Thread_Clear_state+0x85>
10ba80: f7 d2 not %edx
10ba82: 21 da and %ebx,%edx
current_state =
the_thread->current_state = _States_Clear( state, current_state );
10ba84: 89 50 10 mov %edx,0x10(%eax)
if ( _States_Is_ready( current_state ) ) {
10ba87: 85 d2 test %edx,%edx
10ba89: 75 66 jne 10baf1 <_Thread_Clear_state+0x85>
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10ba8b: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
10ba91: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx
10ba98: 66 09 1a or %bx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10ba9b: 66 8b 15 08 33 12 00 mov 0x123308,%dx
10baa2: 0b 90 94 00 00 00 or 0x94(%eax),%edx
10baa8: 66 89 15 08 33 12 00 mov %dx,0x123308
_Priority_bit_map_Add( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10baaf: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10bab5: 8d 5a 04 lea 0x4(%edx),%ebx
10bab8: 89 18 mov %ebx,(%eax)
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
10baba: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
10babd: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10bac0: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
10bac2: 89 58 04 mov %ebx,0x4(%eax)
_ISR_Flash( level );
10bac5: 51 push %ecx
10bac6: 9d popf
10bac7: fa cli
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
10bac8: 8b 50 14 mov 0x14(%eax),%edx
10bacb: 8b 1d ac 34 12 00 mov 0x1234ac,%ebx
10bad1: 3b 53 14 cmp 0x14(%ebx),%edx
10bad4: 73 1b jae 10baf1 <_Thread_Clear_state+0x85>
_Thread_Heir = the_thread;
10bad6: a3 ac 34 12 00 mov %eax,0x1234ac
if ( _Thread_Executing->is_preemptible ||
10badb: a1 a8 34 12 00 mov 0x1234a8,%eax
10bae0: 80 78 74 00 cmpb $0x0,0x74(%eax)
10bae4: 75 04 jne 10baea <_Thread_Clear_state+0x7e>
10bae6: 85 d2 test %edx,%edx
10bae8: 75 07 jne 10baf1 <_Thread_Clear_state+0x85><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10baea: c6 05 b4 34 12 00 01 movb $0x1,0x1234b4
}
}
}
_ISR_Enable( level );
10baf1: 51 push %ecx
10baf2: 9d popf
}
10baf3: 5b pop %ebx
10baf4: c9 leave
10baf5: c3 ret
0010bc6c <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10bc6c: 55 push %ebp
10bc6d: 89 e5 mov %esp,%ebp
10bc6f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10bc72: 8d 45 f4 lea -0xc(%ebp),%eax
10bc75: 50 push %eax
10bc76: ff 75 08 pushl 0x8(%ebp)
10bc79: e8 82 01 00 00 call 10be00 <_Thread_Get>
switch ( location ) {
10bc7e: 83 c4 10 add $0x10,%esp
10bc81: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10bc85: 75 1b jne 10bca2 <_Thread_Delay_ended+0x36><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10bc87: 52 push %edx
10bc88: 52 push %edx
10bc89: 68 18 00 00 10 push $0x10000018
10bc8e: 50 push %eax
10bc8f: e8 d8 fd ff ff call 10ba6c <_Thread_Clear_state>
10bc94: a1 64 32 12 00 mov 0x123264,%eax
10bc99: 48 dec %eax
10bc9a: a3 64 32 12 00 mov %eax,0x123264
10bc9f: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10bca2: c9 leave
10bca3: c3 ret
0010bca4 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10bca4: 55 push %ebp
10bca5: 89 e5 mov %esp,%ebp
10bca7: 57 push %edi
10bca8: 56 push %esi
10bca9: 53 push %ebx
10bcaa: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10bcad: 8b 1d a8 34 12 00 mov 0x1234a8,%ebx
_ISR_Disable( level );
10bcb3: 9c pushf
10bcb4: fa cli
10bcb5: 58 pop %eax
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
10bcb6: 8d 7d d8 lea -0x28(%ebp),%edi
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10bcb9: e9 f9 00 00 00 jmp 10bdb7 <_Thread_Dispatch+0x113>
heir = _Thread_Heir;
10bcbe: 8b 35 ac 34 12 00 mov 0x1234ac,%esi
_Thread_Dispatch_disable_level = 1;
10bcc4: c7 05 64 32 12 00 01 movl $0x1,0x123264
10bccb: 00 00 00
_Thread_Dispatch_necessary = false;
10bcce: c6 05 b4 34 12 00 00 movb $0x0,0x1234b4
_Thread_Executing = heir;
10bcd5: 89 35 a8 34 12 00 mov %esi,0x1234a8
/*
* 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 )
10bcdb: 39 de cmp %ebx,%esi
10bcdd: 0f 84 e2 00 00 00 je 10bdc5 <_Thread_Dispatch+0x121>
*/
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
10bce3: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10bce7: 75 09 jne 10bcf2 <_Thread_Dispatch+0x4e>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10bce9: 8b 15 34 32 12 00 mov 0x123234,%edx
10bcef: 89 56 78 mov %edx,0x78(%esi)
_ISR_Enable( level );
10bcf2: 50 push %eax
10bcf3: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10bcf4: 83 ec 0c sub $0xc,%esp
10bcf7: 8d 45 e0 lea -0x20(%ebp),%eax
10bcfa: 50 push %eax
10bcfb: e8 b0 2b 00 00 call 10e8b0 <_TOD_Get_uptime>
_Timestamp_Subtract(
10bd00: 83 c4 0c add $0xc,%esp
10bd03: 57 push %edi
10bd04: 8d 45 e0 lea -0x20(%ebp),%eax
10bd07: 50 push %eax
10bd08: 68 18 33 12 00 push $0x123318
10bd0d: e8 da 0b 00 00 call 10c8ec <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10bd12: 58 pop %eax
10bd13: 5a pop %edx
10bd14: 57 push %edi
10bd15: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10bd1b: 50 push %eax
10bd1c: e8 9b 0b 00 00 call 10c8bc <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10bd21: 8b 45 e0 mov -0x20(%ebp),%eax
10bd24: 8b 55 e4 mov -0x1c(%ebp),%edx
10bd27: a3 18 33 12 00 mov %eax,0x123318
10bd2c: 89 15 1c 33 12 00 mov %edx,0x12331c
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10bd32: a1 ec 32 12 00 mov 0x1232ec,%eax
10bd37: 83 c4 10 add $0x10,%esp
10bd3a: 85 c0 test %eax,%eax
10bd3c: 74 10 je 10bd4e <_Thread_Dispatch+0xaa> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10bd3e: 8b 10 mov (%eax),%edx
10bd40: 89 93 ec 00 00 00 mov %edx,0xec(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10bd46: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx
10bd4c: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10bd4e: 51 push %ecx
10bd4f: 51 push %ecx
10bd50: 56 push %esi
10bd51: 53 push %ebx
10bd52: e8 cd 0d 00 00 call 10cb24 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10bd57: 58 pop %eax
10bd58: 5a pop %edx
10bd59: 81 c6 d0 00 00 00 add $0xd0,%esi
10bd5f: 56 push %esi
10bd60: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax
10bd66: 50 push %eax
10bd67: e8 84 10 00 00 call 10cdf0 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10bd6c: 83 c4 10 add $0x10,%esp
10bd6f: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx)
10bd76: 74 36 je 10bdae <_Thread_Dispatch+0x10a>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
10bd78: a1 e8 32 12 00 mov 0x1232e8,%eax
10bd7d: 39 c3 cmp %eax,%ebx
10bd7f: 74 2d je 10bdae <_Thread_Dispatch+0x10a>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10bd81: 85 c0 test %eax,%eax
10bd83: 74 11 je 10bd96 <_Thread_Dispatch+0xf2>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10bd85: 83 ec 0c sub $0xc,%esp
10bd88: 05 e8 00 00 00 add $0xe8,%eax
10bd8d: 50 push %eax
10bd8e: e8 91 10 00 00 call 10ce24 <_CPU_Context_save_fp>
10bd93: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10bd96: 83 ec 0c sub $0xc,%esp
10bd99: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax
10bd9f: 50 push %eax
10bda0: e8 89 10 00 00 call 10ce2e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10bda5: 89 1d e8 32 12 00 mov %ebx,0x1232e8
10bdab: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10bdae: 8b 1d a8 34 12 00 mov 0x1234a8,%ebx
_ISR_Disable( level );
10bdb4: 9c pushf
10bdb5: fa cli
10bdb6: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10bdb7: 8a 15 b4 34 12 00 mov 0x1234b4,%dl
10bdbd: 84 d2 test %dl,%dl
10bdbf: 0f 85 f9 fe ff ff jne 10bcbe <_Thread_Dispatch+0x1a>
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
10bdc5: c7 05 64 32 12 00 00 movl $0x0,0x123264
10bdcc: 00 00 00
_ISR_Enable( level );
10bdcf: 50 push %eax
10bdd0: 9d popf
_API_extensions_Run_postswitch();
10bdd1: e8 9d ea ff ff call 10a873 <_API_extensions_Run_postswitch>
}
10bdd6: 8d 65 f4 lea -0xc(%ebp),%esp
10bdd9: 5b pop %ebx
10bdda: 5e pop %esi
10bddb: 5f pop %edi
10bddc: c9 leave
10bddd: c3 ret
0010be00 <_Thread_Get>:
*/
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
10be00: 55 push %ebp
10be01: 89 e5 mov %esp,%ebp
10be03: 53 push %ebx
10be04: 83 ec 04 sub $0x4,%esp
10be07: 8b 55 08 mov 0x8(%ebp),%edx
10be0a: 8b 45 0c mov 0xc(%ebp),%eax
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
10be0d: 85 d2 test %edx,%edx
10be0f: 75 1a jne 10be2b <_Thread_Get+0x2b>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10be11: 8b 15 64 32 12 00 mov 0x123264,%edx
10be17: 42 inc %edx
10be18: 89 15 64 32 12 00 mov %edx,0x123264
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
10be1e: c7 00 00 00 00 00 movl $0x0,(%eax)
tp = _Thread_Executing;
10be24: a1 a8 34 12 00 mov 0x1234a8,%eax
goto done;
10be29: eb 3a jmp 10be65 <_Thread_Get+0x65>
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
10be2b: 89 d1 mov %edx,%ecx
10be2d: c1 e9 18 shr $0x18,%ecx
10be30: 83 e1 07 and $0x7,%ecx
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
10be33: 8d 59 ff lea -0x1(%ecx),%ebx
10be36: 83 fb 02 cmp $0x2,%ebx
10be39: 76 2f jbe 10be6a <_Thread_Get+0x6a>
10be3b: eb 12 jmp 10be4f <_Thread_Get+0x4f>
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
10be3d: 8b 0c 8d 3c 32 12 00 mov 0x12323c(,%ecx,4),%ecx
/*
* There is no way for this to happen if POSIX is enabled.
*/
#if !defined(RTEMS_POSIX_API)
if ( !api_information ) {
10be44: 85 c9 test %ecx,%ecx
10be46: 74 07 je 10be4f <_Thread_Get+0x4f> <== NEVER TAKEN
*location = OBJECTS_ERROR;
goto done;
}
#endif
information = api_information[ the_class ];
10be48: 8b 49 04 mov 0x4(%ecx),%ecx
if ( !information ) {
10be4b: 85 c9 test %ecx,%ecx
10be4d: 75 0a jne 10be59 <_Thread_Get+0x59>
*location = OBJECTS_ERROR;
10be4f: c7 00 01 00 00 00 movl $0x1,(%eax)
{
uint32_t the_api;
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
10be55: 31 c0 xor %eax,%eax
#endif
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
goto done;
10be57: eb 0c jmp 10be65 <_Thread_Get+0x65>
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
10be59: 53 push %ebx
10be5a: 50 push %eax
10be5b: 52 push %edx
10be5c: 51 push %ecx
10be5d: e8 ca f7 ff ff call 10b62c <_Objects_Get>
10be62: 83 c4 10 add $0x10,%esp
done:
return tp;
}
10be65: 8b 5d fc mov -0x4(%ebp),%ebx
10be68: c9 leave
10be69: c3 ret
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10be6a: 89 d3 mov %edx,%ebx
10be6c: c1 eb 1b shr $0x1b,%ebx
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
10be6f: 4b dec %ebx
10be70: 74 cb je 10be3d <_Thread_Get+0x3d>
10be72: eb db jmp 10be4f <_Thread_Get+0x4f>
00110064 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
110064: 55 push %ebp
110065: 89 e5 mov %esp,%ebp
110067: 53 push %ebx
110068: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
11006b: 8b 1d a8 34 12 00 mov 0x1234a8,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
110071: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
_ISR_Set_level(level);
110077: 85 c0 test %eax,%eax
110079: 74 03 je 11007e <_Thread_Handler+0x1a>
11007b: fa cli
11007c: eb 01 jmp 11007f <_Thread_Handler+0x1b>
11007e: fb sti
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
11007f: a0 24 2f 12 00 mov 0x122f24,%al
110084: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
110087: c6 05 24 2f 12 00 01 movb $0x1,0x122f24
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
11008e: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx)
110095: 74 24 je 1100bb <_Thread_Handler+0x57>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
110097: a1 e8 32 12 00 mov 0x1232e8,%eax
11009c: 39 c3 cmp %eax,%ebx
11009e: 74 1b je 1100bb <_Thread_Handler+0x57>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
1100a0: 85 c0 test %eax,%eax
1100a2: 74 11 je 1100b5 <_Thread_Handler+0x51>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
1100a4: 83 ec 0c sub $0xc,%esp
1100a7: 05 e8 00 00 00 add $0xe8,%eax
1100ac: 50 push %eax
1100ad: e8 72 cd ff ff call 10ce24 <_CPU_Context_save_fp>
1100b2: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
1100b5: 89 1d e8 32 12 00 mov %ebx,0x1232e8
/*
* 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 );
1100bb: 83 ec 0c sub $0xc,%esp
1100be: 53 push %ebx
1100bf: e8 10 c9 ff ff call 10c9d4 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
1100c4: e8 15 bd ff ff call 10bdde <_Thread_Enable_dispatch>
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
1100c9: 83 c4 10 add $0x10,%esp
1100cc: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
1100d0: 75 05 jne 1100d7 <_Thread_Handler+0x73>
INIT_NAME ();
1100d2: e8 19 be 00 00 call 11bef0 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
1100d7: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
1100de: 75 15 jne 1100f5 <_Thread_Handler+0x91> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
1100e0: 83 ec 0c sub $0xc,%esp
1100e3: ff b3 a8 00 00 00 pushl 0xa8(%ebx)
1100e9: ff 93 9c 00 00 00 call *0x9c(%ebx)
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
1100ef: 89 43 28 mov %eax,0x28(%ebx)
1100f2: 83 c4 10 add $0x10,%esp
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
1100f5: 83 ec 0c sub $0xc,%esp
1100f8: 53 push %ebx
1100f9: e8 07 c9 ff ff call 10ca05 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
1100fe: 83 c4 0c add $0xc,%esp
110101: 6a 05 push $0x5
110103: 6a 01 push $0x1
110105: 6a 00 push $0x0
110107: e8 60 b0 ff ff call 10b16c <_Internal_error_Occurred>
0010be74 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10be74: 55 push %ebp
10be75: 89 e5 mov %esp,%ebp
10be77: 57 push %edi
10be78: 56 push %esi
10be79: 53 push %ebx
10be7a: 83 ec 24 sub $0x24,%esp
10be7d: 8b 5d 0c mov 0xc(%ebp),%ebx
10be80: 8b 75 14 mov 0x14(%ebp),%esi
10be83: 8a 55 18 mov 0x18(%ebp),%dl
10be86: 8a 45 20 mov 0x20(%ebp),%al
10be89: 88 45 e7 mov %al,-0x19(%ebp)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10be8c: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
10be93: 00 00 00
10be96: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx)
10be9d: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10bea0: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx)
10bea7: 00 00 00
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10beaa: 56 push %esi
10beab: 53 push %ebx
10beac: 88 55 e0 mov %dl,-0x20(%ebp)
10beaf: e8 44 08 00 00 call 10c6f8 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10beb4: 83 c4 10 add $0x10,%esp
10beb7: 39 f0 cmp %esi,%eax
10beb9: 8a 55 e0 mov -0x20(%ebp),%dl
10bebc: 0f 82 a1 01 00 00 jb 10c063 <_Thread_Initialize+0x1ef>
10bec2: 85 c0 test %eax,%eax
10bec4: 0f 84 99 01 00 00 je 10c063 <_Thread_Initialize+0x1ef><== NEVER TAKEN
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10beca: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx
10bed0: 89 8b c4 00 00 00 mov %ecx,0xc4(%ebx)
the_stack->size = size;
10bed6: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx)
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10bedc: 31 ff xor %edi,%edi
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10bede: 84 d2 test %dl,%dl
10bee0: 74 17 je 10bef9 <_Thread_Initialize+0x85>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10bee2: 83 ec 0c sub $0xc,%esp
10bee5: 6a 6c push $0x6c
10bee7: e8 9e 0e 00 00 call 10cd8a <_Workspace_Allocate>
10beec: 89 c7 mov %eax,%edi
if ( !fp_area )
10beee: 83 c4 10 add $0x10,%esp
10bef1: 85 c0 test %eax,%eax
10bef3: 0f 84 fa 00 00 00 je 10bff3 <_Thread_Initialize+0x17f>
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10bef9: 89 bb e8 00 00 00 mov %edi,0xe8(%ebx)
the_thread->Start.fp_context = fp_area;
10beff: 89 bb c8 00 00 00 mov %edi,0xc8(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10bf05: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10bf0c: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10bf13: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10bf1a: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10bf21: a1 f8 32 12 00 mov 0x1232f8,%eax
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10bf26: 31 f6 xor %esi,%esi
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10bf28: 85 c0 test %eax,%eax
10bf2a: 74 1d je 10bf49 <_Thread_Initialize+0xd5>
extensions_area = _Workspace_Allocate(
10bf2c: 83 ec 0c sub $0xc,%esp
10bf2f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10bf36: 50 push %eax
10bf37: e8 4e 0e 00 00 call 10cd8a <_Workspace_Allocate>
10bf3c: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10bf3e: 83 c4 10 add $0x10,%esp
10bf41: 85 c0 test %eax,%eax
10bf43: 0f 84 ac 00 00 00 je 10bff5 <_Thread_Initialize+0x181>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10bf49: 89 b3 f8 00 00 00 mov %esi,0xf8(%ebx)
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
10bf4f: 85 f6 test %esi,%esi
10bf51: 74 16 je 10bf69 <_Thread_Initialize+0xf5>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10bf53: 8b 15 f8 32 12 00 mov 0x1232f8,%edx
10bf59: 31 c0 xor %eax,%eax
10bf5b: eb 08 jmp 10bf65 <_Thread_Initialize+0xf1>
the_thread->extensions[i] = NULL;
10bf5d: c7 04 86 00 00 00 00 movl $0x0,(%esi,%eax,4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10bf64: 40 inc %eax
10bf65: 39 d0 cmp %edx,%eax
10bf67: 76 f4 jbe 10bf5d <_Thread_Initialize+0xe9>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10bf69: 8a 45 e7 mov -0x19(%ebp),%al
10bf6c: 88 83 ac 00 00 00 mov %al,0xac(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10bf72: 8b 45 24 mov 0x24(%ebp),%eax
10bf75: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10bf7b: 8b 45 28 mov 0x28(%ebp),%eax
10bf7e: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10bf84: 8b 45 2c mov 0x2c(%ebp),%eax
10bf87: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
the_thread->current_state = STATES_DORMANT;
10bf8d: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10bf94: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10bf9b: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10bfa2: 8b 45 1c mov 0x1c(%ebp),%eax
10bfa5: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10bfa8: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
_Thread_Set_priority( the_thread, priority );
10bfae: 52 push %edx
10bfaf: 52 push %edx
10bfb0: 50 push %eax
10bfb1: 53 push %ebx
10bfb2: e8 95 05 00 00 call 10c54c <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10bfb7: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10bfbe: 00 00 00
10bfc1: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10bfc8: 00 00 00
_Thread_Stack_Free( the_thread );
return false;
}
10bfcb: 8b 45 08 mov 0x8(%ebp),%eax
10bfce: 8b 40 1c mov 0x1c(%eax),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10bfd1: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bfd5: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10bfd8: 8b 45 30 mov 0x30(%ebp),%eax
10bfdb: 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 );
10bfde: 89 1c 24 mov %ebx,(%esp)
10bfe1: e8 8e 0a 00 00 call 10ca74 <_User_extensions_Thread_create>
10bfe6: 88 c2 mov %al,%dl
if ( extension_status )
10bfe8: 83 c4 10 add $0x10,%esp
return true;
10bfeb: b0 01 mov $0x1,%al
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
10bfed: 84 d2 test %dl,%dl
10bfef: 74 04 je 10bff5 <_Thread_Initialize+0x181>
10bff1: eb 72 jmp 10c065 <_Thread_Initialize+0x1f1>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10bff3: 31 f6 xor %esi,%esi
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
10bff5: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
10bffb: 85 c0 test %eax,%eax
10bffd: 74 0c je 10c00b <_Thread_Initialize+0x197>
_Workspace_Free( the_thread->libc_reent );
10bfff: 83 ec 0c sub $0xc,%esp
10c002: 50 push %eax
10c003: e8 9b 0d 00 00 call 10cda3 <_Workspace_Free>
10c008: 83 c4 10 add $0x10,%esp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10c00b: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax
10c011: 85 c0 test %eax,%eax
10c013: 74 0c je 10c021 <_Thread_Initialize+0x1ad>
_Workspace_Free( the_thread->API_Extensions[i] );
10c015: 83 ec 0c sub $0xc,%esp
10c018: 50 push %eax
10c019: e8 85 0d 00 00 call 10cda3 <_Workspace_Free>
10c01e: 83 c4 10 add $0x10,%esp
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10c021: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax
10c027: 85 c0 test %eax,%eax
10c029: 74 0c je 10c037 <_Thread_Initialize+0x1c3><== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
10c02b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c02e: 50 push %eax <== NOT EXECUTED
10c02f: e8 6f 0d 00 00 call 10cda3 <_Workspace_Free> <== NOT EXECUTED
10c034: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( extensions_area )
10c037: 85 f6 test %esi,%esi
10c039: 74 0c je 10c047 <_Thread_Initialize+0x1d3>
(void) _Workspace_Free( extensions_area );
10c03b: 83 ec 0c sub $0xc,%esp
10c03e: 56 push %esi
10c03f: e8 5f 0d 00 00 call 10cda3 <_Workspace_Free>
10c044: 83 c4 10 add $0x10,%esp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
10c047: 85 ff test %edi,%edi
10c049: 74 0c je 10c057 <_Thread_Initialize+0x1e3>
(void) _Workspace_Free( fp_area );
10c04b: 83 ec 0c sub $0xc,%esp
10c04e: 57 push %edi
10c04f: e8 4f 0d 00 00 call 10cda3 <_Workspace_Free>
10c054: 83 c4 10 add $0x10,%esp
#endif
_Thread_Stack_Free( the_thread );
10c057: 83 ec 0c sub $0xc,%esp
10c05a: 53 push %ebx
10c05b: e8 e8 06 00 00 call 10c748 <_Thread_Stack_Free>
return false;
10c060: 83 c4 10 add $0x10,%esp
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
10c063: 31 c0 xor %eax,%eax
_Thread_Stack_Free( the_thread );
return false;
}
10c065: 8d 65 f4 lea -0xc(%ebp),%esp
10c068: 5b pop %ebx
10c069: 5e pop %esi
10c06a: 5f pop %edi
10c06b: c9 leave
10c06c: c3 ret
0010f2ec <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
10f2ec: 55 push %ebp
10f2ed: 89 e5 mov %esp,%ebp
10f2ef: 53 push %ebx
10f2f0: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10f2f3: 9c pushf
10f2f4: fa cli
10f2f5: 59 pop %ecx
current_state = the_thread->current_state;
10f2f6: 8b 50 10 mov 0x10(%eax),%edx
if ( current_state & STATES_SUSPENDED ) {
10f2f9: f6 c2 02 test $0x2,%dl
10f2fc: 74 70 je 10f36e <_Thread_Resume+0x82> <== NEVER TAKEN
10f2fe: 83 e2 fd and $0xfffffffd,%edx
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
10f301: 89 50 10 mov %edx,0x10(%eax)
if ( _States_Is_ready( current_state ) ) {
10f304: 85 d2 test %edx,%edx
10f306: 75 66 jne 10f36e <_Thread_Resume+0x82>
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10f308: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
10f30e: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx
10f315: 66 09 1a or %bx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10f318: 66 8b 15 d8 63 12 00 mov 0x1263d8,%dx
10f31f: 0b 90 94 00 00 00 or 0x94(%eax),%edx
10f325: 66 89 15 d8 63 12 00 mov %dx,0x1263d8
_Priority_bit_map_Add( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10f32c: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10f332: 8d 5a 04 lea 0x4(%edx),%ebx
10f335: 89 18 mov %ebx,(%eax)
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
10f337: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
10f33a: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10f33d: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
10f33f: 89 58 04 mov %ebx,0x4(%eax)
_ISR_Flash( level );
10f342: 51 push %ecx
10f343: 9d popf
10f344: fa cli
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
10f345: 8b 50 14 mov 0x14(%eax),%edx
10f348: 8b 1d 7c 65 12 00 mov 0x12657c,%ebx
10f34e: 3b 53 14 cmp 0x14(%ebx),%edx
10f351: 73 1b jae 10f36e <_Thread_Resume+0x82>
_Thread_Heir = the_thread;
10f353: a3 7c 65 12 00 mov %eax,0x12657c
if ( _Thread_Executing->is_preemptible ||
10f358: a1 78 65 12 00 mov 0x126578,%eax
10f35d: 80 78 74 00 cmpb $0x0,0x74(%eax)
10f361: 75 04 jne 10f367 <_Thread_Resume+0x7b>
10f363: 85 d2 test %edx,%edx
10f365: 75 07 jne 10f36e <_Thread_Resume+0x82> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10f367: c6 05 84 65 12 00 01 movb $0x1,0x126584
}
}
}
_ISR_Enable( level );
10f36e: 51 push %ecx
10f36f: 9d popf
}
10f370: 5b pop %ebx
10f371: c9 leave
10f372: c3 ret
0010c860 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
10c860: 55 push %ebp
10c861: 89 e5 mov %esp,%ebp
10c863: 57 push %edi
10c864: 56 push %esi
10c865: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10c866: a1 a8 34 12 00 mov 0x1234a8,%eax
ready = executing->ready;
10c86b: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
10c871: 9c pushf
10c872: fa cli
10c873: 5b pop %ebx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Has_only_one_node(
const Chain_Control *the_chain
)
{
return (the_chain->first == the_chain->last);
10c874: 8b 4a 08 mov 0x8(%edx),%ecx
if ( !_Chain_Has_only_one_node( ready ) ) {
10c877: 39 0a cmp %ecx,(%edx)
10c879: 74 2b je 10c8a6 <_Thread_Yield_processor+0x46>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10c87b: 8b 38 mov (%eax),%edi
previous = the_node->previous;
10c87d: 8b 70 04 mov 0x4(%eax),%esi
next->previous = previous;
10c880: 89 77 04 mov %esi,0x4(%edi)
previous->next = next;
10c883: 89 3e mov %edi,(%esi)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10c885: 8d 72 04 lea 0x4(%edx),%esi
10c888: 89 30 mov %esi,(%eax)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
10c88a: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10c88d: 89 01 mov %eax,(%ecx)
the_node->previous = old_last_node;
10c88f: 89 48 04 mov %ecx,0x4(%eax)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10c892: 53 push %ebx
10c893: 9d popf
10c894: fa cli
if ( _Thread_Is_heir( executing ) )
10c895: 3b 05 ac 34 12 00 cmp 0x1234ac,%eax
10c89b: 75 11 jne 10c8ae <_Thread_Yield_processor+0x4e><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
10c89d: 8b 02 mov (%edx),%eax
10c89f: a3 ac 34 12 00 mov %eax,0x1234ac
10c8a4: eb 08 jmp 10c8ae <_Thread_Yield_processor+0x4e>
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
10c8a6: 3b 05 ac 34 12 00 cmp 0x1234ac,%eax
10c8ac: 74 07 je 10c8b5 <_Thread_Yield_processor+0x55><== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
10c8ae: c6 05 b4 34 12 00 01 movb $0x1,0x1234b4
_ISR_Enable( level );
10c8b5: 53 push %ebx
10c8b6: 9d popf
}
10c8b7: 5b pop %ebx
10c8b8: 5e pop %esi
10c8b9: 5f pop %edi
10c8ba: c9 leave
10c8bb: c3 ret
0010c4c4 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10c4c4: 55 push %ebp
10c4c5: 89 e5 mov %esp,%ebp
10c4c7: 57 push %edi
10c4c8: 56 push %esi
10c4c9: 53 push %ebx
10c4ca: 83 ec 1c sub $0x1c,%esp
10c4cd: 8b 75 08 mov 0x8(%ebp),%esi
10c4d0: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
10c4d3: 85 f6 test %esi,%esi
10c4d5: 74 36 je 10c50d <_Thread_queue_Requeue+0x49><== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10c4d7: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10c4db: 75 30 jne 10c50d <_Thread_queue_Requeue+0x49><== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10c4dd: 9c pushf
10c4de: fa cli
10c4df: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10c4e0: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10c4e7: 74 22 je 10c50b <_Thread_queue_Requeue+0x47><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c4e9: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
10c4f0: 50 push %eax
10c4f1: 6a 01 push $0x1
10c4f3: 57 push %edi
10c4f4: 56 push %esi
10c4f5: e8 4e 28 00 00 call 10ed48 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10c4fa: 83 c4 0c add $0xc,%esp
10c4fd: 8d 45 e4 lea -0x1c(%ebp),%eax
10c500: 50 push %eax
10c501: 57 push %edi
10c502: 56 push %esi
10c503: e8 c4 fd ff ff call 10c2cc <_Thread_queue_Enqueue_priority>
10c508: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10c50b: 53 push %ebx
10c50c: 9d popf
}
}
10c50d: 8d 65 f4 lea -0xc(%ebp),%esp
10c510: 5b pop %ebx
10c511: 5e pop %esi
10c512: 5f pop %edi
10c513: c9 leave
10c514: c3 ret
0010c518 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10c518: 55 push %ebp
10c519: 89 e5 mov %esp,%ebp
10c51b: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10c51e: 8d 45 f4 lea -0xc(%ebp),%eax
10c521: 50 push %eax
10c522: ff 75 08 pushl 0x8(%ebp)
10c525: e8 d6 f8 ff ff call 10be00 <_Thread_Get>
switch ( location ) {
10c52a: 83 c4 10 add $0x10,%esp
10c52d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10c531: 75 17 jne 10c54a <_Thread_queue_Timeout+0x32><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10c533: 83 ec 0c sub $0xc,%esp
10c536: 50 push %eax
10c537: e8 c0 28 00 00 call 10edfc <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10c53c: a1 64 32 12 00 mov 0x123264,%eax
10c541: 48 dec %eax
10c542: a3 64 32 12 00 mov %eax,0x123264
10c547: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10c54a: c9 leave
10c54b: c3 ret
0011695c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
11695c: 55 push %ebp
11695d: 89 e5 mov %esp,%ebp
11695f: 57 push %edi
116960: 56 push %esi
116961: 53 push %ebx
116962: 83 ec 4c sub $0x4c,%esp
116965: 8b 5d 08 mov 0x8(%ebp),%ebx
116968: 8d 45 dc lea -0x24(%ebp),%eax
11696b: 8d 55 e0 lea -0x20(%ebp),%edx
11696e: 89 55 b4 mov %edx,-0x4c(%ebp)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
116971: 89 55 dc mov %edx,-0x24(%ebp)
the_chain->permanent_null = NULL;
116974: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
Timer_server_Control *ts = (Timer_server_Control *) arg;
Chain_Control insert_chain;
Chain_Control fire_chain;
_Chain_Initialize_empty( &insert_chain );
11697b: 89 45 e4 mov %eax,-0x1c(%ebp)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11697e: 8d 7d d0 lea -0x30(%ebp),%edi
116981: 8d 55 d4 lea -0x2c(%ebp),%edx
116984: 89 55 b0 mov %edx,-0x50(%ebp)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
116987: 89 55 d0 mov %edx,-0x30(%ebp)
the_chain->permanent_null = NULL;
11698a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
the_chain->last = _Chain_Head(the_chain);
116991: 89 7d d8 mov %edi,-0x28(%ebp)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
116994: 8d 43 30 lea 0x30(%ebx),%eax
116997: 89 45 c0 mov %eax,-0x40(%ebp)
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
11699a: 8d 73 68 lea 0x68(%ebx),%esi
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
11699d: 8d 53 08 lea 0x8(%ebx),%edx
1169a0: 89 55 bc mov %edx,-0x44(%ebp)
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
1169a3: 8d 4d dc lea -0x24(%ebp),%ecx
1169a6: 89 4b 78 mov %ecx,0x78(%ebx)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
1169a9: a1 70 c7 13 00 mov 0x13c770,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
1169ae: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
1169b1: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1169b4: 51 push %ecx
1169b5: 8d 4d d0 lea -0x30(%ebp),%ecx
1169b8: 51 push %ecx
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
1169b9: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1169bb: 50 push %eax
1169bc: ff 75 c0 pushl -0x40(%ebp)
1169bf: e8 0c 38 00 00 call 11a1d0 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
1169c4: a1 c4 c6 13 00 mov 0x13c6c4,%eax
1169c9: 89 45 c4 mov %eax,-0x3c(%ebp)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
1169cc: 8b 43 74 mov 0x74(%ebx),%eax
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
1169cf: 83 c4 10 add $0x10,%esp
1169d2: 39 45 c4 cmp %eax,-0x3c(%ebp)
1169d5: 76 13 jbe 1169ea <_Timer_server_Body+0x8e>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1169d7: 52 push %edx
1169d8: 8d 55 d0 lea -0x30(%ebp),%edx
1169db: 52 push %edx
if ( snapshot > last_snapshot ) {
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
1169dc: 8b 4d c4 mov -0x3c(%ebp),%ecx
1169df: 29 c1 sub %eax,%ecx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1169e1: 51 push %ecx
1169e2: 56 push %esi
1169e3: e8 e8 37 00 00 call 11a1d0 <_Watchdog_Adjust_to_chain>
1169e8: eb 0f jmp 1169f9 <_Timer_server_Body+0x9d>
} else if ( snapshot < last_snapshot ) {
1169ea: 73 10 jae 1169fc <_Timer_server_Body+0xa0>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
1169ec: 51 push %ecx
} else if ( snapshot < last_snapshot ) {
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
1169ed: 2b 45 c4 sub -0x3c(%ebp),%eax
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
1169f0: 50 push %eax
1169f1: 6a 01 push $0x1
1169f3: 56 push %esi
1169f4: e8 6b 37 00 00 call 11a164 <_Watchdog_Adjust>
1169f9: 83 c4 10 add $0x10,%esp
}
watchdogs->last_snapshot = snapshot;
1169fc: 8b 45 c4 mov -0x3c(%ebp),%eax
1169ff: 89 43 74 mov %eax,0x74(%ebx)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
116a02: 8b 43 78 mov 0x78(%ebx),%eax
116a05: 83 ec 0c sub $0xc,%esp
116a08: 50 push %eax
116a09: e8 96 08 00 00 call 1172a4 <_Chain_Get>
if ( timer == NULL ) {
116a0e: 83 c4 10 add $0x10,%esp
116a11: 85 c0 test %eax,%eax
116a13: 74 29 je 116a3e <_Timer_server_Body+0xe2><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116a15: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
116a18: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
116a1b: 75 0b jne 116a28 <_Timer_server_Body+0xcc><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116a1d: 52 push %edx <== NOT EXECUTED
116a1e: 52 push %edx <== NOT EXECUTED
116a1f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
116a22: 50 push %eax <== NOT EXECUTED
116a23: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED
116a26: eb 0c jmp 116a34 <_Timer_server_Body+0xd8><== NOT EXECUTED
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116a28: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
116a2b: 75 d5 jne 116a02 <_Timer_server_Body+0xa6><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116a2d: 51 push %ecx <== NOT EXECUTED
116a2e: 51 push %ecx <== NOT EXECUTED
116a2f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
116a32: 50 push %eax <== NOT EXECUTED
116a33: 56 push %esi <== NOT EXECUTED
116a34: e8 1f 38 00 00 call 11a258 <_Watchdog_Insert> <== NOT EXECUTED
116a39: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
116a3c: eb c4 jmp 116a02 <_Timer_server_Body+0xa6><== 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 );
116a3e: 9c pushf
116a3f: fa cli
116a40: 58 pop %eax
if ( _Chain_Is_empty( insert_chain ) ) {
116a41: 8b 55 b4 mov -0x4c(%ebp),%edx
116a44: 39 55 dc cmp %edx,-0x24(%ebp)
116a47: 75 13 jne 116a5c <_Timer_server_Body+0x100><== NEVER TAKEN
ts->insert_chain = NULL;
116a49: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
116a50: 50 push %eax
116a51: 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 ) ) {
116a52: 8b 4d b0 mov -0x50(%ebp),%ecx
116a55: 39 4d d0 cmp %ecx,-0x30(%ebp)
116a58: 75 09 jne 116a63 <_Timer_server_Body+0x107>
116a5a: eb 3e jmp 116a9a <_Timer_server_Body+0x13e>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
116a5c: 50 push %eax <== NOT EXECUTED
116a5d: 9d popf <== NOT EXECUTED
116a5e: e9 46 ff ff ff jmp 1169a9 <_Timer_server_Body+0x4d><== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
116a63: 9c pushf
116a64: fa cli
116a65: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
116a66: 8b 45 d0 mov -0x30(%ebp),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
116a69: 3b 45 b0 cmp -0x50(%ebp),%eax
116a6c: 74 25 je 116a93 <_Timer_server_Body+0x137>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
116a6e: 8b 08 mov (%eax),%ecx
the_chain->first = new_first;
116a70: 89 4d d0 mov %ecx,-0x30(%ebp)
new_first->previous = _Chain_Head(the_chain);
116a73: 89 79 04 mov %edi,0x4(%ecx)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
116a76: 85 c0 test %eax,%eax
116a78: 74 19 je 116a93 <_Timer_server_Body+0x137><== NEVER TAKEN
watchdog->state = WATCHDOG_INACTIVE;
116a7a: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
116a81: 52 push %edx
116a82: 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 );
116a83: 52 push %edx
116a84: 52 push %edx
116a85: ff 70 24 pushl 0x24(%eax)
116a88: ff 70 20 pushl 0x20(%eax)
116a8b: ff 50 1c call *0x1c(%eax)
}
116a8e: 83 c4 10 add $0x10,%esp
116a91: eb d0 jmp 116a63 <_Timer_server_Body+0x107>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
116a93: 52 push %edx
116a94: 9d popf
116a95: e9 09 ff ff ff jmp 1169a3 <_Timer_server_Body+0x47>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
116a9a: c6 43 7c 00 movb $0x0,0x7c(%ebx)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
116a9e: e8 1d fe ff ff call 1168c0 <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
116aa3: 50 push %eax
116aa4: 50 push %eax
116aa5: 6a 08 push $0x8
116aa7: ff 33 pushl (%ebx)
116aa9: e8 be 2f 00 00 call 119a6c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
116aae: 89 d8 mov %ebx,%eax
116ab0: e8 1b fe ff ff call 1168d0 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
116ab5: 89 d8 mov %ebx,%eax
116ab7: e8 5a fe ff ff call 116916 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
116abc: e8 c9 26 00 00 call 11918a <_Thread_Enable_dispatch>
ts->active = true;
116ac1: 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 );
116ac5: 59 pop %ecx
116ac6: ff 75 bc pushl -0x44(%ebp)
116ac9: e8 a2 38 00 00 call 11a370 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
116ace: 8d 43 40 lea 0x40(%ebx),%eax
116ad1: 89 04 24 mov %eax,(%esp)
116ad4: e8 97 38 00 00 call 11a370 <_Watchdog_Remove>
116ad9: 83 c4 10 add $0x10,%esp
116adc: e9 c2 fe ff ff jmp 1169a3 <_Timer_server_Body+0x47>
00116ae1 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
116ae1: 55 push %ebp
116ae2: 89 e5 mov %esp,%ebp
116ae4: 57 push %edi
116ae5: 56 push %esi
116ae6: 53 push %ebx
116ae7: 83 ec 2c sub $0x2c,%esp
116aea: 8b 5d 08 mov 0x8(%ebp),%ebx
116aed: 8b 75 0c mov 0xc(%ebp),%esi
if ( ts->insert_chain == NULL ) {
116af0: 8b 43 78 mov 0x78(%ebx),%eax
116af3: 85 c0 test %eax,%eax
116af5: 0f 85 de 00 00 00 jne 116bd9 <_Timer_server_Schedule_operation_method+0xf8><== NEVER TAKEN
* is the reference point for the delta chain. Thus if we do not update the
* reference point we have to add DT to the initial delta of the watchdog
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
116afb: e8 c0 fd ff ff call 1168c0 <_Thread_Disable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116b00: 8b 46 38 mov 0x38(%esi),%eax
116b03: 83 f8 01 cmp $0x1,%eax
116b06: 75 5a jne 116b62 <_Timer_server_Schedule_operation_method+0x81>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
116b08: 9c pushf
116b09: fa cli
116b0a: 8f 45 e0 popl -0x20(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
116b0d: 8b 15 70 c7 13 00 mov 0x13c770,%edx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
116b13: 8b 4b 3c mov 0x3c(%ebx),%ecx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
116b16: 8b 43 30 mov 0x30(%ebx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
116b19: 8d 7b 34 lea 0x34(%ebx),%edi
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
116b1c: 39 f8 cmp %edi,%eax
116b1e: 74 19 je 116b39 <_Timer_server_Schedule_operation_method+0x58>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
116b20: 89 d7 mov %edx,%edi
116b22: 29 cf sub %ecx,%edi
116b24: 89 7d e4 mov %edi,-0x1c(%ebp)
delta_interval = first_watchdog->delta_interval;
116b27: 8b 78 10 mov 0x10(%eax),%edi
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
116b2a: 31 c9 xor %ecx,%ecx
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
116b2c: 3b 7d e4 cmp -0x1c(%ebp),%edi
116b2f: 76 05 jbe 116b36 <_Timer_server_Schedule_operation_method+0x55>
delta_interval -= delta;
116b31: 89 f9 mov %edi,%ecx
116b33: 2b 4d e4 sub -0x1c(%ebp),%ecx
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
116b36: 89 48 10 mov %ecx,0x10(%eax)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
116b39: 89 53 3c mov %edx,0x3c(%ebx)
_ISR_Enable( level );
116b3c: ff 75 e0 pushl -0x20(%ebp)
116b3f: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116b40: 50 push %eax
116b41: 50 push %eax
116b42: 83 c6 10 add $0x10,%esi
116b45: 56 push %esi
116b46: 8d 43 30 lea 0x30(%ebx),%eax
116b49: 50 push %eax
116b4a: e8 09 37 00 00 call 11a258 <_Watchdog_Insert>
if ( !ts->active ) {
116b4f: 8a 43 7c mov 0x7c(%ebx),%al
116b52: 83 c4 10 add $0x10,%esp
116b55: 84 c0 test %al,%al
116b57: 75 74 jne 116bcd <_Timer_server_Schedule_operation_method+0xec>
_Timer_server_Reset_interval_system_watchdog( ts );
116b59: 89 d8 mov %ebx,%eax
116b5b: e8 70 fd ff ff call 1168d0 <_Timer_server_Reset_interval_system_watchdog>
116b60: eb 6b jmp 116bcd <_Timer_server_Schedule_operation_method+0xec>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116b62: 83 f8 03 cmp $0x3,%eax
116b65: 75 66 jne 116bcd <_Timer_server_Schedule_operation_method+0xec>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
116b67: 9c pushf
116b68: fa cli
116b69: 8f 45 e0 popl -0x20(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
116b6c: 8b 15 c4 c6 13 00 mov 0x13c6c4,%edx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
116b72: 8b 43 74 mov 0x74(%ebx),%eax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
116b75: 8b 4b 68 mov 0x68(%ebx),%ecx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
116b78: 8d 7b 6c lea 0x6c(%ebx),%edi
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
116b7b: 39 f9 cmp %edi,%ecx
116b7d: 74 27 je 116ba6 <_Timer_server_Schedule_operation_method+0xc5>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
116b7f: 8b 79 10 mov 0x10(%ecx),%edi
116b82: 89 7d d4 mov %edi,-0x2c(%ebp)
if ( snapshot > last_snapshot ) {
116b85: 39 c2 cmp %eax,%edx
116b87: 76 15 jbe 116b9e <_Timer_server_Schedule_operation_method+0xbd>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
116b89: 89 d7 mov %edx,%edi
116b8b: 29 c7 sub %eax,%edi
116b8d: 89 7d e4 mov %edi,-0x1c(%ebp)
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
116b90: 31 c0 xor %eax,%eax
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
116b92: 39 7d d4 cmp %edi,-0x2c(%ebp)
116b95: 76 0c jbe 116ba3 <_Timer_server_Schedule_operation_method+0xc2><== NEVER TAKEN
delta_interval -= delta;
116b97: 8b 45 d4 mov -0x2c(%ebp),%eax
116b9a: 29 f8 sub %edi,%eax
116b9c: eb 05 jmp 116ba3 <_Timer_server_Schedule_operation_method+0xc2>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
116b9e: 03 45 d4 add -0x2c(%ebp),%eax
delta_interval += delta;
116ba1: 29 d0 sub %edx,%eax
}
first_watchdog->delta_interval = delta_interval;
116ba3: 89 41 10 mov %eax,0x10(%ecx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
116ba6: 89 53 74 mov %edx,0x74(%ebx)
_ISR_Enable( level );
116ba9: ff 75 e0 pushl -0x20(%ebp)
116bac: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116bad: 57 push %edi
116bae: 57 push %edi
116baf: 83 c6 10 add $0x10,%esi
116bb2: 56 push %esi
116bb3: 8d 43 68 lea 0x68(%ebx),%eax
116bb6: 50 push %eax
116bb7: e8 9c 36 00 00 call 11a258 <_Watchdog_Insert>
if ( !ts->active ) {
116bbc: 8a 43 7c mov 0x7c(%ebx),%al
116bbf: 83 c4 10 add $0x10,%esp
116bc2: 84 c0 test %al,%al
116bc4: 75 07 jne 116bcd <_Timer_server_Schedule_operation_method+0xec>
_Timer_server_Reset_tod_system_watchdog( ts );
116bc6: 89 d8 mov %ebx,%eax
116bc8: e8 49 fd ff ff call 116916 <_Timer_server_Reset_tod_system_watchdog>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
116bcd: 8d 65 f4 lea -0xc(%ebp),%esp
116bd0: 5b pop %ebx
116bd1: 5e pop %esi
116bd2: 5f pop %edi
116bd3: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
116bd4: e9 b1 25 00 00 jmp 11918a <_Thread_Enable_dispatch>
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
116bd9: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
116bdc: 89 75 0c mov %esi,0xc(%ebp) <== NOT EXECUTED
116bdf: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
}
116be2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
116be5: 5b pop %ebx <== NOT EXECUTED
116be6: 5e pop %esi <== NOT EXECUTED
116be7: 5f pop %edi <== NOT EXECUTED
116be8: c9 leave <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
116be9: e9 7a 06 00 00 jmp 117268 <_Chain_Append> <== NOT EXECUTED
0010e1bc <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
10e1bc: 55 push %ebp
10e1bd: 89 e5 mov %esp,%ebp
10e1bf: 53 push %ebx
10e1c0: 8b 4d 08 mov 0x8(%ebp),%ecx
10e1c3: 8b 55 0c mov 0xc(%ebp),%edx
if ( lhs->tv_sec > rhs->tv_sec )
return true;
10e1c6: b0 01 mov $0x1,%al
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
10e1c8: 8b 1a mov (%edx),%ebx
10e1ca: 39 19 cmp %ebx,(%ecx)
10e1cc: 7f 0d jg 10e1db <_Timespec_Greater_than+0x1f>
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
10e1ce: b0 00 mov $0x0,%al
)
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
10e1d0: 7c 09 jl 10e1db <_Timespec_Greater_than+0x1f><== NEVER TAKEN
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
10e1d2: 8b 42 04 mov 0x4(%edx),%eax
10e1d5: 39 41 04 cmp %eax,0x4(%ecx)
10e1d8: 0f 9f c0 setg %al
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
10e1db: 5b pop %ebx
10e1dc: c9 leave
10e1dd: c3 ret
0010ca37 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10ca37: 55 push %ebp
10ca38: 89 e5 mov %esp,%ebp
10ca3a: 57 push %edi
10ca3b: 56 push %esi
10ca3c: 53 push %ebx
10ca3d: 83 ec 0c sub $0xc,%esp
10ca40: 8b 7d 10 mov 0x10(%ebp),%edi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10ca43: 8b 1d 60 34 12 00 mov 0x123460,%ebx
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10ca49: 0f b6 75 0c movzbl 0xc(%ebp),%esi
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10ca4d: eb 15 jmp 10ca64 <_User_extensions_Fatal+0x2d>
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
10ca4f: 8b 43 30 mov 0x30(%ebx),%eax
10ca52: 85 c0 test %eax,%eax
10ca54: 74 0b je 10ca61 <_User_extensions_Fatal+0x2a>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10ca56: 52 push %edx
10ca57: 57 push %edi
10ca58: 56 push %esi
10ca59: ff 75 08 pushl 0x8(%ebp)
10ca5c: ff d0 call *%eax
10ca5e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10ca61: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10ca64: 81 fb 58 34 12 00 cmp $0x123458,%ebx
10ca6a: 75 e3 jne 10ca4f <_User_extensions_Fatal+0x18><== ALWAYS TAKEN
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10ca6c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10ca6f: 5b pop %ebx <== NOT EXECUTED
10ca70: 5e pop %esi <== NOT EXECUTED
10ca71: 5f pop %edi <== NOT EXECUTED
10ca72: c9 leave <== NOT EXECUTED
10ca73: c3 ret <== NOT EXECUTED
0010c920 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10c920: 55 push %ebp
10c921: 89 e5 mov %esp,%ebp
10c923: 57 push %edi
10c924: 56 push %esi
10c925: 53 push %ebx
10c926: 83 ec 1c sub $0x1c,%esp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
10c929: a1 30 f2 11 00 mov 0x11f230,%eax
10c92e: 89 45 e4 mov %eax,-0x1c(%ebp)
initial_extensions = Configuration.User_extension_table;
10c931: 8b 35 34 f2 11 00 mov 0x11f234,%esi
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10c937: c7 05 58 34 12 00 5c movl $0x12345c,0x123458
10c93e: 34 12 00
the_chain->permanent_null = NULL;
10c941: c7 05 5c 34 12 00 00 movl $0x0,0x12345c
10c948: 00 00 00
the_chain->last = _Chain_Head(the_chain);
10c94b: c7 05 60 34 12 00 58 movl $0x123458,0x123460
10c952: 34 12 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10c955: c7 05 68 32 12 00 6c movl $0x12326c,0x123268
10c95c: 32 12 00
the_chain->permanent_null = NULL;
10c95f: c7 05 6c 32 12 00 00 movl $0x0,0x12326c
10c966: 00 00 00
the_chain->last = _Chain_Head(the_chain);
10c969: c7 05 70 32 12 00 68 movl $0x123268,0x123270
10c970: 32 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10c973: 85 f6 test %esi,%esi
10c975: 74 53 je 10c9ca <_User_extensions_Handler_initialization+0xaa><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10c977: 6b c8 34 imul $0x34,%eax,%ecx
10c97a: 83 ec 0c sub $0xc,%esp
10c97d: 51 push %ecx
10c97e: 89 4d e0 mov %ecx,-0x20(%ebp)
10c981: e8 32 04 00 00 call 10cdb8 <_Workspace_Allocate_or_fatal_error>
10c986: 89 c3 mov %eax,%ebx
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10c988: 31 c0 xor %eax,%eax
10c98a: 8b 4d e0 mov -0x20(%ebp),%ecx
10c98d: 89 df mov %ebx,%edi
10c98f: f3 aa rep stos %al,%es:(%edi)
10c991: 89 f0 mov %esi,%eax
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10c993: 83 c4 10 add $0x10,%esp
10c996: 31 d2 xor %edx,%edx
10c998: eb 2b jmp 10c9c5 <_User_extensions_Handler_initialization+0xa5>
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10c99a: 8d 7b 14 lea 0x14(%ebx),%edi
10c99d: 89 c6 mov %eax,%esi
10c99f: b9 08 00 00 00 mov $0x8,%ecx
10c9a4: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10c9a6: 83 ec 0c sub $0xc,%esp
10c9a9: 53 push %ebx
10c9aa: 89 45 dc mov %eax,-0x24(%ebp)
10c9ad: 89 55 e0 mov %edx,-0x20(%ebp)
10c9b0: e8 03 26 00 00 call 10efb8 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10c9b5: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10c9b8: 8b 55 e0 mov -0x20(%ebp),%edx
10c9bb: 42 inc %edx
10c9bc: 8b 45 dc mov -0x24(%ebp),%eax
10c9bf: 83 c0 20 add $0x20,%eax
10c9c2: 83 c4 10 add $0x10,%esp
10c9c5: 3b 55 e4 cmp -0x1c(%ebp),%edx
10c9c8: 72 d0 jb 10c99a <_User_extensions_Handler_initialization+0x7a>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10c9ca: 8d 65 f4 lea -0xc(%ebp),%esp
10c9cd: 5b pop %ebx
10c9ce: 5e pop %esi
10c9cf: 5f pop %edi
10c9d0: c9 leave
10c9d1: c3 ret
0010ca05 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10ca05: 55 push %ebp
10ca06: 89 e5 mov %esp,%ebp
10ca08: 56 push %esi
10ca09: 53 push %ebx
10ca0a: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10ca0d: 8b 1d 60 34 12 00 mov 0x123460,%ebx
10ca13: eb 13 jmp 10ca28 <_User_extensions_Thread_exitted+0x23>
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
10ca15: 8b 43 2c mov 0x2c(%ebx),%eax
10ca18: 85 c0 test %eax,%eax
10ca1a: 74 09 je 10ca25 <_User_extensions_Thread_exitted+0x20>
(*the_extension->Callouts.thread_exitted)( executing );
10ca1c: 83 ec 0c sub $0xc,%esp
10ca1f: 56 push %esi
10ca20: ff d0 call *%eax
10ca22: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10ca25: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10ca28: 81 fb 58 34 12 00 cmp $0x123458,%ebx
10ca2e: 75 e5 jne 10ca15 <_User_extensions_Thread_exitted+0x10>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
10ca30: 8d 65 f8 lea -0x8(%ebp),%esp
10ca33: 5b pop %ebx
10ca34: 5e pop %esi
10ca35: c9 leave
10ca36: c3 ret
0010e344 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10e344: 55 push %ebp
10e345: 89 e5 mov %esp,%ebp
10e347: 57 push %edi
10e348: 56 push %esi
10e349: 53 push %ebx
10e34a: 83 ec 1c sub $0x1c,%esp
10e34d: 8b 75 08 mov 0x8(%ebp),%esi
10e350: 8b 7d 0c mov 0xc(%ebp),%edi
10e353: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
10e356: 9c pushf
10e357: fa cli
10e358: 58 pop %eax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
10e359: 8b 16 mov (%esi),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10e35b: 8d 4e 04 lea 0x4(%esi),%ecx
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
10e35e: 39 ca cmp %ecx,%edx
10e360: 74 44 je 10e3a6 <_Watchdog_Adjust+0x62>
switch ( direction ) {
10e362: 85 ff test %edi,%edi
10e364: 74 3c je 10e3a2 <_Watchdog_Adjust+0x5e>
10e366: 4f dec %edi
10e367: 75 3d jne 10e3a6 <_Watchdog_Adjust+0x62> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
10e369: 01 5a 10 add %ebx,0x10(%edx)
break;
10e36c: eb 38 jmp 10e3a6 <_Watchdog_Adjust+0x62>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
10e36e: 8b 16 mov (%esi),%edx
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
10e370: 8b 7a 10 mov 0x10(%edx),%edi
10e373: 39 fb cmp %edi,%ebx
10e375: 73 07 jae 10e37e <_Watchdog_Adjust+0x3a>
_Watchdog_First( header )->delta_interval -= units;
10e377: 29 df sub %ebx,%edi
10e379: 89 7a 10 mov %edi,0x10(%edx)
break;
10e37c: eb 28 jmp 10e3a6 <_Watchdog_Adjust+0x62>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
10e37e: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
10e385: 50 push %eax
10e386: 9d popf
_Watchdog_Tickle( header );
10e387: 83 ec 0c sub $0xc,%esp
10e38a: 56 push %esi
10e38b: 89 4d e4 mov %ecx,-0x1c(%ebp)
10e38e: e8 9d 01 00 00 call 10e530 <_Watchdog_Tickle>
_ISR_Disable( level );
10e393: 9c pushf
10e394: fa cli
10e395: 58 pop %eax
if ( _Chain_Is_empty( header ) )
10e396: 83 c4 10 add $0x10,%esp
10e399: 8b 4d e4 mov -0x1c(%ebp),%ecx
10e39c: 39 0e cmp %ecx,(%esi)
10e39e: 74 06 je 10e3a6 <_Watchdog_Adjust+0x62>
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
10e3a0: 29 fb sub %edi,%ebx
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10e3a2: 85 db test %ebx,%ebx
10e3a4: 75 c8 jne 10e36e <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
10e3a6: 50 push %eax
10e3a7: 9d popf
}
10e3a8: 8d 65 f4 lea -0xc(%ebp),%esp
10e3ab: 5b pop %ebx
10e3ac: 5e pop %esi
10e3ad: 5f pop %edi
10e3ae: c9 leave
10e3af: c3 ret
0010cc70 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10cc70: 55 push %ebp
10cc71: 89 e5 mov %esp,%ebp
10cc73: 56 push %esi
10cc74: 53 push %ebx
10cc75: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10cc78: 9c pushf
10cc79: fa cli
10cc7a: 5e pop %esi
previous_state = the_watchdog->state;
10cc7b: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10cc7e: 83 f8 01 cmp $0x1,%eax
10cc81: 74 09 je 10cc8c <_Watchdog_Remove+0x1c>
10cc83: 72 42 jb 10ccc7 <_Watchdog_Remove+0x57>
10cc85: 83 f8 03 cmp $0x3,%eax
10cc88: 77 3d ja 10ccc7 <_Watchdog_Remove+0x57> <== NEVER TAKEN
10cc8a: eb 09 jmp 10cc95 <_Watchdog_Remove+0x25>
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
10cc8c: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10cc93: eb 32 jmp 10ccc7 <_Watchdog_Remove+0x57>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10cc95: 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 );
}
10cc9c: 8b 0a mov (%edx),%ecx
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10cc9e: 83 39 00 cmpl $0x0,(%ecx)
10cca1: 74 06 je 10cca9 <_Watchdog_Remove+0x39>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10cca3: 8b 5a 10 mov 0x10(%edx),%ebx
10cca6: 01 59 10 add %ebx,0x10(%ecx)
if ( _Watchdog_Sync_count )
10cca9: 8b 1d 98 33 12 00 mov 0x123398,%ebx
10ccaf: 85 db test %ebx,%ebx
10ccb1: 74 0c je 10ccbf <_Watchdog_Remove+0x4f>
_Watchdog_Sync_level = _ISR_Nest_level;
10ccb3: 8b 1d a4 34 12 00 mov 0x1234a4,%ebx
10ccb9: 89 1d 10 33 12 00 mov %ebx,0x123310
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10ccbf: 8b 5a 04 mov 0x4(%edx),%ebx
next->previous = previous;
10ccc2: 89 59 04 mov %ebx,0x4(%ecx)
previous->next = next;
10ccc5: 89 0b mov %ecx,(%ebx)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10ccc7: 8b 0d 9c 33 12 00 mov 0x12339c,%ecx
10cccd: 89 4a 18 mov %ecx,0x18(%edx)
_ISR_Enable( level );
10ccd0: 56 push %esi
10ccd1: 9d popf
return( previous_state );
}
10ccd2: 5b pop %ebx
10ccd3: 5e pop %esi
10ccd4: c9 leave
10ccd5: c3 ret
0010def8 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10def8: 55 push %ebp
10def9: 89 e5 mov %esp,%ebp
10defb: 57 push %edi
10defc: 56 push %esi
10defd: 53 push %ebx
10defe: 83 ec 20 sub $0x20,%esp
10df01: 8b 7d 08 mov 0x8(%ebp),%edi
10df04: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10df07: 9c pushf
10df08: fa cli
10df09: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
10df0c: 56 push %esi
10df0d: 57 push %edi
10df0e: 68 54 fc 11 00 push $0x11fc54
10df13: e8 c0 ab ff ff call 108ad8 <printk>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
10df18: 8b 1e mov (%esi),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10df1a: 83 c6 04 add $0x4,%esi
if ( !_Chain_Is_empty( header ) ) {
10df1d: 83 c4 10 add $0x10,%esp
10df20: 39 f3 cmp %esi,%ebx
10df22: 74 1d je 10df41 <_Watchdog_Report_chain+0x49>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10df24: 52 push %edx
10df25: 52 push %edx
10df26: 53 push %ebx
10df27: 6a 00 push $0x0
10df29: e8 32 00 00 00 call 10df60 <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
10df2e: 8b 1b mov (%ebx),%ebx
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
10df30: 83 c4 10 add $0x10,%esp
10df33: 39 f3 cmp %esi,%ebx
10df35: 75 ed jne 10df24 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10df37: 50 push %eax
10df38: 50 push %eax
10df39: 57 push %edi
10df3a: 68 6b fc 11 00 push $0x11fc6b
10df3f: eb 08 jmp 10df49 <_Watchdog_Report_chain+0x51>
} else {
printk( "Chain is empty\n" );
10df41: 83 ec 0c sub $0xc,%esp
10df44: 68 7a fc 11 00 push $0x11fc7a
10df49: e8 8a ab ff ff call 108ad8 <printk>
10df4e: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10df51: ff 75 e4 pushl -0x1c(%ebp)
10df54: 9d popf
}
10df55: 8d 65 f4 lea -0xc(%ebp),%esp
10df58: 5b pop %ebx
10df59: 5e pop %esi
10df5a: 5f pop %edi
10df5b: c9 leave
10df5c: c3 ret
001204be <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
1204be: 55 push %ebp <== NOT EXECUTED
1204bf: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return 0;
}
1204c1: 31 c0 xor %eax,%eax <== NOT EXECUTED
1204c3: c9 leave <== NOT EXECUTED
1204c4: c3 ret <== NOT EXECUTED
00107417 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
107417: 55 push %ebp <== NOT EXECUTED
107418: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10741a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
return gettimeofday( tp, tzp );
}
10741d: c9 leave <== NOT EXECUTED
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
10741e: e9 8d ff ff ff jmp 1073b0 <gettimeofday> <== NOT EXECUTED
0010b1c8 <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
10b1c8: 55 push %ebp
10b1c9: 89 e5 mov %esp,%ebp
10b1cb: 57 push %edi
10b1cc: 56 push %esi
10b1cd: 53 push %ebx
10b1ce: 83 ec 78 sub $0x78,%esp
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
10b1d1: ff 75 0c pushl 0xc(%ebp)
10b1d4: e8 5e ed ff ff call 109f37 <rtems_filesystem_dirname>
10b1d9: 89 45 94 mov %eax,-0x6c(%ebp)
if ( old_parent_pathlen == 0 )
10b1dc: 83 c4 10 add $0x10,%esp
10b1df: 85 c0 test %eax,%eax
10b1e1: 8d 45 b8 lea -0x48(%ebp),%eax
10b1e4: 75 15 jne 10b1fb <_rename_r+0x33>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
10b1e6: 51 push %ecx
10b1e7: 50 push %eax
10b1e8: 8d 45 e4 lea -0x1c(%ebp),%eax
10b1eb: 50 push %eax
10b1ec: ff 75 0c pushl 0xc(%ebp)
10b1ef: e8 48 03 00 00 call 10b53c <rtems_filesystem_get_start_loc>
10b1f4: 83 c4 10 add $0x10,%esp
rtems_filesystem_location_info_t old_parent_loc;
rtems_filesystem_location_info_t new_parent_loc;
int i;
int result;
const char *name;
bool free_old_parentloc = false;
10b1f7: 31 db xor %ebx,%ebx
10b1f9: eb 23 jmp 10b21e <_rename_r+0x56>
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
10b1fb: 83 ec 0c sub $0xc,%esp
10b1fe: 6a 00 push $0x0
10b200: 50 push %eax
10b201: 6a 02 push $0x2
10b203: ff 75 94 pushl -0x6c(%ebp)
10b206: ff 75 0c pushl 0xc(%ebp)
10b209: e8 e8 ec ff ff call 109ef6 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
10b20e: 83 c4 20 add $0x20,%esp
return -1;
10b211: 83 cf ff or $0xffffffff,%edi
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
10b214: 85 c0 test %eax,%eax
10b216: 0f 85 50 01 00 00 jne 10b36c <_rename_r+0x1a4> <== NEVER TAKEN
return -1;
free_old_parentloc = true;
10b21c: b3 01 mov $0x1,%bl
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
10b21e: 8d 7d cc lea -0x34(%ebp),%edi
10b221: 8d 75 b8 lea -0x48(%ebp),%esi
10b224: b9 05 00 00 00 mov $0x5,%ecx
10b229: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = old + old_parent_pathlen;
10b22b: 8b 75 0c mov 0xc(%ebp),%esi
10b22e: 03 75 94 add -0x6c(%ebp),%esi
10b231: 89 75 e0 mov %esi,-0x20(%ebp)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
10b234: 83 c9 ff or $0xffffffff,%ecx
10b237: 89 f7 mov %esi,%edi
10b239: 31 c0 xor %eax,%eax
10b23b: f2 ae repnz scas %es:(%edi),%al
10b23d: f7 d1 not %ecx
10b23f: 49 dec %ecx
10b240: 52 push %edx
10b241: 52 push %edx
10b242: 51 push %ecx
10b243: 56 push %esi
10b244: e8 2d ed ff ff call 109f76 <rtems_filesystem_prefix_separators>
10b249: 01 c6 add %eax,%esi
10b24b: 89 75 e0 mov %esi,-0x20(%ebp)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
10b24e: 83 c9 ff or $0xffffffff,%ecx
10b251: 89 f7 mov %esi,%edi
10b253: 31 c0 xor %eax,%eax
10b255: f2 ae repnz scas %es:(%edi),%al
10b257: f7 d1 not %ecx
10b259: 49 dec %ecx
10b25a: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10b261: 8d 7d cc lea -0x34(%ebp),%edi
10b264: 57 push %edi
10b265: 6a 00 push $0x0
10b267: 51 push %ecx
10b268: 56 push %esi
10b269: e8 2a ec ff ff call 109e98 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
10b26e: 83 c4 20 add $0x20,%esp
10b271: 85 c0 test %eax,%eax
10b273: 74 16 je 10b28b <_rename_r+0xc3>
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
return -1;
10b275: 83 cf ff or $0xffffffff,%edi
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
10b278: 84 db test %bl,%bl
10b27a: 0f 84 ec 00 00 00 je 10b36c <_rename_r+0x1a4> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
10b280: 83 ec 0c sub $0xc,%esp
10b283: 8d 45 b8 lea -0x48(%ebp),%eax
10b286: e9 d8 00 00 00 jmp 10b363 <_rename_r+0x19b>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
10b28b: 50 push %eax
10b28c: 8d 75 a4 lea -0x5c(%ebp),%esi
10b28f: 56 push %esi
10b290: 8d 45 e4 lea -0x1c(%ebp),%eax
10b293: 50 push %eax
10b294: ff 75 10 pushl 0x10(%ebp)
10b297: e8 a0 02 00 00 call 10b53c <rtems_filesystem_get_start_loc>
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
10b29c: 83 c4 0c add $0xc,%esp
10b29f: 8d 45 e0 lea -0x20(%ebp),%eax
10b2a2: 50 push %eax
10b2a3: 56 push %esi
10b2a4: 8b 45 10 mov 0x10(%ebp),%eax
10b2a7: 03 45 e4 add -0x1c(%ebp),%eax
10b2aa: 50 push %eax
10b2ab: 8b 45 b0 mov -0x50(%ebp),%eax
10b2ae: ff 50 04 call *0x4(%eax)
if ( result != 0 ) {
10b2b1: 83 c4 10 add $0x10,%esp
10b2b4: 85 c0 test %eax,%eax
10b2b6: 74 2d je 10b2e5 <_rename_r+0x11d>
rtems_filesystem_freenode( &new_parent_loc );
10b2b8: 83 ec 0c sub $0xc,%esp
10b2bb: 56 push %esi
10b2bc: e8 43 ee ff ff call 10a104 <rtems_filesystem_freenode>
if ( free_old_parentloc )
10b2c1: 83 c4 10 add $0x10,%esp
10b2c4: 84 db test %bl,%bl
10b2c6: 74 0f je 10b2d7 <_rename_r+0x10f> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
10b2c8: 83 ec 0c sub $0xc,%esp
10b2cb: 8d 45 b8 lea -0x48(%ebp),%eax
10b2ce: 50 push %eax
10b2cf: e8 30 ee ff ff call 10a104 <rtems_filesystem_freenode>
10b2d4: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10b2d7: 83 ec 0c sub $0xc,%esp
10b2da: 8d 45 cc lea -0x34(%ebp),%eax
10b2dd: 50 push %eax
10b2de: e8 21 ee ff ff call 10a104 <rtems_filesystem_freenode>
10b2e3: eb 3e jmp 10b323 <_rename_r+0x15b>
/*
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
10b2e5: 8b 45 b4 mov -0x4c(%ebp),%eax
10b2e8: 39 45 c8 cmp %eax,-0x38(%ebp)
10b2eb: 74 3e je 10b32b <_rename_r+0x163>
rtems_filesystem_freenode( &new_parent_loc );
10b2ed: 83 ec 0c sub $0xc,%esp
10b2f0: 56 push %esi
10b2f1: e8 0e ee ff ff call 10a104 <rtems_filesystem_freenode>
if ( free_old_parentloc )
10b2f6: 83 c4 10 add $0x10,%esp
10b2f9: 84 db test %bl,%bl
10b2fb: 74 0f je 10b30c <_rename_r+0x144>
rtems_filesystem_freenode( &old_parent_loc );
10b2fd: 83 ec 0c sub $0xc,%esp
10b300: 8d 45 b8 lea -0x48(%ebp),%eax
10b303: 50 push %eax
10b304: e8 fb ed ff ff call 10a104 <rtems_filesystem_freenode>
10b309: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10b30c: 83 ec 0c sub $0xc,%esp
10b30f: 8d 45 cc lea -0x34(%ebp),%eax
10b312: 50 push %eax
10b313: e8 ec ed ff ff call 10a104 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EXDEV );
10b318: e8 33 86 00 00 call 113950 <__errno>
10b31d: c7 00 12 00 00 00 movl $0x12,(%eax)
10b323: 83 c4 10 add $0x10,%esp
10b326: 83 cf ff or $0xffffffff,%edi
10b329: eb 41 jmp 10b36c <_rename_r+0x1a4>
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
10b32b: ff 75 e0 pushl -0x20(%ebp)
10b32e: 56 push %esi
10b32f: 57 push %edi
10b330: 8d 55 b8 lea -0x48(%ebp),%edx
10b333: 52 push %edx
10b334: 8b 45 b0 mov -0x50(%ebp),%eax
10b337: 89 55 90 mov %edx,-0x70(%ebp)
10b33a: ff 50 40 call *0x40(%eax)
10b33d: 89 c7 mov %eax,%edi
rtems_filesystem_freenode( &new_parent_loc );
10b33f: 89 34 24 mov %esi,(%esp)
10b342: e8 bd ed ff ff call 10a104 <rtems_filesystem_freenode>
if ( free_old_parentloc )
10b347: 83 c4 10 add $0x10,%esp
10b34a: 84 db test %bl,%bl
10b34c: 8b 55 90 mov -0x70(%ebp),%edx
10b34f: 74 0c je 10b35d <_rename_r+0x195>
rtems_filesystem_freenode( &old_parent_loc );
10b351: 83 ec 0c sub $0xc,%esp
10b354: 52 push %edx
10b355: e8 aa ed ff ff call 10a104 <rtems_filesystem_freenode>
10b35a: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10b35d: 83 ec 0c sub $0xc,%esp
10b360: 8d 45 cc lea -0x34(%ebp),%eax
10b363: 50 push %eax
10b364: e8 9b ed ff ff call 10a104 <rtems_filesystem_freenode>
return result;
10b369: 83 c4 10 add $0x10,%esp
}
10b36c: 89 f8 mov %edi,%eax
10b36e: 8d 65 f4 lea -0xc(%ebp),%esp
10b371: 5b pop %ebx
10b372: 5e pop %esi
10b373: 5f pop %edi
10b374: c9 leave
10b375: c3 ret
00107518 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
107518: 55 push %ebp
107519: 89 e5 mov %esp,%ebp
10751b: 57 push %edi
10751c: 56 push %esi
10751d: 83 ec 20 sub $0x20,%esp
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
107520: 81 3d 3c 22 12 00 48 cmpl $0x124348,0x12223c
107527: 43 12 00
10752a: 75 1e jne 10754a <chroot+0x32>
rtems_libio_set_private_env(); /* try to set a new private env*/
10752c: e8 cc 10 00 00 call 1085fd <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
107531: 81 3d 3c 22 12 00 48 cmpl $0x124348,0x12223c
107538: 43 12 00
10753b: 75 0d jne 10754a <chroot+0x32>
rtems_set_errno_and_return_minus_one( ENOTSUP );
10753d: e8 4e 94 00 00 call 110990 <__errno>
107542: c7 00 86 00 00 00 movl $0x86,(%eax)
107548: eb 22 jmp 10756c <chroot+0x54>
}
result = chdir(pathname);
10754a: 83 ec 0c sub $0xc,%esp
10754d: ff 75 08 pushl 0x8(%ebp)
107550: e8 df 71 00 00 call 10e734 <chdir>
if (result) {
107555: 83 c4 10 add $0x10,%esp
107558: 85 c0 test %eax,%eax
10755a: 74 15 je 107571 <chroot+0x59>
rtems_set_errno_and_return_minus_one( errno );
10755c: e8 2f 94 00 00 call 110990 <__errno>
107561: 89 c6 mov %eax,%esi
107563: e8 28 94 00 00 call 110990 <__errno>
107568: 8b 00 mov (%eax),%eax
10756a: 89 06 mov %eax,(%esi)
10756c: 83 c8 ff or $0xffffffff,%eax
10756f: eb 44 jmp 1075b5 <chroot+0x9d>
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
107571: 83 ec 0c sub $0xc,%esp
107574: 6a 00 push $0x0
107576: 8d 75 e4 lea -0x1c(%ebp),%esi
107579: 56 push %esi
10757a: 6a 00 push $0x0
10757c: 6a 01 push $0x1
10757e: 68 42 e4 11 00 push $0x11e442
107583: e8 02 01 00 00 call 10768a <rtems_filesystem_evaluate_path>
107588: 83 c4 20 add $0x20,%esp
10758b: 85 c0 test %eax,%eax
10758d: 75 cd jne 10755c <chroot+0x44> <== NEVER TAKEN
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
10758f: 83 ec 0c sub $0xc,%esp
107592: a1 3c 22 12 00 mov 0x12223c,%eax
107597: 83 c0 18 add $0x18,%eax
10759a: 50 push %eax
10759b: e8 a8 01 00 00 call 107748 <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
1075a0: 8b 3d 3c 22 12 00 mov 0x12223c,%edi
1075a6: 83 c7 18 add $0x18,%edi
1075a9: b9 05 00 00 00 mov $0x5,%ecx
1075ae: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
1075b0: 83 c4 10 add $0x10,%esp
1075b3: 31 c0 xor %eax,%eax
}
1075b5: 8d 65 f8 lea -0x8(%ebp),%esp
1075b8: 5e pop %esi
1075b9: 5f pop %edi
1075ba: c9 leave
1075bb: c3 ret
0010d200 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
10d200: 55 push %ebp
10d201: 89 e5 mov %esp,%ebp
10d203: 57 push %edi
10d204: 56 push %esi
10d205: 53 push %ebx
10d206: 83 ec 1c sub $0x1c,%esp
10d209: 8b 4d 0c mov 0xc(%ebp),%ecx
10d20c: 8b 5d 14 mov 0x14(%ebp),%ebx
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
10d20f: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp)
10d216: 74 0d je 10d225 <devFS_evaluate_path+0x25><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
10d218: e8 43 16 00 00 call 10e860 <__errno> <== NOT EXECUTED
10d21d: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10d223: eb 77 jmp 10d29c <devFS_evaluate_path+0x9c><== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
10d225: 8b 33 mov (%ebx),%esi
if (!device_name_table)
10d227: 85 f6 test %esi,%esi
10d229: 74 04 je 10d22f <devFS_evaluate_path+0x2f>
10d22b: 31 ff xor %edi,%edi
10d22d: eb 5a jmp 10d289 <devFS_evaluate_path+0x89>
rtems_set_errno_and_return_minus_one( EFAULT );
10d22f: e8 2c 16 00 00 call 10e860 <__errno>
10d234: c7 00 0e 00 00 00 movl $0xe,(%eax)
10d23a: eb 60 jmp 10d29c <devFS_evaluate_path+0x9c>
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
10d23c: 8b 16 mov (%esi),%edx
10d23e: 85 d2 test %edx,%edx
10d240: 74 43 je 10d285 <devFS_evaluate_path+0x85>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
10d242: 50 push %eax
10d243: 51 push %ecx
10d244: 52 push %edx
10d245: ff 75 08 pushl 0x8(%ebp)
10d248: 89 55 e4 mov %edx,-0x1c(%ebp)
10d24b: 89 4d e0 mov %ecx,-0x20(%ebp)
10d24e: e8 e1 22 00 00 call 10f534 <strncmp>
10d253: 83 c4 10 add $0x10,%esp
10d256: 85 c0 test %eax,%eax
10d258: 8b 55 e4 mov -0x1c(%ebp),%edx
10d25b: 8b 4d e0 mov -0x20(%ebp),%ecx
10d25e: 75 25 jne 10d285 <devFS_evaluate_path+0x85>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
10d260: 80 3c 0a 00 cmpb $0x0,(%edx,%ecx,1)
10d264: 75 1f jne 10d285 <devFS_evaluate_path+0x85><== NEVER TAKEN
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
10d266: 89 33 mov %esi,(%ebx)
pathloc->handlers = &devFS_file_handlers;
10d268: c7 43 08 7c ef 11 00 movl $0x11ef7c,0x8(%ebx)
pathloc->ops = &devFS_ops;
10d26f: c7 43 0c 34 ef 11 00 movl $0x11ef34,0xc(%ebx)
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
10d276: a1 d0 f0 11 00 mov 0x11f0d0,%eax
10d27b: 8b 40 28 mov 0x28(%eax),%eax
10d27e: 89 43 10 mov %eax,0x10(%ebx)
return 0;
10d281: 31 c0 xor %eax,%eax
10d283: eb 1a jmp 10d29f <devFS_evaluate_path+0x9f>
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
10d285: 47 inc %edi
10d286: 83 c6 14 add $0x14,%esi
10d289: 3b 3d 48 d1 11 00 cmp 0x11d148,%edi
10d28f: 72 ab jb 10d23c <devFS_evaluate_path+0x3c>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
10d291: e8 ca 15 00 00 call 10e860 <__errno>
10d296: c7 00 02 00 00 00 movl $0x2,(%eax)
10d29c: 83 c8 ff or $0xffffffff,%eax
}
10d29f: 8d 65 f4 lea -0xc(%ebp),%esp
10d2a2: 5b pop %ebx
10d2a3: 5e pop %esi
10d2a4: 5f pop %edi
10d2a5: c9 leave
10d2a6: c3 ret
00106c30 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
106c30: 55 push %ebp
106c31: 89 e5 mov %esp,%ebp
106c33: 57 push %edi
106c34: 56 push %esi
106c35: 53 push %ebx
106c36: 83 ec 1c sub $0x1c,%esp
106c39: 8b 7d 08 mov 0x8(%ebp),%edi
106c3c: 8b 4d 10 mov 0x10(%ebp),%ecx
106c3f: 8b 55 14 mov 0x14(%ebp),%edx
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
106c42: 80 3f 64 cmpb $0x64,(%edi)
106c45: 75 18 jne 106c5f <devFS_mknod+0x2f>
106c47: 80 7f 01 65 cmpb $0x65,0x1(%edi)
106c4b: 75 12 jne 106c5f <devFS_mknod+0x2f> <== NEVER TAKEN
106c4d: 80 7f 02 76 cmpb $0x76,0x2(%edi)
106c51: 75 0c jne 106c5f <devFS_mknod+0x2f> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
return 0;
106c53: 31 c0 xor %eax,%eax
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
(path[2] == 'v') && (path[3] == '\0'))
106c55: 80 7f 03 00 cmpb $0x0,0x3(%edi)
106c59: 0f 84 c9 00 00 00 je 106d28 <devFS_mknod+0xf8>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
106c5f: 8b 45 0c mov 0xc(%ebp),%eax
106c62: 25 00 f0 00 00 and $0xf000,%eax
106c67: 3d 00 20 00 00 cmp $0x2000,%eax
106c6c: 74 14 je 106c82 <devFS_mknod+0x52>
106c6e: 3d 00 60 00 00 cmp $0x6000,%eax
106c73: 74 0d je 106c82 <devFS_mknod+0x52>
rtems_set_errno_and_return_minus_one( EINVAL );
106c75: e8 e6 7b 00 00 call 10e860 <__errno>
106c7a: c7 00 16 00 00 00 movl $0x16,(%eax)
106c80: eb 23 jmp 106ca5 <devFS_mknod+0x75>
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
106c82: 89 4d e4 mov %ecx,-0x1c(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
106c85: 89 55 e0 mov %edx,-0x20(%ebp)
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
106c88: 8b 45 18 mov 0x18(%ebp),%eax
106c8b: 8b 08 mov (%eax),%ecx
if (!device_name_table)
106c8d: 85 c9 test %ecx,%ecx
106c8f: 74 09 je 106c9a <devFS_mknod+0x6a>
106c91: 89 ca mov %ecx,%edx
106c93: 83 ce ff or $0xffffffff,%esi
106c96: 31 db xor %ebx,%ebx
106c98: eb 46 jmp 106ce0 <devFS_mknod+0xb0>
rtems_set_errno_and_return_minus_one( EFAULT );
106c9a: e8 c1 7b 00 00 call 10e860 <__errno>
106c9f: c7 00 0e 00 00 00 movl $0xe,(%eax)
106ca5: 83 c8 ff or $0xffffffff,%eax
106ca8: eb 7e jmp 106d28 <devFS_mknod+0xf8>
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
106caa: 8b 02 mov (%edx),%eax
106cac: 85 c0 test %eax,%eax
106cae: 74 2a je 106cda <devFS_mknod+0xaa>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
106cb0: 83 ec 08 sub $0x8,%esp
106cb3: 50 push %eax
106cb4: 57 push %edi
106cb5: 89 55 d8 mov %edx,-0x28(%ebp)
106cb8: 89 4d dc mov %ecx,-0x24(%ebp)
106cbb: e8 cc 87 00 00 call 10f48c <strcmp>
106cc0: 83 c4 10 add $0x10,%esp
106cc3: 85 c0 test %eax,%eax
106cc5: 8b 55 d8 mov -0x28(%ebp),%edx
106cc8: 8b 4d dc mov -0x24(%ebp),%ecx
106ccb: 75 0f jne 106cdc <devFS_mknod+0xac>
rtems_set_errno_and_return_minus_one( EEXIST );
106ccd: e8 8e 7b 00 00 call 10e860 <__errno>
106cd2: c7 00 11 00 00 00 movl $0x11,(%eax)
106cd8: eb cb jmp 106ca5 <devFS_mknod+0x75>
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
106cda: 89 de mov %ebx,%esi
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
106cdc: 43 inc %ebx
106cdd: 83 c2 14 add $0x14,%edx
106ce0: 3b 1d 48 d1 11 00 cmp 0x11d148,%ebx
106ce6: 72 c2 jb 106caa <devFS_mknod+0x7a>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
106ce8: 83 fe ff cmp $0xffffffff,%esi
106ceb: 75 0d jne 106cfa <devFS_mknod+0xca>
rtems_set_errno_and_return_minus_one( ENOMEM );
106ced: e8 6e 7b 00 00 call 10e860 <__errno>
106cf2: c7 00 0c 00 00 00 movl $0xc,(%eax)
106cf8: eb ab jmp 106ca5 <devFS_mknod+0x75>
_ISR_Disable(level);
106cfa: 9c pushf
106cfb: fa cli
106cfc: 5b pop %ebx
device_name_table[slot].device_name = (char *)path;
106cfd: 6b d6 14 imul $0x14,%esi,%edx
106d00: 8d 14 11 lea (%ecx,%edx,1),%edx
106d03: 89 3a mov %edi,(%edx)
device_name_table[slot].device_name_length = strlen(path);
106d05: 31 c0 xor %eax,%eax
106d07: 83 c9 ff or $0xffffffff,%ecx
106d0a: f2 ae repnz scas %es:(%edi),%al
106d0c: f7 d1 not %ecx
106d0e: 49 dec %ecx
106d0f: 89 4a 04 mov %ecx,0x4(%edx)
device_name_table[slot].major = major;
106d12: 8b 45 e4 mov -0x1c(%ebp),%eax
106d15: 89 42 08 mov %eax,0x8(%edx)
device_name_table[slot].minor = minor;
106d18: 8b 45 e0 mov -0x20(%ebp),%eax
106d1b: 89 42 0c mov %eax,0xc(%edx)
device_name_table[slot].mode = mode;
106d1e: 8b 45 0c mov 0xc(%ebp),%eax
106d21: 89 42 10 mov %eax,0x10(%edx)
_ISR_Enable(level);
106d24: 53 push %ebx
106d25: 9d popf
return 0;
106d26: 31 c0 xor %eax,%eax
}
106d28: 8d 65 f4 lea -0xc(%ebp),%esp
106d2b: 5b pop %ebx
106d2c: 5e pop %esi
106d2d: 5f pop %edi
106d2e: c9 leave
106d2f: c3 ret
00108074 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
108074: 55 push %ebp
108075: 89 e5 mov %esp,%ebp
108077: 53 push %ebx
108078: 83 ec 04 sub $0x4,%esp
10807b: 89 c3 mov %eax,%ebx
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
10807d: 83 b8 b4 00 00 00 00 cmpl $0x0,0xb4(%eax)
108084: 74 46 je 1080cc <drainOutput+0x58>
rtems_interrupt_disable (level);
108086: 9c pushf
108087: fa cli
108088: 58 pop %eax
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
108089: eb 2f jmp 1080ba <drainOutput+0x46>
tty->rawOutBufState = rob_wait;
10808b: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
108092: 00 00 00
rtems_interrupt_enable (level);
108095: 50 push %eax
108096: 9d popf
sc = rtems_semaphore_obtain(
108097: 50 push %eax
108098: 6a 00 push $0x0
10809a: 6a 00 push $0x0
10809c: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
1080a2: e8 ad 20 00 00 call 10a154 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1080a7: 83 c4 10 add $0x10,%esp
1080aa: 85 c0 test %eax,%eax
1080ac: 74 09 je 1080b7 <drainOutput+0x43> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
1080ae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1080b1: 50 push %eax <== NOT EXECUTED
1080b2: e8 5d 26 00 00 call 10a714 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_interrupt_disable (level);
1080b7: 9c pushf
1080b8: fa cli
1080b9: 58 pop %eax
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
1080ba: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
1080c0: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
1080c6: 39 d1 cmp %edx,%ecx
1080c8: 75 c1 jne 10808b <drainOutput+0x17>
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);
1080ca: 50 push %eax
1080cb: 9d popf
}
}
1080cc: 8b 5d fc mov -0x4(%ebp),%ebx
1080cf: c9 leave
1080d0: c3 ret
00108c2b <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
108c2b: 55 push %ebp
108c2c: 89 e5 mov %esp,%ebp
108c2e: 53 push %ebx
108c2f: 83 ec 24 sub $0x24,%esp
if ((tty->termios.c_lflag & ECHOCTL) &&
108c32: f6 42 3d 02 testb $0x2,0x3d(%edx)
108c36: 74 3e je 108c76 <echo+0x4b> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
108c38: 0f b6 c8 movzbl %al,%ecx
108c3b: 8b 1d c4 10 12 00 mov 0x1210c4,%ebx
108c41: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1)
108c46: 74 2e je 108c76 <echo+0x4b>
108c48: 3c 09 cmp $0x9,%al
108c4a: 74 2a je 108c76 <echo+0x4b>
108c4c: 3c 0a cmp $0xa,%al
108c4e: 74 26 je 108c76 <echo+0x4b>
char echobuf[2];
echobuf[0] = '^';
108c50: c6 45 f6 5e movb $0x5e,-0xa(%ebp)
echobuf[1] = c ^ 0x40;
108c54: 83 f0 40 xor $0x40,%eax
108c57: 88 45 f7 mov %al,-0x9(%ebp)
rtems_termios_puts (echobuf, 2, tty);
108c5a: 50 push %eax
108c5b: 52 push %edx
108c5c: 6a 02 push $0x2
108c5e: 8d 45 f6 lea -0xa(%ebp),%eax
108c61: 50 push %eax
108c62: 89 55 e4 mov %edx,-0x1c(%ebp)
108c65: e8 84 fd ff ff call 1089ee <rtems_termios_puts>
tty->column += 2;
108c6a: 8b 55 e4 mov -0x1c(%ebp),%edx
108c6d: 83 42 28 02 addl $0x2,0x28(%edx)
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
108c71: 83 c4 10 add $0x10,%esp
108c74: eb 08 jmp 108c7e <echo+0x53>
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
108c76: 0f b6 c0 movzbl %al,%eax
108c79: e8 90 fe ff ff call 108b0e <oproc>
}
}
108c7e: 8b 5d fc mov -0x4(%ebp),%ebx
108c81: c9 leave
108c82: c3 ret
0010810e <endgrent>:
void endgrent(void)
{
10810e: 55 push %ebp
10810f: 89 e5 mov %esp,%ebp
108111: 83 ec 08 sub $0x8,%esp
if (group_fp != NULL)
108114: a1 dc 50 12 00 mov 0x1250dc,%eax
108119: 85 c0 test %eax,%eax
10811b: 74 0c je 108129 <endgrent+0x1b> <== NEVER TAKEN
fclose(group_fp);
10811d: 83 ec 0c sub $0xc,%esp
108120: 50 push %eax
108121: e8 8a 8f 00 00 call 1110b0 <fclose>
108126: 83 c4 10 add $0x10,%esp
}
108129: c9 leave
10812a: c3 ret
00107fc1 <endpwent>:
void endpwent(void)
{
107fc1: 55 push %ebp
107fc2: 89 e5 mov %esp,%ebp
107fc4: 83 ec 08 sub $0x8,%esp
if (passwd_fp != NULL)
107fc7: a1 b8 51 12 00 mov 0x1251b8,%eax
107fcc: 85 c0 test %eax,%eax
107fce: 74 0c je 107fdc <endpwent+0x1b> <== NEVER TAKEN
fclose(passwd_fp);
107fd0: 83 ec 0c sub $0xc,%esp
107fd3: 50 push %eax
107fd4: e8 d7 90 00 00 call 1110b0 <fclose>
107fd9: 83 c4 10 add $0x10,%esp
}
107fdc: c9 leave
107fdd: c3 ret
00108c83 <erase>:
* 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)
{
108c83: 55 push %ebp
108c84: 89 e5 mov %esp,%ebp
108c86: 57 push %edi
108c87: 56 push %esi
108c88: 53 push %ebx
108c89: 83 ec 2c sub $0x2c,%esp
108c8c: 89 c3 mov %eax,%ebx
108c8e: 89 55 e4 mov %edx,-0x1c(%ebp)
if (tty->ccount == 0)
108c91: 83 78 20 00 cmpl $0x0,0x20(%eax)
108c95: 0f 84 59 01 00 00 je 108df4 <erase+0x171>
return;
if (lineFlag) {
108c9b: 85 d2 test %edx,%edx
108c9d: 0f 84 46 01 00 00 je 108de9 <erase+0x166>
if (!(tty->termios.c_lflag & ECHO)) {
108ca3: 8b 40 3c mov 0x3c(%eax),%eax
108ca6: a8 08 test $0x8,%al
108ca8: 75 0c jne 108cb6 <erase+0x33> <== ALWAYS TAKEN
tty->ccount = 0;
108caa: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
return;
108cb1: e9 3e 01 00 00 jmp 108df4 <erase+0x171> <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
108cb6: a8 10 test $0x10,%al
108cb8: 0f 85 2b 01 00 00 jne 108de9 <erase+0x166> <== ALWAYS TAKEN
tty->ccount = 0;
108cbe: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
108cc5: 0f b6 43 44 movzbl 0x44(%ebx),%eax <== NOT EXECUTED
108cc9: 89 da mov %ebx,%edx <== NOT EXECUTED
108ccb: e8 5b ff ff ff call 108c2b <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
108cd0: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED
108cd4: 0f 84 1a 01 00 00 je 108df4 <erase+0x171> <== NOT EXECUTED
echo ('\n', tty);
108cda: 89 da mov %ebx,%edx <== NOT EXECUTED
108cdc: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
108ce1: eb 2a jmp 108d0d <erase+0x8a> <== NOT EXECUTED
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
108ce3: 8b 7b 1c mov 0x1c(%ebx),%edi
108ce6: 8d 50 ff lea -0x1(%eax),%edx
108ce9: 89 53 20 mov %edx,0x20(%ebx)
108cec: 8a 4c 07 ff mov -0x1(%edi,%eax,1),%cl
if (tty->termios.c_lflag & ECHO) {
108cf0: 8b 53 3c mov 0x3c(%ebx),%edx
108cf3: f6 c2 08 test $0x8,%dl
108cf6: 0f 84 e7 00 00 00 je 108de3 <erase+0x160> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
108cfc: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
108d00: 75 17 jne 108d19 <erase+0x96>
108d02: f6 c2 10 test $0x10,%dl
108d05: 75 12 jne 108d19 <erase+0x96> <== ALWAYS TAKEN
echo (tty->termios.c_cc[VERASE], tty);
108d07: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED
108d0b: 89 da mov %ebx,%edx <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
108d0d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108d10: 5b pop %ebx <== NOT EXECUTED
108d11: 5e pop %esi <== NOT EXECUTED
108d12: 5f pop %edi <== NOT EXECUTED
108d13: c9 leave <== 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);
108d14: e9 12 ff ff ff jmp 108c2b <echo> <== NOT EXECUTED
} else if (c == '\t') {
108d19: 80 f9 09 cmp $0x9,%cl
108d1c: 8b 35 c4 10 12 00 mov 0x1210c4,%esi
108d22: 89 75 e0 mov %esi,-0x20(%ebp)
108d25: 75 60 jne 108d87 <erase+0x104>
int col = tty->read_start_column;
108d27: 8b 73 2c mov 0x2c(%ebx),%esi
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
108d2a: b9 01 00 00 00 mov $0x1,%ecx
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
108d2f: 81 e2 00 02 00 00 and $0x200,%edx
108d35: 89 55 dc mov %edx,-0x24(%ebp)
108d38: 89 45 d4 mov %eax,-0x2c(%ebp)
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
108d3b: eb 28 jmp 108d65 <erase+0xe2>
c = tty->cbuf[i++];
108d3d: 8a 54 0f ff mov -0x1(%edi,%ecx,1),%dl
if (c == '\t') {
108d41: 80 fa 09 cmp $0x9,%dl
108d44: 75 05 jne 108d4b <erase+0xc8>
col = (col | 7) + 1;
108d46: 83 ce 07 or $0x7,%esi
108d49: eb 18 jmp 108d63 <erase+0xe0>
} else if (iscntrl (c)) {
108d4b: 0f b6 d2 movzbl %dl,%edx
108d4e: 8b 45 e0 mov -0x20(%ebp),%eax
108d51: f6 44 10 01 20 testb $0x20,0x1(%eax,%edx,1)
108d56: 74 0b je 108d63 <erase+0xe0> <== ALWAYS TAKEN
if (tty->termios.c_lflag & ECHOCTL)
108d58: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) <== NOT EXECUTED
108d5c: 74 06 je 108d64 <erase+0xe1> <== NOT EXECUTED
col += 2;
108d5e: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
108d61: eb 01 jmp 108d64 <erase+0xe1> <== NOT EXECUTED
} else {
col++;
108d63: 46 inc %esi
108d64: 41 inc %ecx
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
108d65: 3b 4d d4 cmp -0x2c(%ebp),%ecx
108d68: 75 d3 jne 108d3d <erase+0xba>
108d6a: eb 14 jmp 108d80 <erase+0xfd>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
108d6c: 57 push %edi
108d6d: 53 push %ebx
108d6e: 6a 01 push $0x1
108d70: 68 b0 d7 11 00 push $0x11d7b0
108d75: e8 74 fc ff ff call 1089ee <rtems_termios_puts>
tty->column--;
108d7a: ff 4b 28 decl 0x28(%ebx)
108d7d: 83 c4 10 add $0x10,%esp
}
/*
* Back up over the tab
*/
while (tty->column > col) {
108d80: 39 73 28 cmp %esi,0x28(%ebx)
108d83: 7f e7 jg 108d6c <erase+0xe9>
108d85: eb 5c jmp 108de3 <erase+0x160>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
108d87: 0f b6 f1 movzbl %cl,%esi
108d8a: 8b 45 e0 mov -0x20(%ebp),%eax
108d8d: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1)
108d92: 74 21 je 108db5 <erase+0x132> <== ALWAYS TAKEN
108d94: 80 e6 02 and $0x2,%dh <== NOT EXECUTED
108d97: 74 1c je 108db5 <erase+0x132> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
108d99: 51 push %ecx <== NOT EXECUTED
108d9a: 53 push %ebx <== NOT EXECUTED
108d9b: 6a 03 push $0x3 <== NOT EXECUTED
108d9d: 68 ae d7 11 00 push $0x11d7ae <== NOT EXECUTED
108da2: e8 47 fc ff ff call 1089ee <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
108da7: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
108daa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108dad: 85 c0 test %eax,%eax <== NOT EXECUTED
108daf: 74 04 je 108db5 <erase+0x132> <== NOT EXECUTED
tty->column--;
108db1: 48 dec %eax <== NOT EXECUTED
108db2: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
108db5: a1 c4 10 12 00 mov 0x1210c4,%eax
108dba: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1)
108dbf: 74 06 je 108dc7 <erase+0x144> <== ALWAYS TAKEN
108dc1: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED
108dc5: 74 1c je 108de3 <erase+0x160> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
108dc7: 52 push %edx
108dc8: 53 push %ebx
108dc9: 6a 03 push $0x3
108dcb: 68 ae d7 11 00 push $0x11d7ae
108dd0: e8 19 fc ff ff call 1089ee <rtems_termios_puts>
if (tty->column)
108dd5: 8b 43 28 mov 0x28(%ebx),%eax
108dd8: 83 c4 10 add $0x10,%esp
108ddb: 85 c0 test %eax,%eax
108ddd: 74 04 je 108de3 <erase+0x160> <== NEVER TAKEN
tty->column--;
108ddf: 48 dec %eax
108de0: 89 43 28 mov %eax,0x28(%ebx)
}
}
}
if (!lineFlag)
108de3: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
108de7: 74 0b je 108df4 <erase+0x171>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
108de9: 8b 43 20 mov 0x20(%ebx),%eax
108dec: 85 c0 test %eax,%eax
108dee: 0f 85 ef fe ff ff jne 108ce3 <erase+0x60>
}
}
if (!lineFlag)
break;
}
}
108df4: 8d 65 f4 lea -0xc(%ebp),%esp
108df7: 5b pop %ebx
108df8: 5e pop %esi
108df9: 5f pop %edi
108dfa: c9 leave
108dfb: c3 ret
00107bd8 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
107bd8: 55 push %ebp
107bd9: 89 e5 mov %esp,%ebp
107bdb: 57 push %edi
107bdc: 56 push %esi
107bdd: 53 push %ebx
107bde: 83 ec 0c sub $0xc,%esp
107be1: 8b 5d 08 mov 0x8(%ebp),%ebx
int ret;
va_list ap;
va_start( ap, cmd );
107be4: 8d 75 10 lea 0x10(%ebp),%esi
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
107be7: 8b 0d 64 14 12 00 mov 0x121464,%ecx
107bed: 39 cb cmp %ecx,%ebx
107bef: 73 14 jae 107c05 <fcntl+0x2d>
iop = rtems_libio_iop( fd );
107bf1: 8b 15 38 54 12 00 mov 0x125438,%edx
107bf7: 6b db 38 imul $0x38,%ebx,%ebx
107bfa: 8d 1c 1a lea (%edx,%ebx,1),%ebx
rtems_libio_check_is_open(iop);
107bfd: 8b 43 14 mov 0x14(%ebx),%eax
107c00: f6 c4 01 test $0x1,%ah
107c03: 75 10 jne 107c15 <fcntl+0x3d>
107c05: e8 16 94 00 00 call 111020 <__errno>
107c0a: c7 00 09 00 00 00 movl $0x9,(%eax)
107c10: e9 e6 00 00 00 jmp 107cfb <fcntl+0x123>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
107c15: 83 7d 0c 09 cmpl $0x9,0xc(%ebp)
107c19: 0f 87 af 00 00 00 ja 107cce <fcntl+0xf6>
107c1f: 8b 7d 0c mov 0xc(%ebp),%edi
107c22: ff 24 bd fc ef 11 00 jmp *0x11effc(,%edi,4)
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
107c29: 8b 36 mov (%esi),%esi
if ( fd2 )
107c2b: 85 f6 test %esi,%esi
107c2d: 74 0e je 107c3d <fcntl+0x65>
diop = rtems_libio_iop( fd2 );
107c2f: 31 c0 xor %eax,%eax
107c31: 39 ce cmp %ecx,%esi
107c33: 73 15 jae 107c4a <fcntl+0x72> <== NEVER TAKEN
107c35: 6b c6 38 imul $0x38,%esi,%eax
107c38: 8d 04 02 lea (%edx,%eax,1),%eax
107c3b: eb 0d jmp 107c4a <fcntl+0x72>
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
107c3d: e8 d1 04 00 00 call 108113 <rtems_libio_allocate>
if ( diop == 0 ) {
107c42: 85 c0 test %eax,%eax
107c44: 0f 84 b1 00 00 00 je 107cfb <fcntl+0x123> <== NEVER TAKEN
ret = -1;
break;
}
}
diop->flags = iop->flags;
107c4a: 8b 53 14 mov 0x14(%ebx),%edx
107c4d: 89 50 14 mov %edx,0x14(%eax)
diop->pathinfo = iop->pathinfo;
107c50: 8d 78 18 lea 0x18(%eax),%edi
107c53: 8d 73 18 lea 0x18(%ebx),%esi
107c56: b9 05 00 00 00 mov $0x5,%ecx
107c5b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ret = (int) (diop - rtems_libio_iops);
107c5d: 2b 05 38 54 12 00 sub 0x125438,%eax
107c63: c1 f8 03 sar $0x3,%eax
107c66: 69 f0 b7 6d db b6 imul $0xb6db6db7,%eax,%esi
107c6c: eb 6d jmp 107cdb <fcntl+0x103>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
107c6e: f6 c4 08 test $0x8,%ah
107c71: 0f 95 c0 setne %al
107c74: 0f b6 c0 movzbl %al,%eax
107c77: 89 c6 mov %eax,%esi
107c79: eb 64 jmp 107cdf <fcntl+0x107>
* 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 ) )
107c7b: 83 3e 00 cmpl $0x0,(%esi)
107c7e: 74 05 je 107c85 <fcntl+0xad>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
107c80: 80 cc 08 or $0x8,%ah
107c83: eb 03 jmp 107c88 <fcntl+0xb0>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
107c85: 80 e4 f7 and $0xf7,%ah
107c88: 89 43 14 mov %eax,0x14(%ebx)
107c8b: eb 30 jmp 107cbd <fcntl+0xe5>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
107c8d: 83 ec 0c sub $0xc,%esp
107c90: 50 push %eax
107c91: e8 3f 04 00 00 call 1080d5 <rtems_libio_to_fcntl_flags>
107c96: 89 c6 mov %eax,%esi
107c98: 83 c4 10 add $0x10,%esp
107c9b: eb 3e jmp 107cdb <fcntl+0x103>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
107c9d: 83 ec 0c sub $0xc,%esp
107ca0: ff 36 pushl (%esi)
107ca2: e8 f9 03 00 00 call 1080a0 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
107ca7: 25 01 02 00 00 and $0x201,%eax
107cac: 8b 53 14 mov 0x14(%ebx),%edx
107caf: 81 e2 fe fd ff ff and $0xfffffdfe,%edx
107cb5: 09 d0 or %edx,%eax
107cb7: 89 43 14 mov %eax,0x14(%ebx)
107cba: 83 c4 10 add $0x10,%esp
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
107cbd: 31 f6 xor %esi,%esi
107cbf: eb 1e jmp 107cdf <fcntl+0x107>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
107cc1: e8 5a 93 00 00 call 111020 <__errno>
107cc6: c7 00 86 00 00 00 movl $0x86,(%eax)
107ccc: eb 2d jmp 107cfb <fcntl+0x123>
ret = -1;
break;
default:
errno = EINVAL;
107cce: e8 4d 93 00 00 call 111020 <__errno>
107cd3: c7 00 16 00 00 00 movl $0x16,(%eax)
107cd9: eb 20 jmp 107cfb <fcntl+0x123>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
107cdb: 85 f6 test %esi,%esi
107cdd: 78 1f js 107cfe <fcntl+0x126> <== NEVER TAKEN
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
107cdf: 50 push %eax
107ce0: 50 push %eax
107ce1: 8b 43 20 mov 0x20(%ebx),%eax
107ce4: 53 push %ebx
107ce5: ff 75 0c pushl 0xc(%ebp)
107ce8: ff 50 30 call *0x30(%eax)
107ceb: 89 c3 mov %eax,%ebx
if (err) {
107ced: 83 c4 10 add $0x10,%esp
107cf0: 85 c0 test %eax,%eax
107cf2: 74 0a je 107cfe <fcntl+0x126> <== ALWAYS TAKEN
errno = err;
107cf4: e8 27 93 00 00 call 111020 <__errno> <== NOT EXECUTED
107cf9: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
ret = -1;
107cfb: 83 ce ff or $0xffffffff,%esi
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
107cfe: 89 f0 mov %esi,%eax
107d00: 8d 65 f4 lea -0xc(%ebp),%esp
107d03: 5b pop %ebx
107d04: 5e pop %esi
107d05: 5f pop %edi
107d06: c9 leave
107d07: c3 ret
0010f847 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
10f847: 55 push %ebp
10f848: 89 e5 mov %esp,%ebp
10f84a: 57 push %edi
10f84b: 56 push %esi
10f84c: 53 push %ebx
10f84d: 83 ec 2c sub $0x2c,%esp
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
10f850: 83 3d 24 4f 12 00 00 cmpl $0x0,0x124f24
10f857: 75 50 jne 10f8a9 <fifo_open+0x62>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10f859: 51 push %ecx
10f85a: 6a 00 push $0x0
10f85c: 6a 00 push $0x0
10f85e: ff 35 28 51 12 00 pushl 0x125128
10f864: e8 27 c3 ff ff call 10bb90 <rtems_semaphore_obtain>
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
10f869: 83 c4 10 add $0x10,%esp
free(pipe);
}
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
10f86c: 31 db xor %ebx,%ebx
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
10f86e: 83 3d 24 4f 12 00 00 cmpl $0x0,0x124f24
10f875: 75 1d jne 10f894 <fifo_open+0x4d> <== NEVER TAKEN
sc = rtems_semaphore_create(
10f877: 83 ec 0c sub $0xc,%esp
10f87a: 68 24 4f 12 00 push $0x124f24
10f87f: 6a 00 push $0x0
10f881: 6a 54 push $0x54
10f883: 6a 01 push $0x1
10f885: 68 45 50 49 50 push $0x50495045
10f88a: e8 d9 c0 ff ff call 10b968 <rtems_semaphore_create>
10f88f: 89 c3 mov %eax,%ebx
10f891: 83 c4 20 add $0x20,%esp
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10f894: 83 ec 0c sub $0xc,%esp
10f897: ff 35 28 51 12 00 pushl 0x125128
10f89d: e8 da c3 ff ff call 10bc7c <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
10f8a2: 83 c4 10 add $0x10,%esp
10f8a5: 85 db test %ebx,%ebx
10f8a7: 75 19 jne 10f8c2 <fifo_open+0x7b>
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10f8a9: 52 push %edx
10f8aa: 6a 00 push $0x0
10f8ac: 6a 00 push $0x0
10f8ae: ff 35 24 4f 12 00 pushl 0x124f24
10f8b4: e8 d7 c2 ff ff call 10bb90 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
10f8b9: 83 c4 10 add $0x10,%esp
return 0;
10f8bc: 31 f6 xor %esi,%esi
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
}
if (sc == RTEMS_SUCCESSFUL) {
10f8be: 85 c0 test %eax,%eax
10f8c0: 74 05 je 10f8c7 <fifo_open+0x80> <== ALWAYS TAKEN
return 0;
} else {
return -ENOMEM;
10f8c2: be f4 ff ff ff mov $0xfffffff4,%esi
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
if (err)
10f8c7: 85 f6 test %esi,%esi
10f8c9: 0f 85 f5 02 00 00 jne 10fbc4 <fifo_open+0x37d>
return err;
pipe = *pipep;
10f8cf: 8b 45 08 mov 0x8(%ebp),%eax
10f8d2: 8b 18 mov (%eax),%ebx
if (pipe == NULL) {
10f8d4: 85 db test %ebx,%ebx
10f8d6: 0f 85 14 01 00 00 jne 10f9f0 <fifo_open+0x1a9>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
10f8dc: 83 ec 0c sub $0xc,%esp
10f8df: 6a 34 push $0x34
10f8e1: e8 52 96 ff ff call 108f38 <malloc>
10f8e6: 89 c3 mov %eax,%ebx
10f8e8: 89 45 d4 mov %eax,-0x2c(%ebp)
if (pipe == NULL)
10f8eb: 83 c4 10 add $0x10,%esp
10f8ee: 85 c0 test %eax,%eax
10f8f0: 0f 84 f3 00 00 00 je 10f9e9 <fifo_open+0x1a2>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
10f8f6: b9 0d 00 00 00 mov $0xd,%ecx
10f8fb: 89 c7 mov %eax,%edi
10f8fd: 89 f0 mov %esi,%eax
10f8ff: f3 ab rep stos %eax,%es:(%edi)
pipe->Size = PIPE_BUF;
10f901: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx)
pipe->Buffer = malloc(pipe->Size);
10f908: 83 ec 0c sub $0xc,%esp
10f90b: 68 00 02 00 00 push $0x200
10f910: e8 23 96 ff ff call 108f38 <malloc>
10f915: 89 03 mov %eax,(%ebx)
if (! pipe->Buffer)
10f917: 83 c4 10 add $0x10,%esp
10f91a: 85 c0 test %eax,%eax
10f91c: 0f 84 b9 00 00 00 je 10f9db <fifo_open+0x194> <== NEVER TAKEN
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
10f922: 8d 43 2c lea 0x2c(%ebx),%eax
10f925: 50 push %eax
10f926: 6a 00 push $0x0
10f928: 6a 00 push $0x0
rtems_build_name ('P', 'I', 'r', c),
10f92a: 0f be 05 74 30 12 00 movsbl 0x123074,%eax
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
10f931: 0d 00 72 49 50 or $0x50497200,%eax
10f936: 50 push %eax
10f937: e8 84 0e 00 00 call 1107c0 <rtems_barrier_create>
10f93c: 83 c4 10 add $0x10,%esp
10f93f: 85 c0 test %eax,%eax
10f941: 0f 85 84 00 00 00 jne 10f9cb <fifo_open+0x184>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
10f947: 8d 43 30 lea 0x30(%ebx),%eax
10f94a: 50 push %eax
10f94b: 6a 00 push $0x0
10f94d: 6a 00 push $0x0
rtems_build_name ('P', 'I', 'w', c),
10f94f: 0f be 05 74 30 12 00 movsbl 0x123074,%eax
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
10f956: 0d 00 77 49 50 or $0x50497700,%eax
10f95b: 50 push %eax
10f95c: e8 5f 0e 00 00 call 1107c0 <rtems_barrier_create>
10f961: 83 c4 10 add $0x10,%esp
10f964: 85 c0 test %eax,%eax
10f966: 75 52 jne 10f9ba <fifo_open+0x173>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
10f968: 83 ec 0c sub $0xc,%esp
10f96b: 8d 43 28 lea 0x28(%ebx),%eax
10f96e: 50 push %eax
10f96f: 6a 00 push $0x0
10f971: 6a 10 push $0x10
10f973: 6a 01 push $0x1
rtems_build_name ('P', 'I', 's', c), 1,
10f975: 0f be 05 74 30 12 00 movsbl 0x123074,%eax
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
10f97c: 0d 00 73 49 50 or $0x50497300,%eax
10f981: 50 push %eax
10f982: e8 e1 bf ff ff call 10b968 <rtems_semaphore_create>
10f987: 83 c4 20 add $0x20,%esp
10f98a: 85 c0 test %eax,%eax
10f98c: 75 1b jne 10f9a9 <fifo_open+0x162>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
10f98e: a0 74 30 12 00 mov 0x123074,%al
10f993: 8d 50 01 lea 0x1(%eax),%edx
10f996: 88 15 74 30 12 00 mov %dl,0x123074
10f99c: 3c 7a cmp $0x7a,%al
10f99e: 75 50 jne 10f9f0 <fifo_open+0x1a9>
c = 'a';
10f9a0: c6 05 74 30 12 00 61 movb $0x61,0x123074
10f9a7: eb 47 jmp 10f9f0 <fifo_open+0x1a9>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
10f9a9: 83 ec 0c sub $0xc,%esp
10f9ac: 8b 55 d4 mov -0x2c(%ebp),%edx
10f9af: ff 72 30 pushl 0x30(%edx)
10f9b2: e8 c1 0e 00 00 call 110878 <rtems_barrier_delete>
10f9b7: 83 c4 10 add $0x10,%esp
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
10f9ba: 83 ec 0c sub $0xc,%esp
10f9bd: 8b 45 d4 mov -0x2c(%ebp),%eax
10f9c0: ff 70 2c pushl 0x2c(%eax)
10f9c3: e8 b0 0e 00 00 call 110878 <rtems_barrier_delete>
10f9c8: 83 c4 10 add $0x10,%esp
err_rbar:
free(pipe->Buffer);
10f9cb: 83 ec 0c sub $0xc,%esp
10f9ce: 8b 55 d4 mov -0x2c(%ebp),%edx
10f9d1: ff 32 pushl (%edx)
10f9d3: e8 5c 8f ff ff call 108934 <free>
10f9d8: 83 c4 10 add $0x10,%esp
err_buf:
free(pipe);
10f9db: 83 ec 0c sub $0xc,%esp
10f9de: ff 75 d4 pushl -0x2c(%ebp)
10f9e1: e8 4e 8f ff ff call 108934 <free>
10f9e6: 83 c4 10 add $0x10,%esp
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
10f9e9: be f4 ff ff ff mov $0xfffffff4,%esi
10f9ee: eb 33 jmp 10fa23 <fifo_open+0x1dc>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
10f9f0: 50 push %eax
10f9f1: 6a 00 push $0x0
10f9f3: 6a 00 push $0x0
10f9f5: ff 73 28 pushl 0x28(%ebx)
10f9f8: e8 93 c1 ff ff call 10bb90 <rtems_semaphore_obtain>
10f9fd: 83 c4 10 add $0x10,%esp
10fa00: 85 c0 test %eax,%eax
10fa02: 74 05 je 10fa09 <fifo_open+0x1c2> <== ALWAYS TAKEN
err = -EINTR;
10fa04: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
if (*pipep == NULL) {
10fa09: 8b 45 08 mov 0x8(%ebp),%eax
10fa0c: 83 38 00 cmpl $0x0,(%eax)
10fa0f: 75 12 jne 10fa23 <fifo_open+0x1dc>
if (err)
10fa11: 85 f6 test %esi,%esi
10fa13: 74 09 je 10fa1e <fifo_open+0x1d7> <== ALWAYS TAKEN
pipe_free(pipe);
10fa15: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10fa17: e8 5e fd ff ff call 10f77a <pipe_free> <== NOT EXECUTED
10fa1c: eb 05 jmp 10fa23 <fifo_open+0x1dc> <== NOT EXECUTED
else
*pipep = pipe;
10fa1e: 8b 55 08 mov 0x8(%ebp),%edx
10fa21: 89 1a mov %ebx,(%edx)
}
out:
pipe_unlock();
10fa23: e8 3c fd ff ff call 10f764 <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
10fa28: 85 f6 test %esi,%esi
10fa2a: 0f 85 94 01 00 00 jne 10fbc4 <fifo_open+0x37d>
return err;
pipe = *pipep;
10fa30: 8b 45 08 mov 0x8(%ebp),%eax
10fa33: 8b 18 mov (%eax),%ebx
switch (LIBIO_ACCMODE(iop)) {
10fa35: 8b 55 0c mov 0xc(%ebp),%edx
10fa38: 8b 42 14 mov 0x14(%edx),%eax
10fa3b: 83 e0 06 and $0x6,%eax
10fa3e: 83 f8 04 cmp $0x4,%eax
10fa41: 0f 84 91 00 00 00 je 10fad8 <fifo_open+0x291>
10fa47: 83 f8 06 cmp $0x6,%eax
10fa4a: 0f 84 10 01 00 00 je 10fb60 <fifo_open+0x319>
10fa50: 83 f8 02 cmp $0x2,%eax
10fa53: 0f 85 49 01 00 00 jne 10fba2 <fifo_open+0x35b> <== NEVER TAKEN
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
10fa59: ff 43 20 incl 0x20(%ebx)
if (pipe->Readers ++ == 0)
10fa5c: 8b 43 10 mov 0x10(%ebx),%eax
10fa5f: 8d 50 01 lea 0x1(%eax),%edx
10fa62: 89 53 10 mov %edx,0x10(%ebx)
10fa65: 85 c0 test %eax,%eax
10fa67: 75 11 jne 10fa7a <fifo_open+0x233> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
10fa69: 57 push %edi
10fa6a: 57 push %edi
10fa6b: 8d 45 e4 lea -0x1c(%ebp),%eax
10fa6e: 50 push %eax
10fa6f: ff 73 30 pushl 0x30(%ebx)
10fa72: e8 89 0e 00 00 call 110900 <rtems_barrier_release>
10fa77: 83 c4 10 add $0x10,%esp
if (pipe->Writers == 0) {
10fa7a: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10fa7e: 0f 85 1e 01 00 00 jne 10fba2 <fifo_open+0x35b>
/* Not an error */
if (LIBIO_NODELAY(iop))
10fa84: 8b 45 0c mov 0xc(%ebp),%eax
10fa87: f6 40 14 01 testb $0x1,0x14(%eax)
10fa8b: 0f 85 11 01 00 00 jne 10fba2 <fifo_open+0x35b>
break;
prevCounter = pipe->writerCounter;
10fa91: 8b 7b 24 mov 0x24(%ebx),%edi
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
10fa94: 83 ec 0c sub $0xc,%esp
10fa97: ff 73 28 pushl 0x28(%ebx)
10fa9a: e8 dd c1 ff ff call 10bc7c <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
10fa9f: 5a pop %edx
10faa0: 59 pop %ecx
10faa1: 6a 00 push $0x0
10faa3: ff 73 2c pushl 0x2c(%ebx)
10faa6: e8 ad 0e 00 00 call 110958 <rtems_barrier_wait>
10faab: 83 c4 10 add $0x10,%esp
10faae: 85 c0 test %eax,%eax
10fab0: 0f 85 f9 00 00 00 jne 10fbaf <fifo_open+0x368> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
10fab6: 50 push %eax
10fab7: 6a 00 push $0x0
10fab9: 6a 00 push $0x0
10fabb: ff 73 28 pushl 0x28(%ebx)
10fabe: e8 cd c0 ff ff call 10bb90 <rtems_semaphore_obtain>
10fac3: 83 c4 10 add $0x10,%esp
10fac6: 85 c0 test %eax,%eax
10fac8: 0f 85 e1 00 00 00 jne 10fbaf <fifo_open+0x368> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->writerCounter);
10face: 3b 7b 24 cmp 0x24(%ebx),%edi
10fad1: 74 c1 je 10fa94 <fifo_open+0x24d> <== NEVER TAKEN
10fad3: e9 ca 00 00 00 jmp 10fba2 <fifo_open+0x35b>
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
10fad8: ff 43 24 incl 0x24(%ebx)
if (pipe->Writers ++ == 0)
10fadb: 8b 43 14 mov 0x14(%ebx),%eax
10fade: 8d 50 01 lea 0x1(%eax),%edx
10fae1: 89 53 14 mov %edx,0x14(%ebx)
10fae4: 85 c0 test %eax,%eax
10fae6: 75 11 jne 10faf9 <fifo_open+0x2b2> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
10fae8: 57 push %edi
10fae9: 57 push %edi
10faea: 8d 45 e4 lea -0x1c(%ebp),%eax
10faed: 50 push %eax
10faee: ff 73 2c pushl 0x2c(%ebx)
10faf1: e8 0a 0e 00 00 call 110900 <rtems_barrier_release>
10faf6: 83 c4 10 add $0x10,%esp
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
10faf9: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10fafd: 0f 85 9f 00 00 00 jne 10fba2 <fifo_open+0x35b>
10fb03: 8b 55 0c mov 0xc(%ebp),%edx
10fb06: f6 42 14 01 testb $0x1,0x14(%edx)
10fb0a: 74 18 je 10fb24 <fifo_open+0x2dd>
PIPE_UNLOCK(pipe);
10fb0c: 83 ec 0c sub $0xc,%esp
10fb0f: ff 73 28 pushl 0x28(%ebx)
10fb12: e8 65 c1 ff ff call 10bc7c <rtems_semaphore_release>
err = -ENXIO;
goto out_error;
10fb17: 83 c4 10 add $0x10,%esp
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
err = -ENXIO;
10fb1a: be fa ff ff ff mov $0xfffffffa,%esi
goto out_error;
10fb1f: e9 90 00 00 00 jmp 10fbb4 <fifo_open+0x36d>
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
10fb24: 8b 7b 20 mov 0x20(%ebx),%edi
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
10fb27: 83 ec 0c sub $0xc,%esp
10fb2a: ff 73 28 pushl 0x28(%ebx)
10fb2d: e8 4a c1 ff ff call 10bc7c <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
10fb32: 5a pop %edx
10fb33: 59 pop %ecx
10fb34: 6a 00 push $0x0
10fb36: ff 73 30 pushl 0x30(%ebx)
10fb39: e8 1a 0e 00 00 call 110958 <rtems_barrier_wait>
10fb3e: 83 c4 10 add $0x10,%esp
10fb41: 85 c0 test %eax,%eax
10fb43: 75 6a jne 10fbaf <fifo_open+0x368> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
10fb45: 50 push %eax
10fb46: 6a 00 push $0x0
10fb48: 6a 00 push $0x0
10fb4a: ff 73 28 pushl 0x28(%ebx)
10fb4d: e8 3e c0 ff ff call 10bb90 <rtems_semaphore_obtain>
10fb52: 83 c4 10 add $0x10,%esp
10fb55: 85 c0 test %eax,%eax
10fb57: 75 56 jne 10fbaf <fifo_open+0x368> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->readerCounter);
10fb59: 3b 7b 20 cmp 0x20(%ebx),%edi
10fb5c: 74 c9 je 10fb27 <fifo_open+0x2e0> <== NEVER TAKEN
10fb5e: eb 42 jmp 10fba2 <fifo_open+0x35b>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
10fb60: ff 43 20 incl 0x20(%ebx)
if (pipe->Readers ++ == 0)
10fb63: 8b 43 10 mov 0x10(%ebx),%eax
10fb66: 8d 50 01 lea 0x1(%eax),%edx
10fb69: 89 53 10 mov %edx,0x10(%ebx)
10fb6c: 85 c0 test %eax,%eax
10fb6e: 75 11 jne 10fb81 <fifo_open+0x33a> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
10fb70: 51 push %ecx
10fb71: 51 push %ecx
10fb72: 8d 45 e4 lea -0x1c(%ebp),%eax
10fb75: 50 push %eax
10fb76: ff 73 30 pushl 0x30(%ebx)
10fb79: e8 82 0d 00 00 call 110900 <rtems_barrier_release>
10fb7e: 83 c4 10 add $0x10,%esp
pipe->writerCounter ++;
10fb81: ff 43 24 incl 0x24(%ebx)
if (pipe->Writers ++ == 0)
10fb84: 8b 43 14 mov 0x14(%ebx),%eax
10fb87: 8d 50 01 lea 0x1(%eax),%edx
10fb8a: 89 53 14 mov %edx,0x14(%ebx)
10fb8d: 85 c0 test %eax,%eax
10fb8f: 75 11 jne 10fba2 <fifo_open+0x35b> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
10fb91: 52 push %edx
10fb92: 52 push %edx
10fb93: 8d 45 e4 lea -0x1c(%ebp),%eax
10fb96: 50 push %eax
10fb97: ff 73 2c pushl 0x2c(%ebx)
10fb9a: e8 61 0d 00 00 call 110900 <rtems_barrier_release>
10fb9f: 83 c4 10 add $0x10,%esp
break;
}
PIPE_UNLOCK(pipe);
10fba2: 83 ec 0c sub $0xc,%esp
10fba5: ff 73 28 pushl 0x28(%ebx)
10fba8: e8 cf c0 ff ff call 10bc7c <rtems_semaphore_release>
10fbad: eb 12 jmp 10fbc1 <fifo_open+0x37a>
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
10fbaf: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
10fbb4: 50 push %eax
10fbb5: 50 push %eax
10fbb6: ff 75 0c pushl 0xc(%ebp)
10fbb9: ff 75 08 pushl 0x8(%ebp)
10fbbc: e8 f4 fb ff ff call 10f7b5 <pipe_release>
return err;
10fbc1: 83 c4 10 add $0x10,%esp
}
10fbc4: 89 f0 mov %esi,%eax
10fbc6: 8d 65 f4 lea -0xc(%ebp),%esp
10fbc9: 5b pop %ebx
10fbca: 5e pop %esi
10fbcb: 5f pop %edi
10fbcc: c9 leave
10fbcd: c3 ret
00107d7c <fpathconf>:
long fpathconf(
int fd,
int name
)
{
107d7c: 55 push %ebp
107d7d: 89 e5 mov %esp,%ebp
107d7f: 83 ec 08 sub $0x8,%esp
107d82: 8b 45 08 mov 0x8(%ebp),%eax
107d85: 8b 55 0c mov 0xc(%ebp),%edx
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
107d88: 3b 05 64 14 12 00 cmp 0x121464,%eax
107d8e: 73 11 jae 107da1 <fpathconf+0x25>
iop = rtems_libio_iop(fd);
107d90: 6b c0 38 imul $0x38,%eax,%eax
107d93: 03 05 38 54 12 00 add 0x125438,%eax
rtems_libio_check_is_open(iop);
107d99: 8b 48 14 mov 0x14(%eax),%ecx
107d9c: f6 c5 01 test $0x1,%ch
107d9f: 75 0d jne 107dae <fpathconf+0x32> <== ALWAYS TAKEN
107da1: e8 7a 92 00 00 call 111020 <__errno>
107da6: c7 00 09 00 00 00 movl $0x9,(%eax)
107dac: eb 5b jmp 107e09 <fpathconf+0x8d>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
107dae: 80 e1 02 and $0x2,%cl
107db1: 74 4b je 107dfe <fpathconf+0x82>
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
107db3: 8b 40 28 mov 0x28(%eax),%eax
switch ( name ) {
107db6: 83 fa 0b cmp $0xb,%edx
107db9: 77 43 ja 107dfe <fpathconf+0x82>
107dbb: ff 24 95 24 f0 11 00 jmp *0x11f024(,%edx,4)
case _PC_LINK_MAX:
return_value = the_limits->link_max;
107dc2: 8b 40 38 mov 0x38(%eax),%eax
break;
107dc5: eb 45 jmp 107e0c <fpathconf+0x90>
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
107dc7: 8b 40 3c mov 0x3c(%eax),%eax
break;
107dca: eb 40 jmp 107e0c <fpathconf+0x90>
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
107dcc: 8b 40 40 mov 0x40(%eax),%eax
break;
107dcf: eb 3b jmp 107e0c <fpathconf+0x90>
case _PC_NAME_MAX:
return_value = the_limits->name_max;
107dd1: 8b 40 44 mov 0x44(%eax),%eax
break;
107dd4: eb 36 jmp 107e0c <fpathconf+0x90>
case _PC_PATH_MAX:
return_value = the_limits->path_max;
107dd6: 8b 40 48 mov 0x48(%eax),%eax
break;
107dd9: eb 31 jmp 107e0c <fpathconf+0x90>
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
107ddb: 8b 40 4c mov 0x4c(%eax),%eax
break;
107dde: eb 2c jmp 107e0c <fpathconf+0x90>
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
107de0: 8b 40 54 mov 0x54(%eax),%eax
break;
107de3: eb 27 jmp 107e0c <fpathconf+0x90>
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
107de5: 8b 40 58 mov 0x58(%eax),%eax
break;
107de8: eb 22 jmp 107e0c <fpathconf+0x90>
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
107dea: 8b 40 64 mov 0x64(%eax),%eax
break;
107ded: eb 1d jmp 107e0c <fpathconf+0x90>
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
107def: 8b 40 50 mov 0x50(%eax),%eax
break;
107df2: eb 18 jmp 107e0c <fpathconf+0x90>
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
107df4: 8b 40 5c mov 0x5c(%eax),%eax
break;
107df7: eb 13 jmp 107e0c <fpathconf+0x90>
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
107df9: 8b 40 60 mov 0x60(%eax),%eax
break;
107dfc: eb 0e jmp 107e0c <fpathconf+0x90>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
107dfe: e8 1d 92 00 00 call 111020 <__errno>
107e03: c7 00 16 00 00 00 movl $0x16,(%eax)
107e09: 83 c8 ff or $0xffffffff,%eax
break;
}
return return_value;
}
107e0c: c9 leave
107e0d: c3 ret
00107338 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
107338: 55 push %ebp
107339: 89 e5 mov %esp,%ebp
10733b: 53 push %ebx
10733c: 83 ec 04 sub $0x4,%esp
10733f: 8b 5d 08 mov 0x8(%ebp),%ebx
MSBUMP(free_calls, 1);
107342: ff 05 3c 31 12 00 incl 0x12313c
if ( !ptr )
107348: 85 db test %ebx,%ebx
10734a: 74 5f je 1073ab <free+0x73>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
10734c: 83 3d e4 33 12 00 03 cmpl $0x3,0x1233e4
107353: 75 15 jne 10736a <free+0x32> <== NEVER TAKEN
!malloc_is_system_state_OK() ) {
107355: e8 56 01 00 00 call 1074b0 <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()) &&
10735a: 84 c0 test %al,%al
10735c: 75 0c jne 10736a <free+0x32>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
10735e: 89 5d 08 mov %ebx,0x8(%ebp)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
107361: 8b 5d fc mov -0x4(%ebp),%ebx
107364: c9 leave
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
107365: e9 ae 01 00 00 jmp 107518 <malloc_deferred_free>
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
10736a: a1 d0 15 12 00 mov 0x1215d0,%eax
10736f: 85 c0 test %eax,%eax
107371: 74 0a je 10737d <free+0x45>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
107373: 83 ec 0c sub $0xc,%esp
107376: 53 push %ebx
107377: ff 50 08 call *0x8(%eax)
10737a: 83 c4 10 add $0x10,%esp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
10737d: 50 push %eax
10737e: 50 push %eax
10737f: 53 push %ebx
107380: ff 35 50 f1 11 00 pushl 0x11f150
107386: e8 35 45 00 00 call 10b8c0 <_Protected_heap_Free>
10738b: 83 c4 10 add $0x10,%esp
10738e: 84 c0 test %al,%al
107390: 75 19 jne 1073ab <free+0x73>
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
107392: a1 50 f1 11 00 mov 0x11f150,%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",
107397: ff 70 1c pushl 0x1c(%eax)
10739a: ff 70 18 pushl 0x18(%eax)
10739d: 53 push %ebx
10739e: 68 cf d6 11 00 push $0x11d6cf
1073a3: e8 d8 0b 00 00 call 107f80 <printk>
1073a8: 83 c4 10 add $0x10,%esp
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
1073ab: 8b 5d fc mov -0x4(%ebp),%ebx
1073ae: c9 leave
1073af: c3 ret
001085c0 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
1085c0: 55 push %ebp
1085c1: 89 e5 mov %esp,%ebp
1085c3: 53 push %ebx
1085c4: 83 ec 04 sub $0x4,%esp
1085c7: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
1085ca: 81 fb 48 43 12 00 cmp $0x124348,%ebx
1085d0: 74 26 je 1085f8 <free_user_env+0x38> <== NEVER TAKEN
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
1085d2: 83 ec 0c sub $0xc,%esp
1085d5: 8d 43 04 lea 0x4(%ebx),%eax
1085d8: 50 push %eax
1085d9: e8 6a f1 ff ff call 107748 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &env->root_directory);
1085de: 8d 43 18 lea 0x18(%ebx),%eax
1085e1: 89 04 24 mov %eax,(%esp)
1085e4: e8 5f f1 ff ff call 107748 <rtems_filesystem_freenode>
free(env);
1085e9: 83 c4 10 add $0x10,%esp
1085ec: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
1085ef: 8b 5d fc mov -0x4(%ebp),%ebx
1085f2: c9 leave
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
1085f3: e9 64 f1 ff ff jmp 10775c <free>
}
}
1085f8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1085fb: c9 leave <== NOT EXECUTED
1085fc: c3 ret <== NOT EXECUTED
0011cf58 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
11cf58: 55 push %ebp
11cf59: 89 e5 mov %esp,%ebp
11cf5b: 57 push %edi
11cf5c: 56 push %esi
11cf5d: 53 push %ebx
11cf5e: 83 ec 2c sub $0x2c,%esp
11cf61: 8b 45 08 mov 0x8(%ebp),%eax
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
11cf64: 31 db xor %ebx,%ebx
11cf66: 3b 05 44 24 12 00 cmp 0x122444,%eax
11cf6c: 73 09 jae 11cf77 <getdents+0x1f> <== NEVER TAKEN
11cf6e: 6b d8 38 imul $0x38,%eax,%ebx
11cf71: 03 1d 40 65 12 00 add 0x126540,%ebx
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
11cf77: 8d 7d d4 lea -0x2c(%ebp),%edi
11cf7a: 8d 73 18 lea 0x18(%ebx),%esi
11cf7d: b9 05 00 00 00 mov $0x5,%ecx
11cf82: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
11cf84: 83 ec 0c sub $0xc,%esp
11cf87: 8d 45 d4 lea -0x2c(%ebp),%eax
11cf8a: 50 push %eax
11cf8b: 8b 45 e0 mov -0x20(%ebp),%eax
11cf8e: ff 50 10 call *0x10(%eax)
11cf91: 83 c4 10 add $0x10,%esp
11cf94: 48 dec %eax
11cf95: 74 10 je 11cfa7 <getdents+0x4f>
rtems_set_errno_and_return_minus_one( ENOTDIR );
11cf97: e8 94 41 ff ff call 111130 <__errno>
11cf9c: c7 00 14 00 00 00 movl $0x14,(%eax)
11cfa2: 83 c8 ff or $0xffffffff,%eax
11cfa5: eb 11 jmp 11cfb8 <getdents+0x60>
/*
* 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 );
11cfa7: 50 push %eax
11cfa8: 8b 43 20 mov 0x20(%ebx),%eax
11cfab: ff 75 10 pushl 0x10(%ebp)
11cfae: ff 75 0c pushl 0xc(%ebp)
11cfb1: 53 push %ebx
11cfb2: ff 50 08 call *0x8(%eax)
11cfb5: 83 c4 10 add $0x10,%esp
}
11cfb8: 8d 65 f4 lea -0xc(%ebp),%esp
11cfbb: 5b pop %ebx
11cfbc: 5e pop %esi
11cfbd: 5f pop %edi
11cfbe: c9 leave
11cfbf: c3 ret
001073b0 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
1073b0: 55 push %ebp
1073b1: 89 e5 mov %esp,%ebp
1073b3: 56 push %esi
1073b4: 53 push %ebx
1073b5: 83 ec 10 sub $0x10,%esp
1073b8: 8b 5d 08 mov 0x8(%ebp),%ebx
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
1073bb: 85 db test %ebx,%ebx
1073bd: 75 10 jne 1073cf <gettimeofday+0x1f> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
1073bf: e8 f4 8d 00 00 call 1101b8 <__errno> <== NOT EXECUTED
1073c4: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
1073ca: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1073cd: eb 29 jmp 1073f8 <gettimeofday+0x48> <== NOT EXECUTED
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
1073cf: 9c pushf
1073d0: fa cli
1073d1: 5e pop %esi
_TOD_Get( &now );
1073d2: 83 ec 0c sub $0xc,%esp
1073d5: 8d 45 f0 lea -0x10(%ebp),%eax
1073d8: 50 push %eax
1073d9: e8 6e 39 00 00 call 10ad4c <_TOD_Get>
_ISR_Enable(level);
1073de: 56 push %esi
1073df: 9d popf
useconds = (suseconds_t)now.tv_nsec;
1073e0: 8b 45 f4 mov -0xc(%ebp),%eax
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
1073e3: 8b 55 f0 mov -0x10(%ebp),%edx
1073e6: 89 13 mov %edx,(%ebx)
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
1073e8: b9 e8 03 00 00 mov $0x3e8,%ecx
1073ed: 99 cltd
1073ee: f7 f9 idiv %ecx
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
1073f0: 89 43 04 mov %eax,0x4(%ebx)
* Timezone information ignored by the OS proper. Per email
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
1073f3: 83 c4 10 add $0x10,%esp
1073f6: 31 c0 xor %eax,%eax
}
1073f8: 8d 65 f8 lea -0x8(%ebp),%esp
1073fb: 5b pop %ebx
1073fc: 5e pop %esi
1073fd: c9 leave
1073fe: c3 ret
0010fb08 <imfs_dir_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
10fb08: 55 push %ebp
10fb09: 89 e5 mov %esp,%ebp
10fb0b: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
10fb0e: 8b 4a 18 mov 0x18(%edx),%ecx
return -1; /* It wasn't a directory --> return error */
10fb11: 83 c8 ff or $0xffffffff,%eax
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
10fb14: 83 79 4c 01 cmpl $0x1,0x4c(%ecx)
10fb18: 75 10 jne 10fb2a <imfs_dir_open+0x22> <== NEVER TAKEN
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
10fb1a: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
10fb21: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
return 0;
10fb28: 31 c0 xor %eax,%eax
}
10fb2a: c9 leave
10fb2b: c3 ret
0010fd69 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
10fd69: 55 push %ebp
10fd6a: 89 e5 mov %esp,%ebp
10fd6c: 53 push %ebx
10fd6d: 83 ec 04 sub $0x4,%esp
10fd70: 8b 45 0c mov 0xc(%ebp),%eax
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
10fd73: 8b 18 mov (%eax),%ebx
10fd75: 8d 53 54 lea 0x54(%ebx),%edx
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
10fd78: 39 53 50 cmp %edx,0x50(%ebx)
10fd7b: 74 0d je 10fd8a <imfs_dir_rmnod+0x21>
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
10fd7d: e8 36 04 00 00 call 1101b8 <__errno>
10fd82: c7 00 5a 00 00 00 movl $0x5a,(%eax)
10fd88: eb 13 jmp 10fd9d <imfs_dir_rmnod+0x34>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
10fd8a: 8b 40 10 mov 0x10(%eax),%eax
10fd8d: 39 58 1c cmp %ebx,0x1c(%eax)
10fd90: 75 10 jne 10fda2 <imfs_dir_rmnod+0x39>
rtems_set_errno_and_return_minus_one( EBUSY );
10fd92: e8 21 04 00 00 call 1101b8 <__errno>
10fd97: c7 00 10 00 00 00 movl $0x10,(%eax)
10fd9d: 83 c8 ff or $0xffffffff,%eax
10fda0: eb 1c jmp 10fdbe <imfs_dir_rmnod+0x55>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
10fda2: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx)
10fda6: 75 ea jne 10fd92 <imfs_dir_rmnod+0x29> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
10fda8: 83 ec 0c sub $0xc,%esp
10fdab: 53 push %ebx
10fdac: e8 13 de ff ff call 10dbc4 <IMFS_create_orphan>
IMFS_check_node_remove( the_jnode );
10fdb1: 89 1c 24 mov %ebx,(%esp)
10fdb4: e8 4d de ff ff call 10dc06 <IMFS_check_node_remove>
return 0;
10fdb9: 83 c4 10 add $0x10,%esp
10fdbc: 31 c0 xor %eax,%eax
}
10fdbe: 8b 5d fc mov -0x4(%ebp),%ebx
10fdc1: c9 leave
10fdc2: c3 ret
00107c5c <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
107c5c: 55 push %ebp
107c5d: 89 e5 mov %esp,%ebp
107c5f: 53 push %ebx
107c60: 83 ec 04 sub $0x4,%esp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
107c63: 80 3d a0 52 12 00 00 cmpb $0x0,0x1252a0
107c6a: 0f 85 b8 00 00 00 jne 107d28 <init_etc_passwd_group+0xcc>
return;
etc_passwd_initted = 1;
107c70: c6 05 a0 52 12 00 01 movb $0x1,0x1252a0
mkdir("/etc", 0777);
107c77: 50 push %eax
107c78: 50 push %eax
107c79: 68 ff 01 00 00 push $0x1ff
107c7e: 68 7b ef 11 00 push $0x11ef7b
107c83: e8 7c 07 00 00 call 108404 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
107c88: 59 pop %ecx
107c89: 5b pop %ebx
107c8a: 68 c6 dc 11 00 push $0x11dcc6
107c8f: 68 80 ef 11 00 push $0x11ef80
107c94: e8 1b 9b 00 00 call 1117b4 <fopen>
107c99: 83 c4 10 add $0x10,%esp
107c9c: 85 c0 test %eax,%eax
107c9e: 74 06 je 107ca6 <init_etc_passwd_group+0x4a>
fclose(fp);
107ca0: 83 ec 0c sub $0xc,%esp
107ca3: 50 push %eax
107ca4: eb 2a jmp 107cd0 <init_etc_passwd_group+0x74>
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
107ca6: 52 push %edx
107ca7: 52 push %edx
107ca8: 68 e0 db 11 00 push $0x11dbe0
107cad: 68 80 ef 11 00 push $0x11ef80
107cb2: e8 fd 9a 00 00 call 1117b4 <fopen>
107cb7: 89 c3 mov %eax,%ebx
107cb9: 83 c4 10 add $0x10,%esp
107cbc: 85 c0 test %eax,%eax
107cbe: 74 18 je 107cd8 <init_etc_passwd_group+0x7c><== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
107cc0: 50 push %eax
107cc1: 50 push %eax
107cc2: 53 push %ebx
107cc3: 68 8c ef 11 00 push $0x11ef8c
107cc8: e8 b3 9b 00 00 call 111880 <fputs>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
107ccd: 89 1c 24 mov %ebx,(%esp)
107cd0: e8 db 93 00 00 call 1110b0 <fclose>
107cd5: 83 c4 10 add $0x10,%esp
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
107cd8: 51 push %ecx
107cd9: 51 push %ecx
107cda: 68 c6 dc 11 00 push $0x11dcc6
107cdf: 68 f3 ef 11 00 push $0x11eff3
107ce4: e8 cb 9a 00 00 call 1117b4 <fopen>
107ce9: 83 c4 10 add $0x10,%esp
107cec: 85 c0 test %eax,%eax
107cee: 74 06 je 107cf6 <init_etc_passwd_group+0x9a>
fclose(fp);
107cf0: 83 ec 0c sub $0xc,%esp
107cf3: 50 push %eax
107cf4: eb 2a jmp 107d20 <init_etc_passwd_group+0xc4>
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
107cf6: 52 push %edx
107cf7: 52 push %edx
107cf8: 68 e0 db 11 00 push $0x11dbe0
107cfd: 68 f3 ef 11 00 push $0x11eff3
107d02: e8 ad 9a 00 00 call 1117b4 <fopen>
107d07: 89 c3 mov %eax,%ebx
107d09: 83 c4 10 add $0x10,%esp
107d0c: 85 c0 test %eax,%eax
107d0e: 74 18 je 107d28 <init_etc_passwd_group+0xcc><== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
107d10: 50 push %eax
107d11: 50 push %eax
107d12: 53 push %ebx
107d13: 68 fe ef 11 00 push $0x11effe
107d18: e8 63 9b 00 00 call 111880 <fputs>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
107d1d: 89 1c 24 mov %ebx,(%esp)
107d20: e8 8b 93 00 00 call 1110b0 <fclose>
107d25: 83 c4 10 add $0x10,%esp
}
}
107d28: 8b 5d fc mov -0x4(%ebp),%ebx
107d2b: c9 leave
107d2c: c3 ret
00108dfc <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
108dfc: 55 push %ebp
108dfd: 89 e5 mov %esp,%ebp
108dff: 53 push %ebx
108e00: 83 ec 14 sub $0x14,%esp
108e03: 89 d3 mov %edx,%ebx
108e05: 88 c1 mov %al,%cl
if (tty->termios.c_iflag & ISTRIP)
108e07: 8b 52 30 mov 0x30(%edx),%edx
108e0a: f6 c2 20 test $0x20,%dl
108e0d: 74 03 je 108e12 <iproc+0x16> <== ALWAYS TAKEN
c &= 0x7f;
108e0f: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
108e12: f6 c6 02 test $0x2,%dh
108e15: 74 16 je 108e2d <iproc+0x31>
c = tolower (c);
108e17: 0f b6 c9 movzbl %cl,%ecx
108e1a: a1 c4 10 12 00 mov 0x1210c4,%eax
108e1f: 0f be 44 08 01 movsbl 0x1(%eax,%ecx,1),%eax
108e24: 83 e0 03 and $0x3,%eax
108e27: 48 dec %eax
108e28: 75 03 jne 108e2d <iproc+0x31>
108e2a: 83 c1 20 add $0x20,%ecx
if (c == '\r') {
108e2d: 80 f9 0d cmp $0xd,%cl
108e30: 75 14 jne 108e46 <iproc+0x4a>
if (tty->termios.c_iflag & IGNCR)
return 0;
108e32: 31 c0 xor %eax,%eax
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
108e34: f6 c2 80 test $0x80,%dl
108e37: 0f 85 d9 00 00 00 jne 108f16 <iproc+0x11a> <== NEVER TAKEN
return 0;
if (tty->termios.c_iflag & ICRNL)
108e3d: 80 e6 01 and $0x1,%dh
108e40: 74 1a je 108e5c <iproc+0x60> <== NEVER TAKEN
c = '\n';
108e42: b1 0a mov $0xa,%cl
108e44: eb 16 jmp 108e5c <iproc+0x60>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
108e46: 80 f9 0a cmp $0xa,%cl
108e49: 75 09 jne 108e54 <iproc+0x58>
108e4b: 80 e2 40 and $0x40,%dl
108e4e: 74 0c je 108e5c <iproc+0x60> <== ALWAYS TAKEN
c = '\r';
108e50: b1 0d mov $0xd,%cl <== NOT EXECUTED
108e52: eb 08 jmp 108e5c <iproc+0x60> <== NOT EXECUTED
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
108e54: 84 c9 test %cl,%cl
108e56: 0f 84 87 00 00 00 je 108ee3 <iproc+0xe7> <== NEVER TAKEN
108e5c: 8b 53 3c mov 0x3c(%ebx),%edx
108e5f: f6 c2 02 test $0x2,%dl
108e62: 74 7f je 108ee3 <iproc+0xe7>
if (c == tty->termios.c_cc[VERASE]) {
108e64: 3a 4b 43 cmp 0x43(%ebx),%cl
108e67: 75 04 jne 108e6d <iproc+0x71>
erase (tty, 0);
108e69: 31 d2 xor %edx,%edx
108e6b: eb 0a jmp 108e77 <iproc+0x7b>
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
108e6d: 3a 4b 44 cmp 0x44(%ebx),%cl
108e70: 75 11 jne 108e83 <iproc+0x87>
erase (tty, 1);
108e72: ba 01 00 00 00 mov $0x1,%edx
108e77: 89 d8 mov %ebx,%eax
108e79: e8 05 fe ff ff call 108c83 <erase>
108e7e: e9 91 00 00 00 jmp 108f14 <iproc+0x118>
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
108e83: b8 01 00 00 00 mov $0x1,%eax
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
108e88: 3a 4b 45 cmp 0x45(%ebx),%cl
108e8b: 0f 84 85 00 00 00 je 108f16 <iproc+0x11a> <== NEVER TAKEN
return 1;
} else if (c == '\n') {
108e91: 80 f9 0a cmp $0xa,%cl
108e94: 75 1a jne 108eb0 <iproc+0xb4>
if (tty->termios.c_lflag & (ECHO | ECHONL))
108e96: 80 e2 48 and $0x48,%dl
108e99: 74 09 je 108ea4 <iproc+0xa8> <== NEVER TAKEN
echo (c, tty);
108e9b: 89 da mov %ebx,%edx
108e9d: b0 0a mov $0xa,%al
108e9f: e8 87 fd ff ff call 108c2b <echo>
tty->cbuf[tty->ccount++] = c;
108ea4: 8b 43 20 mov 0x20(%ebx),%eax
108ea7: 8b 53 1c mov 0x1c(%ebx),%edx
108eaa: c6 04 02 0a movb $0xa,(%edx,%eax,1)
108eae: eb 28 jmp 108ed8 <iproc+0xdc>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
108eb0: 3a 4b 4c cmp 0x4c(%ebx),%cl
108eb3: 74 05 je 108eba <iproc+0xbe> <== NEVER TAKEN
108eb5: 3a 4b 51 cmp 0x51(%ebx),%cl
108eb8: 75 29 jne 108ee3 <iproc+0xe7> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
108eba: 80 e2 08 and $0x8,%dl <== NOT EXECUTED
108ebd: 74 10 je 108ecf <iproc+0xd3> <== NOT EXECUTED
echo (c, tty);
108ebf: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
108ec2: 89 da mov %ebx,%edx <== NOT EXECUTED
108ec4: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED
108ec7: e8 5f fd ff ff call 108c2b <echo> <== NOT EXECUTED
108ecc: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
108ecf: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
108ed2: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
108ed5: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED
108ed8: 40 inc %eax
108ed9: 89 43 20 mov %eax,0x20(%ebx)
return 1;
108edc: b8 01 00 00 00 mov $0x1,%eax
108ee1: eb 33 jmp 108f16 <iproc+0x11a>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
108ee3: 8b 15 40 10 12 00 mov 0x121040,%edx
108ee9: 4a dec %edx
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
108eea: 31 c0 xor %eax,%eax
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
108eec: 39 53 20 cmp %edx,0x20(%ebx)
108eef: 7d 25 jge 108f16 <iproc+0x11a> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
108ef1: f6 43 3c 08 testb $0x8,0x3c(%ebx)
108ef5: 74 10 je 108f07 <iproc+0x10b> <== NEVER TAKEN
echo (c, tty);
108ef7: 0f b6 c1 movzbl %cl,%eax
108efa: 89 da mov %ebx,%edx
108efc: 88 4d f4 mov %cl,-0xc(%ebp)
108eff: e8 27 fd ff ff call 108c2b <echo>
108f04: 8a 4d f4 mov -0xc(%ebp),%cl
tty->cbuf[tty->ccount++] = c;
108f07: 8b 43 20 mov 0x20(%ebx),%eax
108f0a: 8b 53 1c mov 0x1c(%ebx),%edx
108f0d: 88 0c 02 mov %cl,(%edx,%eax,1)
108f10: 40 inc %eax
108f11: 89 43 20 mov %eax,0x20(%ebx)
}
return 0;
108f14: 31 c0 xor %eax,%eax
}
108f16: 83 c4 14 add $0x14,%esp
108f19: 5b pop %ebx
108f1a: c9 leave
108f1b: c3 ret
001204b0 <kill>:
* These are directly supported (and completely correct) in the posix api.
*/
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
1204b0: 55 push %ebp <== NOT EXECUTED
1204b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return 0;
}
1204b3: 31 c0 xor %eax,%eax <== NOT EXECUTED
1204b5: c9 leave <== NOT EXECUTED
1204b6: c3 ret <== NOT EXECUTED
0011b844 <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
11b844: 55 push %ebp
11b845: 89 e5 mov %esp,%ebp
11b847: 53 push %ebx
11b848: 83 ec 04 sub $0x4,%esp
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
11b84b: 83 3d e4 33 12 00 03 cmpl $0x3,0x1233e4
11b852: 75 4f jne 11b8a3 <libc_wrapup+0x5f> <== NEVER TAKEN
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
11b854: 8b 1d 00 e0 11 00 mov 0x11e000,%ebx
11b85a: 39 1d e0 10 12 00 cmp %ebx,0x1210e0
11b860: 74 12 je 11b874 <libc_wrapup+0x30>
_wrapup_reent(_global_impure_ptr);
11b862: 83 ec 0c sub $0xc,%esp
11b865: 53 push %ebx
11b866: e8 b5 05 00 00 call 11be20 <_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;
11b86b: 89 1d e0 10 12 00 mov %ebx,0x1210e0
11b871: 83 c4 10 add $0x10,%esp
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
11b874: 83 ec 0c sub $0xc,%esp
11b877: a1 e0 10 12 00 mov 0x1210e0,%eax
11b87c: ff 70 04 pushl 0x4(%eax)
11b87f: e8 8c 4a ff ff call 110310 <fclose>
fclose (stdout);
11b884: 5a pop %edx
11b885: a1 e0 10 12 00 mov 0x1210e0,%eax
11b88a: ff 70 08 pushl 0x8(%eax)
11b88d: e8 7e 4a ff ff call 110310 <fclose>
fclose (stderr);
11b892: 58 pop %eax
11b893: a1 e0 10 12 00 mov 0x1210e0,%eax
11b898: ff 70 0c pushl 0xc(%eax)
11b89b: e8 70 4a ff ff call 110310 <fclose>
11b8a0: 83 c4 10 add $0x10,%esp
}
11b8a3: 8b 5d fc mov -0x4(%ebp),%ebx
11b8a6: c9 leave
11b8a7: c3 ret
0011b750 <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
11b750: 55 push %ebp
11b751: 89 e5 mov %esp,%ebp
11b753: 57 push %edi
11b754: 56 push %esi
11b755: 53 push %ebx
11b756: 83 ec 1c sub $0x1c,%esp
11b759: 8b 5d 08 mov 0x8(%ebp),%ebx
11b75c: 8b 45 0c mov 0xc(%ebp),%eax
11b75f: 8b 55 10 mov 0x10(%ebp),%edx
11b762: 8b 4d 14 mov 0x14(%ebp),%ecx
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
11b765: 3b 1d 44 f1 11 00 cmp 0x11f144,%ebx
11b76b: 73 0f jae 11b77c <lseek+0x2c>
iop = rtems_libio_iop( fd );
11b76d: 6b db 38 imul $0x38,%ebx,%ebx
11b770: 03 1d 18 31 12 00 add 0x123118,%ebx
rtems_libio_check_is_open(iop);
11b776: f6 43 15 01 testb $0x1,0x15(%ebx)
11b77a: 75 0d jne 11b789 <lseek+0x39>
11b77c: e8 37 4a ff ff call 1101b8 <__errno>
11b781: c7 00 09 00 00 00 movl $0x9,(%eax)
11b787: eb 4b jmp 11b7d4 <lseek+0x84>
/*
* Now process the lseek().
*/
old_offset = iop->offset;
11b789: 8b 73 0c mov 0xc(%ebx),%esi
11b78c: 8b 7b 10 mov 0x10(%ebx),%edi
11b78f: 89 75 e0 mov %esi,-0x20(%ebp)
11b792: 89 7d e4 mov %edi,-0x1c(%ebp)
switch ( whence ) {
11b795: 83 f9 01 cmp $0x1,%ecx
11b798: 74 11 je 11b7ab <lseek+0x5b>
11b79a: 83 f9 02 cmp $0x2,%ecx
11b79d: 74 18 je 11b7b7 <lseek+0x67>
11b79f: 85 c9 test %ecx,%ecx
11b7a1: 75 26 jne 11b7c9 <lseek+0x79>
case SEEK_SET:
iop->offset = offset;
11b7a3: 89 43 0c mov %eax,0xc(%ebx)
11b7a6: 89 53 10 mov %edx,0x10(%ebx)
break;
11b7a9: eb 30 jmp 11b7db <lseek+0x8b>
case SEEK_CUR:
iop->offset += offset;
11b7ab: 8b 75 e0 mov -0x20(%ebp),%esi
11b7ae: 8b 7d e4 mov -0x1c(%ebp),%edi
11b7b1: 01 c6 add %eax,%esi
11b7b3: 11 d7 adc %edx,%edi
11b7b5: eb 0a jmp 11b7c1 <lseek+0x71>
break;
case SEEK_END:
iop->offset = iop->size + offset;
11b7b7: 89 c6 mov %eax,%esi
11b7b9: 89 d7 mov %edx,%edi
11b7bb: 03 73 04 add 0x4(%ebx),%esi
11b7be: 13 7b 08 adc 0x8(%ebx),%edi
11b7c1: 89 73 0c mov %esi,0xc(%ebx)
11b7c4: 89 7b 10 mov %edi,0x10(%ebx)
break;
11b7c7: eb 12 jmp 11b7db <lseek+0x8b>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
11b7c9: e8 ea 49 ff ff call 1101b8 <__errno>
11b7ce: c7 00 16 00 00 00 movl $0x16,(%eax)
11b7d4: 83 c8 ff or $0xffffffff,%eax
11b7d7: 89 c2 mov %eax,%edx
11b7d9: eb 23 jmp 11b7fe <lseek+0xae>
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
11b7db: 8b 73 20 mov 0x20(%ebx),%esi
11b7de: 51 push %ecx
11b7df: 52 push %edx
11b7e0: 50 push %eax
11b7e1: 53 push %ebx
11b7e2: ff 56 14 call *0x14(%esi)
if ( status == (off_t) -1 )
11b7e5: 83 c4 10 add $0x10,%esp
11b7e8: 83 fa ff cmp $0xffffffff,%edx
11b7eb: 75 11 jne 11b7fe <lseek+0xae>
11b7ed: 83 f8 ff cmp $0xffffffff,%eax
11b7f0: 75 0c jne 11b7fe <lseek+0xae> <== NEVER TAKEN
iop->offset = old_offset;
11b7f2: 8b 75 e0 mov -0x20(%ebp),%esi
11b7f5: 8b 7d e4 mov -0x1c(%ebp),%edi
11b7f8: 89 73 0c mov %esi,0xc(%ebx)
11b7fb: 89 7b 10 mov %edi,0x10(%ebx)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
11b7fe: 8d 65 f4 lea -0xc(%ebp),%esp
11b801: 5b pop %ebx
11b802: 5e pop %esi
11b803: 5f pop %edi
11b804: c9 leave
11b805: c3 ret
001075d4 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
1075d4: 55 push %ebp
1075d5: 89 e5 mov %esp,%ebp
1075d7: 56 push %esi
1075d8: 53 push %ebx
1075d9: 8b 75 08 mov 0x8(%ebp),%esi
void *return_this;
MSBUMP(malloc_calls, 1);
1075dc: ff 05 34 31 12 00 incl 0x123134
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
1075e2: e8 07 ff ff ff call 1074ee <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
return (void *) 0;
1075e7: 31 db xor %ebx,%ebx
malloc_deferred_frees_process();
/*
* Validate the parameters
*/
if ( !size )
1075e9: 85 f6 test %esi,%esi
1075eb: 74 78 je 107665 <malloc+0x91>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
1075ed: 83 3d e4 33 12 00 03 cmpl $0x3,0x1233e4
1075f4: 75 09 jne 1075ff <malloc+0x2b>
!malloc_is_system_state_OK() )
1075f6: e8 b5 fe ff ff call 1074b0 <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()) &&
1075fb: 84 c0 test %al,%al
1075fd: 74 66 je 107665 <malloc+0x91> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
1075ff: 6a 00 push $0x0
107601: 6a 00 push $0x0
107603: 56 push %esi
107604: ff 35 50 f1 11 00 pushl 0x11f150
10760a: e8 79 42 00 00 call 10b888 <_Protected_heap_Allocate_aligned_with_boundary>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
10760f: 83 c4 10 add $0x10,%esp
107612: 89 c3 mov %eax,%ebx
107614: 85 c0 test %eax,%eax
107616: 75 28 jne 107640 <malloc+0x6c>
if (rtems_malloc_sbrk_helpers)
107618: a1 d4 15 12 00 mov 0x1215d4,%eax
10761d: 85 c0 test %eax,%eax
10761f: 74 10 je 107631 <malloc+0x5d>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
107621: 83 ec 0c sub $0xc,%esp
107624: 56 push %esi
107625: ff 50 04 call *0x4(%eax)
107628: 89 c3 mov %eax,%ebx
if ( !return_this ) {
10762a: 83 c4 10 add $0x10,%esp
10762d: 85 c0 test %eax,%eax
10762f: 75 0f jne 107640 <malloc+0x6c>
errno = ENOMEM;
107631: e8 82 8b 00 00 call 1101b8 <__errno>
107636: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
10763c: 31 db xor %ebx,%ebx
10763e: eb 25 jmp 107665 <malloc+0x91>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
107640: a1 d8 15 12 00 mov 0x1215d8,%eax
107645: 85 c0 test %eax,%eax
107647: 74 09 je 107652 <malloc+0x7e>
(*rtems_malloc_dirty_helper)( return_this, size );
107649: 52 push %edx
10764a: 52 push %edx
10764b: 56 push %esi
10764c: 53 push %ebx
10764d: ff d0 call *%eax
10764f: 83 c4 10 add $0x10,%esp
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
107652: a1 d0 15 12 00 mov 0x1215d0,%eax
107657: 85 c0 test %eax,%eax
107659: 74 0a je 107665 <malloc+0x91>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
10765b: 83 ec 0c sub $0xc,%esp
10765e: 53 push %ebx
10765f: ff 50 04 call *0x4(%eax)
107662: 83 c4 10 add $0x10,%esp
return return_this;
}
107665: 89 d8 mov %ebx,%eax
107667: 8d 65 f8 lea -0x8(%ebp),%esp
10766a: 5b pop %ebx
10766b: 5e pop %esi
10766c: c9 leave
10766d: c3 ret
0010793c <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
10793c: 55 push %ebp
10793d: 89 e5 mov %esp,%ebp
10793f: 57 push %edi
107940: 56 push %esi
107941: 53 push %ebx
107942: 83 ec 0c sub $0xc,%esp
107945: 8b 7d 08 mov 0x8(%ebp),%edi
* 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;
107948: 8b 0d 94 32 12 00 mov 0x123294,%ecx
if ( sbrk_amount == 0 )
return (void *) 0;
10794e: 31 f6 xor %esi,%esi
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
107950: 85 c9 test %ecx,%ecx
107952: 74 67 je 1079bb <malloc_sbrk_extend_and_allocate+0x7f><== NEVER TAKEN
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
107954: 8d 1c 0f lea (%edi,%ecx,1),%ebx
107957: 89 d8 mov %ebx,%eax
107959: 31 d2 xor %edx,%edx
10795b: f7 f1 div %ecx
10795d: 89 c3 mov %eax,%ebx
10795f: 0f af d9 imul %ecx,%ebx
starting_address = (void *) sbrk(the_size);
107962: 83 ec 0c sub $0xc,%esp
107965: 53 push %ebx
107966: e8 e8 8a ff ff call 100453 <sbrk>
if ( starting_address == (void*) -1 )
10796b: 83 c4 10 add $0x10,%esp
10796e: 83 f8 ff cmp $0xffffffff,%eax
107971: 74 48 je 1079bb <malloc_sbrk_extend_and_allocate+0x7f>
return (void *) 0;
if ( !_Protected_heap_Extend(
107973: 52 push %edx
107974: 53 push %ebx
107975: 50 push %eax
107976: ff 35 50 f1 11 00 pushl 0x11f150
10797c: e8 9f 42 00 00 call 10bc20 <_Protected_heap_Extend>
107981: 83 c4 10 add $0x10,%esp
107984: 84 c0 test %al,%al
107986: 75 18 jne 1079a0 <malloc_sbrk_extend_and_allocate+0x64>
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
107988: 83 ec 0c sub $0xc,%esp
10798b: f7 db neg %ebx
10798d: 53 push %ebx
10798e: e8 c0 8a ff ff call 100453 <sbrk>
errno = ENOMEM;
107993: e8 e8 8d 00 00 call 110780 <__errno>
107998: c7 00 0c 00 00 00 movl $0xc,(%eax)
10799e: eb 18 jmp 1079b8 <malloc_sbrk_extend_and_allocate+0x7c>
return (void *) 0;
}
MSBUMP(space_available, the_size);
1079a0: 01 1d 68 32 12 00 add %ebx,0x123268
1079a6: 6a 00 push $0x0
1079a8: 6a 00 push $0x0
1079aa: 57 push %edi
1079ab: ff 35 50 f1 11 00 pushl 0x11f150
1079b1: e8 32 42 00 00 call 10bbe8 <_Protected_heap_Allocate_aligned_with_boundary>
1079b6: 89 c6 mov %eax,%esi
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
1079b8: 83 c4 10 add $0x10,%esp
}
1079bb: 89 f0 mov %esi,%eax
1079bd: 8d 65 f4 lea -0xc(%ebp),%esp
1079c0: 5b pop %ebx
1079c1: 5e pop %esi
1079c2: 5f pop %edi
1079c3: c9 leave
1079c4: c3 ret
0010f813 <memfile_ftruncate>:
*/
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
10f813: 55 push %ebp
10f814: 89 e5 mov %esp,%ebp
10f816: 53 push %ebx
10f817: 83 ec 14 sub $0x14,%esp
10f81a: 8b 4d 08 mov 0x8(%ebp),%ecx
10f81d: 8b 45 0c mov 0xc(%ebp),%eax
10f820: 8b 55 10 mov 0x10(%ebp),%edx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
10f823: 8b 59 18 mov 0x18(%ecx),%ebx
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
10f826: 3b 53 54 cmp 0x54(%ebx),%edx
10f829: 7c 15 jl 10f840 <memfile_ftruncate+0x2d><== NEVER TAKEN
10f82b: 7f 05 jg 10f832 <memfile_ftruncate+0x1f><== NEVER TAKEN
10f82d: 3b 43 50 cmp 0x50(%ebx),%eax
10f830: 76 0e jbe 10f840 <memfile_ftruncate+0x2d>
return IMFS_memfile_extend( the_jnode, length );
10f832: 51 push %ecx
10f833: 52 push %edx
10f834: 50 push %eax
10f835: 53 push %ebx
10f836: e8 cb fc ff ff call 10f506 <IMFS_memfile_extend>
10f83b: 83 c4 10 add $0x10,%esp
10f83e: eb 24 jmp 10f864 <memfile_ftruncate+0x51>
/*
* The in-memory files do not currently reclaim memory until the file is
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
10f840: 89 43 50 mov %eax,0x50(%ebx)
10f843: 89 53 54 mov %edx,0x54(%ebx)
iop->size = the_jnode->info.file.size;
10f846: 89 41 04 mov %eax,0x4(%ecx)
10f849: 89 51 08 mov %edx,0x8(%ecx)
IMFS_update_atime( the_jnode );
10f84c: 50 push %eax
10f84d: 50 push %eax
10f84e: 6a 00 push $0x0
10f850: 8d 45 f0 lea -0x10(%ebp),%eax
10f853: 50 push %eax
10f854: e8 57 7b ff ff call 1073b0 <gettimeofday>
10f859: 8b 45 f0 mov -0x10(%ebp),%eax
10f85c: 89 43 40 mov %eax,0x40(%ebx)
return 0;
10f85f: 83 c4 10 add $0x10,%esp
10f862: 31 c0 xor %eax,%eax
}
10f864: 8b 5d fc mov -0x4(%ebp),%ebx
10f867: c9 leave
10f868: c3 ret
0010f869 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
10f869: 55 push %ebp
10f86a: 89 e5 mov %esp,%ebp
10f86c: 56 push %esi
10f86d: 53 push %ebx
10f86e: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
10f871: 8b 73 18 mov 0x18(%ebx),%esi
if (the_jnode->type == IMFS_LINEAR_FILE) {
10f874: 83 7e 4c 06 cmpl $0x6,0x4c(%esi)
10f878: 75 1a jne 10f894 <memfile_lseek+0x2b>
if (iop->offset > the_jnode->info.linearfile.size)
10f87a: 8b 56 50 mov 0x50(%esi),%edx
10f87d: 8b 46 54 mov 0x54(%esi),%eax
10f880: 39 43 10 cmp %eax,0x10(%ebx)
10f883: 7c 41 jl 10f8c6 <memfile_lseek+0x5d> <== NEVER TAKEN
10f885: 7f 05 jg 10f88c <memfile_lseek+0x23> <== NEVER TAKEN
10f887: 39 53 0c cmp %edx,0xc(%ebx)
10f88a: 76 3a jbe 10f8c6 <memfile_lseek+0x5d> <== ALWAYS TAKEN
iop->offset = the_jnode->info.linearfile.size;
10f88c: 89 53 0c mov %edx,0xc(%ebx) <== NOT EXECUTED
10f88f: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED
10f892: eb 32 jmp 10f8c6 <memfile_lseek+0x5d> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
10f894: 50 push %eax
10f895: ff 73 10 pushl 0x10(%ebx)
10f898: ff 73 0c pushl 0xc(%ebx)
10f89b: 56 push %esi
10f89c: e8 65 fc ff ff call 10f506 <IMFS_memfile_extend>
10f8a1: 83 c4 10 add $0x10,%esp
10f8a4: 85 c0 test %eax,%eax
10f8a6: 74 12 je 10f8ba <memfile_lseek+0x51>
rtems_set_errno_and_return_minus_one( ENOSPC );
10f8a8: e8 0b 09 00 00 call 1101b8 <__errno>
10f8ad: c7 00 1c 00 00 00 movl $0x1c,(%eax)
10f8b3: 83 c8 ff or $0xffffffff,%eax
10f8b6: 89 c2 mov %eax,%edx
10f8b8: eb 12 jmp 10f8cc <memfile_lseek+0x63>
iop->size = the_jnode->info.file.size;
10f8ba: 8b 46 50 mov 0x50(%esi),%eax
10f8bd: 8b 56 54 mov 0x54(%esi),%edx
10f8c0: 89 43 04 mov %eax,0x4(%ebx)
10f8c3: 89 53 08 mov %edx,0x8(%ebx)
}
return iop->offset;
10f8c6: 8b 43 0c mov 0xc(%ebx),%eax
10f8c9: 8b 53 10 mov 0x10(%ebx),%edx
}
10f8cc: 8d 65 f8 lea -0x8(%ebp),%esp
10f8cf: 5b pop %ebx
10f8d0: 5e pop %esi
10f8d1: c9 leave
10f8d2: c3 ret
0010f784 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
10f784: 55 push %ebp
10f785: 89 e5 mov %esp,%ebp
10f787: 56 push %esi
10f788: 53 push %ebx
10f789: 8b 75 08 mov 0x8(%ebp),%esi
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
10f78c: 8b 5e 18 mov 0x18(%esi),%ebx
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
10f78f: f7 46 14 04 02 00 00 testl $0x204,0x14(%esi)
10f796: 74 54 je 10f7ec <memfile_open+0x68>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
10f798: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx)
10f79c: 75 4e jne 10f7ec <memfile_open+0x68> <== ALWAYS TAKEN
uint32_t count = the_jnode->info.linearfile.size;
10f79e: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
10f7a1: 8b 53 58 mov 0x58(%ebx),%edx <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
10f7a4: c7 43 4c 05 00 00 00 movl $0x5,0x4c(%ebx) <== NOT EXECUTED
the_jnode->info.file.size = 0;
10f7ab: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED
10f7b2: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
10f7b9: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
10f7c0: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
10f7c7: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) <== NOT EXECUTED
if ((count != 0)
10f7ce: 85 c0 test %eax,%eax <== NOT EXECUTED
10f7d0: 74 1a je 10f7ec <memfile_open+0x68> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
10f7d2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f7d5: 50 push %eax <== NOT EXECUTED
10f7d6: 52 push %edx <== NOT EXECUTED
10f7d7: 6a 00 push $0x0 <== NOT EXECUTED
10f7d9: 6a 00 push $0x0 <== NOT EXECUTED
10f7db: 53 push %ebx <== NOT EXECUTED
10f7dc: e8 17 fe ff ff call 10f5f8 <IMFS_memfile_write> <== NOT EXECUTED
10f7e1: 89 c2 mov %eax,%edx <== NOT EXECUTED
10f7e3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
return -1;
10f7e6: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
10f7e9: 42 inc %edx <== NOT EXECUTED
10f7ea: 74 20 je 10f80c <memfile_open+0x88> <== NOT EXECUTED
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
10f7ec: f6 46 15 02 testb $0x2,0x15(%esi)
10f7f0: 74 0c je 10f7fe <memfile_open+0x7a>
iop->offset = the_jnode->info.file.size;
10f7f2: 8b 43 50 mov 0x50(%ebx),%eax
10f7f5: 8b 53 54 mov 0x54(%ebx),%edx
10f7f8: 89 46 0c mov %eax,0xc(%esi)
10f7fb: 89 56 10 mov %edx,0x10(%esi)
iop->size = the_jnode->info.file.size;
10f7fe: 8b 43 50 mov 0x50(%ebx),%eax
10f801: 8b 53 54 mov 0x54(%ebx),%edx
10f804: 89 46 04 mov %eax,0x4(%esi)
10f807: 89 56 08 mov %edx,0x8(%esi)
return 0;
10f80a: 31 c0 xor %eax,%eax
}
10f80c: 8d 65 f8 lea -0x8(%ebp),%esp
10f80f: 5b pop %ebx
10f810: 5e pop %esi
10f811: c9 leave
10f812: c3 ret
001077a5 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
1077a5: 55 push %ebp
1077a6: 89 e5 mov %esp,%ebp
1077a8: 57 push %edi
1077a9: 56 push %esi
1077aa: 53 push %ebx
1077ab: 83 ec 4c sub $0x4c,%esp
1077ae: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
1077b1: 83 7d 14 01 cmpl $0x1,0x14(%ebp)
1077b5: 77 13 ja 1077ca <mount+0x25>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
1077b7: 83 ec 0c sub $0xc,%esp
1077ba: 56 push %esi
1077bb: e8 af 69 00 00 call 10e16f <rtems_filesystem_get_mount_handler>
1077c0: 89 45 b0 mov %eax,-0x50(%ebp)
if ( !mount_h )
1077c3: 83 c4 10 add $0x10,%esp
1077c6: 85 c0 test %eax,%eax
1077c8: 75 10 jne 1077da <mount+0x35>
rtems_set_errno_and_return_minus_one( EINVAL );
1077ca: e8 e9 89 00 00 call 1101b8 <__errno>
1077cf: c7 00 16 00 00 00 movl $0x16,(%eax)
1077d5: e9 ca 00 00 00 jmp 1078a4 <mount+0xff>
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
bool has_target = target != NULL;
1077da: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
1077de: 0f 95 45 b7 setne -0x49(%ebp)
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
1077e2: 8b 45 0c mov 0xc(%ebp),%eax
1077e5: 89 45 b8 mov %eax,-0x48(%ebp)
1077e8: 80 7d b7 00 cmpb $0x0,-0x49(%ebp)
1077ec: 75 07 jne 1077f5 <mount+0x50>
1077ee: c7 45 b8 c8 d6 11 00 movl $0x11d6c8,-0x48(%ebp)
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
1077f5: 83 ca ff or $0xffffffff,%edx
1077f8: 31 c0 xor %eax,%eax
1077fa: 89 d1 mov %edx,%ecx
1077fc: 89 f7 mov %esi,%edi
1077fe: f2 ae repnz scas %es:(%edi),%al
107800: f7 d1 not %ecx
107802: 89 4d bc mov %ecx,-0x44(%ebp)
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
107805: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
10780c: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
107810: 74 0c je 10781e <mount+0x79>
107812: 89 d1 mov %edx,%ecx
107814: 8b 7d 08 mov 0x8(%ebp),%edi
107817: f2 ae repnz scas %es:(%edi),%al
107819: f7 d1 not %ecx
10781b: 89 4d c4 mov %ecx,-0x3c(%ebp)
size_t target_size = strlen( target ) + 1;
10781e: 31 c0 xor %eax,%eax
107820: 83 c9 ff or $0xffffffff,%ecx
107823: 8b 7d b8 mov -0x48(%ebp),%edi
107826: f2 ae repnz scas %es:(%edi),%al
107828: f7 d1 not %ecx
10782a: 89 4d c0 mov %ecx,-0x40(%ebp)
10782d: 49 dec %ecx
10782e: 89 4d ac mov %ecx,-0x54(%ebp)
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
107831: 50 push %eax
107832: 50 push %eax
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
107833: 8b 55 c4 mov -0x3c(%ebp),%edx
107836: 8b 7d bc mov -0x44(%ebp),%edi
107839: 8d 44 3a 74 lea 0x74(%edx,%edi,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 )
10783d: 03 45 c0 add -0x40(%ebp),%eax
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
107840: 50 push %eax
107841: 6a 01 push $0x1
107843: e8 84 f9 ff ff call 1071cc <calloc>
107848: 89 c3 mov %eax,%ebx
if ( mt_entry != NULL ) {
10784a: 83 c4 10 add $0x10,%esp
10784d: 85 c0 test %eax,%eax
10784f: 74 48 je 107899 <mount+0xf4> <== NEVER TAKEN
char *str = (char *) mt_entry + sizeof( *mt_entry );
107851: 8d 40 74 lea 0x74(%eax),%eax
memcpy( str, filesystemtype, filesystemtype_size );
107854: 89 c7 mov %eax,%edi
107856: 8b 4d bc mov -0x44(%ebp),%ecx
107859: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10785b: 89 fa mov %edi,%edx
mt_entry->type = str;
10785d: 89 43 6c mov %eax,0x6c(%ebx)
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
107860: 8b 75 08 mov 0x8(%ebp),%esi
107863: 8b 4d c4 mov -0x3c(%ebp),%ecx
107866: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
107868: 89 f8 mov %edi,%eax
mt_entry->dev = str;
10786a: 89 53 70 mov %edx,0x70(%ebx)
str += source_size;
memcpy( str, target, target_size );
10786d: 8b 75 b8 mov -0x48(%ebp),%esi
107870: 8b 4d c0 mov -0x40(%ebp),%ecx
107873: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
mt_entry->target = str;
107875: 89 43 68 mov %eax,0x68(%ebx)
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
107878: 89 5b 2c mov %ebx,0x2c(%ebx)
mt_entry->options = options;
10787b: 8b 45 14 mov 0x14(%ebp),%eax
10787e: 89 43 30 mov %eax,0x30(%ebx)
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
107881: 8d 7b 38 lea 0x38(%ebx),%edi
107884: be 08 d7 11 00 mov $0x11d708,%esi
107889: b1 0c mov $0xc,%cl
10788b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
10788d: 80 7d b7 00 cmpb $0x0,-0x49(%ebp)
107891: 0f 84 a3 00 00 00 je 10793a <mount+0x195>
107897: eb 13 jmp 1078ac <mount+0x107>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
107899: e8 1a 89 00 00 call 1101b8 <__errno> <== NOT EXECUTED
10789e: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
1078a4: 83 c8 ff or $0xffffffff,%eax
1078a7: e9 26 01 00 00 jmp 1079d2 <mount+0x22d>
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
1078ac: 83 ec 0c sub $0xc,%esp
1078af: 6a 01 push $0x1
1078b1: 8d 75 d4 lea -0x2c(%ebp),%esi
1078b4: 56 push %esi
1078b5: 6a 07 push $0x7
1078b7: ff 75 ac pushl -0x54(%ebp)
1078ba: ff 75 0c pushl 0xc(%ebp)
1078bd: e8 a4 f9 ff ff call 107266 <rtems_filesystem_evaluate_path>
1078c2: 83 c4 20 add $0x20,%esp
1078c5: 40 inc %eax
1078c6: 0f 84 df 00 00 00 je 1079ab <mount+0x206> <== NEVER TAKEN
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
1078cc: 83 ec 0c sub $0xc,%esp
1078cf: 56 push %esi
1078d0: 8b 45 e0 mov -0x20(%ebp),%eax
1078d3: ff 50 10 call *0x10(%eax)
1078d6: 83 c4 10 add $0x10,%esp
1078d9: 48 dec %eax
1078da: 74 10 je 1078ec <mount+0x147>
errno = ENOTDIR;
1078dc: e8 d7 88 00 00 call 1101b8 <__errno>
1078e1: c7 00 14 00 00 00 movl $0x14,(%eax)
goto cleanup_and_bail;
1078e7: e9 c1 00 00 00 jmp 1079ad <mount+0x208>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
1078ec: 57 push %edi
1078ed: 57 push %edi
1078ee: ff 75 d4 pushl -0x2c(%ebp)
1078f1: 68 1c 77 10 00 push $0x10771c
1078f6: e8 62 fe ff ff call 10775d <rtems_filesystem_mount_iterate>
1078fb: 83 c4 10 add $0x10,%esp
1078fe: 84 c0 test %al,%al
107900: 74 10 je 107912 <mount+0x16d>
errno = EBUSY;
107902: e8 b1 88 00 00 call 1101b8 <__errno>
107907: c7 00 10 00 00 00 movl $0x10,(%eax)
goto cleanup_and_bail;
10790d: e9 9b 00 00 00 jmp 1079ad <mount+0x208>
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
107912: 8b 45 d4 mov -0x2c(%ebp),%eax
107915: 89 43 08 mov %eax,0x8(%ebx)
mt_entry->mt_point_node.handlers = loc.handlers;
107918: 8b 45 dc mov -0x24(%ebp),%eax
10791b: 89 43 10 mov %eax,0x10(%ebx)
mt_entry->mt_point_node.ops = loc.ops;
10791e: 8b 45 e0 mov -0x20(%ebp),%eax
107921: 89 43 14 mov %eax,0x14(%ebx)
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
107924: 8b 55 e4 mov -0x1c(%ebp),%edx
107927: 89 53 18 mov %edx,0x18(%ebx)
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
10792a: 83 ec 0c sub $0xc,%esp
10792d: 53 push %ebx
10792e: ff 50 20 call *0x20(%eax)
107931: 83 c4 10 add $0x10,%esp
107934: 85 c0 test %eax,%eax
107936: 74 1d je 107955 <mount+0x1b0> <== ALWAYS TAKEN
107938: eb 73 jmp 1079ad <mount+0x208> <== NOT EXECUTED
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
10793a: 31 f6 xor %esi,%esi
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
10793c: 81 3d 34 0f 12 00 38 cmpl $0x120f38,0x120f34
107943: 0f 12 00
107946: 74 0d je 107955 <mount+0x1b0> <== ALWAYS TAKEN
errno = EINVAL;
107948: e8 6b 88 00 00 call 1101b8 <__errno> <== NOT EXECUTED
10794d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
goto cleanup_and_bail;
107953: eb 58 jmp 1079ad <mount+0x208> <== NOT EXECUTED
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
107955: 51 push %ecx
107956: 51 push %ecx
107957: ff 75 18 pushl 0x18(%ebp)
10795a: 53 push %ebx
10795b: ff 55 b0 call *-0x50(%ebp)
10795e: 83 c4 10 add $0x10,%esp
107961: 85 c0 test %eax,%eax
107963: 74 0f je 107974 <mount+0x1cf>
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
107965: 83 ec 0c sub $0xc,%esp
107968: 53 push %ebx
107969: 8b 45 e0 mov -0x20(%ebp),%eax
10796c: ff 50 28 call *0x28(%eax)
goto cleanup_and_bail;
10796f: 83 c4 10 add $0x10,%esp
107972: eb 39 jmp 1079ad <mount+0x208>
}
/*
* Add the mount table entry to the mount table chain
*/
rtems_libio_lock();
107974: e8 b4 fd ff ff call 10772d <rtems_libio_lock>
107979: 52 push %edx
10797a: 52 push %edx
10797b: 53 push %ebx
10797c: 68 34 0f 12 00 push $0x120f34
107981: e8 ea 2f 00 00 call 10a970 <_Chain_Append>
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
107986: e8 bc fd ff ff call 107747 <rtems_libio_unlock>
if ( !has_target )
10798b: 83 c4 10 add $0x10,%esp
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
10798e: 31 c0 xor %eax,%eax
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
107990: 80 7d b7 00 cmpb $0x0,-0x49(%ebp)
107994: 75 3c jne 1079d2 <mount+0x22d>
rtems_filesystem_root = mt_entry->mt_fs_root;
107996: 8b 3d 50 10 12 00 mov 0x121050,%edi
10799c: 83 c7 18 add $0x18,%edi
10799f: 8d 73 1c lea 0x1c(%ebx),%esi
1079a2: b9 05 00 00 00 mov $0x5,%ecx
1079a7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
1079a9: eb 27 jmp 1079d2 <mount+0x22d>
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
1079ab: 31 f6 xor %esi,%esi <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
1079ad: 83 ec 0c sub $0xc,%esp
1079b0: 53 push %ebx
1079b1: e8 82 f9 ff ff call 107338 <free>
if ( loc_to_free )
1079b6: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( loc_to_free );
return -1;
1079b9: 83 c8 ff or $0xffffffff,%eax
cleanup_and_bail:
free( mt_entry );
if ( loc_to_free )
1079bc: 85 f6 test %esi,%esi
1079be: 74 12 je 1079d2 <mount+0x22d> <== NEVER TAKEN
rtems_filesystem_freenode( loc_to_free );
1079c0: 83 ec 0c sub $0xc,%esp
1079c3: 56 push %esi
1079c4: 89 45 a8 mov %eax,-0x58(%ebp)
1079c7: e8 58 f9 ff ff call 107324 <rtems_filesystem_freenode>
1079cc: 83 c4 10 add $0x10,%esp
1079cf: 8b 45 a8 mov -0x58(%ebp),%eax
return -1;
}
1079d2: 8d 65 f4 lea -0xc(%ebp),%esp
1079d5: 5b pop %ebx
1079d6: 5e pop %esi
1079d7: 5f pop %edi
1079d8: c9 leave
1079d9: c3 ret
00107d2c <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
107d2c: 55 push %ebp
107d2d: 89 e5 mov %esp,%ebp
107d2f: 57 push %edi
107d30: 56 push %esi
107d31: 53 push %ebx
107d32: 83 ec 1c sub $0x1c,%esp
107d35: 8b 4d 08 mov 0x8(%ebp),%ecx
107d38: 8b 5d 0c mov 0xc(%ebp),%ebx
107d3b: 8b 75 10 mov 0x10(%ebp),%esi
107d3e: 8b 7d 14 mov 0x14(%ebp),%edi
107d41: 8b 55 18 mov 0x18(%ebp),%edx
int rv = -1;
if (target != NULL) {
107d44: 85 db test %ebx,%ebx
107d46: 74 3b je 107d83 <mount_and_make_target_path+0x57>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
107d48: 50 push %eax
107d49: 50 push %eax
107d4a: 68 ff 01 00 00 push $0x1ff
107d4f: 53 push %ebx
107d50: 89 55 e0 mov %edx,-0x20(%ebp)
107d53: 89 4d e4 mov %ecx,-0x1c(%ebp)
107d56: e8 bd 08 00 00 call 108618 <rtems_mkdir>
if (rv == 0) {
107d5b: 83 c4 10 add $0x10,%esp
107d5e: 85 c0 test %eax,%eax
107d60: 8b 55 e0 mov -0x20(%ebp),%edx
107d63: 8b 4d e4 mov -0x1c(%ebp),%ecx
107d66: 75 29 jne 107d91 <mount_and_make_target_path+0x65><== NEVER TAKEN
rv = mount(
107d68: 89 55 18 mov %edx,0x18(%ebp)
107d6b: 89 7d 14 mov %edi,0x14(%ebp)
107d6e: 89 75 10 mov %esi,0x10(%ebp)
107d71: 89 5d 0c mov %ebx,0xc(%ebp)
107d74: 89 4d 08 mov %ecx,0x8(%ebp)
} else {
errno = EINVAL;
}
return rv;
}
107d77: 8d 65 f4 lea -0xc(%ebp),%esp
107d7a: 5b pop %ebx
107d7b: 5e pop %esi
107d7c: 5f pop %edi
107d7d: c9 leave
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
107d7e: e9 a2 00 00 00 jmp 107e25 <mount>
options,
data
);
}
} else {
errno = EINVAL;
107d83: e8 ac 8a 00 00 call 110834 <__errno>
107d88: c7 00 16 00 00 00 movl $0x16,(%eax)
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
107d8e: 83 c8 ff or $0xffffffff,%eax
} else {
errno = EINVAL;
}
return rv;
}
107d91: 8d 65 f4 lea -0xc(%ebp),%esp
107d94: 5b pop %ebx
107d95: 5e pop %esi
107d96: 5f pop %edi
107d97: c9 leave
107d98: c3 ret
00107a35 <newlib_create_hook>:
*/
bool newlib_create_hook(
rtems_tcb *current_task __attribute__((unused)),
rtems_tcb *creating_task
)
{
107a35: 55 push %ebp
107a36: 89 e5 mov %esp,%ebp
107a38: 57 push %edi
107a39: 56 push %esi
107a3a: 53 push %ebx
107a3b: 83 ec 1c sub $0x1c,%esp
struct _reent *ptr;
if (_Thread_libc_reent == 0)
107a3e: 83 3d ec 32 12 00 00 cmpl $0x0,0x1232ec
107a45: 75 14 jne 107a5b <newlib_create_hook+0x26>
{
_REENT = _global_impure_ptr;
107a47: a1 00 e0 11 00 mov 0x11e000,%eax
107a4c: a3 e0 10 12 00 mov %eax,0x1210e0
RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent (
struct _reent **libc_reent
)
{
_Thread_libc_reent = libc_reent;
107a51: c7 05 ec 32 12 00 e0 movl $0x1210e0,0x1232ec
107a58: 10 12 00
ptr = (struct _reent *) calloc(1, sizeof(struct _reent));
#else
/* It is OK to allocate from the workspace because these
* hooks run with thread dispatching disabled.
*/
ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent));
107a5b: 83 ec 0c sub $0xc,%esp
107a5e: 68 24 04 00 00 push $0x424
107a63: e8 22 53 00 00 call 10cd8a <_Workspace_Allocate>
107a68: 89 c2 mov %eax,%edx
#endif
if (ptr) {
107a6a: 83 c4 10 add $0x10,%esp
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
creating_task->libc_reent = ptr;
return TRUE;
}
return FALSE;
107a6d: 31 c0 xor %eax,%eax
* hooks run with thread dispatching disabled.
*/
ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent));
#endif
if (ptr) {
107a6f: 85 d2 test %edx,%edx
107a71: 0f 84 28 02 00 00 je 107c9f <newlib_create_hook+0x26a><== NEVER TAKEN
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
107a77: c7 02 00 00 00 00 movl $0x0,(%edx)
107a7d: 8d b2 ec 02 00 00 lea 0x2ec(%edx),%esi
107a83: 89 72 04 mov %esi,0x4(%edx)
107a86: 8d 8a 54 03 00 00 lea 0x354(%edx),%ecx
107a8c: 89 4a 08 mov %ecx,0x8(%edx)
107a8f: 8d 8a bc 03 00 00 lea 0x3bc(%edx),%ecx
107a95: 89 4a 0c mov %ecx,0xc(%edx)
107a98: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
107a9f: 8d 4a 14 lea 0x14(%edx),%ecx
107aa2: bb 19 00 00 00 mov $0x19,%ebx
107aa7: 89 cf mov %ecx,%edi
107aa9: 89 d9 mov %ebx,%ecx
107aab: f3 aa rep stos %al,%es:(%edi)
107aad: 89 cb mov %ecx,%ebx
107aaf: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
107ab6: c7 42 34 5a d4 11 00 movl $0x11d45a,0x34(%edx)
107abd: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx)
107ac4: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx)
107acb: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx)
107ad2: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx)
107ad9: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx)
107ae0: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx)
107ae7: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
107aee: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx)
107af5: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx)
107afc: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx)
107b03: c6 42 60 00 movb $0x0,0x60(%edx)
107b07: 8d 42 7c lea 0x7c(%edx),%eax
107b0a: 89 45 e4 mov %eax,-0x1c(%ebp)
107b0d: b1 09 mov $0x9,%cl
107b0f: 89 c7 mov %eax,%edi
107b11: 89 d8 mov %ebx,%eax
107b13: f3 ab rep stos %eax,%es:(%edi)
107b15: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx)
107b1c: 00 00 00
107b1f: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx)
107b26: 00 00 00
107b29: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx)
107b30: 00 00 00
107b33: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx)
107b3a: 0e 33
107b3c: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx)
107b43: cd ab
107b45: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx)
107b4c: 34 12
107b4e: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx)
107b55: 6d e6
107b57: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx)
107b5e: ec de
107b60: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx)
107b67: 05 00
107b69: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx)
107b70: 0b 00
107b72: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx)
107b79: 00 00 00
107b7c: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx)
107b83: 00 00 00
107b86: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx)
107b8d: 00 00 00
107b90: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx)
107b97: 00 00 00
107b9a: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx)
107ba1: 00 00 00
107ba4: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx)
107bab: 00 00 00
107bae: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx)
107bb5: 00 00 00
107bb8: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx)
107bbf: 00 00 00
107bc2: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx)
107bc9: 00 00 00
107bcc: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx)
107bd3: 00 00 00
107bd6: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx)
107bdd: 00 00 00
107be0: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx)
107be7: 00 00 00
107bea: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx)
107bf1: 00 00 00
107bf4: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx)
107bfb: 00 00 00
107bfe: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx)
107c05: 00 00 00
107c08: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx)
107c0f: 00 00 00
107c12: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx)
107c19: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx)
107c20: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx)
107c27: 00 00 00
107c2a: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx)
107c31: 00 00 00
107c34: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx)
107c3b: 00 00 00
107c3e: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx)
107c45: 00 00 00
107c48: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx)
107c4f: 00 00 00
107c52: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx)
107c59: 00 00 00
107c5c: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx)
107c63: 00 00 00
107c66: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx)
107c6d: 00 00 00
107c70: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx)
107c77: 00 00 00
107c7a: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx)
107c81: 00 00 00
107c84: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx)
107c8b: 00 00 00
107c8e: b1 4e mov $0x4e,%cl
107c90: 89 f7 mov %esi,%edi
107c92: f3 ab rep stos %eax,%es:(%edi)
creating_task->libc_reent = ptr;
107c94: 8b 45 0c mov 0xc(%ebp),%eax
107c97: 89 90 ec 00 00 00 mov %edx,0xec(%eax)
return TRUE;
107c9d: b0 01 mov $0x1,%al
}
return FALSE;
}
107c9f: 8d 65 f4 lea -0xc(%ebp),%esp
107ca2: 5b pop %ebx
107ca3: 5e pop %esi
107ca4: 5f pop %edi
107ca5: c9 leave
107ca6: c3 ret
00107ca7 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
107ca7: 55 push %ebp
107ca8: 89 e5 mov %esp,%ebp
107caa: 57 push %edi
107cab: 56 push %esi
107cac: 53 push %ebx
107cad: 83 ec 0c sub $0xc,%esp
107cb0: 8b 7d 08 mov 0x8(%ebp),%edi
107cb3: 8b 75 0c mov 0xc(%ebp),%esi
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
107cb6: 39 f7 cmp %esi,%edi
107cb8: 75 08 jne 107cc2 <newlib_delete_hook+0x1b>
ptr = _REENT;
107cba: 8b 1d e0 10 12 00 mov 0x1210e0,%ebx
107cc0: eb 06 jmp 107cc8 <newlib_delete_hook+0x21>
} else {
ptr = deleted_task->libc_reent;
107cc2: 8b 9e ec 00 00 00 mov 0xec(%esi),%ebx
}
if (ptr && ptr != _global_impure_ptr) {
107cc8: 85 db test %ebx,%ebx
107cca: 74 20 je 107cec <newlib_delete_hook+0x45><== NEVER TAKEN
107ccc: 3b 1d 00 e0 11 00 cmp 0x11e000,%ebx
107cd2: 74 18 je 107cec <newlib_delete_hook+0x45>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
107cd4: 50 push %eax
107cd5: 50 push %eax
107cd6: 68 e4 79 10 00 push $0x1079e4
107cdb: 53 push %ebx
107cdc: e8 bf 8c 00 00 call 1109a0 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
107ce1: 89 1c 24 mov %ebx,(%esp)
107ce4: e8 ba 50 00 00 call 10cda3 <_Workspace_Free>
107ce9: 83 c4 10 add $0x10,%esp
#endif
}
deleted_task->libc_reent = NULL;
107cec: c7 86 ec 00 00 00 00 movl $0x0,0xec(%esi)
107cf3: 00 00 00
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
107cf6: 39 f7 cmp %esi,%edi
107cf8: 75 0a jne 107d04 <newlib_delete_hook+0x5d>
_REENT = 0;
107cfa: c7 05 e0 10 12 00 00 movl $0x0,0x1210e0
107d01: 00 00 00
}
}
107d04: 8d 65 f4 lea -0xc(%ebp),%esp
107d07: 5b pop %ebx
107d08: 5e pop %esi
107d09: 5f pop %edi
107d0a: c9 leave
107d0b: c3 ret
001079e4 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
1079e4: 55 push %ebp
1079e5: 89 e5 mov %esp,%ebp
1079e7: 53 push %ebx
1079e8: 83 ec 10 sub $0x10,%esp
1079eb: 8b 5d 08 mov 0x8(%ebp),%ebx
switch ( fileno(fp) ) {
1079ee: 53 push %ebx
1079ef: e8 98 8b 00 00 call 11058c <fileno>
1079f4: 83 c4 10 add $0x10,%esp
1079f7: 83 f8 02 cmp $0x2,%eax
1079fa: 77 26 ja 107a22 <newlib_free_buffers+0x3e><== NEVER TAKEN
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
1079fc: f6 43 0c 80 testb $0x80,0xc(%ebx)
107a00: 74 2c je 107a2e <newlib_free_buffers+0x4a><== ALWAYS TAKEN
free( fp->_bf._base );
107a02: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107a05: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
107a08: e8 2b f9 ff ff call 107338 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
107a0d: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
107a13: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
107a19: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
107a20: eb 09 jmp 107a2b <newlib_free_buffers+0x47><== NOT EXECUTED
}
break;
default:
fclose(fp);
107a22: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107a25: 53 push %ebx <== NOT EXECUTED
107a26: e8 e5 88 00 00 call 110310 <fclose> <== NOT EXECUTED
107a2b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
107a2e: 31 c0 xor %eax,%eax
107a30: 8b 5d fc mov -0x4(%ebp),%ebx
107a33: c9 leave
107a34: c3 ret
00107d6c <open>:
int open(
const char *pathname,
int flags,
...
)
{
107d6c: 55 push %ebp
107d6d: 89 e5 mov %esp,%ebp
107d6f: 57 push %edi
107d70: 56 push %esi
107d71: 53 push %ebx
107d72: 83 ec 3c sub $0x3c,%esp
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
107d75: 8b 45 0c mov 0xc(%ebp),%eax
107d78: 40 inc %eax
if ( ( status & _FREAD ) == _FREAD )
107d79: 89 c6 mov %eax,%esi
107d7b: 83 e6 01 and $0x1,%esi
eval_flags |= RTEMS_LIBIO_PERMS_READ;
107d7e: f7 de neg %esi
107d80: 83 e6 04 and $0x4,%esi
if ( ( status & _FWRITE ) == _FWRITE )
107d83: a8 02 test $0x2,%al
107d85: 74 03 je 107d8a <open+0x1e>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
107d87: 83 ce 02 or $0x2,%esi
va_start(ap, flags);
mode = va_arg( ap, int );
107d8a: 8b 45 10 mov 0x10(%ebp),%eax
107d8d: 89 45 c4 mov %eax,-0x3c(%ebp)
* code does not require changes here since network file
* descriptors are obtained using socket(), not open().
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
107d90: e8 be 61 00 00 call 10df53 <rtems_libio_allocate>
107d95: 89 c3 mov %eax,%ebx
if ( iop == 0 ) {
107d97: 85 c0 test %eax,%eax
107d99: 0f 84 56 01 00 00 je 107ef5 <open+0x189>
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
107d9f: 83 c9 ff or $0xffffffff,%ecx
107da2: 8b 7d 08 mov 0x8(%ebp),%edi
107da5: 31 c0 xor %eax,%eax
107da7: f2 ae repnz scas %es:(%edi),%al
107da9: f7 d1 not %ecx
107dab: 49 dec %ecx
107dac: 83 ec 0c sub $0xc,%esp
107daf: 6a 01 push $0x1
107db1: 8d 45 d4 lea -0x2c(%ebp),%eax
107db4: 50 push %eax
107db5: 56 push %esi
107db6: 51 push %ecx
107db7: ff 75 08 pushl 0x8(%ebp)
107dba: e8 a7 f4 ff ff call 107266 <rtems_filesystem_evaluate_path>
107dbf: 89 c6 mov %eax,%esi
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
107dc1: 83 c4 20 add $0x20,%esp
107dc4: 83 f8 ff cmp $0xffffffff,%eax
107dc7: 75 6c jne 107e35 <open+0xc9>
if ( errno != ENOENT ) {
107dc9: e8 ea 83 00 00 call 1101b8 <__errno>
107dce: 83 38 02 cmpl $0x2,(%eax)
107dd1: 75 27 jne 107dfa <open+0x8e>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
107dd3: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
107dda: 0f 84 1c 01 00 00 je 107efc <open+0x190>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
107de0: 6a 00 push $0x0
107de2: 6a 00 push $0x0
107de4: 8b 45 c4 mov -0x3c(%ebp),%eax
107de7: 80 cc 80 or $0x80,%ah
107dea: 50 push %eax
107deb: ff 75 08 pushl 0x8(%ebp)
107dee: e8 99 f8 ff ff call 10768c <mknod>
if ( rc ) {
107df3: 83 c4 10 add $0x10,%esp
107df6: 85 c0 test %eax,%eax
107df8: 74 0e je 107e08 <open+0x9c> <== ALWAYS TAKEN
rc = errno;
107dfa: e8 b9 83 00 00 call 1101b8 <__errno>
107dff: 8b 30 mov (%eax),%esi
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
107e01: 31 ff xor %edi,%edi
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
goto done;
107e03: e9 10 01 00 00 jmp 107f18 <open+0x1ac>
/*
* After we do the mknod(), we have to evaluate the path to get the
* "loc" structure needed to actually have the file itself open.
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
107e08: 89 f1 mov %esi,%ecx
107e0a: 8b 7d 08 mov 0x8(%ebp),%edi
107e0d: 31 c0 xor %eax,%eax
107e0f: f2 ae repnz scas %es:(%edi),%al
107e11: f7 d1 not %ecx
107e13: 49 dec %ecx
107e14: 83 ec 0c sub $0xc,%esp
107e17: 6a 01 push $0x1
107e19: 8d 45 d4 lea -0x2c(%ebp),%eax
107e1c: 50 push %eax
107e1d: 6a 00 push $0x0
107e1f: 51 push %ecx
107e20: ff 75 08 pushl 0x8(%ebp)
107e23: e8 3e f4 ff ff call 107266 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
107e28: 83 c4 20 add $0x20,%esp
107e2b: 85 c0 test %eax,%eax
107e2d: 0f 85 d2 00 00 00 jne 107f05 <open+0x199> <== NEVER TAKEN
107e33: eb 13 jmp 107e48 <open+0xdc>
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
107e35: 8b 45 0c mov 0xc(%ebp),%eax
107e38: 25 00 0a 00 00 and $0xa00,%eax
107e3d: 3d 00 0a 00 00 cmp $0xa00,%eax
107e42: 0f 84 c6 00 00 00 je 107f0e <open+0x1a2> <== NEVER TAKEN
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
107e48: 8b 73 14 mov 0x14(%ebx),%esi
107e4b: 83 ec 0c sub $0xc,%esp
107e4e: ff 75 0c pushl 0xc(%ebp)
107e51: e8 8a 60 00 00 call 10dee0 <rtems_libio_fcntl_flags>
107e56: 09 f0 or %esi,%eax
107e58: 89 43 14 mov %eax,0x14(%ebx)
iop->pathinfo = loc;
107e5b: 8d 7b 18 lea 0x18(%ebx),%edi
107e5e: 8d 75 d4 lea -0x2c(%ebp),%esi
107e61: b9 05 00 00 00 mov $0x5,%ecx
107e66: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
107e68: 8b 43 20 mov 0x20(%ebx),%eax
107e6b: ff 75 c4 pushl -0x3c(%ebp)
107e6e: ff 75 0c pushl 0xc(%ebp)
107e71: ff 75 08 pushl 0x8(%ebp)
107e74: 53 push %ebx
107e75: ff 10 call *(%eax)
if ( rc ) {
107e77: 83 c4 20 add $0x20,%esp
107e7a: 85 c0 test %eax,%eax
107e7c: 74 0f je 107e8d <open+0x121>
rc = errno;
107e7e: e8 35 83 00 00 call 1101b8 <__errno>
107e83: 8b 30 mov (%eax),%esi
rc = EEXIST;
loc_to_free = &loc;
goto done;
}
loc_to_free = &loc;
107e85: 8d 7d d4 lea -0x2c(%ebp),%edi
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
goto done;
107e88: e9 8b 00 00 00 jmp 107f18 <open+0x1ac>
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
107e8d: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
107e94: 0f 84 ae 00 00 00 je 107f48 <open+0x1dc>
rc = ftruncate( iop - rtems_libio_iops, 0 );
107e9a: 50 push %eax
107e9b: 6a 00 push $0x0
107e9d: 6a 00 push $0x0
107e9f: 89 d8 mov %ebx,%eax
107ea1: 2b 05 18 31 12 00 sub 0x123118,%eax
107ea7: c1 f8 03 sar $0x3,%eax
107eaa: 69 c0 b7 6d db b6 imul $0xb6db6db7,%eax,%eax
107eb0: 50 push %eax
107eb1: e8 62 5f 00 00 call 10de18 <ftruncate>
107eb6: 89 c6 mov %eax,%esi
if ( rc ) {
107eb8: 83 c4 10 add $0x10,%esp
107ebb: 85 c0 test %eax,%eax
107ebd: 0f 84 85 00 00 00 je 107f48 <open+0x1dc>
if(errno) rc = errno;
107ec3: e8 f0 82 00 00 call 1101b8 <__errno>
107ec8: 83 38 00 cmpl $0x0,(%eax)
107ecb: 74 07 je 107ed4 <open+0x168> <== NEVER TAKEN
107ecd: e8 e6 82 00 00 call 1101b8 <__errno>
107ed2: 8b 30 mov (%eax),%esi
close( iop - rtems_libio_iops );
107ed4: 83 ec 0c sub $0xc,%esp
107ed7: 2b 1d 18 31 12 00 sub 0x123118,%ebx
107edd: c1 fb 03 sar $0x3,%ebx
107ee0: 69 db b7 6d db b6 imul $0xb6db6db7,%ebx,%ebx
107ee6: 53 push %ebx
107ee7: e8 bc 5e 00 00 call 10dda8 <close>
107eec: 83 c4 10 add $0x10,%esp
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
107eef: 31 ff xor %edi,%edi
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
/* those are released by close(): */
iop = 0;
107ef1: 31 db xor %ebx,%ebx
107ef3: eb 23 jmp 107f18 <open+0x1ac>
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
rc = ENFILE;
107ef5: be 17 00 00 00 mov $0x17,%esi
107efa: eb 40 jmp 107f3c <open+0x1d0>
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
107efc: 31 ff xor %edi,%edi
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
rc = ENOENT;
107efe: be 02 00 00 00 mov $0x2,%esi
107f03: eb 17 jmp 107f1c <open+0x1b0>
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
107f05: 31 ff xor %edi,%edi <== NOT EXECUTED
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
107f07: be 0d 00 00 00 mov $0xd,%esi <== NOT EXECUTED
107f0c: eb 0e jmp 107f1c <open+0x1b0> <== NOT EXECUTED
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
loc_to_free = &loc;
107f0e: 8d 7d d4 lea -0x2c(%ebp),%edi
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
107f11: be 11 00 00 00 mov $0x11,%esi
107f16: eb 04 jmp 107f1c <open+0x1b0>
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
107f18: 85 f6 test %esi,%esi
107f1a: 74 2c je 107f48 <open+0x1dc> <== NEVER TAKEN
if ( iop )
107f1c: 85 db test %ebx,%ebx
107f1e: 74 0c je 107f2c <open+0x1c0>
rtems_libio_free( iop );
107f20: 83 ec 0c sub $0xc,%esp
107f23: 53 push %ebx
107f24: e8 a3 60 00 00 call 10dfcc <rtems_libio_free>
107f29: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
107f2c: 85 ff test %edi,%edi
107f2e: 74 0c je 107f3c <open+0x1d0>
rtems_filesystem_freenode( loc_to_free );
107f30: 83 ec 0c sub $0xc,%esp
107f33: 57 push %edi
107f34: e8 eb f3 ff ff call 107324 <rtems_filesystem_freenode>
107f39: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( rc );
107f3c: e8 77 82 00 00 call 1101b8 <__errno>
107f41: 89 30 mov %esi,(%eax)
107f43: 83 c8 ff or $0xffffffff,%eax
107f46: eb 0f jmp 107f57 <open+0x1eb>
}
return iop - rtems_libio_iops;
107f48: 2b 1d 18 31 12 00 sub 0x123118,%ebx
107f4e: c1 fb 03 sar $0x3,%ebx
107f51: 69 c3 b7 6d db b6 imul $0xb6db6db7,%ebx,%eax
}
107f57: 8d 65 f4 lea -0xc(%ebp),%esp
107f5a: 5b pop %ebx
107f5b: 5e pop %esi
107f5c: 5f pop %edi
107f5d: c9 leave
107f5e: c3 ret
00108b0e <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
108b0e: 55 push %ebp
108b0f: 89 e5 mov %esp,%ebp
108b11: 56 push %esi
108b12: 53 push %ebx
108b13: 83 ec 10 sub $0x10,%esp
108b16: 89 d3 mov %edx,%ebx
108b18: 88 45 f4 mov %al,-0xc(%ebp)
int i;
if (tty->termios.c_oflag & OPOST) {
108b1b: 8b 52 34 mov 0x34(%edx),%edx
108b1e: f6 c2 01 test $0x1,%dl
108b21: 0f 84 ed 00 00 00 je 108c14 <oproc+0x106> <== NEVER TAKEN
switch (c) {
108b27: 3c 09 cmp $0x9,%al
108b29: 74 75 je 108ba0 <oproc+0x92>
108b2b: 77 0d ja 108b3a <oproc+0x2c> <== ALWAYS TAKEN
108b2d: 3c 08 cmp $0x8,%al <== NOT EXECUTED
108b2f: 0f 85 aa 00 00 00 jne 108bdf <oproc+0xd1> <== NOT EXECUTED
108b35: e9 98 00 00 00 jmp 108bd2 <oproc+0xc4> <== NOT EXECUTED
108b3a: 3c 0a cmp $0xa,%al
108b3c: 74 0a je 108b48 <oproc+0x3a>
108b3e: 3c 0d cmp $0xd,%al
108b40: 0f 85 99 00 00 00 jne 108bdf <oproc+0xd1> <== ALWAYS TAKEN
108b46: eb 32 jmp 108b7a <oproc+0x6c> <== NOT EXECUTED
case '\n':
if (tty->termios.c_oflag & ONLRET)
108b48: f6 c2 20 test $0x20,%dl
108b4b: 74 07 je 108b54 <oproc+0x46> <== ALWAYS TAKEN
tty->column = 0;
108b4d: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
108b54: 80 e2 04 and $0x4,%dl
108b57: 0f 84 b7 00 00 00 je 108c14 <oproc+0x106> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
108b5d: 56 push %esi
108b5e: 53 push %ebx
108b5f: 6a 01 push $0x1
108b61: 68 ac d7 11 00 push $0x11d7ac
108b66: e8 83 fe ff ff call 1089ee <rtems_termios_puts>
tty->column = 0;
108b6b: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx)
108b72: 83 c4 10 add $0x10,%esp
108b75: e9 9a 00 00 00 jmp 108c14 <oproc+0x106>
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
108b7a: f6 c2 10 test $0x10,%dl <== NOT EXECUTED
108b7d: 74 0a je 108b89 <oproc+0x7b> <== NOT EXECUTED
108b7f: 83 7b 28 00 cmpl $0x0,0x28(%ebx) <== NOT EXECUTED
108b83: 0f 84 9b 00 00 00 je 108c24 <oproc+0x116> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
108b89: f6 c2 08 test $0x8,%dl <== NOT EXECUTED
108b8c: 74 09 je 108b97 <oproc+0x89> <== NOT EXECUTED
c = '\n';
108b8e: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
108b92: 80 e2 20 and $0x20,%dl <== NOT EXECUTED
108b95: 74 7d je 108c14 <oproc+0x106> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
108b97: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
break;
108b9e: eb 74 jmp 108c14 <oproc+0x106> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
108ba0: 8b 4b 28 mov 0x28(%ebx),%ecx
108ba3: 89 ce mov %ecx,%esi
108ba5: 83 e6 07 and $0x7,%esi
108ba8: b8 08 00 00 00 mov $0x8,%eax
108bad: 29 f0 sub %esi,%eax
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
108baf: 81 e2 00 18 00 00 and $0x1800,%edx
108bb5: 81 fa 00 18 00 00 cmp $0x1800,%edx
108bbb: 8d 14 08 lea (%eax,%ecx,1),%edx
108bbe: 75 0d jne 108bcd <oproc+0xbf> <== NEVER TAKEN
tty->column += i;
108bc0: 89 53 28 mov %edx,0x28(%ebx)
rtems_termios_puts ( " ", i, tty);
108bc3: 51 push %ecx
108bc4: 53 push %ebx
108bc5: 50 push %eax
108bc6: 68 6c d3 11 00 push $0x11d36c
108bcb: eb 4f jmp 108c1c <oproc+0x10e>
return;
}
tty->column += i;
108bcd: 89 53 28 mov %edx,0x28(%ebx) <== NOT EXECUTED
break;
108bd0: eb 42 jmp 108c14 <oproc+0x106> <== NOT EXECUTED
case '\b':
if (tty->column > 0)
108bd2: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
108bd5: 85 c0 test %eax,%eax <== NOT EXECUTED
108bd7: 7e 3b jle 108c14 <oproc+0x106> <== NOT EXECUTED
tty->column--;
108bd9: 48 dec %eax <== NOT EXECUTED
108bda: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
108bdd: eb 35 jmp 108c14 <oproc+0x106> <== NOT EXECUTED
break;
default:
if (tty->termios.c_oflag & OLCUC)
108bdf: 80 e2 02 and $0x2,%dl
108be2: 74 1c je 108c00 <oproc+0xf2> <== ALWAYS TAKEN
c = toupper(c);
108be4: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
108be7: 8b 15 c4 10 12 00 mov 0x1210c4,%edx <== NOT EXECUTED
108bed: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx <== NOT EXECUTED
108bf2: 83 e2 03 and $0x3,%edx <== NOT EXECUTED
108bf5: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED
108bf8: 75 03 jne 108bfd <oproc+0xef> <== NOT EXECUTED
108bfa: 83 e8 20 sub $0x20,%eax <== NOT EXECUTED
108bfd: 88 45 f4 mov %al,-0xc(%ebp) <== NOT EXECUTED
if (!iscntrl(c))
108c00: 0f b6 45 f4 movzbl -0xc(%ebp),%eax
108c04: 8b 15 c4 10 12 00 mov 0x1210c4,%edx
108c0a: f6 44 02 01 20 testb $0x20,0x1(%edx,%eax,1)
108c0f: 75 03 jne 108c14 <oproc+0x106> <== NEVER TAKEN
tty->column++;
108c11: ff 43 28 incl 0x28(%ebx)
break;
}
}
rtems_termios_puts (&c, 1, tty);
108c14: 52 push %edx
108c15: 53 push %ebx
108c16: 6a 01 push $0x1
108c18: 8d 45 f4 lea -0xc(%ebp),%eax
108c1b: 50 push %eax
108c1c: e8 cd fd ff ff call 1089ee <rtems_termios_puts>
108c21: 83 c4 10 add $0x10,%esp
}
108c24: 8d 65 f8 lea -0x8(%ebp),%esp
108c27: 5b pop %ebx
108c28: 5e pop %esi
108c29: c9 leave
108c2a: c3 ret
0010ec20 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
10ec20: 55 push %ebp
10ec21: 89 e5 mov %esp,%ebp
10ec23: 57 push %edi
10ec24: 56 push %esi
10ec25: 53 push %ebx
10ec26: 83 ec 34 sub $0x34,%esp
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
10ec29: 68 ff 01 00 00 push $0x1ff
10ec2e: 68 d4 f0 11 00 push $0x11f0d4
10ec33: e8 c4 13 00 00 call 10fffc <rtems_mkdir>
10ec38: 83 c4 10 add $0x10,%esp
return -1;
10ec3b: c7 45 d4 ff ff ff ff movl $0xffffffff,-0x2c(%ebp)
)
{
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
10ec42: 85 c0 test %eax,%eax
10ec44: 0f 85 e8 00 00 00 jne 10ed32 <pipe_create+0x112> <== NEVER TAKEN
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
10ec4a: 8d 5d d9 lea -0x27(%ebp),%ebx
10ec4d: be d9 f0 11 00 mov $0x11f0d9,%esi
10ec52: b9 0a 00 00 00 mov $0xa,%ecx
10ec57: 89 df mov %ebx,%edi
10ec59: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
10ec5b: 0f b7 05 24 3f 12 00 movzwl 0x123f24,%eax
10ec62: 8d 50 01 lea 0x1(%eax),%edx
10ec65: 66 89 15 24 3f 12 00 mov %dx,0x123f24
10ec6c: 57 push %edi
10ec6d: 50 push %eax
10ec6e: 68 e4 f0 11 00 push $0x11f0e4
10ec73: 8d 45 e3 lea -0x1d(%ebp),%eax
10ec76: 50 push %eax
10ec77: e8 04 33 00 00 call 111f80 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
10ec7c: 59 pop %ecx
10ec7d: 5e pop %esi
10ec7e: 68 80 01 00 00 push $0x180
10ec83: 53 push %ebx
10ec84: e8 33 11 00 00 call 10fdbc <mkfifo>
10ec89: 83 c4 10 add $0x10,%esp
10ec8c: 85 c0 test %eax,%eax
10ec8e: 74 0a je 10ec9a <pipe_create+0x7a>
if (errno != EEXIST){
10ec90: e8 ff 28 00 00 call 111594 <__errno>
10ec95: e9 98 00 00 00 jmp 10ed32 <pipe_create+0x112>
return -1;
/* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
10ec9a: 52 push %edx
10ec9b: 52 push %edx
10ec9c: 68 00 40 00 00 push $0x4000
10eca1: 53 push %ebx
10eca2: e8 bd a0 ff ff call 108d64 <open>
10eca7: 8b 55 08 mov 0x8(%ebp),%edx
10ecaa: 89 02 mov %eax,(%edx)
if (filsdes[0] < 0) {
10ecac: 83 c4 10 add $0x10,%esp
10ecaf: 85 c0 test %eax,%eax
10ecb1: 79 0d jns 10ecc0 <pipe_create+0xa0>
err = errno;
10ecb3: e8 dc 28 00 00 call 111594 <__errno>
10ecb8: 8b 30 mov (%eax),%esi
/* Delete file at errors, or else if pipe is successfully created
the file node will be deleted after it is closed by all. */
unlink(fifopath);
10ecba: 83 ec 0c sub $0xc,%esp
10ecbd: 53 push %ebx
10ecbe: eb 51 jmp 10ed11 <pipe_create+0xf1>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
10ecc0: 31 d2 xor %edx,%edx
10ecc2: 3b 05 44 01 12 00 cmp 0x120144,%eax
10ecc8: 73 09 jae 10ecd3 <pipe_create+0xb3> <== NEVER TAKEN
10ecca: 6b d0 38 imul $0x38,%eax,%edx
10eccd: 03 15 20 41 12 00 add 0x124120,%edx
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
10ecd3: 83 62 14 fe andl $0xfffffffe,0x14(%edx)
filsdes[1] = open(fifopath, O_WRONLY);
10ecd7: 50 push %eax
10ecd8: 50 push %eax
10ecd9: 6a 01 push $0x1
10ecdb: 8d 45 d9 lea -0x27(%ebp),%eax
10ecde: 50 push %eax
10ecdf: e8 80 a0 ff ff call 108d64 <open>
10ece4: 8b 55 08 mov 0x8(%ebp),%edx
10ece7: 89 42 04 mov %eax,0x4(%edx)
if (filsdes[1] < 0) {
10ecea: 83 c4 10 add $0x10,%esp
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
10eced: 31 f6 xor %esi,%esi
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
10ecef: 85 c0 test %eax,%eax
10ecf1: 79 17 jns 10ed0a <pipe_create+0xea>
err = errno;
10ecf3: e8 9c 28 00 00 call 111594 <__errno>
10ecf8: 8b 30 mov (%eax),%esi
close(filsdes[0]);
10ecfa: 83 ec 0c sub $0xc,%esp
10ecfd: 8b 45 08 mov 0x8(%ebp),%eax
10ed00: ff 30 pushl (%eax)
10ed02: e8 85 92 ff ff call 107f8c <close>
10ed07: 83 c4 10 add $0x10,%esp
}
unlink(fifopath);
10ed0a: 83 ec 0c sub $0xc,%esp
10ed0d: 8d 45 d9 lea -0x27(%ebp),%eax
10ed10: 50 push %eax
10ed11: e8 ea bb ff ff call 10a900 <unlink>
10ed16: 83 c4 10 add $0x10,%esp
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
10ed19: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
10ed20: 85 f6 test %esi,%esi
10ed22: 74 0e je 10ed32 <pipe_create+0x112>
rtems_set_errno_and_return_minus_one(err);
10ed24: e8 6b 28 00 00 call 111594 <__errno>
10ed29: 89 30 mov %esi,(%eax)
10ed2b: c7 45 d4 ff ff ff ff movl $0xffffffff,-0x2c(%ebp)
return 0;
}
10ed32: 8b 45 d4 mov -0x2c(%ebp),%eax
10ed35: 8d 65 f4 lea -0xc(%ebp),%esp
10ed38: 5b pop %ebx
10ed39: 5e pop %esi
10ed3a: 5f pop %edi
10ed3b: c9 leave
10ed3c: c3 ret
0010fed1 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
10fed1: 55 push %ebp
10fed2: 89 e5 mov %esp,%ebp
10fed4: 56 push %esi
10fed5: 53 push %ebx
10fed6: 8b 5d 08 mov 0x8(%ebp),%ebx
10fed9: 8b 75 10 mov 0x10(%ebp),%esi
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
10fedc: b8 ea ff ff ff mov $0xffffffea,%eax
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
10fee1: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp)
10fee8: 75 36 jne 10ff20 <pipe_ioctl+0x4f>
if (buffer == NULL)
return -EFAULT;
10feea: b0 f2 mov $0xf2,%al
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
10feec: 85 f6 test %esi,%esi
10feee: 74 30 je 10ff20 <pipe_ioctl+0x4f>
return -EFAULT;
if (! PIPE_LOCK(pipe))
10fef0: 50 push %eax
10fef1: 6a 00 push $0x0
10fef3: 6a 00 push $0x0
10fef5: ff 73 28 pushl 0x28(%ebx)
10fef8: e8 93 bc ff ff call 10bb90 <rtems_semaphore_obtain>
10fefd: 89 c2 mov %eax,%edx
10feff: 83 c4 10 add $0x10,%esp
return -EINTR;
10ff02: b8 fc ff ff ff mov $0xfffffffc,%eax
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
10ff07: 85 d2 test %edx,%edx
10ff09: 75 15 jne 10ff20 <pipe_ioctl+0x4f> <== NEVER TAKEN
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
10ff0b: 8b 43 0c mov 0xc(%ebx),%eax
10ff0e: 89 06 mov %eax,(%esi)
PIPE_UNLOCK(pipe);
10ff10: 83 ec 0c sub $0xc,%esp
10ff13: ff 73 28 pushl 0x28(%ebx)
10ff16: e8 61 bd ff ff call 10bc7c <rtems_semaphore_release>
return 0;
10ff1b: 83 c4 10 add $0x10,%esp
10ff1e: 31 c0 xor %eax,%eax
}
return -EINVAL;
}
10ff20: 8d 65 f8 lea -0x8(%ebp),%esp
10ff23: 5b pop %ebx
10ff24: 5e pop %esi
10ff25: c9 leave
10ff26: c3 ret
0010fbce <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
10fbce: 55 push %ebp
10fbcf: 89 e5 mov %esp,%ebp
10fbd1: 57 push %edi
10fbd2: 56 push %esi
10fbd3: 53 push %ebx
10fbd4: 83 ec 30 sub $0x30,%esp
10fbd7: 8b 5d 08 mov 0x8(%ebp),%ebx
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
10fbda: 6a 00 push $0x0
10fbdc: 6a 00 push $0x0
10fbde: ff 73 28 pushl 0x28(%ebx)
10fbe1: e8 aa bf ff ff call 10bb90 <rtems_semaphore_obtain>
10fbe6: 83 c4 10 add $0x10,%esp
return -EINTR;
10fbe9: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp)
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
10fbf0: 85 c0 test %eax,%eax
10fbf2: 0f 85 2f 01 00 00 jne 10fd27 <pipe_read+0x159> <== NEVER TAKEN
10fbf8: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
10fbff: e9 f0 00 00 00 jmp 10fcf4 <pipe_read+0x126>
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
10fc04: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10fc08: 0f 84 f2 00 00 00 je 10fd00 <pipe_read+0x132>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
10fc0e: 8b 45 14 mov 0x14(%ebp),%eax
10fc11: f6 40 14 01 testb $0x1,0x14(%eax)
10fc15: 0f 85 e9 00 00 00 jne 10fd04 <pipe_read+0x136>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
10fc1b: ff 43 18 incl 0x18(%ebx)
PIPE_UNLOCK(pipe);
10fc1e: 83 ec 0c sub $0xc,%esp
10fc21: ff 73 28 pushl 0x28(%ebx)
10fc24: e8 53 c0 ff ff call 10bc7c <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
10fc29: 5f pop %edi
10fc2a: 58 pop %eax
10fc2b: 6a 00 push $0x0
10fc2d: ff 73 2c pushl 0x2c(%ebx)
10fc30: e8 23 0d 00 00 call 110958 <rtems_barrier_wait>
10fc35: 83 c4 0c add $0xc,%esp
10fc38: 83 f8 01 cmp $0x1,%eax
10fc3b: 19 f6 sbb %esi,%esi
10fc3d: f7 d6 not %esi
10fc3f: 83 e6 fc and $0xfffffffc,%esi
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
10fc42: 6a 00 push $0x0
10fc44: 6a 00 push $0x0
10fc46: ff 73 28 pushl 0x28(%ebx)
10fc49: e8 42 bf ff ff call 10bb90 <rtems_semaphore_obtain>
10fc4e: 83 c4 10 add $0x10,%esp
10fc51: 85 c0 test %eax,%eax
10fc53: 0f 85 c0 00 00 00 jne 10fd19 <pipe_read+0x14b> <== NEVER TAKEN
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
10fc59: ff 4b 18 decl 0x18(%ebx)
if (ret != 0)
10fc5c: 85 f6 test %esi,%esi
10fc5e: 0f 85 a5 00 00 00 jne 10fd09 <pipe_read+0x13b> <== NEVER TAKEN
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
10fc64: 8b 53 0c mov 0xc(%ebx),%edx
10fc67: 85 d2 test %edx,%edx
10fc69: 74 99 je 10fc04 <pipe_read+0x36>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
10fc6b: 8b 45 10 mov 0x10(%ebp),%eax
10fc6e: 2b 45 d4 sub -0x2c(%ebp),%eax
10fc71: 89 55 d0 mov %edx,-0x30(%ebp)
10fc74: 39 c2 cmp %eax,%edx
10fc76: 76 03 jbe 10fc7b <pipe_read+0xad>
10fc78: 89 45 d0 mov %eax,-0x30(%ebp)
chunk1 = pipe->Size - pipe->Start;
10fc7b: 8b 73 08 mov 0x8(%ebx),%esi
10fc7e: 8b 43 04 mov 0x4(%ebx),%eax
10fc81: 29 f0 sub %esi,%eax
if (chunk > chunk1) {
10fc83: 39 45 d0 cmp %eax,-0x30(%ebp)
10fc86: 8b 7d 0c mov 0xc(%ebp),%edi
10fc89: 8b 4d d4 mov -0x2c(%ebp),%ecx
10fc8c: 8d 14 0f lea (%edi,%ecx,1),%edx
10fc8f: 7e 1b jle 10fcac <pipe_read+0xde>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
10fc91: 03 33 add (%ebx),%esi
10fc93: 89 d7 mov %edx,%edi
10fc95: 89 c1 mov %eax,%ecx
10fc97: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
10fc99: 8b 55 d4 mov -0x2c(%ebp),%edx
10fc9c: 01 c2 add %eax,%edx
10fc9e: 03 55 0c add 0xc(%ebp),%edx
10fca1: 8b 4d d0 mov -0x30(%ebp),%ecx
10fca4: 29 c1 sub %eax,%ecx
10fca6: 8b 33 mov (%ebx),%esi
10fca8: 89 d7 mov %edx,%edi
10fcaa: eb 07 jmp 10fcb3 <pipe_read+0xe5>
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
10fcac: 03 33 add (%ebx),%esi
10fcae: 89 d7 mov %edx,%edi
10fcb0: 8b 4d d0 mov -0x30(%ebp),%ecx
10fcb3: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
pipe->Start += chunk;
10fcb5: 8b 45 d0 mov -0x30(%ebp),%eax
10fcb8: 03 43 08 add 0x8(%ebx),%eax
pipe->Start %= pipe->Size;
10fcbb: 31 d2 xor %edx,%edx
10fcbd: f7 73 04 divl 0x4(%ebx)
10fcc0: 89 53 08 mov %edx,0x8(%ebx)
pipe->Length -= chunk;
10fcc3: 8b 43 0c mov 0xc(%ebx),%eax
10fcc6: 2b 45 d0 sub -0x30(%ebp),%eax
10fcc9: 89 43 0c mov %eax,0xc(%ebx)
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
10fccc: 85 c0 test %eax,%eax
10fcce: 75 07 jne 10fcd7 <pipe_read+0x109>
pipe->Start = 0;
10fcd0: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
if (pipe->waitingWriters > 0)
10fcd7: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx)
10fcdb: 74 11 je 10fcee <pipe_read+0x120>
PIPE_WAKEUPWRITERS(pipe);
10fcdd: 56 push %esi
10fcde: 56 push %esi
10fcdf: 8d 45 e4 lea -0x1c(%ebp),%eax
10fce2: 50 push %eax
10fce3: ff 73 30 pushl 0x30(%ebx)
10fce6: e8 15 0c 00 00 call 110900 <rtems_barrier_release>
10fceb: 83 c4 10 add $0x10,%esp
read += chunk;
10fcee: 8b 4d d0 mov -0x30(%ebp),%ecx
10fcf1: 01 4d d4 add %ecx,-0x2c(%ebp)
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
10fcf4: 8b 7d 10 mov 0x10(%ebp),%edi
10fcf7: 39 7d d4 cmp %edi,-0x2c(%ebp)
10fcfa: 0f 82 64 ff ff ff jb 10fc64 <pipe_read+0x96>
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
10fd00: 31 f6 xor %esi,%esi
10fd02: eb 05 jmp 10fd09 <pipe_read+0x13b>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
10fd04: be f5 ff ff ff mov $0xfffffff5,%esi
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
10fd09: 83 ec 0c sub $0xc,%esp
10fd0c: ff 73 28 pushl 0x28(%ebx)
10fd0f: e8 68 bf ff ff call 10bc7c <rtems_semaphore_release>
10fd14: 83 c4 10 add $0x10,%esp
10fd17: eb 05 jmp 10fd1e <pipe_read+0x150>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
10fd19: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
10fd1e: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
10fd22: 7f 03 jg 10fd27 <pipe_read+0x159>
return read;
return ret;
10fd24: 89 75 d4 mov %esi,-0x2c(%ebp)
}
10fd27: 8b 45 d4 mov -0x2c(%ebp),%eax
10fd2a: 8d 65 f4 lea -0xc(%ebp),%esp
10fd2d: 5b pop %ebx
10fd2e: 5e pop %esi
10fd2f: 5f pop %edi
10fd30: c9 leave
10fd31: c3 ret
0010f7b5 <pipe_release>:
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
10f7b5: 55 push %ebp
10f7b6: 89 e5 mov %esp,%ebp
10f7b8: 57 push %edi
10f7b9: 56 push %esi
10f7ba: 53 push %ebx
10f7bb: 83 ec 1c sub $0x1c,%esp
10f7be: 8b 7d 08 mov 0x8(%ebp),%edi
pipe_control_t *pipe = *pipep;
10f7c1: 8b 1f mov (%edi),%ebx
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
10f7c3: 8b 45 0c mov 0xc(%ebp),%eax
10f7c6: 8b 40 14 mov 0x14(%eax),%eax
10f7c9: 89 c6 mov %eax,%esi
10f7cb: 83 e6 06 and $0x6,%esi
if (mode & LIBIO_FLAGS_READ)
10f7ce: a8 02 test $0x2,%al
10f7d0: 74 03 je 10f7d5 <pipe_release+0x20>
pipe->Readers --;
10f7d2: ff 4b 10 decl 0x10(%ebx)
if (mode & LIBIO_FLAGS_WRITE)
10f7d5: f7 c6 04 00 00 00 test $0x4,%esi
10f7db: 74 03 je 10f7e0 <pipe_release+0x2b>
pipe->Writers --;
10f7dd: ff 4b 14 decl 0x14(%ebx)
PIPE_UNLOCK(pipe);
10f7e0: 83 ec 0c sub $0xc,%esp
10f7e3: ff 73 28 pushl 0x28(%ebx)
10f7e6: e8 91 c4 ff ff call 10bc7c <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
10f7eb: 8b 43 10 mov 0x10(%ebx),%eax
10f7ee: 83 c4 10 add $0x10,%esp
10f7f1: 85 c0 test %eax,%eax
10f7f3: 75 15 jne 10f80a <pipe_release+0x55>
10f7f5: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f7f9: 75 0f jne 10f80a <pipe_release+0x55>
#if 0
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
10f7fb: 89 d8 mov %ebx,%eax
10f7fd: e8 78 ff ff ff call 10f77a <pipe_free>
*pipep = NULL;
10f802: c7 07 00 00 00 00 movl $0x0,(%edi)
10f808: eb 30 jmp 10f83a <pipe_release+0x85>
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
10f80a: 83 fe 04 cmp $0x4,%esi
10f80d: 74 0f je 10f81e <pipe_release+0x69>
10f80f: 85 c0 test %eax,%eax
10f811: 75 0b jne 10f81e <pipe_release+0x69> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
10f813: 57 push %edi
10f814: 57 push %edi
10f815: 8d 45 e4 lea -0x1c(%ebp),%eax
10f818: 50 push %eax
10f819: ff 73 30 pushl 0x30(%ebx)
10f81c: eb 14 jmp 10f832 <pipe_release+0x7d>
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
10f81e: 83 fe 02 cmp $0x2,%esi
10f821: 74 17 je 10f83a <pipe_release+0x85> <== NEVER TAKEN
10f823: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f827: 75 11 jne 10f83a <pipe_release+0x85> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
10f829: 56 push %esi
10f82a: 56 push %esi
10f82b: 8d 45 e4 lea -0x1c(%ebp),%eax
10f82e: 50 push %eax
10f82f: ff 73 2c pushl 0x2c(%ebx)
10f832: e8 c9 10 00 00 call 110900 <rtems_barrier_release>
10f837: 83 c4 10 add $0x10,%esp
pipe_unlock();
10f83a: e8 25 ff ff ff call 10f764 <pipe_unlock>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
10f83f: 8d 65 f4 lea -0xc(%ebp),%esp
10f842: 5b pop %ebx
10f843: 5e pop %esi
10f844: 5f pop %edi
10f845: c9 leave
10f846: c3 ret
0010fd32 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
10fd32: 55 push %ebp
10fd33: 89 e5 mov %esp,%ebp
10fd35: 57 push %edi
10fd36: 56 push %esi
10fd37: 53 push %ebx
10fd38: 83 ec 2c sub $0x2c,%esp
10fd3b: 8b 5d 08 mov 0x8(%ebp),%ebx
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
10fd3e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
)
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
10fd45: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10fd49: 0f 84 77 01 00 00 je 10fec6 <pipe_write+0x194> <== NEVER TAKEN
return 0;
if (! PIPE_LOCK(pipe))
10fd4f: 57 push %edi
10fd50: 6a 00 push $0x0
10fd52: 6a 00 push $0x0
10fd54: ff 73 28 pushl 0x28(%ebx)
10fd57: e8 34 be ff ff call 10bb90 <rtems_semaphore_obtain>
10fd5c: 83 c4 10 add $0x10,%esp
return -EINTR;
10fd5f: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp)
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
10fd66: 85 c0 test %eax,%eax
10fd68: 0f 85 58 01 00 00 jne 10fec6 <pipe_write+0x194> <== NEVER TAKEN
return -EINTR;
if (pipe->Readers == 0) {
10fd6e: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10fd72: 0f 84 16 01 00 00 je 10fe8e <pipe_write+0x15c> <== NEVER TAKEN
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
10fd78: bf 01 00 00 00 mov $0x1,%edi
10fd7d: 8b 45 10 mov 0x10(%ebp),%eax
10fd80: 3b 43 04 cmp 0x4(%ebx),%eax
10fd83: 77 02 ja 10fd87 <pipe_write+0x55> <== NEVER TAKEN
10fd85: 89 c7 mov %eax,%edi
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
10fd87: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
10fd8e: e9 eb 00 00 00 jmp 10fe7e <pipe_write+0x14c>
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
10fd93: 8b 4d 14 mov 0x14(%ebp),%ecx
10fd96: f6 41 14 01 testb $0x1,0x14(%ecx)
10fd9a: 0f 85 fc 00 00 00 jne 10fe9c <pipe_write+0x16a>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
10fda0: ff 43 1c incl 0x1c(%ebx)
PIPE_UNLOCK(pipe);
10fda3: 83 ec 0c sub $0xc,%esp
10fda6: ff 73 28 pushl 0x28(%ebx)
10fda9: e8 ce be ff ff call 10bc7c <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
10fdae: 59 pop %ecx
10fdaf: 5e pop %esi
10fdb0: 6a 00 push $0x0
10fdb2: ff 73 30 pushl 0x30(%ebx)
10fdb5: e8 9e 0b 00 00 call 110958 <rtems_barrier_wait>
10fdba: 83 c4 0c add $0xc,%esp
10fdbd: 83 f8 01 cmp $0x1,%eax
10fdc0: 19 f6 sbb %esi,%esi
10fdc2: f7 d6 not %esi
10fdc4: 83 e6 fc and $0xfffffffc,%esi
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
10fdc7: 6a 00 push $0x0
10fdc9: 6a 00 push $0x0
10fdcb: ff 73 28 pushl 0x28(%ebx)
10fdce: e8 bd bd ff ff call 10bb90 <rtems_semaphore_obtain>
10fdd3: 83 c4 10 add $0x10,%esp
10fdd6: 85 c0 test %eax,%eax
10fdd8: 0f 85 da 00 00 00 jne 10feb8 <pipe_write+0x186> <== NEVER TAKEN
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
10fdde: ff 4b 1c decl 0x1c(%ebx)
if (ret != 0)
10fde1: 85 f6 test %esi,%esi
10fde3: 0f 85 bf 00 00 00 jne 10fea8 <pipe_write+0x176> <== NEVER TAKEN
goto out_locked;
if (pipe->Readers == 0) {
10fde9: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10fded: 0f 84 b0 00 00 00 je 10fea3 <pipe_write+0x171> <== NEVER TAKEN
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
10fdf3: 8b 73 04 mov 0x4(%ebx),%esi
10fdf6: 8b 43 0c mov 0xc(%ebx),%eax
10fdf9: 89 f1 mov %esi,%ecx
10fdfb: 29 c1 sub %eax,%ecx
10fdfd: 39 f9 cmp %edi,%ecx
10fdff: 72 92 jb 10fd93 <pipe_write+0x61>
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
10fe01: 8b 55 10 mov 0x10(%ebp),%edx
10fe04: 2b 55 d4 sub -0x2c(%ebp),%edx
10fe07: 89 4d d0 mov %ecx,-0x30(%ebp)
10fe0a: 39 d1 cmp %edx,%ecx
10fe0c: 76 03 jbe 10fe11 <pipe_write+0xdf>
10fe0e: 89 55 d0 mov %edx,-0x30(%ebp)
chunk1 = pipe->Size - PIPE_WSTART(pipe);
10fe11: 03 43 08 add 0x8(%ebx),%eax
10fe14: 31 d2 xor %edx,%edx
10fe16: f7 f6 div %esi
10fe18: 29 d6 sub %edx,%esi
10fe1a: 89 75 cc mov %esi,-0x34(%ebp)
if (chunk > chunk1) {
10fe1d: 39 75 d0 cmp %esi,-0x30(%ebp)
10fe20: 8b 4d 0c mov 0xc(%ebp),%ecx
10fe23: 8b 45 d4 mov -0x2c(%ebp),%eax
10fe26: 8d 34 01 lea (%ecx,%eax,1),%esi
10fe29: 7e 20 jle 10fe4b <pipe_write+0x119>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
10fe2b: 8b 03 mov (%ebx),%eax
10fe2d: 01 d0 add %edx,%eax
10fe2f: 89 c7 mov %eax,%edi
10fe31: 8b 4d cc mov -0x34(%ebp),%ecx
10fe34: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
10fe36: 8b 03 mov (%ebx),%eax
10fe38: 8b 4d d0 mov -0x30(%ebp),%ecx
10fe3b: 2b 4d cc sub -0x34(%ebp),%ecx
10fe3e: 8b 75 cc mov -0x34(%ebp),%esi
10fe41: 03 75 d4 add -0x2c(%ebp),%esi
10fe44: 03 75 0c add 0xc(%ebp),%esi
10fe47: 89 c7 mov %eax,%edi
10fe49: eb 09 jmp 10fe54 <pipe_write+0x122>
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
10fe4b: 8b 03 mov (%ebx),%eax
10fe4d: 01 d0 add %edx,%eax
10fe4f: 89 c7 mov %eax,%edi
10fe51: 8b 4d d0 mov -0x30(%ebp),%ecx
10fe54: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
pipe->Length += chunk;
10fe56: 8b 45 d0 mov -0x30(%ebp),%eax
10fe59: 01 43 0c add %eax,0xc(%ebx)
if (pipe->waitingReaders > 0)
10fe5c: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10fe60: 74 11 je 10fe73 <pipe_write+0x141>
PIPE_WAKEUPREADERS(pipe);
10fe62: 52 push %edx
10fe63: 52 push %edx
10fe64: 8d 4d e4 lea -0x1c(%ebp),%ecx
10fe67: 51 push %ecx
10fe68: ff 73 2c pushl 0x2c(%ebx)
10fe6b: e8 90 0a 00 00 call 110900 <rtems_barrier_release>
10fe70: 83 c4 10 add $0x10,%esp
written += chunk;
10fe73: 8b 45 d0 mov -0x30(%ebp),%eax
10fe76: 01 45 d4 add %eax,-0x2c(%ebp)
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
10fe79: bf 01 00 00 00 mov $0x1,%edi
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
10fe7e: 8b 4d 10 mov 0x10(%ebp),%ecx
10fe81: 39 4d d4 cmp %ecx,-0x2c(%ebp)
10fe84: 0f 82 69 ff ff ff jb 10fdf3 <pipe_write+0xc1>
10fe8a: 31 f6 xor %esi,%esi
10fe8c: eb 1a jmp 10fea8 <pipe_write+0x176>
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
10fe8e: be e0 ff ff ff mov $0xffffffe0,%esi
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
10fe93: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
10fe9a: eb 0c jmp 10fea8 <pipe_write+0x176>
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
10fe9c: be f5 ff ff ff mov $0xfffffff5,%esi
10fea1: eb 05 jmp 10fea8 <pipe_write+0x176>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
10fea3: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
10fea8: 83 ec 0c sub $0xc,%esp
10feab: ff 73 28 pushl 0x28(%ebx)
10feae: e8 c9 bd ff ff call 10bc7c <rtems_semaphore_release>
10feb3: 83 c4 10 add $0x10,%esp
10feb6: eb 05 jmp 10febd <pipe_write+0x18b>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
10feb8: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
10febd: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
10fec1: 7f 03 jg 10fec6 <pipe_write+0x194>
return written;
return ret;
10fec3: 89 75 d4 mov %esi,-0x2c(%ebp)
}
10fec6: 8b 45 d4 mov -0x2c(%ebp),%eax
10fec9: 8d 65 f4 lea -0xc(%ebp),%esp
10fecc: 5b pop %ebx
10fecd: 5e pop %esi
10fece: 5f pop %edi
10fecf: c9 leave
10fed0: c3 ret
0010a7c4 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
10a7c4: 55 push %ebp
10a7c5: 89 e5 mov %esp,%ebp
10a7c7: 53 push %ebx
10a7c8: 83 ec 04 sub $0x4,%esp
10a7cb: 8b 45 0c mov 0xc(%ebp),%eax
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
10a7ce: ff 05 2c 9a 12 00 incl 0x129a2c
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
10a7d4: 8d 58 ff lea -0x1(%eax),%ebx
10a7d7: 85 c3 test %eax,%ebx
10a7d9: 75 0d jne 10a7e8 <posix_memalign+0x24> <== NEVER TAKEN
10a7db: 83 f8 03 cmp $0x3,%eax
10a7de: 76 08 jbe 10a7e8 <posix_memalign+0x24>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
10a7e0: 59 pop %ecx
10a7e1: 5b pop %ebx
10a7e2: c9 leave
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
10a7e3: e9 74 01 00 00 jmp 10a95c <rtems_memalign>
}
10a7e8: b8 16 00 00 00 mov $0x16,%eax
10a7ed: 5a pop %edx
10a7ee: 5b pop %ebx
10a7ef: c9 leave
10a7f0: c3 ret
0011b8c4 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
11b8c4: 55 push %ebp
11b8c5: 89 e5 mov %esp,%ebp
11b8c7: 56 push %esi
11b8c8: 53 push %ebx
11b8c9: 8b 5d 08 mov 0x8(%ebp),%ebx
11b8cc: 8b 55 0c mov 0xc(%ebp),%edx
11b8cf: 8b 4d 10 mov 0x10(%ebp),%ecx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11b8d2: 3b 1d 44 f1 11 00 cmp 0x11f144,%ebx
11b8d8: 73 14 jae 11b8ee <read+0x2a> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
11b8da: 6b db 38 imul $0x38,%ebx,%ebx
11b8dd: 03 1d 18 31 12 00 add 0x123118,%ebx
rtems_libio_check_is_open( iop );
11b8e3: 8b 73 14 mov 0x14(%ebx),%esi
11b8e6: f7 c6 00 01 00 00 test $0x100,%esi
11b8ec: 75 0d jne 11b8fb <read+0x37>
11b8ee: e8 c5 48 ff ff call 1101b8 <__errno>
11b8f3: c7 00 09 00 00 00 movl $0x9,(%eax)
11b8f9: eb 1a jmp 11b915 <read+0x51>
rtems_libio_check_buffer( buffer );
11b8fb: 85 d2 test %edx,%edx
11b8fd: 74 0b je 11b90a <read+0x46> <== NEVER TAKEN
rtems_libio_check_count( count );
11b8ff: 31 c0 xor %eax,%eax
11b901: 85 c9 test %ecx,%ecx
11b903: 74 31 je 11b936 <read+0x72>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
11b905: 83 e6 02 and $0x2,%esi
11b908: 75 10 jne 11b91a <read+0x56>
11b90a: e8 a9 48 ff ff call 1101b8 <__errno>
11b90f: c7 00 16 00 00 00 movl $0x16,(%eax)
11b915: 83 c8 ff or $0xffffffff,%eax
11b918: eb 1c jmp 11b936 <read+0x72>
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
11b91a: 50 push %eax
11b91b: 8b 43 20 mov 0x20(%ebx),%eax
11b91e: 51 push %ecx
11b91f: 52 push %edx
11b920: 53 push %ebx
11b921: ff 50 08 call *0x8(%eax)
if ( rc > 0 )
11b924: 83 c4 10 add $0x10,%esp
11b927: 85 c0 test %eax,%eax
11b929: 7e 0b jle 11b936 <read+0x72>
iop->offset += rc;
11b92b: 89 c1 mov %eax,%ecx
11b92d: c1 f9 1f sar $0x1f,%ecx
11b930: 01 43 0c add %eax,0xc(%ebx)
11b933: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
11b936: 8d 65 f8 lea -0x8(%ebp),%esp
11b939: 5b pop %ebx
11b93a: 5e pop %esi
11b93b: c9 leave
11b93c: c3 ret
00109e94 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
109e94: 55 push %ebp
109e95: 89 e5 mov %esp,%ebp
109e97: 57 push %edi
109e98: 56 push %esi
109e99: 53 push %ebx
109e9a: 83 ec 2c sub $0x2c,%esp
109e9d: 8b 55 08 mov 0x8(%ebp),%edx
109ea0: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
109ea3: 85 db test %ebx,%ebx
109ea5: 75 10 jne 109eb7 <readlink+0x23>
rtems_set_errno_and_return_minus_one( EFAULT );
109ea7: e8 38 8a 00 00 call 1128e4 <__errno>
109eac: c7 00 0e 00 00 00 movl $0xe,(%eax)
109eb2: 83 cf ff or $0xffffffff,%edi
109eb5: eb 69 jmp 109f20 <readlink+0x8c>
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
109eb7: 31 c0 xor %eax,%eax
109eb9: 83 c9 ff or $0xffffffff,%ecx
109ebc: 89 d7 mov %edx,%edi
109ebe: f2 ae repnz scas %es:(%edi),%al
109ec0: f7 d1 not %ecx
109ec2: 49 dec %ecx
109ec3: 83 ec 0c sub $0xc,%esp
109ec6: 6a 00 push $0x0
109ec8: 8d 75 d4 lea -0x2c(%ebp),%esi
109ecb: 56 push %esi
109ecc: 6a 00 push $0x0
109ece: 51 push %ecx
109ecf: 52 push %edx
109ed0: e8 6d f0 ff ff call 108f42 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
109ed5: 83 c4 20 add $0x20,%esp
return -1;
109ed8: 83 cf ff or $0xffffffff,%edi
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
109edb: 85 c0 test %eax,%eax
109edd: 75 41 jne 109f20 <readlink+0x8c> <== NEVER TAKEN
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
109edf: 83 ec 0c sub $0xc,%esp
109ee2: 56 push %esi
109ee3: 8b 45 e0 mov -0x20(%ebp),%eax
109ee6: ff 50 10 call *0x10(%eax)
109ee9: 83 c4 10 add $0x10,%esp
109eec: 83 f8 04 cmp $0x4,%eax
109eef: 74 16 je 109f07 <readlink+0x73>
rtems_filesystem_freenode( &loc );
109ef1: 83 ec 0c sub $0xc,%esp
109ef4: 56 push %esi
109ef5: e8 06 f1 ff ff call 109000 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
109efa: e8 e5 89 00 00 call 1128e4 <__errno>
109eff: c7 00 16 00 00 00 movl $0x16,(%eax)
109f05: eb 16 jmp 109f1d <readlink+0x89>
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
109f07: 50 push %eax
109f08: ff 75 10 pushl 0x10(%ebp)
109f0b: 53 push %ebx
109f0c: 56 push %esi
109f0d: 8b 45 e0 mov -0x20(%ebp),%eax
109f10: ff 50 3c call *0x3c(%eax)
109f13: 89 c7 mov %eax,%edi
rtems_filesystem_freenode( &loc );
109f15: 89 34 24 mov %esi,(%esp)
109f18: e8 e3 f0 ff ff call 109000 <rtems_filesystem_freenode>
return result;
109f1d: 83 c4 10 add $0x10,%esp
}
109f20: 89 f8 mov %edi,%eax
109f22: 8d 65 f4 lea -0xc(%ebp),%esp
109f25: 5b pop %ebx
109f26: 5e pop %esi
109f27: 5f pop %edi
109f28: c9 leave
109f29: c3 ret
00108c54 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
108c54: 55 push %ebp
108c55: 89 e5 mov %esp,%ebp
108c57: 57 push %edi
108c58: 56 push %esi
108c59: 53 push %ebx
108c5a: 83 ec 2c sub $0x2c,%esp
108c5d: 8b 75 08 mov 0x8(%ebp),%esi
108c60: 8b 7d 0c mov 0xc(%ebp),%edi
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
108c63: 3b 35 44 01 12 00 cmp 0x120144,%esi
108c69: 73 11 jae 108c7c <readv+0x28>
iop = rtems_libio_iop( fd );
108c6b: 6b f6 38 imul $0x38,%esi,%esi
108c6e: 03 35 18 41 12 00 add 0x124118,%esi
rtems_libio_check_is_open( iop );
108c74: 8b 46 14 mov 0x14(%esi),%eax
108c77: f6 c4 01 test $0x1,%ah
108c7a: 75 10 jne 108c8c <readv+0x38>
108c7c: e8 17 81 00 00 call 110d98 <__errno>
108c81: c7 00 09 00 00 00 movl $0x9,(%eax)
108c87: e9 a4 00 00 00 jmp 108d30 <readv+0xdc>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
108c8c: a8 02 test $0x2,%al
108c8e: 74 35 je 108cc5 <readv+0x71> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
108c90: 85 ff test %edi,%edi
108c92: 74 31 je 108cc5 <readv+0x71>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
108c94: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
108c98: 7e 2b jle 108cc5 <readv+0x71>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
108c9a: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp)
108ca1: 7f 22 jg 108cc5 <readv+0x71> <== NEVER TAKEN
108ca3: b2 01 mov $0x1,%dl
108ca5: 31 c0 xor %eax,%eax
108ca7: 31 c9 xor %ecx,%ecx
108ca9: 89 75 d4 mov %esi,-0x2c(%ebp)
108cac: eb 03 jmp 108cb1 <readv+0x5d>
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
108cae: 8b 4d e4 mov -0x1c(%ebp),%ecx
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
108cb1: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8)
108cb5: 74 0e je 108cc5 <readv+0x71>
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
108cb7: 8b 5c c7 04 mov 0x4(%edi,%eax,8),%ebx
108cbb: 8d 34 19 lea (%ecx,%ebx,1),%esi
108cbe: 89 75 e4 mov %esi,-0x1c(%ebp)
if ( total < old )
108cc1: 39 ce cmp %ecx,%esi
108cc3: 7d 0d jge 108cd2 <readv+0x7e>
rtems_set_errno_and_return_minus_one( EINVAL );
108cc5: e8 ce 80 00 00 call 110d98 <__errno>
108cca: c7 00 16 00 00 00 movl $0x16,(%eax)
108cd0: eb 5e jmp 108d30 <readv+0xdc>
if ( iov[v].iov_len )
all_zeros = false;
108cd2: 85 db test %ebx,%ebx
108cd4: 0f 94 c1 sete %cl
108cd7: f7 d9 neg %ecx
108cd9: 21 ca and %ecx,%edx
* 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++ ) {
108cdb: 40 inc %eax
108cdc: 3b 45 10 cmp 0x10(%ebp),%eax
108cdf: 7c cd jl 108cae <readv+0x5a>
108ce1: 8b 75 d4 mov -0x2c(%ebp),%esi
* 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;
108ce4: 31 db xor %ebx,%ebx
/*
* 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 ) {
108ce6: 84 d2 test %dl,%dl
108ce8: 75 49 jne 108d33 <readv+0xdf>
108cea: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
108cf1: 50 push %eax
108cf2: 8b 46 20 mov 0x20(%esi),%eax
108cf5: 8b 55 e4 mov -0x1c(%ebp),%edx
108cf8: ff 74 d7 04 pushl 0x4(%edi,%edx,8)
108cfc: ff 34 d7 pushl (%edi,%edx,8)
108cff: 56 push %esi
108d00: ff 50 08 call *0x8(%eax)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
108d03: 83 c4 10 add $0x10,%esp
108d06: 83 f8 00 cmp $0x0,%eax
108d09: 7c 25 jl 108d30 <readv+0xdc> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
108d0b: 74 0d je 108d1a <readv+0xc6> <== NEVER TAKEN
iop->offset += bytes;
108d0d: 89 c1 mov %eax,%ecx
108d0f: c1 f9 1f sar $0x1f,%ecx
108d12: 01 46 0c add %eax,0xc(%esi)
108d15: 11 4e 10 adc %ecx,0x10(%esi)
total += bytes;
108d18: 01 c3 add %eax,%ebx
}
if (bytes != iov[ v ].iov_len)
108d1a: 8b 55 e4 mov -0x1c(%ebp),%edx
108d1d: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax
108d21: 75 10 jne 108d33 <readv+0xdf> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
108d23: 42 inc %edx
108d24: 89 55 e4 mov %edx,-0x1c(%ebp)
108d27: 8b 45 10 mov 0x10(%ebp),%eax
108d2a: 39 c2 cmp %eax,%edx
108d2c: 7c c3 jl 108cf1 <readv+0x9d>
108d2e: eb 03 jmp 108d33 <readv+0xdf>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
108d30: 83 cb ff or $0xffffffff,%ebx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
108d33: 89 d8 mov %ebx,%eax
108d35: 8d 65 f4 lea -0xc(%ebp),%esp
108d38: 5b pop %ebx
108d39: 5e pop %esi
108d3a: 5f pop %edi
108d3b: c9 leave
108d3c: c3 ret
0011b9c8 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
11b9c8: 55 push %ebp
11b9c9: 89 e5 mov %esp,%ebp
11b9cb: 57 push %edi
11b9cc: 56 push %esi
11b9cd: 53 push %ebx
11b9ce: 83 ec 2c sub $0x2c,%esp
11b9d1: 8b 5d 08 mov 0x8(%ebp),%ebx
11b9d4: 8b 75 0c mov 0xc(%ebp),%esi
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
11b9d7: ff 05 40 31 12 00 incl 0x123140
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
11b9dd: 83 3d e4 33 12 00 03 cmpl $0x3,0x1233e4
11b9e4: 75 1a jne 11ba00 <realloc+0x38> <== NEVER TAKEN
if (_Thread_Dispatch_disable_level > 0)
11b9e6: a1 64 32 12 00 mov 0x123264,%eax
11b9eb: 85 c0 test %eax,%eax
11b9ed: 0f 85 ad 00 00 00 jne 11baa0 <realloc+0xd8> <== NEVER TAKEN
return (void *) 0;
if (_ISR_Nest_level > 0)
11b9f3: 83 3d a4 34 12 00 00 cmpl $0x0,0x1234a4
11b9fa: 0f 85 a0 00 00 00 jne 11baa0 <realloc+0xd8> <== NEVER TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
11ba00: 85 db test %ebx,%ebx
11ba02: 75 13 jne 11ba17 <realloc+0x4f>
return malloc( size );
11ba04: 83 ec 0c sub $0xc,%esp
11ba07: 56 push %esi
11ba08: e8 c7 bb fe ff call 1075d4 <malloc>
11ba0d: 89 c3 mov %eax,%ebx
11ba0f: 83 c4 10 add $0x10,%esp
11ba12: e9 8b 00 00 00 jmp 11baa2 <realloc+0xda>
if ( !size ) {
11ba17: 85 f6 test %esi,%esi
11ba19: 75 0e jne 11ba29 <realloc+0x61> <== ALWAYS TAKEN
free( ptr );
11ba1b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11ba1e: 53 push %ebx <== NOT EXECUTED
11ba1f: e8 14 b9 fe ff call 107338 <free> <== NOT EXECUTED
return (void *) 0;
11ba24: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11ba27: eb 77 jmp 11baa0 <realloc+0xd8> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
11ba29: 52 push %edx
11ba2a: 8d 45 e4 lea -0x1c(%ebp),%eax
11ba2d: 50 push %eax
11ba2e: 53 push %ebx
11ba2f: ff 35 50 f1 11 00 pushl 0x11f150
11ba35: e8 ee 00 00 00 call 11bb28 <_Protected_heap_Get_block_size>
11ba3a: 83 c4 10 add $0x10,%esp
11ba3d: 84 c0 test %al,%al
11ba3f: 75 0d jne 11ba4e <realloc+0x86>
errno = EINVAL;
11ba41: e8 72 47 ff ff call 1101b8 <__errno>
11ba46: c7 00 16 00 00 00 movl $0x16,(%eax)
11ba4c: eb 52 jmp 11baa0 <realloc+0xd8>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
11ba4e: 50 push %eax
11ba4f: 56 push %esi
11ba50: 53 push %ebx
11ba51: ff 35 50 f1 11 00 pushl 0x11f150
11ba57: e8 04 01 00 00 call 11bb60 <_Protected_heap_Resize_block>
11ba5c: 83 c4 10 add $0x10,%esp
11ba5f: 84 c0 test %al,%al
11ba61: 75 3f jne 11baa2 <realloc+0xda>
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
11ba63: 83 ec 0c sub $0xc,%esp
11ba66: 56 push %esi
11ba67: e8 68 bb fe ff call 1075d4 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
11ba6c: ff 0d 34 31 12 00 decl 0x123134
if ( !new_area ) {
11ba72: 83 c4 10 add $0x10,%esp
11ba75: 85 c0 test %eax,%eax
11ba77: 74 27 je 11baa0 <realloc+0xd8>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
11ba79: 8b 55 e4 mov -0x1c(%ebp),%edx
11ba7c: 89 f1 mov %esi,%ecx
11ba7e: 39 d6 cmp %edx,%esi
11ba80: 76 02 jbe 11ba84 <realloc+0xbc> <== NEVER TAKEN
11ba82: 89 d1 mov %edx,%ecx
11ba84: 89 c7 mov %eax,%edi
11ba86: 89 de mov %ebx,%esi
11ba88: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
free( ptr );
11ba8a: 83 ec 0c sub $0xc,%esp
11ba8d: 53 push %ebx
11ba8e: 89 45 d4 mov %eax,-0x2c(%ebp)
11ba91: e8 a2 b8 fe ff call 107338 <free>
return new_area;
11ba96: 83 c4 10 add $0x10,%esp
11ba99: 8b 45 d4 mov -0x2c(%ebp),%eax
11ba9c: 89 c3 mov %eax,%ebx
11ba9e: eb 02 jmp 11baa2 <realloc+0xda>
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
11baa0: 31 db xor %ebx,%ebx
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
11baa2: 89 d8 mov %ebx,%eax
11baa4: 8d 65 f4 lea -0xc(%ebp),%esp
11baa7: 5b pop %ebx
11baa8: 5e pop %esi
11baa9: 5f pop %edi
11baaa: c9 leave
11baab: c3 ret
00108380 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
108380: 55 push %ebp
108381: 89 e5 mov %esp,%ebp
108383: 57 push %edi
108384: 56 push %esi
108385: 53 push %ebx
108386: 83 ec 58 sub $0x58,%esp
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
108389: ff 75 08 pushl 0x8(%ebp)
10838c: e8 fe f2 ff ff call 10768f <rtems_filesystem_dirname>
108391: 89 45 b4 mov %eax,-0x4c(%ebp)
if ( parentpathlen == 0 )
108394: 83 c4 10 add $0x10,%esp
108397: 85 c0 test %eax,%eax
108399: 8d 45 d0 lea -0x30(%ebp),%eax
10839c: 75 15 jne 1083b3 <rmdir+0x33>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
10839e: 51 push %ecx
10839f: 50 push %eax
1083a0: 8d 45 e4 lea -0x1c(%ebp),%eax
1083a3: 50 push %eax
1083a4: ff 75 08 pushl 0x8(%ebp)
1083a7: e8 08 01 00 00 call 1084b4 <rtems_filesystem_get_start_loc>
1083ac: 83 c4 10 add $0x10,%esp
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
1083af: 31 db xor %ebx,%ebx
1083b1: eb 25 jmp 1083d8 <rmdir+0x58>
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
1083b3: 83 ec 0c sub $0xc,%esp
1083b6: 6a 00 push $0x0
1083b8: 50 push %eax
1083b9: 6a 02 push $0x2
1083bb: ff 75 b4 pushl -0x4c(%ebp)
1083be: ff 75 08 pushl 0x8(%ebp)
1083c1: e8 88 f2 ff ff call 10764e <rtems_filesystem_evaluate_path>
1083c6: 89 c2 mov %eax,%edx
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
1083c8: 83 c4 20 add $0x20,%esp
return -1;
1083cb: 83 c8 ff or $0xffffffff,%eax
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
1083ce: 85 d2 test %edx,%edx
1083d0: 0f 85 d6 00 00 00 jne 1084ac <rmdir+0x12c> <== NEVER TAKEN
return -1;
free_parentloc = true;
1083d6: b3 01 mov $0x1,%bl
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
1083d8: 8d 7d bc lea -0x44(%ebp),%edi
1083db: 8d 75 d0 lea -0x30(%ebp),%esi
1083de: b9 05 00 00 00 mov $0x5,%ecx
1083e3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = pathname + parentpathlen;
1083e5: 8b 75 08 mov 0x8(%ebp),%esi
1083e8: 03 75 b4 add -0x4c(%ebp),%esi
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
1083eb: 83 c9 ff or $0xffffffff,%ecx
1083ee: 89 f7 mov %esi,%edi
1083f0: 31 c0 xor %eax,%eax
1083f2: f2 ae repnz scas %es:(%edi),%al
1083f4: f7 d1 not %ecx
1083f6: 49 dec %ecx
1083f7: 52 push %edx
1083f8: 52 push %edx
1083f9: 51 push %ecx
1083fa: 56 push %esi
1083fb: e8 ce f2 ff ff call 1076ce <rtems_filesystem_prefix_separators>
108400: 01 c6 add %eax,%esi
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
108402: 83 c9 ff or $0xffffffff,%ecx
108405: 89 f7 mov %esi,%edi
108407: 31 c0 xor %eax,%eax
108409: f2 ae repnz scas %es:(%edi),%al
10840b: f7 d1 not %ecx
10840d: 49 dec %ecx
10840e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
108415: 8d 7d bc lea -0x44(%ebp),%edi
108418: 57 push %edi
108419: 6a 00 push $0x0
10841b: 51 push %ecx
10841c: 56 push %esi
10841d: e8 ce f1 ff ff call 1075f0 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
108422: 83 c4 20 add $0x20,%esp
108425: 85 c0 test %eax,%eax
108427: 74 13 je 10843c <rmdir+0xbc>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
108429: 83 c8 ff or $0xffffffff,%eax
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
10842c: 84 db test %bl,%bl
10842e: 74 7c je 1084ac <rmdir+0x12c>
rtems_filesystem_freenode( &parentloc );
108430: 83 ec 0c sub $0xc,%esp
108433: 8d 55 d0 lea -0x30(%ebp),%edx
108436: 52 push %edx
108437: 89 45 b0 mov %eax,-0x50(%ebp)
10843a: eb 65 jmp 1084a1 <rmdir+0x121>
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
10843c: 83 ec 0c sub $0xc,%esp
10843f: 57 push %edi
108440: 8b 45 c8 mov -0x38(%ebp),%eax
108443: ff 50 10 call *0x10(%eax)
108446: 83 c4 10 add $0x10,%esp
108449: 48 dec %eax
10844a: 74 2f je 10847b <rmdir+0xfb>
rtems_filesystem_freenode( &loc );
10844c: 83 ec 0c sub $0xc,%esp
10844f: 57 push %edi
108450: e8 b7 f2 ff ff call 10770c <rtems_filesystem_freenode>
if ( free_parentloc )
108455: 83 c4 10 add $0x10,%esp
108458: 84 db test %bl,%bl
10845a: 74 0f je 10846b <rmdir+0xeb> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
10845c: 83 ec 0c sub $0xc,%esp
10845f: 8d 45 d0 lea -0x30(%ebp),%eax
108462: 50 push %eax
108463: e8 a4 f2 ff ff call 10770c <rtems_filesystem_freenode>
108468: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTDIR );
10846b: e8 d8 84 00 00 call 110948 <__errno>
108470: c7 00 14 00 00 00 movl $0x14,(%eax)
108476: 83 c8 ff or $0xffffffff,%eax
108479: eb 31 jmp 1084ac <rmdir+0x12c>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
10847b: 50 push %eax
10847c: 50 push %eax
10847d: 57 push %edi
10847e: 8d 75 d0 lea -0x30(%ebp),%esi
108481: 56 push %esi
108482: 8b 45 c4 mov -0x3c(%ebp),%eax
108485: ff 50 34 call *0x34(%eax)
rtems_filesystem_freenode( &loc );
108488: 89 3c 24 mov %edi,(%esp)
10848b: 89 45 b0 mov %eax,-0x50(%ebp)
10848e: e8 79 f2 ff ff call 10770c <rtems_filesystem_freenode>
if ( free_parentloc )
108493: 83 c4 10 add $0x10,%esp
108496: 84 db test %bl,%bl
108498: 8b 45 b0 mov -0x50(%ebp),%eax
10849b: 74 0f je 1084ac <rmdir+0x12c>
rtems_filesystem_freenode( &parentloc );
10849d: 83 ec 0c sub $0xc,%esp
1084a0: 56 push %esi
1084a1: e8 66 f2 ff ff call 10770c <rtems_filesystem_freenode>
1084a6: 83 c4 10 add $0x10,%esp
1084a9: 8b 45 b0 mov -0x50(%ebp),%eax
return result;
}
1084ac: 8d 65 f4 lea -0xc(%ebp),%esp
1084af: 5b pop %ebx
1084b0: 5e pop %esi
1084b1: 5f pop %edi
1084b2: c9 leave
1084b3: c3 ret
00106fe4 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
106fe4: 55 push %ebp
106fe5: 89 e5 mov %esp,%ebp
106fe7: 57 push %edi
106fe8: 56 push %esi
106fe9: 53 push %ebx
106fea: 83 ec 0c sub $0xc,%esp
106fed: 8b 45 08 mov 0x8(%ebp),%eax
106ff0: 8b 5d 0c mov 0xc(%ebp),%ebx
106ff3: 8b 75 10 mov 0x10(%ebp),%esi
const char *p;
if ( !name )
106ff6: 85 c0 test %eax,%eax
106ff8: 74 4c je 107046 <rtems_bsp_cmdline_get_param+0x62><== NEVER TAKEN
return NULL;
if ( !value )
106ffa: 85 db test %ebx,%ebx
106ffc: 74 4a je 107048 <rtems_bsp_cmdline_get_param+0x64><== NEVER TAKEN
return NULL;
if ( !length )
106ffe: 85 f6 test %esi,%esi
107000: 74 44 je 107046 <rtems_bsp_cmdline_get_param+0x62>
return NULL;
value[0] = '\0';
107002: c6 03 00 movb $0x0,(%ebx)
p = rtems_bsp_cmdline_get_param_raw( name );
107005: 83 ec 0c sub $0xc,%esp
107008: 50 push %eax
107009: e8 46 00 00 00 call 107054 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
10700e: 83 c4 10 add $0x10,%esp
107011: 85 c0 test %eax,%eax
107013: 74 31 je 107046 <rtems_bsp_cmdline_get_param+0x62>
107015: 31 ff xor %edi,%edi
107017: 31 d2 xor %edx,%edx
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
107019: 4e dec %esi
10701a: eb 1d jmp 107039 <rtems_bsp_cmdline_get_param+0x55>
if ( *p == '\"' ) {
10701c: 80 f9 22 cmp $0x22,%cl
10701f: 75 03 jne 107024 <rtems_bsp_cmdline_get_param+0x40>
quotes++;
107021: 47 inc %edi
107022: eb 0d jmp 107031 <rtems_bsp_cmdline_get_param+0x4d>
} else if ( ((quotes % 2) == 0) && *p == ' ' )
107024: f7 c7 01 00 00 00 test $0x1,%edi
10702a: 75 05 jne 107031 <rtems_bsp_cmdline_get_param+0x4d>
10702c: 80 f9 20 cmp $0x20,%cl
10702f: 74 17 je 107048 <rtems_bsp_cmdline_get_param+0x64>
break;
value[i++] = *p++;
107031: 88 0c 13 mov %cl,(%ebx,%edx,1)
107034: 42 inc %edx
value[i] = '\0';
107035: 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; ) {
107039: 8a 0c 10 mov (%eax,%edx,1),%cl
10703c: 84 c9 test %cl,%cl
10703e: 74 08 je 107048 <rtems_bsp_cmdline_get_param+0x64>
107040: 39 f2 cmp %esi,%edx
107042: 72 d8 jb 10701c <rtems_bsp_cmdline_get_param+0x38>
107044: eb 02 jmp 107048 <rtems_bsp_cmdline_get_param+0x64>
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
return NULL;
107046: 31 db xor %ebx,%ebx
copy_string( p, value, length );
return value;
}
107048: 89 d8 mov %ebx,%eax
10704a: 8d 65 f4 lea -0xc(%ebp),%esp
10704d: 5b pop %ebx
10704e: 5e pop %esi
10704f: 5f pop %edi
107050: c9 leave
107051: c3 ret
0010aa18 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
10aa18: 55 push %ebp
10aa19: 89 e5 mov %esp,%ebp
10aa1b: 56 push %esi
10aa1c: 53 push %ebx
10aa1d: 8b 5d 10 mov 0x10(%ebp),%ebx
10aa20: 8b 75 14 mov 0x14(%ebp),%esi
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Append_with_empty_check( chain, node );
10aa23: 50 push %eax
10aa24: 50 push %eax
10aa25: ff 75 0c pushl 0xc(%ebp)
10aa28: ff 75 08 pushl 0x8(%ebp)
10aa2b: e8 38 04 00 00 call 10ae68 <_Chain_Append_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
10aa30: 83 c4 10 add $0x10,%esp
10aa33: 84 c0 test %al,%al
10aa35: 74 11 je 10aa48 <rtems_chain_append_with_notification+0x30><== NEVER TAKEN
sc = rtems_event_send( task, events );
10aa37: 89 75 0c mov %esi,0xc(%ebp)
10aa3a: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10aa3d: 8d 65 f8 lea -0x8(%ebp),%esp
10aa40: 5b pop %ebx
10aa41: 5e pop %esi
10aa42: c9 leave
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
10aa43: e9 d4 f6 ff ff jmp 10a11c <rtems_event_send>
}
return sc;
}
10aa48: 31 c0 xor %eax,%eax <== NOT EXECUTED
10aa4a: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10aa4d: 5b pop %ebx <== NOT EXECUTED
10aa4e: 5e pop %esi <== NOT EXECUTED
10aa4f: c9 leave <== NOT EXECUTED
10aa50: c3 ret <== NOT EXECUTED
0010aa54 <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
10aa54: 55 push %ebp
10aa55: 89 e5 mov %esp,%ebp
10aa57: 56 push %esi
10aa58: 53 push %ebx
10aa59: 8b 5d 0c mov 0xc(%ebp),%ebx
10aa5c: 8b 75 10 mov 0x10(%ebp),%esi
RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node **node
)
{
return _Chain_Get_with_empty_check( chain, node );
10aa5f: 50 push %eax
10aa60: 50 push %eax
10aa61: ff 75 14 pushl 0x14(%ebp)
10aa64: ff 75 08 pushl 0x8(%ebp)
10aa67: e8 64 04 00 00 call 10aed0 <_Chain_Get_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
10aa6c: 83 c4 10 add $0x10,%esp
10aa6f: 84 c0 test %al,%al
10aa71: 74 11 je 10aa84 <rtems_chain_get_with_notification+0x30><== NEVER TAKEN
sc = rtems_event_send( task, events );
10aa73: 89 75 0c mov %esi,0xc(%ebp)
10aa76: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10aa79: 8d 65 f8 lea -0x8(%ebp),%esp
10aa7c: 5b pop %ebx
10aa7d: 5e pop %esi
10aa7e: c9 leave
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
10aa7f: e9 98 f6 ff ff jmp 10a11c <rtems_event_send>
}
return sc;
}
10aa84: 31 c0 xor %eax,%eax <== NOT EXECUTED
10aa86: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10aa89: 5b pop %ebx <== NOT EXECUTED
10aa8a: 5e pop %esi <== NOT EXECUTED
10aa8b: c9 leave <== NOT EXECUTED
10aa8c: c3 ret <== NOT EXECUTED
0010aa90 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10aa90: 55 push %ebp
10aa91: 89 e5 mov %esp,%ebp
10aa93: 57 push %edi
10aa94: 56 push %esi
10aa95: 53 push %ebx
10aa96: 83 ec 1c sub $0x1c,%esp
10aa99: 8b 7d 0c mov 0xc(%ebp),%edi
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
10aa9c: 8d 75 e4 lea -0x1c(%ebp),%esi
10aa9f: eb 13 jmp 10aab4 <rtems_chain_get_with_wait+0x24>
10aaa1: 56 push %esi
10aaa2: ff 75 10 pushl 0x10(%ebp)
10aaa5: 6a 00 push $0x0
10aaa7: 57 push %edi
10aaa8: e8 0f f5 ff ff call 109fbc <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10aaad: 83 c4 10 add $0x10,%esp
10aab0: 85 c0 test %eax,%eax
10aab2: 75 16 jne 10aaca <rtems_chain_get_with_wait+0x3a><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10aab4: 83 ec 0c sub $0xc,%esp
10aab7: ff 75 08 pushl 0x8(%ebp)
10aaba: e8 49 04 00 00 call 10af08 <_Chain_Get>
10aabf: 89 c3 mov %eax,%ebx
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10aac1: 83 c4 10 add $0x10,%esp
10aac4: 85 c0 test %eax,%eax
10aac6: 74 d9 je 10aaa1 <rtems_chain_get_with_wait+0x11>
10aac8: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10aaca: 8b 55 14 mov 0x14(%ebp),%edx
10aacd: 89 1a mov %ebx,(%edx)
return sc;
}
10aacf: 8d 65 f4 lea -0xc(%ebp),%esp
10aad2: 5b pop %ebx
10aad3: 5e pop %esi
10aad4: 5f pop %edi
10aad5: c9 leave
10aad6: c3 ret
0010aad8 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
10aad8: 55 push %ebp
10aad9: 89 e5 mov %esp,%ebp
10aadb: 56 push %esi
10aadc: 53 push %ebx
10aadd: 8b 5d 10 mov 0x10(%ebp),%ebx
10aae0: 8b 75 14 mov 0x14(%ebp),%esi
RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Prepend_with_empty_check( chain, node );
10aae3: 50 push %eax
10aae4: 50 push %eax
10aae5: ff 75 0c pushl 0xc(%ebp)
10aae8: ff 75 08 pushl 0x8(%ebp)
10aaeb: e8 5c 04 00 00 call 10af4c <_Chain_Prepend_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
10aaf0: 83 c4 10 add $0x10,%esp
10aaf3: 84 c0 test %al,%al
10aaf5: 74 11 je 10ab08 <rtems_chain_prepend_with_notification+0x30><== NEVER TAKEN
sc = rtems_event_send( task, events );
10aaf7: 89 75 0c mov %esi,0xc(%ebp)
10aafa: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10aafd: 8d 65 f8 lea -0x8(%ebp),%esp
10ab00: 5b pop %ebx
10ab01: 5e pop %esi
10ab02: c9 leave
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
10ab03: e9 14 f6 ff ff jmp 10a11c <rtems_event_send>
}
return sc;
}
10ab08: 31 c0 xor %eax,%eax <== NOT EXECUTED
10ab0a: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10ab0d: 5b pop %ebx <== NOT EXECUTED
10ab0e: 5e pop %esi <== NOT EXECUTED
10ab0f: c9 leave <== NOT EXECUTED
10ab10: c3 ret <== NOT EXECUTED
00107698 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
107698: 55 push %ebp
107699: 89 e5 mov %esp,%ebp
10769b: 57 push %edi
10769c: 56 push %esi
10769d: 53 push %ebx
10769e: 83 ec 6c sub $0x6c,%esp
1076a1: 8b 7d 08 mov 0x8(%ebp),%edi
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
1076a4: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
1076a8: 0f 84 44 01 00 00 je 1077f2 <rtems_cpu_usage_report_with_plugin+0x15a><== NEVER TAKEN
* When not using nanosecond CPU usage resolution, we have to count
* 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__
_TOD_Get_uptime( &uptime );
1076ae: 83 ec 0c sub $0xc,%esp
1076b1: 8d 5d d8 lea -0x28(%ebp),%ebx
1076b4: 53 push %ebx
1076b5: e8 ba 4a 00 00 call 10c174 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
1076ba: 83 c4 0c add $0xc,%esp
1076bd: 8d 75 d0 lea -0x30(%ebp),%esi
1076c0: 56 push %esi
1076c1: 53 push %ebx
1076c2: 68 1c ee 12 00 push $0x12ee1c
1076c7: e8 d0 69 00 00 call 10e09c <_Timespec_Subtract>
}
}
}
#endif
(*print)(
1076cc: 5b pop %ebx
1076cd: 5e pop %esi
1076ce: 68 e5 f7 11 00 push $0x11f7e5
1076d3: 57 push %edi
1076d4: ff 55 0c call *0xc(%ebp)
1076d7: 83 c4 10 add $0x10,%esp
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
1076da: bb 01 00 00 00 mov $0x1,%ebx
#if defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
1076df: 8b 04 9d 60 eb 12 00 mov 0x12eb60(,%ebx,4),%eax
1076e6: 8b 70 04 mov 0x4(%eax),%esi
if ( information ) {
1076e9: 85 f6 test %esi,%esi
1076eb: 0f 84 db 00 00 00 je 1077cc <rtems_cpu_usage_report_with_plugin+0x134><== NEVER TAKEN
1076f1: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp)
1076f8: 89 5d 94 mov %ebx,-0x6c(%ebp)
1076fb: e9 bc 00 00 00 jmp 1077bc <rtems_cpu_usage_report_with_plugin+0x124>
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
107700: 8b 46 1c mov 0x1c(%esi),%eax
107703: 8b 4d a4 mov -0x5c(%ebp),%ecx
107706: 8b 14 88 mov (%eax,%ecx,4),%edx
if ( !the_thread )
107709: 85 d2 test %edx,%edx
10770b: 0f 84 a8 00 00 00 je 1077b9 <rtems_cpu_usage_report_with_plugin+0x121>
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
107711: 51 push %ecx
107712: 8d 5d b3 lea -0x4d(%ebp),%ebx
107715: 53 push %ebx
107716: 6a 0d push $0xd
107718: ff 72 08 pushl 0x8(%edx)
10771b: 89 55 a0 mov %edx,-0x60(%ebp)
10771e: e8 95 39 00 00 call 10b0b8 <rtems_object_get_name>
(*print)(
107723: 53 push %ebx
107724: 8b 55 a0 mov -0x60(%ebp),%edx
107727: ff 72 08 pushl 0x8(%edx)
10772a: 68 57 f9 11 00 push $0x11f957
10772f: 57 push %edi
107730: ff 55 0c call *0xc(%ebp)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
107733: 8b 55 a0 mov -0x60(%ebp),%edx
107736: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx
10773c: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx
107742: 89 4d c8 mov %ecx,-0x38(%ebp)
107745: 89 5d cc mov %ebx,-0x34(%ebp)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
107748: 83 c4 20 add $0x20,%esp
10774b: a1 0c ee 12 00 mov 0x12ee0c,%eax
107750: 8b 5a 08 mov 0x8(%edx),%ebx
107753: 39 58 08 cmp %ebx,0x8(%eax)
107756: 75 28 jne 107780 <rtems_cpu_usage_report_with_plugin+0xe8>
Timestamp_Control used;
_Timestamp_Subtract(
107758: 50 push %eax
107759: 8d 45 c0 lea -0x40(%ebp),%eax
10775c: 50 push %eax
10775d: 8d 55 d8 lea -0x28(%ebp),%edx
107760: 52 push %edx
107761: 68 3c ec 12 00 push $0x12ec3c
107766: 89 45 a0 mov %eax,-0x60(%ebp)
107769: e8 2e 69 00 00 call 10e09c <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
10776e: 59 pop %ecx
10776f: 5b pop %ebx
107770: 8b 45 a0 mov -0x60(%ebp),%eax
107773: 50 push %eax
107774: 8d 45 c8 lea -0x38(%ebp),%eax
107777: 50 push %eax
107778: e8 33 68 00 00 call 10dfb0 <_Timespec_Add_to>
10777d: 83 c4 10 add $0x10,%esp
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
107780: 8d 4d e0 lea -0x20(%ebp),%ecx
107783: 51 push %ecx
107784: 8d 5d e4 lea -0x1c(%ebp),%ebx
107787: 53 push %ebx
107788: 8d 45 d0 lea -0x30(%ebp),%eax
10778b: 50 push %eax
10778c: 8d 4d c8 lea -0x38(%ebp),%ecx
10778f: 51 push %ecx
107790: e8 4b 68 00 00 call 10dfe0 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
107795: 58 pop %eax
107796: 5a pop %edx
107797: ff 75 e0 pushl -0x20(%ebp)
10779a: ff 75 e4 pushl -0x1c(%ebp)
10779d: 8b 45 cc mov -0x34(%ebp),%eax
1077a0: b9 e8 03 00 00 mov $0x3e8,%ecx
1077a5: 31 d2 xor %edx,%edx
1077a7: f7 f1 div %ecx
1077a9: 50 push %eax
1077aa: ff 75 c8 pushl -0x38(%ebp)
1077ad: 68 6a f9 11 00 push $0x11f96a
1077b2: 57 push %edi
1077b3: ff 55 0c call *0xc(%ebp)
1077b6: 83 c4 20 add $0x20,%esp
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
1077b9: ff 45 a4 incl -0x5c(%ebp)
1077bc: 0f b7 46 10 movzwl 0x10(%esi),%eax
1077c0: 39 45 a4 cmp %eax,-0x5c(%ebp)
1077c3: 0f 86 37 ff ff ff jbe 107700 <rtems_cpu_usage_report_with_plugin+0x68>
1077c9: 8b 5d 94 mov -0x6c(%ebp),%ebx
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
1077cc: 43 inc %ebx
1077cd: 83 fb 04 cmp $0x4,%ebx
1077d0: 0f 85 09 ff ff ff jne 1076df <rtems_cpu_usage_report_with_plugin+0x47>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
1077d6: 8b 45 d4 mov -0x2c(%ebp),%eax
1077d9: b9 e8 03 00 00 mov $0x3e8,%ecx
1077de: 31 d2 xor %edx,%edx
1077e0: f7 f1 div %ecx
1077e2: 50 push %eax
1077e3: ff 75 d0 pushl -0x30(%ebp)
1077e6: 68 82 f9 11 00 push $0x11f982
1077eb: 57 push %edi
1077ec: ff 55 0c call *0xc(%ebp)
1077ef: 83 c4 10 add $0x10,%esp
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
1077f2: 8d 65 f4 lea -0xc(%ebp),%esp
1077f5: 5b pop %ebx
1077f6: 5e pop %esi
1077f7: 5f pop %edi
1077f8: c9 leave
1077f9: c3 ret
00110170 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
110170: 55 push %ebp
110171: 89 e5 mov %esp,%ebp
110173: 53 push %ebx
110174: 83 ec 04 sub $0x4,%esp
110177: 8b 55 08 mov 0x8(%ebp),%edx
if (sc == RTEMS_SUCCESSFUL) {
return 0;
11017a: 31 c0 xor %eax,%eax
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
11017c: 85 d2 test %edx,%edx
11017e: 74 1b je 11019b <rtems_deviceio_errno+0x2b>
return 0;
} else {
int eno = EINVAL;
110180: bb 16 00 00 00 mov $0x16,%ebx
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
110185: 83 fa 1c cmp $0x1c,%edx
110188: 77 07 ja 110191 <rtems_deviceio_errno+0x21><== NEVER TAKEN
eno = status_code_to_errno [sc];
11018a: 8b 1c 95 ec dc 11 00 mov 0x11dcec(,%edx,4),%ebx
}
errno = eno;
110191: e8 22 00 00 00 call 1101b8 <__errno>
110196: 89 18 mov %ebx,(%eax)
return -1;
110198: 83 c8 ff or $0xffffffff,%eax
}
}
11019b: 5a pop %edx
11019c: 5b pop %ebx
11019d: c9 leave
11019e: c3 ret
0010e16f <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
10e16f: 55 push %ebp
10e170: 89 e5 mov %esp,%ebp
10e172: 83 ec 18 sub $0x18,%esp
10e175: 8b 45 08 mov 0x8(%ebp),%eax
find_arg fa = {
10e178: 89 45 f0 mov %eax,-0x10(%ebp)
10e17b: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
10e182: 85 c0 test %eax,%eax
10e184: 74 13 je 10e199 <rtems_filesystem_get_mount_handler+0x2a><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
10e186: 50 push %eax
10e187: 50 push %eax
10e188: 8d 45 f0 lea -0x10(%ebp),%eax
10e18b: 50 push %eax
10e18c: 68 98 e0 10 00 push $0x10e098
10e191: e8 62 ff ff ff call 10e0f8 <rtems_filesystem_iterate>
10e196: 83 c4 10 add $0x10,%esp
}
return fa.mount_h;
}
10e199: 8b 45 f4 mov -0xc(%ebp),%eax
10e19c: c9 leave
10e19d: c3 ret
001070ec <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 )
{
1070ec: 55 push %ebp
1070ed: 89 e5 mov %esp,%ebp
1070ef: 57 push %edi
1070f0: 56 push %esi
1070f1: 53 push %ebx
1070f2: 83 ec 2c sub $0x2c,%esp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1070f5: a1 50 10 12 00 mov 0x121050,%eax
1070fa: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
107101: 83 3d a0 bf 11 00 00 cmpl $0x0,0x11bfa0
107108: 75 0a jne 107114 <rtems_filesystem_initialize+0x28><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
10710a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10710d: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED
107112: eb 28 jmp 10713c <rtems_filesystem_initialize+0x50><== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
107114: a1 4c f1 11 00 mov 0x11f14c,%eax
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
107119: 83 ec 0c sub $0xc,%esp
10711c: 6a 00 push $0x0
10711e: ff 70 04 pushl 0x4(%eax)
107121: ff 30 pushl (%eax)
107123: ff 70 0c pushl 0xc(%eax)
107126: ff 70 08 pushl 0x8(%eax)
107129: e8 77 06 00 00 call 1077a5 <mount>
if ( status == -1 )
10712e: 83 c4 20 add $0x20,%esp
107131: 40 inc %eax
107132: 75 0d jne 107141 <rtems_filesystem_initialize+0x55><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
107134: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107137: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED
10713c: e8 d3 35 00 00 call 10a714 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_filesystem_link_counts = 0;
107141: a1 50 10 12 00 mov 0x121050,%eax
107146: 66 c7 40 30 00 00 movw $0x0,0x30(%eax)
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
10714c: 83 ec 0c sub $0xc,%esp
10714f: 6a 00 push $0x0
107151: 8d 5d d4 lea -0x2c(%ebp),%ebx
107154: 53 push %ebx
107155: 6a 00 push $0x0
107157: 6a 01 push $0x1
107159: 68 c8 d6 11 00 push $0x11d6c8
10715e: e8 03 01 00 00 call 107266 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
107163: 8b 3d 50 10 12 00 mov 0x121050,%edi
107169: 83 c7 18 add $0x18,%edi
10716c: b9 05 00 00 00 mov $0x5,%ecx
107171: 89 de mov %ebx,%esi
107173: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
107175: 83 c4 14 add $0x14,%esp
107178: 6a 00 push $0x0
10717a: 53 push %ebx
10717b: 6a 00 push $0x0
10717d: 6a 01 push $0x1
10717f: 68 c8 d6 11 00 push $0x11d6c8
107184: e8 dd 00 00 00 call 107266 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
107189: 8b 3d 50 10 12 00 mov 0x121050,%edi
10718f: 83 c7 04 add $0x4,%edi
107192: b9 05 00 00 00 mov $0x5,%ecx
107197: 89 de mov %ebx,%esi
107199: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
10719b: 83 c4 18 add $0x18,%esp
10719e: 68 ff 01 00 00 push $0x1ff
1071a3: 68 ca d6 11 00 push $0x11d6ca
1071a8: e8 c3 04 00 00 call 107670 <mkdir>
if ( status != 0 )
1071ad: 83 c4 10 add $0x10,%esp
1071b0: 85 c0 test %eax,%eax
1071b2: 74 0d je 1071c1 <rtems_filesystem_initialize+0xd5><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0003 );
1071b4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1071b7: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED
1071bc: e9 7b ff ff ff jmp 10713c <rtems_filesystem_initialize+0x50><== NOT EXECUTED
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
1071c1: 8d 65 f4 lea -0xc(%ebp),%esp
1071c4: 5b pop %ebx
1071c5: 5e pop %esi
1071c6: 5f pop %edi
1071c7: c9 leave
1071c8: c3 ret
0010e0f8 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
10e0f8: 55 push %ebp
10e0f9: 89 e5 mov %esp,%ebp
10e0fb: 57 push %edi
10e0fc: 56 push %esi
10e0fd: 53 push %ebx
10e0fe: 83 ec 1c sub $0x1c,%esp
10e101: 8b 75 08 mov 0x8(%ebp),%esi
10e104: 8b 7d 0c mov 0xc(%ebp),%edi
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
10e107: 31 c0 xor %eax,%eax
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
10e109: bb 80 bf 11 00 mov $0x11bf80,%ebx
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10e10e: eb 0c jmp 10e11c <rtems_filesystem_iterate+0x24>
stop = (*routine)( table_entry, routine_arg );
10e110: 51 push %ecx
10e111: 51 push %ecx
10e112: 57 push %edi
10e113: 53 push %ebx
10e114: ff d6 call *%esi
++table_entry;
10e116: 83 c3 08 add $0x8,%ebx
10e119: 83 c4 10 add $0x10,%esp
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10e11c: 83 3b 00 cmpl $0x0,(%ebx)
10e11f: 74 06 je 10e127 <rtems_filesystem_iterate+0x2f>
10e121: 84 c0 test %al,%al
10e123: 74 eb je 10e110 <rtems_filesystem_iterate+0x18>
10e125: eb 40 jmp 10e167 <rtems_filesystem_iterate+0x6f>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
10e127: 84 c0 test %al,%al
10e129: 75 3c jne 10e167 <rtems_filesystem_iterate+0x6f>
rtems_libio_lock();
10e12b: 88 45 e4 mov %al,-0x1c(%ebp)
10e12e: e8 95 ff ff ff call 10e0c8 <rtems_libio_lock>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
10e133: 8b 1d 74 10 12 00 mov 0x121074,%ebx
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
10e139: 8a 55 e4 mov -0x1c(%ebp),%dl
10e13c: eb 10 jmp 10e14e <rtems_filesystem_iterate+0x56>
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
10e13e: 52 push %edx
10e13f: 52 push %edx
10e140: 57 push %edi
10e141: 8d 43 08 lea 0x8(%ebx),%eax
10e144: 50 push %eax
10e145: ff d6 call *%esi
10e147: 88 c2 mov %al,%dl
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
10e149: 8b 1b mov (%ebx),%ebx
10e14b: 83 c4 10 add $0x10,%esp
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
10e14e: 81 fb 78 10 12 00 cmp $0x121078,%ebx
10e154: 74 04 je 10e15a <rtems_filesystem_iterate+0x62>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
10e156: 84 d2 test %dl,%dl
10e158: 74 e4 je 10e13e <rtems_filesystem_iterate+0x46><== ALWAYS TAKEN
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
}
rtems_libio_unlock();
10e15a: 88 55 e4 mov %dl,-0x1c(%ebp)
10e15d: e8 80 ff ff ff call 10e0e2 <rtems_libio_unlock>
10e162: 8a 55 e4 mov -0x1c(%ebp),%dl
10e165: 88 d0 mov %dl,%al
}
return stop;
}
10e167: 8d 65 f4 lea -0xc(%ebp),%esp
10e16a: 5b pop %ebx
10e16b: 5e pop %esi
10e16c: 5f pop %edi
10e16d: c9 leave
10e16e: c3 ret
0010775d <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
10775d: 55 push %ebp
10775e: 89 e5 mov %esp,%ebp
107760: 57 push %edi
107761: 56 push %esi
107762: 53 push %ebx
107763: 83 ec 1c sub $0x1c,%esp
107766: 8b 7d 08 mov 0x8(%ebp),%edi
107769: 8b 75 0c mov 0xc(%ebp),%esi
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
10776c: e8 bc ff ff ff call 10772d <rtems_libio_lock>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
107771: 8b 1d 34 0f 12 00 mov 0x120f34,%ebx
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
rtems_chain_node *node = NULL;
bool stop = false;
107777: 31 c0 xor %eax,%eax
rtems_libio_lock();
for (
107779: eb 0b jmp 107786 <rtems_filesystem_mount_iterate+0x29>
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
10777b: 50 push %eax
10777c: 50 push %eax
10777d: 56 push %esi
10777e: 53 push %ebx
10777f: ff d7 call *%edi
}
rtems_libio_unlock();
return stop;
}
107781: 8b 1b mov (%ebx),%ebx
107783: 83 c4 10 add $0x10,%esp
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
107786: 81 fb 38 0f 12 00 cmp $0x120f38,%ebx
10778c: 74 04 je 107792 <rtems_filesystem_mount_iterate+0x35>
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
10778e: 84 c0 test %al,%al
107790: 74 e9 je 10777b <rtems_filesystem_mount_iterate+0x1e><== ALWAYS TAKEN
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
107792: 88 45 e4 mov %al,-0x1c(%ebp)
107795: e8 ad ff ff ff call 107747 <rtems_libio_unlock>
return stop;
}
10779a: 8a 45 e4 mov -0x1c(%ebp),%al
10779d: 8d 65 f4 lea -0xc(%ebp),%esp
1077a0: 5b pop %ebx
1077a1: 5e pop %esi
1077a2: 5f pop %edi
1077a3: c9 leave
1077a4: c3 ret
001072e6 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
1072e6: 55 push %ebp
1072e7: 89 e5 mov %esp,%ebp
1072e9: 57 push %edi
1072ea: 56 push %esi
1072eb: 53 push %ebx
1072ec: 83 ec 0c sub $0xc,%esp
1072ef: 8b 7d 08 mov 0x8(%ebp),%edi
1072f2: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
1072f5: 31 db xor %ebx,%ebx
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
1072f7: eb 01 jmp 1072fa <rtems_filesystem_prefix_separators+0x14>
{
pathname++;
pathnamelen--;
stripped++;
1072f9: 43 inc %ebx
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
1072fa: 8a 04 1f mov (%edi,%ebx,1),%al
1072fd: 39 de cmp %ebx,%esi
1072ff: 74 17 je 107318 <rtems_filesystem_prefix_separators+0x32><== NEVER TAKEN
107301: 84 c0 test %al,%al
107303: 74 13 je 107318 <rtems_filesystem_prefix_separators+0x32><== NEVER TAKEN
107305: 83 ec 0c sub $0xc,%esp
107308: 0f be c0 movsbl %al,%eax
10730b: 50 push %eax
10730c: e8 df 0c 00 00 call 107ff0 <rtems_filesystem_is_separator>
107311: 83 c4 10 add $0x10,%esp
107314: 85 c0 test %eax,%eax
107316: 75 e1 jne 1072f9 <rtems_filesystem_prefix_separators+0x13>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
107318: 89 d8 mov %ebx,%eax
10731a: 8d 65 f4 lea -0xc(%ebp),%esp
10731d: 5b pop %ebx
10731e: 5e pop %esi
10731f: 5f pop %edi
107320: c9 leave
107321: c3 ret
00107c07 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
107c07: 55 push %ebp
107c08: 89 e5 mov %esp,%ebp
107c0a: 53 push %ebx
107c0b: 83 ec 0c sub $0xc,%esp
107c0e: 8b 5d 08 mov 0x8(%ebp),%ebx
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: delete key=%x\n", key );
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
107c11: 53 push %ebx
107c12: 6a 00 push $0x0
107c14: e8 6b 34 00 00 call 10b084 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
107c19: 83 c4 10 add $0x10,%esp
107c1c: 85 c0 test %eax,%eax
107c1e: 75 11 jne 107c31 <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
107c20: 85 db test %ebx,%ebx
107c22: 74 0d je 107c31 <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
107c24: 83 ec 0c sub $0xc,%esp
107c27: ff 33 pushl (%ebx)
107c29: e8 4a fe ff ff call 107a78 <free>
107c2e: 83 c4 10 add $0x10,%esp
return 0;
}
key = NULL;
return 0;
}
107c31: 31 c0 xor %eax,%eax
107c33: 8b 5d fc mov -0x4(%ebp),%ebx
107c36: c9 leave
107c37: c3 ret
00107b64 <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))
{
107b64: 55 push %ebp
107b65: 89 e5 mov %esp,%ebp
107b67: 56 push %esi
107b68: 53 push %ebx
107b69: 83 ec 10 sub $0x10,%esp
107b6c: 8b 5d 08 mov 0x8(%ebp),%ebx
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
107b6f: 8b 03 mov (%ebx),%eax
107b71: 85 c0 test %eax,%eax
107b73: 75 3f jne 107bb4 <rtems_gxx_once+0x50>
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
107b75: 52 push %edx
107b76: 8d 45 f4 lea -0xc(%ebp),%eax
107b79: 50 push %eax
107b7a: 68 00 01 00 00 push $0x100
107b7f: 68 00 01 00 00 push $0x100
107b84: e8 e7 32 00 00 call 10ae70 <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
107b89: 8b 33 mov (%ebx),%esi
107b8b: 83 c4 10 add $0x10,%esp
107b8e: 85 f6 test %esi,%esi
107b90: 75 06 jne 107b98 <rtems_gxx_once+0x34> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
107b92: c7 03 01 00 00 00 movl $0x1,(%ebx)
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
107b98: 50 push %eax
107b99: 8d 45 f4 lea -0xc(%ebp),%eax
107b9c: 50 push %eax
107b9d: 68 00 01 00 00 push $0x100
107ba2: ff 75 f4 pushl -0xc(%ebp)
107ba5: e8 c6 32 00 00 call 10ae70 <rtems_task_mode>
if ( o == 0 )
107baa: 83 c4 10 add $0x10,%esp
107bad: 85 f6 test %esi,%esi
107baf: 75 03 jne 107bb4 <rtems_gxx_once+0x50> <== NEVER TAKEN
(*func)();
107bb1: ff 55 0c call *0xc(%ebp)
}
return 0;
}
107bb4: 31 c0 xor %eax,%eax
107bb6: 8d 65 f8 lea -0x8(%ebp),%esp
107bb9: 5b pop %ebx
107bba: 5e pop %esi
107bbb: c9 leave
107bbc: c3 ret
00107c90 <rtems_gxx_setspecific>:
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
107c90: 55 push %ebp
107c91: 89 e5 mov %esp,%ebp
107c93: 53 push %ebx
107c94: 83 ec 08 sub $0x8,%esp
107c97: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
107c9a: ff 73 04 pushl 0x4(%ebx)
107c9d: 53 push %ebx
107c9e: 6a 00 push $0x0
107ca0: e8 4b 33 00 00 call 10aff0 <rtems_task_variable_add>
107ca5: 89 c2 mov %eax,%edx
if ( status == RTEMS_SUCCESSFUL ) {
107ca7: 83 c4 10 add $0x10,%esp
/* now let's set the proper value */
key->val = (void *)ptr;
return 0;
}
return -1;
107caa: 83 c8 ff or $0xffffffff,%eax
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
if ( status == RTEMS_SUCCESSFUL ) {
107cad: 85 d2 test %edx,%edx
107caf: 75 07 jne 107cb8 <rtems_gxx_setspecific+0x28><== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
107cb1: 8b 45 0c mov 0xc(%ebp),%eax
107cb4: 89 03 mov %eax,(%ebx)
return 0;
107cb6: 31 c0 xor %eax,%eax
}
return -1;
}
107cb8: 8b 5d fc mov -0x4(%ebp),%ebx
107cbb: c9 leave
107cbc: c3 ret
0010a920 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
10a920: 55 push %ebp
10a921: 89 e5 mov %esp,%ebp
10a923: 83 ec 08 sub $0x8,%esp
if (
10a926: 83 3d d8 9c 12 00 03 cmpl $0x3,0x129cd8
10a92d: 75 0d jne 10a93c <rtems_heap_allocate_aligned_with_boundary+0x1c><== NEVER TAKEN
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
10a92f: e8 34 f1 ff ff call 109a68 <malloc_is_system_state_OK>
10a934: 88 c2 mov %al,%dl
) {
return NULL;
10a936: 31 c0 xor %eax,%eax
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
10a938: 84 d2 test %dl,%dl
10a93a: 74 1c je 10a958 <rtems_heap_allocate_aligned_with_boundary+0x38>
) {
return NULL;
}
malloc_deferred_frees_process();
10a93c: e8 65 f1 ff ff call 109aa6 <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
10a941: ff 75 10 pushl 0x10(%ebp)
10a944: ff 75 0c pushl 0xc(%ebp)
10a947: ff 75 08 pushl 0x8(%ebp)
10a94a: ff 35 50 51 12 00 pushl 0x125150
10a950: e8 03 43 00 00 call 10ec58 <_Protected_heap_Allocate_aligned_with_boundary>
10a955: 83 c4 10 add $0x10,%esp
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
10a958: c9 leave
10a959: c3 ret
00107012 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
107012: 55 push %ebp
107013: 89 e5 mov %esp,%ebp
107015: 57 push %edi
107016: 56 push %esi
107017: 53 push %ebx
107018: 83 ec 48 sub $0x48,%esp
10701b: 8b 75 08 mov 0x8(%ebp),%esi
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
10701e: 31 c0 xor %eax,%eax
107020: 83 c9 ff or $0xffffffff,%ecx
107023: 89 f7 mov %esi,%edi
107025: f2 ae repnz scas %es:(%edi),%al
107027: f7 d1 not %ecx
107029: 49 dec %ecx
10702a: 6a 01 push $0x1
10702c: 8d 55 d4 lea -0x2c(%ebp),%edx
10702f: 52 push %edx
107030: 6a 00 push $0x0
107032: 51 push %ecx
107033: 56 push %esi
107034: 89 55 c4 mov %edx,-0x3c(%ebp)
107037: e8 2a 02 00 00 call 107266 <rtems_filesystem_evaluate_path>
10703c: 89 c7 mov %eax,%edi
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
10703e: 8b 5d d4 mov -0x2c(%ebp),%ebx
node_type = (*loc.ops->node_type_h)( &loc );
107041: 83 c4 14 add $0x14,%esp
107044: 8b 55 c4 mov -0x3c(%ebp),%edx
107047: 52 push %edx
107048: 8b 45 e0 mov -0x20(%ebp),%eax
10704b: ff 50 10 call *0x10(%eax)
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
10704e: 83 c4 10 add $0x10,%esp
107051: 83 f8 02 cmp $0x2,%eax
107054: 8b 55 c4 mov -0x3c(%ebp),%edx
107057: 75 07 jne 107060 <rtems_io_lookup_name+0x4e>
107059: 85 ff test %edi,%edi
10705b: 0f 95 c0 setne %al
10705e: 74 16 je 107076 <rtems_io_lookup_name+0x64><== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
107060: 83 ec 0c sub $0xc,%esp
107063: 8d 45 d4 lea -0x2c(%ebp),%eax
107066: 50 push %eax
107067: e8 b8 02 00 00 call 107324 <rtems_filesystem_freenode>
return RTEMS_UNSATISFIED;
10706c: 83 c4 10 add $0x10,%esp
10706f: b8 0d 00 00 00 mov $0xd,%eax
107074: eb 32 jmp 1070a8 <rtems_io_lookup_name+0x96>
}
device_info->device_name = (char *) name;
107076: 8b 4d 0c mov 0xc(%ebp),%ecx
107079: 89 31 mov %esi,(%ecx)
device_info->device_name_length = strlen( name );
10707b: 83 c9 ff or $0xffffffff,%ecx
10707e: 89 f7 mov %esi,%edi
107080: f2 ae repnz scas %es:(%edi),%al
107082: f7 d1 not %ecx
107084: 49 dec %ecx
107085: 8b 45 0c mov 0xc(%ebp),%eax
107088: 89 48 04 mov %ecx,0x4(%eax)
device_info->major = the_jnode->info.device.major;
10708b: 8b 43 50 mov 0x50(%ebx),%eax
10708e: 8b 4d 0c mov 0xc(%ebp),%ecx
107091: 89 41 08 mov %eax,0x8(%ecx)
device_info->minor = the_jnode->info.device.minor;
107094: 8b 43 54 mov 0x54(%ebx),%eax
107097: 89 41 0c mov %eax,0xc(%ecx)
rtems_filesystem_freenode( &loc );
10709a: 83 ec 0c sub $0xc,%esp
10709d: 52 push %edx
10709e: e8 81 02 00 00 call 107324 <rtems_filesystem_freenode>
return RTEMS_SUCCESSFUL;
1070a3: 83 c4 10 add $0x10,%esp
1070a6: 31 c0 xor %eax,%eax
}
1070a8: 8d 65 f4 lea -0xc(%ebp),%esp
1070ab: 5b pop %ebx
1070ac: 5e pop %esi
1070ad: 5f pop %edi
1070ae: c9 leave
1070af: c3 ret
0010b700 <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
)
{
10b700: 55 push %ebp
10b701: 89 e5 mov %esp,%ebp
10b703: 57 push %edi
10b704: 56 push %esi
10b705: 53 push %ebx
10b706: 83 ec 0c sub $0xc,%esp
10b709: 8b 5d 08 mov 0x8(%ebp),%ebx
10b70c: 8b 75 0c mov 0xc(%ebp),%esi
10b70f: 8b 45 10 mov 0x10(%ebp),%eax
rtems_device_major_number major_limit = _IO_Number_of_drivers;
10b712: 8b 15 fc 65 12 00 mov 0x1265fc,%edx
if ( rtems_interrupt_is_in_progress() )
10b718: 83 3d 64 65 12 00 00 cmpl $0x0,0x126564
10b71f: 0f 85 cc 00 00 00 jne 10b7f1 <rtems_io_register_driver+0xf1><== NEVER TAKEN
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
10b725: 85 c0 test %eax,%eax
10b727: 0f 84 cb 00 00 00 je 10b7f8 <rtems_io_register_driver+0xf8>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
10b72d: 89 10 mov %edx,(%eax)
if ( driver_table == NULL )
10b72f: 85 f6 test %esi,%esi
10b731: 0f 84 c1 00 00 00 je 10b7f8 <rtems_io_register_driver+0xf8>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10b737: 83 3e 00 cmpl $0x0,(%esi)
10b73a: 0f 85 cc 00 00 00 jne 10b80c <rtems_io_register_driver+0x10c>
10b740: 83 7e 04 00 cmpl $0x0,0x4(%esi)
10b744: 0f 85 c2 00 00 00 jne 10b80c <rtems_io_register_driver+0x10c>
10b74a: e9 a9 00 00 00 jmp 10b7f8 <rtems_io_register_driver+0xf8>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b74f: 8b 15 24 63 12 00 mov 0x126324,%edx
10b755: 42 inc %edx
10b756: 89 15 24 63 12 00 mov %edx,0x126324
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
10b75c: 85 db test %ebx,%ebx
10b75e: 75 32 jne 10b792 <rtems_io_register_driver+0x92>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
10b760: 8b 0d fc 65 12 00 mov 0x1265fc,%ecx
10b766: 8b 15 00 66 12 00 mov 0x126600,%edx
10b76c: eb 15 jmp 10b783 <rtems_io_register_driver+0x83>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10b76e: 83 3a 00 cmpl $0x0,(%edx)
10b771: 0f 85 9f 00 00 00 jne 10b816 <rtems_io_register_driver+0x116>
10b777: 83 7a 04 00 cmpl $0x0,0x4(%edx)
10b77b: 0f 85 95 00 00 00 jne 10b816 <rtems_io_register_driver+0x116>
10b781: eb 04 jmp 10b787 <rtems_io_register_driver+0x87>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10b783: 39 cb cmp %ecx,%ebx
10b785: 72 e7 jb 10b76e <rtems_io_register_driver+0x6e>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10b787: 89 18 mov %ebx,(%eax)
if ( m != n )
10b789: 39 cb cmp %ecx,%ebx
10b78b: 75 30 jne 10b7bd <rtems_io_register_driver+0xbd>
10b78d: e9 8d 00 00 00 jmp 10b81f <rtems_io_register_driver+0x11f>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
10b792: 6b d3 18 imul $0x18,%ebx,%edx
10b795: 03 15 00 66 12 00 add 0x126600,%edx
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10b79b: 31 c9 xor %ecx,%ecx
10b79d: 83 3a 00 cmpl $0x0,(%edx)
10b7a0: 75 09 jne 10b7ab <rtems_io_register_driver+0xab>
10b7a2: 31 c9 xor %ecx,%ecx
10b7a4: 83 7a 04 00 cmpl $0x0,0x4(%edx)
10b7a8: 0f 94 c1 sete %cl
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
10b7ab: 85 c9 test %ecx,%ecx
10b7ad: 75 0c jne 10b7bb <rtems_io_register_driver+0xbb>
_Thread_Enable_dispatch();
10b7af: e8 52 17 00 00 call 10cf06 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10b7b4: b8 0c 00 00 00 mov $0xc,%eax
10b7b9: eb 49 jmp 10b804 <rtems_io_register_driver+0x104>
}
*registered_major = major;
10b7bb: 89 18 mov %ebx,(%eax)
}
_IO_Driver_address_table [major] = *driver_table;
10b7bd: 6b c3 18 imul $0x18,%ebx,%eax
10b7c0: 03 05 00 66 12 00 add 0x126600,%eax
10b7c6: b9 06 00 00 00 mov $0x6,%ecx
10b7cb: 89 c7 mov %eax,%edi
10b7cd: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
10b7cf: e8 32 17 00 00 call 10cf06 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
10b7d4: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
10b7db: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp)
10b7e2: 89 5d 08 mov %ebx,0x8(%ebp)
}
10b7e5: 83 c4 0c add $0xc,%esp
10b7e8: 5b pop %ebx
10b7e9: 5e pop %esi
10b7ea: 5f pop %edi
10b7eb: c9 leave
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10b7ec: e9 e3 65 00 00 jmp 111dd4 <rtems_io_initialize>
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
10b7f1: b8 12 00 00 00 mov $0x12,%eax
10b7f6: eb 0c jmp 10b804 <rtems_io_register_driver+0x104>
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
10b7f8: b8 09 00 00 00 mov $0x9,%eax
10b7fd: eb 05 jmp 10b804 <rtems_io_register_driver+0x104>
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
10b7ff: 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 );
}
10b804: 83 c4 0c add $0xc,%esp
10b807: 5b pop %ebx
10b808: 5e pop %esi
10b809: 5f pop %edi
10b80a: c9 leave
10b80b: c3 ret
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
10b80c: 39 d3 cmp %edx,%ebx
10b80e: 0f 82 3b ff ff ff jb 10b74f <rtems_io_register_driver+0x4f>
10b814: eb e9 jmp 10b7ff <rtems_io_register_driver+0xff>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10b816: 43 inc %ebx
10b817: 83 c2 18 add $0x18,%edx
10b81a: e9 64 ff ff ff jmp 10b783 <rtems_io_register_driver+0x83>
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
10b81f: e8 e2 16 00 00 call 10cf06 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
10b824: 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;
10b829: eb d9 jmp 10b804 <rtems_io_register_driver+0x104>
0010c680 <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)
{
10c680: 55 push %ebp
10c681: 89 e5 mov %esp,%ebp
10c683: 57 push %edi
10c684: 56 push %esi
10c685: 53 push %ebx
10c686: 83 ec 0c sub $0xc,%esp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10c689: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
10c68d: 74 3d je 10c6cc <rtems_iterate_over_all_threads+0x4c><== NEVER TAKEN
10c68f: bb 01 00 00 00 mov $0x1,%ebx
#if defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10c694: 8b 04 9d 60 eb 12 00 mov 0x12eb60(,%ebx,4),%eax
10c69b: 8b 78 04 mov 0x4(%eax),%edi
if ( !information )
10c69e: be 01 00 00 00 mov $0x1,%esi
10c6a3: 85 ff test %edi,%edi
10c6a5: 75 17 jne 10c6be <rtems_iterate_over_all_threads+0x3e>
10c6a7: eb 1d jmp 10c6c6 <rtems_iterate_over_all_threads+0x46>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
10c6a9: 8b 47 1c mov 0x1c(%edi),%eax
10c6ac: 8b 04 b0 mov (%eax,%esi,4),%eax
if ( !the_thread )
10c6af: 85 c0 test %eax,%eax
10c6b1: 74 0a je 10c6bd <rtems_iterate_over_all_threads+0x3d>
continue;
(*routine)(the_thread);
10c6b3: 83 ec 0c sub $0xc,%esp
10c6b6: 50 push %eax
10c6b7: ff 55 08 call *0x8(%ebp)
10c6ba: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10c6bd: 46 inc %esi
10c6be: 0f b7 47 10 movzwl 0x10(%edi),%eax
10c6c2: 39 c6 cmp %eax,%esi
10c6c4: 76 e3 jbe 10c6a9 <rtems_iterate_over_all_threads+0x29>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10c6c6: 43 inc %ebx
10c6c7: 83 fb 04 cmp $0x4,%ebx
10c6ca: 75 c8 jne 10c694 <rtems_iterate_over_all_threads+0x14>
(*routine)(the_thread);
}
}
}
10c6cc: 8d 65 f4 lea -0xc(%ebp),%esp
10c6cf: 5b pop %ebx
10c6d0: 5e pop %esi
10c6d1: 5f pop %edi
10c6d2: c9 leave
10c6d3: c3 ret
0010dfcc <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
10dfcc: 55 push %ebp
10dfcd: 89 e5 mov %esp,%ebp
10dfcf: 53 push %ebx
10dfd0: 83 ec 04 sub $0x4,%esp
10dfd3: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_lock();
10dfd6: e8 d5 fe ff ff call 10deb0 <rtems_libio_lock>
if (iop->sem)
10dfdb: 8b 43 2c mov 0x2c(%ebx),%eax
10dfde: 85 c0 test %eax,%eax
10dfe0: 74 0c je 10dfee <rtems_libio_free+0x22> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
10dfe2: 83 ec 0c sub $0xc,%esp
10dfe5: 50 push %eax
10dfe6: e8 d9 c0 ff ff call 10a0c4 <rtems_semaphore_delete>
10dfeb: 83 c4 10 add $0x10,%esp
iop->flags &= ~LIBIO_FLAGS_OPEN;
10dfee: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx)
iop->data1 = rtems_libio_iop_freelist;
10dff5: a1 1c 31 12 00 mov 0x12311c,%eax
10dffa: 89 43 34 mov %eax,0x34(%ebx)
rtems_libio_iop_freelist = iop;
10dffd: 89 1d 1c 31 12 00 mov %ebx,0x12311c
rtems_libio_unlock();
}
10e003: 8b 5d fc mov -0x4(%ebp),%ebx
10e006: c9 leave
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
rtems_libio_unlock();
10e007: e9 be fe ff ff jmp 10deca <rtems_libio_unlock>
00107424 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
107424: 55 push %ebp
107425: 89 e5 mov %esp,%ebp
107427: 53 push %ebx
107428: 83 ec 04 sub $0x4,%esp
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
10742b: 8b 1d 44 f1 11 00 mov 0x11f144,%ebx
107431: 85 db test %ebx,%ebx
107433: 74 3e je 107473 <rtems_libio_init+0x4f> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
107435: 50 push %eax
107436: 50 push %eax
107437: 6a 38 push $0x38
107439: 53 push %ebx
10743a: e8 8d fd ff ff call 1071cc <calloc>
10743f: a3 18 31 12 00 mov %eax,0x123118
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
107444: 83 c4 10 add $0x10,%esp
107447: 85 c0 test %eax,%eax
107449: 75 07 jne 107452 <rtems_libio_init+0x2e>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
10744b: 83 ec 0c sub $0xc,%esp
10744e: 6a 1a push $0x1a
107450: eb 44 jmp 107496 <rtems_libio_init+0x72>
iop = rtems_libio_iop_freelist = rtems_libio_iops;
107452: a3 1c 31 12 00 mov %eax,0x12311c
107457: 89 c2 mov %eax,%edx
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
107459: 31 c9 xor %ecx,%ecx
10745b: eb 03 jmp 107460 <rtems_libio_init+0x3c>
iop->data1 = iop + 1;
10745d: 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++)
107460: 41 inc %ecx
107461: 83 c2 38 add $0x38,%edx
107464: 39 d9 cmp %ebx,%ecx
107466: 72 f5 jb 10745d <rtems_libio_init+0x39>
iop->data1 = iop + 1;
iop->data1 = NULL;
107468: 6b db 38 imul $0x38,%ebx,%ebx
10746b: c7 44 18 fc 00 00 00 movl $0x0,-0x4(%eax,%ebx,1)
107472: 00
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
107473: 83 ec 0c sub $0xc,%esp
107476: 68 20 31 12 00 push $0x123120
10747b: 6a 00 push $0x0
10747d: 6a 54 push $0x54
10747f: 6a 01 push $0x1
107481: 68 4f 49 42 4c push $0x4c42494f
107486: e8 a1 2a 00 00 call 109f2c <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
10748b: 83 c4 20 add $0x20,%esp
10748e: 85 c0 test %eax,%eax
107490: 74 09 je 10749b <rtems_libio_init+0x77> <== ALWAYS TAKEN
rtems_fatal_error_occurred( rc );
107492: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107495: 50 push %eax <== NOT EXECUTED
107496: e8 79 32 00 00 call 10a714 <rtems_fatal_error_occurred>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
10749b: a1 40 f1 11 00 mov 0x11f140,%eax
1074a0: 85 c0 test %eax,%eax
1074a2: 74 06 je 1074aa <rtems_libio_init+0x86> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
1074a4: 8b 5d fc mov -0x4(%ebp),%ebx
1074a7: c9 leave
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
1074a8: ff e0 jmp *%eax
}
1074aa: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1074ad: c9 leave <== NOT EXECUTED
1074ae: c3 ret <== NOT EXECUTED
001085fd <rtems_libio_set_private_env>:
rtems_status_code rtems_libio_set_private_env(void)
{
1085fd: 55 push %ebp
1085fe: 89 e5 mov %esp,%ebp
108600: 57 push %edi
108601: 56 push %esi
108602: 53 push %ebx
108603: 83 ec 3c sub $0x3c,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id task_id = rtems_task_self();
108606: e8 49 27 00 00 call 10ad54 <rtems_task_self>
10860b: 89 c3 mov %eax,%ebx
rtems_filesystem_location_info_t root_loc;
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
10860d: 83 ec 0c sub $0xc,%esp
108610: 6a 00 push $0x0
108612: 8d 45 d4 lea -0x2c(%ebp),%eax
108615: 50 push %eax
108616: 6a 00 push $0x0
108618: 6a 01 push $0x1
10861a: 68 30 df 11 00 push $0x11df30
10861f: e8 66 f0 ff ff call 10768a <rtems_filesystem_evaluate_path>
108624: 89 c2 mov %eax,%edx
if (rv != 0)
108626: 83 c4 20 add $0x20,%esp
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
108629: b8 1a 00 00 00 mov $0x1a,%eax
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
if (rv != 0)
10862e: 85 d2 test %edx,%edx
108630: 0f 85 c0 00 00 00 jne 1086f6 <rtems_libio_set_private_env+0xf9><== NEVER TAKEN
goto error_0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0);
108636: 83 ec 0c sub $0xc,%esp
108639: 6a 00 push $0x0
10863b: 8d 45 c0 lea -0x40(%ebp),%eax
10863e: 50 push %eax
10863f: 6a 00 push $0x0
108641: 6a 01 push $0x1
108643: 68 30 df 11 00 push $0x11df30
108648: e8 3d f0 ff ff call 10768a <rtems_filesystem_evaluate_path>
if (rv != 0)
10864d: 83 c4 20 add $0x20,%esp
108650: 85 c0 test %eax,%eax
108652: 0f 85 8a 00 00 00 jne 1086e2 <rtems_libio_set_private_env+0xe5><== NEVER TAKEN
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
rtems_current_user_env == &rtems_global_user_env
108658: a1 3c 22 12 00 mov 0x12223c,%eax
/*
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
10865d: 3d 48 43 12 00 cmp $0x124348,%eax
108662: 74 04 je 108668 <rtems_libio_set_private_env+0x6b>
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
108664: 39 18 cmp %ebx,(%eax)
108666: 74 32 je 10869a <rtems_libio_set_private_env+0x9d>
) {
new_env = malloc(sizeof(rtems_user_env_t));
108668: 83 ec 0c sub $0xc,%esp
10866b: 6a 48 push $0x48
10866d: e8 8a f5 ff ff call 107bfc <malloc>
108672: 89 c6 mov %eax,%esi
if (new_env == NULL)
108674: 83 c4 10 add $0x10,%esp
108677: 85 c0 test %eax,%eax
108679: 74 58 je 1086d3 <rtems_libio_set_private_env+0xd6>
#ifdef HAVE_USERENV_REFCNT
new_env->refcnt = 1;
#endif
sc = rtems_task_variable_add(
10867b: 50 push %eax
10867c: 68 c0 85 10 00 push $0x1085c0
108681: 68 3c 22 12 00 push $0x12223c
108686: 6a 00 push $0x0
108688: e8 3b 27 00 00 call 10adc8 <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL)
10868d: 83 c4 10 add $0x10,%esp
108690: 85 c0 test %eax,%eax
108692: 75 33 jne 1086c7 <rtems_libio_set_private_env+0xca>
goto error_3;
rtems_current_user_env = new_env;
108694: 89 35 3c 22 12 00 mov %esi,0x12223c
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
10869a: a1 3c 22 12 00 mov 0x12223c,%eax
10869f: be 48 43 12 00 mov $0x124348,%esi
1086a4: b9 12 00 00 00 mov $0x12,%ecx
1086a9: 89 c7 mov %eax,%edi
1086ab: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_current_user_env->task_id = task_id;
1086ad: 89 18 mov %ebx,(%eax)
* Clone the pathlocs. In contrast to most other code we must _not_ free the
* original locs because what we are trying to do here is forking off clones.
* The reason is a pathloc can be allocated by the file system and needs to
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
1086af: 8d 78 18 lea 0x18(%eax),%edi
1086b2: 8d 75 d4 lea -0x2c(%ebp),%esi
1086b5: b1 05 mov $0x5,%cl
1086b7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_filesystem_current = current_loc;
1086b9: 8d 78 04 lea 0x4(%eax),%edi
1086bc: 8d 75 c0 lea -0x40(%ebp),%esi
1086bf: b1 05 mov $0x5,%cl
1086c1: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return RTEMS_SUCCESSFUL;
1086c3: 31 c0 xor %eax,%eax
1086c5: eb 2f jmp 1086f6 <rtems_libio_set_private_env+0xf9>
error_3:
free(new_env);
1086c7: 83 ec 0c sub $0xc,%esp
1086ca: 56 push %esi
1086cb: e8 8c f0 ff ff call 10775c <free>
1086d0: 83 c4 10 add $0x10,%esp
error_2:
rtems_filesystem_freenode(¤t_loc);
1086d3: 83 ec 0c sub $0xc,%esp
1086d6: 8d 45 c0 lea -0x40(%ebp),%eax
1086d9: 50 push %eax
1086da: e8 69 f0 ff ff call 107748 <rtems_filesystem_freenode>
1086df: 83 c4 10 add $0x10,%esp
error_1:
rtems_filesystem_freenode(&root_loc);
1086e2: 83 ec 0c sub $0xc,%esp
1086e5: 8d 45 d4 lea -0x2c(%ebp),%eax
1086e8: 50 push %eax
1086e9: e8 5a f0 ff ff call 107748 <rtems_filesystem_freenode>
1086ee: 83 c4 10 add $0x10,%esp
error_0:
return RTEMS_NO_MEMORY;
1086f1: b8 1a 00 00 00 mov $0x1a,%eax
}
1086f6: 8d 65 f4 lea -0xc(%ebp),%esp
1086f9: 5b pop %ebx
1086fa: 5e pop %esi
1086fb: 5f pop %edi
1086fc: c9 leave
1086fd: c3 ret
001086fe <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
1086fe: 55 push %ebp
1086ff: 89 e5 mov %esp,%ebp
108701: 56 push %esi
108702: 53 push %ebx
108703: 83 ec 20 sub $0x20,%esp
108706: 8b 75 08 mov 0x8(%ebp),%esi
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
108709: e8 46 26 00 00 call 10ad54 <rtems_task_self>
10870e: 89 c3 mov %eax,%ebx
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
return RTEMS_SUCCESSFUL;
108710: 31 c0 xor %eax,%eax
/*
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
108712: 39 de cmp %ebx,%esi
108714: 74 3c je 108752 <rtems_libio_share_private_env+0x54><== NEVER TAKEN
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
108716: 52 push %edx
task_id,
(void*)&rtems_current_user_env,
(void*)&shared_user_env );
108717: 8d 45 f4 lea -0xc(%ebp),%eax
if( task_id == current_task_id )
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
10871a: 50 push %eax
10871b: 68 3c 22 12 00 push $0x12223c
108720: 56 push %esi
108721: e8 36 27 00 00 call 10ae5c <rtems_task_variable_get>
(void*)&shared_user_env );
/*
* If it was not successful, return the error code
*/
if (sc != RTEMS_SUCCESSFUL)
108726: 83 c4 10 add $0x10,%esp
108729: 85 c0 test %eax,%eax
10872b: 75 25 jne 108752 <rtems_libio_share_private_env+0x54>
* If we have a current environment in place, we need to
* free it, since we will be sharing the variable with the
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
10872d: 8b 15 3c 22 12 00 mov 0x12223c,%edx
108733: 39 1a cmp %ebx,(%edx)
108735: 75 12 jne 108749 <rtems_libio_share_private_env+0x4b>
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
108737: 83 ec 0c sub $0xc,%esp
10873a: 52 push %edx
10873b: 89 45 e4 mov %eax,-0x1c(%ebp)
10873e: e8 7d fe ff ff call 1085c0 <free_user_env>
108743: 83 c4 10 add $0x10,%esp
108746: 8b 45 e4 mov -0x1c(%ebp),%eax
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
108749: 8b 55 f4 mov -0xc(%ebp),%edx
10874c: 89 15 3c 22 12 00 mov %edx,0x12223c
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
108752: 8d 65 f8 lea -0x8(%ebp),%esp
108755: 5b pop %ebx
108756: 5e pop %esi
108757: c9 leave
108758: c3 ret
0010df15 <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
10df15: 55 push %ebp
10df16: 89 e5 mov %esp,%ebp
10df18: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10df1b: 89 d1 mov %edx,%ecx
10df1d: 83 e1 06 and $0x6,%ecx
fcntl_flags |= O_RDWR;
10df20: b8 02 00 00 00 mov $0x2,%eax
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10df25: 83 f9 06 cmp $0x6,%ecx
10df28: 74 0f je 10df39 <rtems_libio_to_fcntl_flags+0x24><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
fcntl_flags |= O_RDONLY;
10df2a: 30 c0 xor %al,%al
{
uint32_t 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) {
10df2c: f6 c2 02 test $0x2,%dl
10df2f: 75 08 jne 10df39 <rtems_libio_to_fcntl_flags+0x24><== ALWAYS TAKEN
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
10df31: 31 c0 xor %eax,%eax <== NOT EXECUTED
10df33: f6 c2 04 test $0x4,%dl <== NOT EXECUTED
10df36: 0f 95 c0 setne %al <== 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 ) {
10df39: f6 c2 01 test $0x1,%dl
10df3c: 74 03 je 10df41 <rtems_libio_to_fcntl_flags+0x2c>
fcntl_flags |= O_NONBLOCK;
10df3e: 80 cc 40 or $0x40,%ah
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
10df41: f6 c6 02 test $0x2,%dh
10df44: 74 03 je 10df49 <rtems_libio_to_fcntl_flags+0x34>
fcntl_flags |= O_APPEND;
10df46: 83 c8 08 or $0x8,%eax
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
10df49: 80 e6 04 and $0x4,%dh
10df4c: 74 03 je 10df51 <rtems_libio_to_fcntl_flags+0x3c>
fcntl_flags |= O_CREAT;
10df4e: 80 cc 02 or $0x2,%ah
}
return fcntl_flags;
}
10df51: c9 leave
10df52: c3 ret
00109d6c <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
109d6c: 55 push %ebp
109d6d: 89 e5 mov %esp,%ebp
109d6f: 83 ec 1c sub $0x1c,%esp
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
109d72: 8d 45 f4 lea -0xc(%ebp),%eax
109d75: 50 push %eax
109d76: ff 75 08 pushl 0x8(%ebp)
109d79: ff 35 50 51 12 00 pushl 0x125150
109d7f: e8 7c 4f 00 00 call 10ed00 <_Protected_heap_Get_block_size>
109d84: 83 c4 10 add $0x10,%esp
109d87: 84 c0 test %al,%al
109d89: 74 11 je 109d9c <rtems_malloc_statistics_at_free+0x30><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
109d8b: 8b 45 f4 mov -0xc(%ebp),%eax
109d8e: 31 d2 xor %edx,%edx
109d90: 01 05 48 9a 12 00 add %eax,0x129a48
109d96: 11 15 4c 9a 12 00 adc %edx,0x129a4c
}
}
109d9c: c9 leave
109d9d: c3 ret
00109d9e <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
109d9e: 55 push %ebp
109d9f: 89 e5 mov %esp,%ebp
109da1: 83 ec 18 sub $0x18,%esp
109da4: 8b 45 08 mov 0x8(%ebp),%eax
uintptr_t actual_size = 0;
109da7: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
109dae: 85 c0 test %eax,%eax
109db0: 74 43 je 109df5 <rtems_malloc_statistics_at_malloc+0x57><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
109db2: 52 push %edx
109db3: 8d 55 f4 lea -0xc(%ebp),%edx
109db6: 52 push %edx
109db7: 50 push %eax
109db8: ff 35 50 51 12 00 pushl 0x125150
109dbe: e8 3d 4f 00 00 call 10ed00 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
109dc3: 8b 45 f4 mov -0xc(%ebp),%eax
109dc6: 31 d2 xor %edx,%edx
109dc8: 03 05 40 9a 12 00 add 0x129a40,%eax
109dce: 13 15 44 9a 12 00 adc 0x129a44,%edx
109dd4: a3 40 9a 12 00 mov %eax,0x129a40
109dd9: 89 15 44 9a 12 00 mov %edx,0x129a44
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
109ddf: 2b 05 48 9a 12 00 sub 0x129a48,%eax
if (current_depth > s->max_depth)
109de5: 83 c4 10 add $0x10,%esp
109de8: 3b 05 3c 9a 12 00 cmp 0x129a3c,%eax
109dee: 76 05 jbe 109df5 <rtems_malloc_statistics_at_malloc+0x57>
s->max_depth = current_depth;
109df0: a3 3c 9a 12 00 mov %eax,0x129a3c
}
109df5: c9 leave
109df6: c3 ret
00111780 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
111780: 55 push %ebp
111781: 89 e5 mov %esp,%ebp
111783: 57 push %edi
111784: 56 push %esi
111785: 53 push %ebx
111786: 83 ec 0c sub $0xc,%esp
111789: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Parameter error checks
*/
if ( !pointer )
return EINVAL;
11178c: be 16 00 00 00 mov $0x16,%esi
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
111791: 85 db test %ebx,%ebx
111793: 74 55 je 1117ea <rtems_memalign+0x6a>
return EINVAL;
*pointer = NULL;
111795: 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()) &&
11179b: 83 3d a4 64 12 00 03 cmpl $0x3,0x1264a4
1117a2: 75 09 jne 1117ad <rtems_memalign+0x2d> <== NEVER TAKEN
!malloc_is_system_state_OK() )
1117a4: e8 4f 6a ff ff call 1081f8 <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()) &&
1117a9: 84 c0 test %al,%al
1117ab: 74 3d je 1117ea <rtems_memalign+0x6a> <== NEVER TAKEN
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
1117ad: e8 84 6a ff ff call 108236 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
1117b2: 6a 00 push $0x0
1117b4: ff 75 0c pushl 0xc(%ebp)
1117b7: ff 75 10 pushl 0x10(%ebp)
1117ba: ff 35 50 21 12 00 pushl 0x122150
1117c0: e8 6b b1 ff ff call 10c930 <_Protected_heap_Allocate_aligned_with_boundary>
1117c5: 89 c7 mov %eax,%edi
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
1117c7: 83 c4 10 add $0x10,%esp
return ENOMEM;
1117ca: be 0c 00 00 00 mov $0xc,%esi
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
1117cf: 85 c0 test %eax,%eax
1117d1: 74 17 je 1117ea <rtems_memalign+0x6a>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
1117d3: a1 f0 45 12 00 mov 0x1245f0,%eax
1117d8: 85 c0 test %eax,%eax
1117da: 74 0a je 1117e6 <rtems_memalign+0x66>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
1117dc: 83 ec 0c sub $0xc,%esp
1117df: 53 push %ebx
1117e0: ff 50 04 call *0x4(%eax)
1117e3: 83 c4 10 add $0x10,%esp
*pointer = return_this;
1117e6: 89 3b mov %edi,(%ebx)
return 0;
1117e8: 31 f6 xor %esi,%esi
}
1117ea: 89 f0 mov %esi,%eax
1117ec: 8d 65 f4 lea -0xc(%ebp),%esp
1117ef: 5b pop %ebx
1117f0: 5e pop %esi
1117f1: 5f pop %edi
1117f2: c9 leave
1117f3: c3 ret
0010fffc <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
10fffc: 55 push %ebp
10fffd: 89 e5 mov %esp,%ebp
10ffff: 57 push %edi
110000: 56 push %esi
110001: 53 push %ebx
110002: 83 ec 78 sub $0x78,%esp
int success = 0;
char *dup_path = strdup(path);
110005: ff 75 08 pushl 0x8(%ebp)
110008: e8 67 22 00 00 call 112274 <strdup>
11000d: 89 c3 mov %eax,%ebx
if (dup_path != NULL) {
11000f: 83 c4 10 add $0x10,%esp
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
110012: 83 c8 ff or $0xffffffff,%eax
rtems_mkdir(const char *path, mode_t mode)
{
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
110015: 85 db test %ebx,%ebx
110017: 0f 84 1e 01 00 00 je 11013b <rtems_mkdir+0x13f> <== NEVER TAKEN
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
11001d: 31 c0 xor %eax,%eax
11001f: 80 3b 2f cmpb $0x2f,(%ebx)
110022: 0f 94 c0 sete %al
110025: 8d 3c 03 lea (%ebx,%eax,1),%edi
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
110028: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp)
11002f: b8 01 00 00 00 mov $0x1,%eax
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
110034: 8a 0f mov (%edi),%cl
last = 1;
110036: ba 01 00 00 00 mov $0x1,%edx
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
11003b: 84 c9 test %cl,%cl
11003d: 74 0b je 11004a <rtems_mkdir+0x4e>
last = 1;
else if (p[0] != '/')
11003f: 80 f9 2f cmp $0x2f,%cl
110042: 0f 85 c8 00 00 00 jne 110110 <rtems_mkdir+0x114>
110048: 30 d2 xor %dl,%dl
continue;
*p = '\0';
11004a: c6 07 00 movb $0x0,(%edi)
if (!last && p[1] == '\0')
11004d: be 01 00 00 00 mov $0x1,%esi
110052: 85 d2 test %edx,%edx
110054: 75 0b jne 110061 <rtems_mkdir+0x65>
110056: 31 d2 xor %edx,%edx
110058: 80 7f 01 00 cmpb $0x0,0x1(%edi)
11005c: 0f 94 c2 sete %dl
11005f: 89 d6 mov %edx,%esi
last = 1;
if (first) {
110061: 85 c0 test %eax,%eax
110063: 74 1a je 11007f <rtems_mkdir+0x83>
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
110065: 83 ec 0c sub $0xc,%esp
110068: 6a 00 push $0x0
11006a: e8 75 01 00 00 call 1101e4 <umask>
11006f: 89 45 94 mov %eax,-0x6c(%ebp)
numask = oumask & ~(S_IWUSR | S_IXUSR);
110072: 24 3f and $0x3f,%al
(void)umask(numask);
110074: 89 04 24 mov %eax,(%esp)
110077: e8 68 01 00 00 call 1101e4 <umask>
11007c: 83 c4 10 add $0x10,%esp
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
11007f: b8 ff 01 00 00 mov $0x1ff,%eax
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
110084: 85 f6 test %esi,%esi
110086: 74 11 je 110099 <rtems_mkdir+0x9d>
(void)umask(oumask);
110088: 83 ec 0c sub $0xc,%esp
11008b: ff 75 94 pushl -0x6c(%ebp)
11008e: e8 51 01 00 00 call 1101e4 <umask>
110093: 83 c4 10 add $0x10,%esp
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
110096: 8b 45 0c mov 0xc(%ebp),%eax
110099: 52 push %edx
11009a: 52 push %edx
11009b: 50 push %eax
11009c: 53 push %ebx
11009d: e8 c6 85 ff ff call 108668 <mkdir>
1100a2: 83 c4 10 add $0x10,%esp
1100a5: 85 c0 test %eax,%eax
1100a7: 79 5e jns 110107 <rtems_mkdir+0x10b>
if (errno == EEXIST || errno == EISDIR) {
1100a9: e8 e6 14 00 00 call 111594 <__errno>
1100ae: 83 38 11 cmpl $0x11,(%eax)
1100b1: 74 0a je 1100bd <rtems_mkdir+0xc1>
1100b3: e8 dc 14 00 00 call 111594 <__errno>
1100b8: 83 38 15 cmpl $0x15,(%eax)
1100bb: 75 59 jne 110116 <rtems_mkdir+0x11a> <== ALWAYS TAKEN
if (stat(path, &sb) < 0) {
1100bd: 50 push %eax
1100be: 50 push %eax
1100bf: 8d 45 a0 lea -0x60(%ebp),%eax
1100c2: 50 push %eax
1100c3: 53 push %ebx
1100c4: e8 8b 00 00 00 call 110154 <stat>
1100c9: 83 c4 10 add $0x10,%esp
1100cc: 85 c0 test %eax,%eax
1100ce: 78 46 js 110116 <rtems_mkdir+0x11a> <== NEVER TAKEN
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
1100d0: 8b 45 ac mov -0x54(%ebp),%eax
1100d3: 25 00 f0 00 00 and $0xf000,%eax
1100d8: 3d 00 40 00 00 cmp $0x4000,%eax
1100dd: 74 22 je 110101 <rtems_mkdir+0x105>
if (last)
1100df: 85 f6 test %esi,%esi
1100e1: 74 0f je 1100f2 <rtems_mkdir+0xf6>
errno = EEXIST;
1100e3: e8 ac 14 00 00 call 111594 <__errno>
1100e8: c7 00 11 00 00 00 movl $0x11,(%eax)
else
errno = ENOTDIR;
retval = 0;
1100ee: 31 ff xor %edi,%edi
1100f0: eb 38 jmp 11012a <rtems_mkdir+0x12e>
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
1100f2: e8 9d 14 00 00 call 111594 <__errno>
1100f7: c7 00 14 00 00 00 movl $0x14,(%eax)
retval = 0;
1100fd: 31 ff xor %edi,%edi
1100ff: eb 1b jmp 11011c <rtems_mkdir+0x120>
break;
}
if (last)
110101: 85 f6 test %esi,%esi
110103: 75 3e jne 110143 <rtems_mkdir+0x147>
110105: eb 04 jmp 11010b <rtems_mkdir+0x10f>
} else {
retval = 0;
break;
}
}
if (!last)
110107: 85 f6 test %esi,%esi
110109: 75 3f jne 11014a <rtems_mkdir+0x14e>
*p = '/';
11010b: c6 07 2f movb $0x2f,(%edi)
11010e: 31 c0 xor %eax,%eax
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
110110: 47 inc %edi
110111: e9 1e ff ff ff jmp 110034 <rtems_mkdir+0x38>
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
110116: 31 ff xor %edi,%edi
}
}
if (!last)
*p = '/';
}
if (!first && !last)
110118: 85 f6 test %esi,%esi
11011a: 75 0e jne 11012a <rtems_mkdir+0x12e> <== ALWAYS TAKEN
(void)umask(oumask);
11011c: 83 ec 0c sub $0xc,%esp
11011f: ff 75 94 pushl -0x6c(%ebp)
110122: e8 bd 00 00 00 call 1101e4 <umask>
110127: 83 c4 10 add $0x10,%esp
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
11012a: 83 ec 0c sub $0xc,%esp
11012d: 53 push %ebx
11012e: e8 f9 7f ff ff call 10812c <free>
}
return success != 0 ? 0 : -1;
110133: 83 c4 10 add $0x10,%esp
110136: 83 ff 01 cmp $0x1,%edi
110139: 19 c0 sbb %eax,%eax
}
11013b: 8d 65 f4 lea -0xc(%ebp),%esp
11013e: 5b pop %ebx
11013f: 5e pop %esi
110140: 5f pop %edi
110141: c9 leave
110142: c3 ret
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
retval = 2;
110143: bf 02 00 00 00 mov $0x2,%edi
110148: eb e0 jmp 11012a <rtems_mkdir+0x12e>
} else {
retval = 0;
break;
}
}
if (!last)
11014a: bf 01 00 00 00 mov $0x1,%edi
11014f: eb d9 jmp 11012a <rtems_mkdir+0x12e>
001147d8 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
1147d8: 55 push %ebp
1147d9: 89 e5 mov %esp,%ebp
1147db: 57 push %edi
1147dc: 56 push %esi
1147dd: 53 push %ebx
1147de: 83 ec 1c sub $0x1c,%esp
1147e1: 8b 75 0c mov 0xc(%ebp),%esi
1147e4: 8b 55 10 mov 0x10(%ebp),%edx
1147e7: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
1147ea: b8 03 00 00 00 mov $0x3,%eax
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
1147ef: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
1147f3: 0f 84 ce 00 00 00 je 1148c7 <rtems_partition_create+0xef>
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
1147f9: b0 09 mov $0x9,%al
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
1147fb: 85 f6 test %esi,%esi
1147fd: 0f 84 c4 00 00 00 je 1148c7 <rtems_partition_create+0xef>
return RTEMS_INVALID_ADDRESS;
if ( !id )
114803: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp)
114807: 0f 84 ba 00 00 00 je 1148c7 <rtems_partition_create+0xef><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
11480d: 85 ff test %edi,%edi
11480f: 0f 84 ad 00 00 00 je 1148c2 <rtems_partition_create+0xea>
114815: 85 d2 test %edx,%edx
114817: 0f 84 a5 00 00 00 je 1148c2 <rtems_partition_create+0xea>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
11481d: b0 08 mov $0x8,%al
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
11481f: 39 fa cmp %edi,%edx
114821: 0f 82 a0 00 00 00 jb 1148c7 <rtems_partition_create+0xef>
114827: f7 c7 03 00 00 00 test $0x3,%edi
11482d: 0f 85 94 00 00 00 jne 1148c7 <rtems_partition_create+0xef>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
114833: b0 09 mov $0x9,%al
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
114835: f7 c6 03 00 00 00 test $0x3,%esi
11483b: 0f 85 86 00 00 00 jne 1148c7 <rtems_partition_create+0xef>
114841: a1 38 c6 13 00 mov 0x13c638,%eax
114846: 40 inc %eax
114847: a3 38 c6 13 00 mov %eax,0x13c638
* 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 );
11484c: 83 ec 0c sub $0xc,%esp
11484f: 68 c4 c4 13 00 push $0x13c4c4
114854: 89 55 e4 mov %edx,-0x1c(%ebp)
114857: e8 10 3d 00 00 call 11856c <_Objects_Allocate>
11485c: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
11485e: 83 c4 10 add $0x10,%esp
114861: 85 c0 test %eax,%eax
114863: 8b 55 e4 mov -0x1c(%ebp),%edx
114866: 75 0c jne 114874 <rtems_partition_create+0x9c>
_Thread_Enable_dispatch();
114868: e8 1d 49 00 00 call 11918a <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
11486d: b8 05 00 00 00 mov $0x5,%eax
114872: eb 53 jmp 1148c7 <rtems_partition_create+0xef>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
114874: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
114877: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
11487a: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
11487d: 8b 45 18 mov 0x18(%ebp),%eax
114880: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
114883: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
11488a: 57 push %edi
11488b: 89 d0 mov %edx,%eax
11488d: 31 d2 xor %edx,%edx
11488f: f7 f7 div %edi
114891: 50 push %eax
114892: 56 push %esi
114893: 8d 43 24 lea 0x24(%ebx),%eax
114896: 50 push %eax
114897: e8 2c 2a 00 00 call 1172c8 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
11489c: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
11489f: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1148a2: 8b 15 e0 c4 13 00 mov 0x13c4e0,%edx
1148a8: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1148ab: 8b 55 08 mov 0x8(%ebp),%edx
1148ae: 89 53 0c mov %edx,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
1148b1: 8b 55 1c mov 0x1c(%ebp),%edx
1148b4: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
1148b6: e8 cf 48 00 00 call 11918a <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1148bb: 83 c4 10 add $0x10,%esp
1148be: 31 c0 xor %eax,%eax
1148c0: eb 05 jmp 1148c7 <rtems_partition_create+0xef>
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
1148c2: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1148c7: 8d 65 f4 lea -0xc(%ebp),%esp
1148ca: 5b pop %ebx
1148cb: 5e pop %esi
1148cc: 5f pop %edi
1148cd: c9 leave
1148ce: c3 ret
0010b02d <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
10b02d: 55 push %ebp
10b02e: 89 e5 mov %esp,%ebp
10b030: 57 push %edi
10b031: 56 push %esi
10b032: 53 push %ebx
10b033: 83 ec 30 sub $0x30,%esp
10b036: 8b 75 08 mov 0x8(%ebp),%esi
10b039: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_value;
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
10b03c: 8d 45 e4 lea -0x1c(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
10b03f: 50 push %eax
10b040: 56 push %esi
10b041: 68 74 67 12 00 push $0x126774
10b046: e8 65 1d 00 00 call 10cdb0 <_Objects_Get>
10b04b: 89 c7 mov %eax,%edi
switch ( location ) {
10b04d: 83 c4 10 add $0x10,%esp
10b050: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10b054: 0f 85 3b 01 00 00 jne 10b195 <rtems_rate_monotonic_period+0x168><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10b05a: a1 ac 6a 12 00 mov 0x126aac,%eax
10b05f: 39 47 40 cmp %eax,0x40(%edi)
10b062: 74 0f je 10b073 <rtems_rate_monotonic_period+0x46>
_Thread_Enable_dispatch();
10b064: e8 f9 24 00 00 call 10d562 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
10b069: be 17 00 00 00 mov $0x17,%esi
10b06e: e9 27 01 00 00 jmp 10b19a <rtems_rate_monotonic_period+0x16d>
}
if ( length == RTEMS_PERIOD_STATUS ) {
10b073: 85 db test %ebx,%ebx
10b075: 75 1b jne 10b092 <rtems_rate_monotonic_period+0x65>
switch ( the_period->state ) {
10b077: 8b 47 38 mov 0x38(%edi),%eax
10b07a: 31 f6 xor %esi,%esi
10b07c: 83 f8 04 cmp $0x4,%eax
10b07f: 77 07 ja 10b088 <rtems_rate_monotonic_period+0x5b><== NEVER TAKEN
10b081: 8b 34 85 b0 f9 11 00 mov 0x11f9b0(,%eax,4),%esi
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10b088: e8 d5 24 00 00 call 10d562 <_Thread_Enable_dispatch>
return( return_value );
10b08d: e9 08 01 00 00 jmp 10b19a <rtems_rate_monotonic_period+0x16d>
}
_ISR_Disable( level );
10b092: 9c pushf
10b093: fa cli
10b094: 8f 45 d4 popl -0x2c(%ebp)
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
10b097: 8b 47 38 mov 0x38(%edi),%eax
10b09a: 85 c0 test %eax,%eax
10b09c: 75 4c jne 10b0ea <rtems_rate_monotonic_period+0xbd>
_ISR_Enable( level );
10b09e: ff 75 d4 pushl -0x2c(%ebp)
10b0a1: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10b0a2: 83 ec 0c sub $0xc,%esp
10b0a5: 57 push %edi
10b0a6: e8 3f fe ff ff call 10aeea <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10b0ab: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b0b2: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10b0b9: c7 47 2c a4 b3 10 00 movl $0x10b3a4,0x2c(%edi)
the_watchdog->id = id;
10b0c0: 89 77 30 mov %esi,0x30(%edi)
the_watchdog->user_data = user_data;
10b0c3: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10b0ca: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b0cd: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b0d0: 58 pop %eax
10b0d1: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, length );
10b0d2: 83 c7 10 add $0x10,%edi
10b0d5: 57 push %edi
10b0d6: 68 30 69 12 00 push $0x126930
10b0db: e8 90 33 00 00 call 10e470 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10b0e0: e8 7d 24 00 00 call 10d562 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b0e5: 83 c4 10 add $0x10,%esp
10b0e8: eb 65 jmp 10b14f <rtems_rate_monotonic_period+0x122>
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
10b0ea: 83 f8 02 cmp $0x2,%eax
10b0ed: 75 64 jne 10b153 <rtems_rate_monotonic_period+0x126>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10b0ef: 83 ec 0c sub $0xc,%esp
10b0f2: 57 push %edi
10b0f3: e8 5a fe ff ff call 10af52 <_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;
10b0f8: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi)
the_period->next_length = length;
10b0ff: 89 5f 3c mov %ebx,0x3c(%edi)
_ISR_Enable( level );
10b102: ff 75 d4 pushl -0x2c(%ebp)
10b105: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10b106: a1 ac 6a 12 00 mov 0x126aac,%eax
10b10b: 8b 57 08 mov 0x8(%edi),%edx
10b10e: 89 50 20 mov %edx,0x20(%eax)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10b111: 5b pop %ebx
10b112: 5e pop %esi
10b113: 68 00 40 00 00 push $0x4000
10b118: 50 push %eax
10b119: e8 1a 2c 00 00 call 10dd38 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10b11e: 9c pushf
10b11f: fa cli
10b120: 5a pop %edx
local_state = the_period->state;
10b121: 8b 47 38 mov 0x38(%edi),%eax
the_period->state = RATE_MONOTONIC_ACTIVE;
10b124: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
_ISR_Enable( level );
10b12b: 52 push %edx
10b12c: 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 )
10b12d: 83 c4 10 add $0x10,%esp
10b130: 83 f8 03 cmp $0x3,%eax
10b133: 75 15 jne 10b14a <rtems_rate_monotonic_period+0x11d>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10b135: 51 push %ecx
10b136: 51 push %ecx
10b137: 68 00 40 00 00 push $0x4000
10b13c: ff 35 ac 6a 12 00 pushl 0x126aac
10b142: e8 a9 20 00 00 call 10d1f0 <_Thread_Clear_state>
10b147: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
10b14a: e8 13 24 00 00 call 10d562 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b14f: 31 f6 xor %esi,%esi
10b151: eb 47 jmp 10b19a <rtems_rate_monotonic_period+0x16d>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b153: be 04 00 00 00 mov $0x4,%esi
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
10b158: 83 f8 04 cmp $0x4,%eax
10b15b: 75 3d jne 10b19a <rtems_rate_monotonic_period+0x16d><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10b15d: 83 ec 0c sub $0xc,%esp
10b160: 57 push %edi
10b161: e8 ec fd ff ff call 10af52 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10b166: ff 75 d4 pushl -0x2c(%ebp)
10b169: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10b16a: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
the_period->next_length = length;
10b171: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b174: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b177: 58 pop %eax
10b178: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, length );
10b179: 83 c7 10 add $0x10,%edi
10b17c: 57 push %edi
10b17d: 68 30 69 12 00 push $0x126930
10b182: e8 e9 32 00 00 call 10e470 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10b187: e8 d6 23 00 00 call 10d562 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
10b18c: 83 c4 10 add $0x10,%esp
10b18f: 66 be 06 00 mov $0x6,%si
10b193: eb 05 jmp 10b19a <rtems_rate_monotonic_period+0x16d>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b195: be 04 00 00 00 mov $0x4,%esi
}
10b19a: 89 f0 mov %esi,%eax
10b19c: 8d 65 f4 lea -0xc(%ebp),%esp
10b19f: 5b pop %ebx
10b1a0: 5e pop %esi
10b1a1: 5f pop %edi
10b1a2: c9 leave
10b1a3: c3 ret
0010b1a4 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10b1a4: 55 push %ebp
10b1a5: 89 e5 mov %esp,%ebp
10b1a7: 57 push %edi
10b1a8: 56 push %esi
10b1a9: 53 push %ebx
10b1aa: 83 ec 7c sub $0x7c,%esp
10b1ad: 8b 5d 08 mov 0x8(%ebp),%ebx
10b1b0: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
10b1b3: 85 ff test %edi,%edi
10b1b5: 0f 84 2b 01 00 00 je 10b2e6 <rtems_rate_monotonic_report_statistics_with_plugin+0x142><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10b1bb: 52 push %edx
10b1bc: 52 push %edx
10b1bd: 68 c4 f9 11 00 push $0x11f9c4
10b1c2: 53 push %ebx
10b1c3: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
10b1c5: 5e pop %esi
10b1c6: 58 pop %eax
10b1c7: 68 e2 f9 11 00 push $0x11f9e2
10b1cc: 53 push %ebx
10b1cd: ff d7 call *%edi
(*print)( context, "--- Wall times are in seconds ---\n" );
10b1cf: 5a pop %edx
10b1d0: 59 pop %ecx
10b1d1: 68 04 fa 11 00 push $0x11fa04
10b1d6: 53 push %ebx
10b1d7: ff d7 call *%edi
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10b1d9: 5e pop %esi
10b1da: 58 pop %eax
10b1db: 68 27 fa 11 00 push $0x11fa27
10b1e0: 53 push %ebx
10b1e1: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10b1e3: 5a pop %edx
10b1e4: 59 pop %ecx
10b1e5: 68 72 fa 11 00 push $0x11fa72
10b1ea: 53 push %ebx
10b1eb: ff d7 call *%edi
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
10b1ed: 8b 35 7c 67 12 00 mov 0x12677c,%esi
10b1f3: 83 c4 10 add $0x10,%esp
10b1f6: e9 df 00 00 00 jmp 10b2da <rtems_rate_monotonic_report_statistics_with_plugin+0x136>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10b1fb: 50 push %eax
10b1fc: 50 push %eax
10b1fd: 8d 45 88 lea -0x78(%ebp),%eax
10b200: 50 push %eax
10b201: 56 push %esi
10b202: e8 51 4b 00 00 call 10fd58 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10b207: 83 c4 10 add $0x10,%esp
10b20a: 85 c0 test %eax,%eax
10b20c: 0f 85 c7 00 00 00 jne 10b2d9 <rtems_rate_monotonic_report_statistics_with_plugin+0x135>
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
10b212: 51 push %ecx
10b213: 51 push %ecx
10b214: 8d 55 c0 lea -0x40(%ebp),%edx
10b217: 52 push %edx
10b218: 56 push %esi
10b219: e8 de 4b 00 00 call 10fdfc <rtems_rate_monotonic_get_status>
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
10b21e: 83 c4 0c add $0xc,%esp
10b221: 8d 45 e3 lea -0x1d(%ebp),%eax
10b224: 50 push %eax
10b225: 6a 05 push $0x5
10b227: ff 75 c0 pushl -0x40(%ebp)
10b22a: e8 01 02 00 00 call 10b430 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10b22f: 58 pop %eax
10b230: 5a pop %edx
10b231: ff 75 8c pushl -0x74(%ebp)
10b234: ff 75 88 pushl -0x78(%ebp)
10b237: 8d 55 e3 lea -0x1d(%ebp),%edx
10b23a: 52 push %edx
10b23b: 56 push %esi
10b23c: 68 be fa 11 00 push $0x11fabe
10b241: 53 push %ebx
10b242: ff d7 call *%edi
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10b244: 8b 45 88 mov -0x78(%ebp),%eax
10b247: 83 c4 20 add $0x20,%esp
10b24a: 85 c0 test %eax,%eax
10b24c: 75 0f jne 10b25d <rtems_rate_monotonic_report_statistics_with_plugin+0xb9>
(*print)( context, "\n" );
10b24e: 51 push %ecx
10b24f: 51 push %ecx
10b250: 68 38 fd 11 00 push $0x11fd38
10b255: 53 push %ebx
10b256: ff d7 call *%edi
continue;
10b258: 83 c4 10 add $0x10,%esp
10b25b: eb 7c jmp 10b2d9 <rtems_rate_monotonic_report_statistics_with_plugin+0x135>
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
10b25d: 52 push %edx
10b25e: 8d 55 d8 lea -0x28(%ebp),%edx
10b261: 52 push %edx
10b262: 50 push %eax
10b263: 8d 45 a0 lea -0x60(%ebp),%eax
10b266: 50 push %eax
10b267: e8 d8 2e 00 00 call 10e144 <_Timespec_Divide_by_integer>
(*print)( context,
10b26c: 8b 45 dc mov -0x24(%ebp),%eax
10b26f: b9 e8 03 00 00 mov $0x3e8,%ecx
10b274: 99 cltd
10b275: f7 f9 idiv %ecx
10b277: 50 push %eax
10b278: ff 75 d8 pushl -0x28(%ebp)
10b27b: 8b 45 9c mov -0x64(%ebp),%eax
10b27e: 99 cltd
10b27f: f7 f9 idiv %ecx
10b281: 50 push %eax
10b282: ff 75 98 pushl -0x68(%ebp)
10b285: 8b 45 94 mov -0x6c(%ebp),%eax
10b288: 99 cltd
10b289: f7 f9 idiv %ecx
10b28b: 50 push %eax
10b28c: ff 75 90 pushl -0x70(%ebp)
10b28f: 68 d5 fa 11 00 push $0x11fad5
10b294: 53 push %ebx
10b295: 89 4d 84 mov %ecx,-0x7c(%ebp)
10b298: ff d7 call *%edi
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
10b29a: 83 c4 2c add $0x2c,%esp
10b29d: 8d 55 d8 lea -0x28(%ebp),%edx
10b2a0: 52 push %edx
10b2a1: ff 75 88 pushl -0x78(%ebp)
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
10b2a4: 8d 45 b8 lea -0x48(%ebp),%eax
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
10b2a7: 50 push %eax
10b2a8: e8 97 2e 00 00 call 10e144 <_Timespec_Divide_by_integer>
(*print)( context,
10b2ad: 8b 45 dc mov -0x24(%ebp),%eax
10b2b0: 8b 4d 84 mov -0x7c(%ebp),%ecx
10b2b3: 99 cltd
10b2b4: f7 f9 idiv %ecx
10b2b6: 50 push %eax
10b2b7: ff 75 d8 pushl -0x28(%ebp)
10b2ba: 8b 45 b4 mov -0x4c(%ebp),%eax
10b2bd: 99 cltd
10b2be: f7 f9 idiv %ecx
10b2c0: 50 push %eax
10b2c1: ff 75 b0 pushl -0x50(%ebp)
10b2c4: 8b 45 ac mov -0x54(%ebp),%eax
10b2c7: 99 cltd
10b2c8: f7 f9 idiv %ecx
10b2ca: 50 push %eax
10b2cb: ff 75 a8 pushl -0x58(%ebp)
10b2ce: 68 f4 fa 11 00 push $0x11faf4
10b2d3: 53 push %ebx
10b2d4: ff d7 call *%edi
10b2d6: 83 c4 30 add $0x30,%esp
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
10b2d9: 46 inc %esi
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
10b2da: 3b 35 80 67 12 00 cmp 0x126780,%esi
10b2e0: 0f 86 15 ff ff ff jbe 10b1fb <rtems_rate_monotonic_report_statistics_with_plugin+0x57>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10b2e6: 8d 65 f4 lea -0xc(%ebp),%esp
10b2e9: 5b pop %ebx
10b2ea: 5e pop %esi
10b2eb: 5f pop %edi
10b2ec: c9 leave
10b2ed: c3 ret
00115b38 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
115b38: 55 push %ebp
115b39: 89 e5 mov %esp,%ebp
115b3b: 53 push %ebx
115b3c: 83 ec 14 sub $0x14,%esp
115b3f: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
115b42: b8 0a 00 00 00 mov $0xa,%eax
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
115b47: 85 db test %ebx,%ebx
115b49: 74 6d je 115bb8 <rtems_signal_send+0x80>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
115b4b: 50 push %eax
115b4c: 50 push %eax
115b4d: 8d 45 f4 lea -0xc(%ebp),%eax
115b50: 50 push %eax
115b51: ff 75 08 pushl 0x8(%ebp)
115b54: e8 53 36 00 00 call 1191ac <_Thread_Get>
switch ( location ) {
115b59: 83 c4 10 add $0x10,%esp
115b5c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115b60: 75 51 jne 115bb3 <rtems_signal_send+0x7b>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
115b62: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
115b68: 83 7a 0c 00 cmpl $0x0,0xc(%edx)
115b6c: 74 39 je 115ba7 <rtems_signal_send+0x6f>
if ( asr->is_enabled ) {
115b6e: 80 7a 08 00 cmpb $0x0,0x8(%edx)
115b72: 74 22 je 115b96 <rtems_signal_send+0x5e>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
115b74: 9c pushf
115b75: fa cli
115b76: 59 pop %ecx
*signal_set |= signals;
115b77: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
115b7a: 51 push %ecx
115b7b: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
115b7c: 83 3d 80 c8 13 00 00 cmpl $0x0,0x13c880
115b83: 74 19 je 115b9e <rtems_signal_send+0x66>
115b85: 3b 05 84 c8 13 00 cmp 0x13c884,%eax
115b8b: 75 11 jne 115b9e <rtems_signal_send+0x66><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
115b8d: c6 05 90 c8 13 00 01 movb $0x1,0x13c890
115b94: eb 08 jmp 115b9e <rtems_signal_send+0x66>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
115b96: 9c pushf
115b97: fa cli
115b98: 58 pop %eax
*signal_set |= signals;
115b99: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
115b9c: 50 push %eax
115b9d: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
115b9e: e8 e7 35 00 00 call 11918a <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115ba3: 31 c0 xor %eax,%eax
115ba5: eb 11 jmp 115bb8 <rtems_signal_send+0x80>
}
_Thread_Enable_dispatch();
115ba7: e8 de 35 00 00 call 11918a <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
115bac: b8 0b 00 00 00 mov $0xb,%eax
115bb1: eb 05 jmp 115bb8 <rtems_signal_send+0x80>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115bb3: b8 04 00 00 00 mov $0x4,%eax
}
115bb8: 8b 5d fc mov -0x4(%ebp),%ebx
115bbb: c9 leave
115bbc: c3 ret
00106cd4 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
106cd4: 55 push %ebp
106cd5: 89 e5 mov %esp,%ebp
106cd7: 57 push %edi
106cd8: 56 push %esi
106cd9: 8b 45 08 mov 0x8(%ebp),%eax
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
106cdc: 83 78 08 00 cmpl $0x0,0x8(%eax)
106ce0: 74 15 je 106cf7 <rtems_stack_checker_begin_extension+0x23><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
106ce2: 8b b8 c4 00 00 00 mov 0xc4(%eax),%edi
106ce8: 83 c7 08 add $0x8,%edi
106ceb: be 28 31 12 00 mov $0x123128,%esi
106cf0: b9 04 00 00 00 mov $0x4,%ecx
106cf5: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
106cf7: 5e pop %esi
106cf8: 5f pop %edi
106cf9: c9 leave
106cfa: c3 ret
00106cad <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
106cad: 55 push %ebp
106cae: 89 e5 mov %esp,%ebp
106cb0: 57 push %edi
106cb1: 8b 7d 0c mov 0xc(%ebp),%edi
Stack_check_Initialize();
106cb4: e8 8a ff ff ff call 106c43 <Stack_check_Initialize>
if (the_thread)
106cb9: 85 ff test %edi,%edi
106cbb: 74 12 je 106ccf <rtems_stack_checker_create_extension+0x22><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
106cbd: 8b 8f c0 00 00 00 mov 0xc0(%edi),%ecx
106cc3: 8b 97 c4 00 00 00 mov 0xc4(%edi),%edx
106cc9: b0 a5 mov $0xa5,%al
106ccb: 89 d7 mov %edx,%edi
106ccd: f3 aa rep stos %al,%es:(%edi)
return true;
}
106ccf: b0 01 mov $0x1,%al
106cd1: 5f pop %edi
106cd2: c9 leave
106cd3: c3 ret
00106e08 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
106e08: 55 push %ebp
106e09: 89 e5 mov %esp,%ebp
106e0b: 53 push %ebx
106e0c: 83 ec 04 sub $0x4,%esp
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
106e0f: a1 d0 34 12 00 mov 0x1234d0,%eax
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
106e14: 8b 90 c4 00 00 00 mov 0xc4(%eax),%edx
return false;
106e1a: 31 db xor %ebx,%ebx
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
106e1c: 39 d5 cmp %edx,%ebp
106e1e: 72 0e jb 106e2e <rtems_stack_checker_is_blown+0x26><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
106e20: 8b 80 c0 00 00 00 mov 0xc0(%eax),%eax
106e26: 8d 04 02 lea (%edx,%eax,1),%eax
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
106e29: 39 c5 cmp %eax,%ebp
106e2b: 0f 96 c3 setbe %bl
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
106e2e: b0 01 mov $0x1,%al
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
106e30: 83 3d 18 2e 12 00 00 cmpl $0x0,0x122e18
106e37: 74 19 je 106e52 <rtems_stack_checker_is_blown+0x4a><== NEVER TAKEN
pattern_ok = (!memcmp(
(void *) Stack_check_Get_pattern_area(the_stack)->pattern,
106e39: 83 c2 08 add $0x8,%edx
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
pattern_ok = (!memcmp(
106e3c: 51 push %ecx
106e3d: 6a 10 push $0x10
106e3f: 68 28 31 12 00 push $0x123128
106e44: 52 push %edx
106e45: e8 ca a0 00 00 call 110f14 <memcmp>
106e4a: 83 c4 10 add $0x10,%esp
106e4d: 85 c0 test %eax,%eax
106e4f: 0f 94 c0 sete %al
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
106e52: 84 db test %bl,%bl
106e54: 74 04 je 106e5a <rtems_stack_checker_is_blown+0x52><== NEVER TAKEN
106e56: 84 c0 test %al,%al
106e58: 75 11 jne 106e6b <rtems_stack_checker_is_blown+0x63><== ALWAYS TAKEN
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
106e5a: 52 push %edx <== NOT EXECUTED
106e5b: 52 push %edx <== NOT EXECUTED
106e5c: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
106e5f: 50 push %eax <== NOT EXECUTED
106e60: ff 35 d0 34 12 00 pushl 0x1234d0 <== NOT EXECUTED
106e66: e8 90 fe ff ff call 106cfb <Stack_check_report_blown_task><== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
106e6b: 31 c0 xor %eax,%eax
106e6d: 8b 5d fc mov -0x4(%ebp),%ebx
106e70: c9 leave
106e71: c3 ret
00106ed7 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
106ed7: 55 push %ebp <== NOT EXECUTED
106ed8: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106eda: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
106edd: 68 40 83 10 00 push $0x108340 <== NOT EXECUTED
106ee2: 6a 00 push $0x0 <== NOT EXECUTED
106ee4: e8 89 ff ff ff call 106e72 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
106ee9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
106eec: c9 leave <== NOT EXECUTED
106eed: c3 ret <== NOT EXECUTED
00106e72 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
106e72: 55 push %ebp <== NOT EXECUTED
106e73: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106e75: 56 push %esi <== NOT EXECUTED
106e76: 53 push %ebx <== NOT EXECUTED
106e77: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
106e7a: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
if ( !print )
106e7d: 85 db test %ebx,%ebx <== NOT EXECUTED
106e7f: 74 4f je 106ed0 <rtems_stack_checker_report_usage_with_plugin+0x5e><== NOT EXECUTED
return;
print_context = context;
106e81: 89 35 10 2e 12 00 mov %esi,0x122e10 <== NOT EXECUTED
print_handler = print;
106e87: 89 1d 14 2e 12 00 mov %ebx,0x122e14 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
106e8d: 51 push %ecx <== NOT EXECUTED
106e8e: 51 push %ecx <== NOT EXECUTED
106e8f: 68 52 db 11 00 push $0x11db52 <== NOT EXECUTED
106e94: 56 push %esi <== NOT EXECUTED
106e95: ff d3 call *%ebx <== NOT EXECUTED
(*print)( context,
106e97: 58 pop %eax <== NOT EXECUTED
106e98: 5a pop %edx <== NOT EXECUTED
106e99: 68 69 db 11 00 push $0x11db69 <== NOT EXECUTED
106e9e: 56 push %esi <== NOT EXECUTED
106e9f: 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 );
106ea1: c7 04 24 28 6b 10 00 movl $0x106b28,(%esp) <== NOT EXECUTED
106ea8: e8 d7 46 00 00 call 10b584 <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);
106ead: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED
106eb4: e8 6f fc ff ff call 106b28 <Stack_check_Dump_threads_usage><== NOT EXECUTED
#endif
print_context = NULL;
106eb9: c7 05 10 2e 12 00 00 movl $0x0,0x122e10 <== NOT EXECUTED
106ec0: 00 00 00
print_handler = NULL;
106ec3: c7 05 14 2e 12 00 00 movl $0x0,0x122e14 <== NOT EXECUTED
106eca: 00 00 00
106ecd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
106ed0: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
106ed3: 5b pop %ebx <== NOT EXECUTED
106ed4: 5e pop %esi <== NOT EXECUTED
106ed5: c9 leave <== NOT EXECUTED
106ed6: c3 ret <== NOT EXECUTED
00106daf <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
106daf: 55 push %ebp
106db0: 89 e5 mov %esp,%ebp
106db2: 53 push %ebx
106db3: 83 ec 14 sub $0x14,%esp
106db6: 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 = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
106db9: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax
106dbf: 8d 48 08 lea 0x8(%eax),%ecx
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
106dc2: 31 d2 xor %edx,%edx
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
106dc4: 39 c5 cmp %eax,%ebp
106dc6: 72 0b jb 106dd3 <rtems_stack_checker_switch_extension+0x24><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
106dc8: 03 83 c0 00 00 00 add 0xc0(%ebx),%eax
}
/*
* rtems_stack_checker_switch_extension
*/
void rtems_stack_checker_switch_extension(
106dce: 39 c5 cmp %eax,%ebp
106dd0: 0f 96 c2 setbe %dl
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
106dd3: 50 push %eax
106dd4: 6a 10 push $0x10
106dd6: 68 28 31 12 00 push $0x123128
106ddb: 51 push %ecx
106ddc: 88 55 f4 mov %dl,-0xc(%ebp)
106ddf: e8 30 a1 00 00 call 110f14 <memcmp>
106de4: 83 c4 10 add $0x10,%esp
106de7: 85 c0 test %eax,%eax
106de9: 0f 94 c0 sete %al
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
106dec: 8a 55 f4 mov -0xc(%ebp),%dl
106def: 84 d2 test %dl,%dl
106df1: 74 04 je 106df7 <rtems_stack_checker_switch_extension+0x48><== NEVER TAKEN
106df3: 84 c0 test %al,%al
106df5: 75 0c jne 106e03 <rtems_stack_checker_switch_extension+0x54><== ALWAYS TAKEN
Stack_check_report_blown_task( running, pattern_ok );
106df7: 52 push %edx <== NOT EXECUTED
106df8: 52 push %edx <== NOT EXECUTED
106df9: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
106dfc: 50 push %eax <== NOT EXECUTED
106dfd: 53 push %ebx <== NOT EXECUTED
106dfe: e8 f8 fe ff ff call 106cfb <Stack_check_report_blown_task><== NOT EXECUTED
}
}
106e03: 8b 5d fc mov -0x4(%ebp),%ebx
106e06: c9 leave
106e07: c3 ret
0010edb0 <rtems_string_to_double>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10edb0: 55 push %ebp
10edb1: 89 e5 mov %esp,%ebp
10edb3: 57 push %edi
10edb4: 56 push %esi
10edb5: 53 push %ebx
10edb6: 83 ec 2c sub $0x2c,%esp
10edb9: 8b 75 08 mov 0x8(%ebp),%esi
10edbc: 8b 5d 0c mov 0xc(%ebp),%ebx
10edbf: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10edc2: b8 09 00 00 00 mov $0x9,%eax
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10edc7: 85 db test %ebx,%ebx
10edc9: 74 6e je 10ee39 <rtems_string_to_double+0x89>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10edcb: e8 e0 1d 00 00 call 110bb0 <__errno>
10edd0: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10edd6: c7 03 00 00 00 00 movl $0x0,(%ebx)
10eddc: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
10ede3: 50 push %eax
10ede4: 50 push %eax
10ede5: 8d 45 e4 lea -0x1c(%ebp),%eax
10ede8: 50 push %eax
10ede9: 56 push %esi
10edea: e8 65 48 00 00 call 113654 <strtod>
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
10edef: 83 c4 10 add $0x10,%esp
10edf2: 85 ff test %edi,%edi
10edf4: 74 05 je 10edfb <rtems_string_to_double+0x4b>
*endptr = end;
10edf6: 8b 45 e4 mov -0x1c(%ebp),%eax
10edf9: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
10edfb: b8 0b 00 00 00 mov $0xb,%eax
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
10ee00: 39 75 e4 cmp %esi,-0x1c(%ebp)
10ee03: 74 2e je 10ee33 <rtems_string_to_double+0x83>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10ee05: dd 05 48 21 12 00 fldl 0x122148
10ee0b: d9 c9 fxch %st(1)
10ee0d: dd e1 fucom %st(1)
10ee0f: df e0 fnstsw %ax
10ee11: dd d9 fstp %st(1)
10ee13: 9e sahf
10ee14: 76 17 jbe 10ee2d <rtems_string_to_double+0x7d>
10ee16: dd 5d c8 fstpl -0x38(%ebp)
10ee19: e8 92 1d 00 00 call 110bb0 <__errno>
10ee1e: 89 c2 mov %eax,%edx
return RTEMS_INVALID_NUMBER;
10ee20: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10ee25: 83 3a 22 cmpl $0x22,(%edx)
10ee28: dd 45 c8 fldl -0x38(%ebp)
10ee2b: 74 0a je 10ee37 <rtems_string_to_double+0x87><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
10ee2d: dd 1b fstpl (%ebx)
#endif
return RTEMS_SUCCESSFUL;
10ee2f: 31 c0 xor %eax,%eax
10ee31: eb 06 jmp 10ee39 <rtems_string_to_double+0x89>
10ee33: dd d8 fstp %st(0)
10ee35: eb 02 jmp 10ee39 <rtems_string_to_double+0x89>
10ee37: dd d8 fstp %st(0)
}
10ee39: 8d 65 f4 lea -0xc(%ebp),%esp
10ee3c: 5b pop %ebx
10ee3d: 5e pop %esi
10ee3e: 5f pop %edi
10ee3f: c9 leave
10ee40: c3 ret
0010ee44 <rtems_string_to_float>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10ee44: 55 push %ebp
10ee45: 89 e5 mov %esp,%ebp
10ee47: 57 push %edi
10ee48: 56 push %esi
10ee49: 53 push %ebx
10ee4a: 83 ec 2c sub $0x2c,%esp
10ee4d: 8b 75 08 mov 0x8(%ebp),%esi
10ee50: 8b 5d 0c mov 0xc(%ebp),%ebx
10ee53: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10ee56: b8 09 00 00 00 mov $0x9,%eax
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10ee5b: 85 db test %ebx,%ebx
10ee5d: 74 67 je 10eec6 <rtems_string_to_float+0x82>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10ee5f: e8 4c 1d 00 00 call 110bb0 <__errno>
10ee64: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10ee6a: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
10ee70: 50 push %eax
10ee71: 50 push %eax
10ee72: 8d 45 e4 lea -0x1c(%ebp),%eax
10ee75: 50 push %eax
10ee76: 56 push %esi
10ee77: e8 f4 47 00 00 call 113670 <strtof>
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
10ee7c: 83 c4 10 add $0x10,%esp
10ee7f: 85 ff test %edi,%edi
10ee81: 74 05 je 10ee88 <rtems_string_to_float+0x44>
*endptr = end;
10ee83: 8b 45 e4 mov -0x1c(%ebp),%eax
10ee86: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
10ee88: b8 0b 00 00 00 mov $0xb,%eax
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
10ee8d: 39 75 e4 cmp %esi,-0x1c(%ebp)
10ee90: 74 2e je 10eec0 <rtems_string_to_float+0x7c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10ee92: d9 05 50 21 12 00 flds 0x122150
10ee98: d9 c9 fxch %st(1)
10ee9a: dd e1 fucom %st(1)
10ee9c: df e0 fnstsw %ax
10ee9e: dd d9 fstp %st(1)
10eea0: 9e sahf
10eea1: 76 17 jbe 10eeba <rtems_string_to_float+0x76>
10eea3: d9 5d c8 fstps -0x38(%ebp)
10eea6: e8 05 1d 00 00 call 110bb0 <__errno>
10eeab: 89 c2 mov %eax,%edx
return RTEMS_INVALID_NUMBER;
10eead: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10eeb2: 83 3a 22 cmpl $0x22,(%edx)
10eeb5: d9 45 c8 flds -0x38(%ebp)
10eeb8: 74 0a je 10eec4 <rtems_string_to_float+0x80><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
10eeba: d9 1b fstps (%ebx)
#endif
return RTEMS_SUCCESSFUL;
10eebc: 31 c0 xor %eax,%eax
10eebe: eb 06 jmp 10eec6 <rtems_string_to_float+0x82>
10eec0: dd d8 fstp %st(0)
10eec2: eb 02 jmp 10eec6 <rtems_string_to_float+0x82>
10eec4: dd d8 fstp %st(0)
}
10eec6: 8d 65 f4 lea -0xc(%ebp),%esp
10eec9: 5b pop %ebx
10eeca: 5e pop %esi
10eecb: 5f pop %edi
10eecc: c9 leave
10eecd: c3 ret
0010ef50 <rtems_string_to_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10ef50: 55 push %ebp
10ef51: 89 e5 mov %esp,%ebp
10ef53: 57 push %edi
10ef54: 56 push %esi
10ef55: 53 push %ebx
10ef56: 83 ec 2c sub $0x2c,%esp
10ef59: 8b 5d 0c mov 0xc(%ebp),%ebx
10ef5c: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10ef5f: b9 09 00 00 00 mov $0x9,%ecx
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10ef64: 85 db test %ebx,%ebx
10ef66: 74 76 je 10efde <rtems_string_to_long_long+0x8e>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10ef68: e8 43 1c 00 00 call 110bb0 <__errno>
10ef6d: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10ef73: c7 03 00 00 00 00 movl $0x0,(%ebx)
10ef79: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
10ef80: 50 push %eax
10ef81: ff 75 14 pushl 0x14(%ebp)
10ef84: 8d 45 e4 lea -0x1c(%ebp),%eax
10ef87: 50 push %eax
10ef88: ff 75 08 pushl 0x8(%ebp)
10ef8b: e8 c0 48 00 00 call 113850 <strtoll>
10ef90: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
10ef92: 83 c4 10 add $0x10,%esp
10ef95: 85 ff test %edi,%edi
10ef97: 74 05 je 10ef9e <rtems_string_to_long_long+0x4e>
*endptr = end;
10ef99: 8b 45 e4 mov -0x1c(%ebp),%eax
10ef9c: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
10ef9e: b9 0b 00 00 00 mov $0xb,%ecx
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
10efa3: 8b 45 08 mov 0x8(%ebp),%eax
10efa6: 39 45 e4 cmp %eax,-0x1c(%ebp)
10efa9: 74 33 je 10efde <rtems_string_to_long_long+0x8e>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10efab: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
10efb1: 75 05 jne 10efb8 <rtems_string_to_long_long+0x68>
10efb3: 83 fe ff cmp $0xffffffff,%esi
10efb6: 74 0a je 10efc2 <rtems_string_to_long_long+0x72><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
10efb8: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax
10efbe: 09 f0 or %esi,%eax
10efc0: 75 15 jne 10efd7 <rtems_string_to_long_long+0x87>
10efc2: 89 55 d4 mov %edx,-0x2c(%ebp)
10efc5: e8 e6 1b 00 00 call 110bb0 <__errno>
return RTEMS_INVALID_NUMBER;
10efca: b9 0a 00 00 00 mov $0xa,%ecx
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
10efcf: 83 38 22 cmpl $0x22,(%eax)
10efd2: 8b 55 d4 mov -0x2c(%ebp),%edx
10efd5: 74 07 je 10efde <rtems_string_to_long_long+0x8e>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
10efd7: 89 33 mov %esi,(%ebx)
10efd9: 89 53 04 mov %edx,0x4(%ebx)
#endif
return RTEMS_SUCCESSFUL;
10efdc: 31 c9 xor %ecx,%ecx
}
10efde: 89 c8 mov %ecx,%eax
10efe0: 8d 65 f4 lea -0xc(%ebp),%esp
10efe3: 5b pop %ebx
10efe4: 5e pop %esi
10efe5: 5f pop %edi
10efe6: c9 leave
10efe7: c3 ret
0010f070 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10f070: 55 push %ebp
10f071: 89 e5 mov %esp,%ebp
10f073: 57 push %edi
10f074: 56 push %esi
10f075: 53 push %ebx
10f076: 83 ec 2c sub $0x2c,%esp
10f079: 8b 7d 08 mov 0x8(%ebp),%edi
10f07c: 8b 5d 0c mov 0xc(%ebp),%ebx
10f07f: 8b 55 10 mov 0x10(%ebp),%edx
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10f082: b8 09 00 00 00 mov $0x9,%eax
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10f087: 85 db test %ebx,%ebx
10f089: 74 56 je 10f0e1 <rtems_string_to_pointer+0x71>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f08b: 89 55 d4 mov %edx,-0x2c(%ebp)
10f08e: e8 1d 1b 00 00 call 110bb0 <__errno>
10f093: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f099: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
10f09f: 50 push %eax
10f0a0: 6a 10 push $0x10
10f0a2: 8d 45 e4 lea -0x1c(%ebp),%eax
10f0a5: 50 push %eax
10f0a6: 57 push %edi
10f0a7: e8 50 4c 00 00 call 113cfc <strtoul>
10f0ac: 89 c6 mov %eax,%esi
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
10f0ae: 83 c4 10 add $0x10,%esp
10f0b1: 8b 55 d4 mov -0x2c(%ebp),%edx
10f0b4: 85 d2 test %edx,%edx
10f0b6: 74 05 je 10f0bd <rtems_string_to_pointer+0x4d>
*endptr = end;
10f0b8: 8b 45 e4 mov -0x1c(%ebp),%eax
10f0bb: 89 02 mov %eax,(%edx)
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
10f0bd: b8 0b 00 00 00 mov $0xb,%eax
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
10f0c2: 39 7d e4 cmp %edi,-0x1c(%ebp)
10f0c5: 74 1a je 10f0e1 <rtems_string_to_pointer+0x71>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10f0c7: 83 fe ff cmp $0xffffffff,%esi
10f0ca: 75 11 jne 10f0dd <rtems_string_to_pointer+0x6d><== ALWAYS TAKEN
10f0cc: e8 df 1a 00 00 call 110bb0 <__errno> <== NOT EXECUTED
10f0d1: 89 c2 mov %eax,%edx <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
10f0d3: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10f0d8: 83 3a 22 cmpl $0x22,(%edx) <== NOT EXECUTED
10f0db: 74 04 je 10f0e1 <rtems_string_to_pointer+0x71><== NOT EXECUTED
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
10f0dd: 89 33 mov %esi,(%ebx)
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
10f0df: 31 c0 xor %eax,%eax
}
10f0e1: 8d 65 f4 lea -0xc(%ebp),%esp
10f0e4: 5b pop %ebx
10f0e5: 5e pop %esi
10f0e6: 5f pop %edi
10f0e7: c9 leave
10f0e8: c3 ret
0010f148 <rtems_string_to_unsigned_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10f148: 55 push %ebp
10f149: 89 e5 mov %esp,%ebp
10f14b: 57 push %edi
10f14c: 56 push %esi
10f14d: 53 push %ebx
10f14e: 83 ec 2c sub $0x2c,%esp
10f151: 8b 7d 08 mov 0x8(%ebp),%edi
10f154: 8b 5d 0c mov 0xc(%ebp),%ebx
10f157: 8b 55 10 mov 0x10(%ebp),%edx
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10f15a: b8 09 00 00 00 mov $0x9,%eax
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10f15f: 85 db test %ebx,%ebx
10f161: 74 57 je 10f1ba <rtems_string_to_unsigned_int+0x72>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f163: 89 55 d4 mov %edx,-0x2c(%ebp)
10f166: e8 45 1a 00 00 call 110bb0 <__errno>
10f16b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f171: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
10f177: 50 push %eax
10f178: ff 75 14 pushl 0x14(%ebp)
10f17b: 8d 45 e4 lea -0x1c(%ebp),%eax
10f17e: 50 push %eax
10f17f: 57 push %edi
10f180: e8 77 4b 00 00 call 113cfc <strtoul>
10f185: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
10f187: 83 c4 10 add $0x10,%esp
10f18a: 8b 55 d4 mov -0x2c(%ebp),%edx
10f18d: 85 d2 test %edx,%edx
10f18f: 74 05 je 10f196 <rtems_string_to_unsigned_int+0x4e>
*endptr = end;
10f191: 8b 45 e4 mov -0x1c(%ebp),%eax
10f194: 89 02 mov %eax,(%edx)
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
10f196: b8 0b 00 00 00 mov $0xb,%eax
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
10f19b: 39 7d e4 cmp %edi,-0x1c(%ebp)
10f19e: 74 1a je 10f1ba <rtems_string_to_unsigned_int+0x72>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10f1a0: 83 fe ff cmp $0xffffffff,%esi
10f1a3: 75 11 jne 10f1b6 <rtems_string_to_unsigned_int+0x6e>
10f1a5: e8 06 1a 00 00 call 110bb0 <__errno>
10f1aa: 89 c2 mov %eax,%edx
return RTEMS_INVALID_NUMBER;
10f1ac: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10f1b1: 83 3a 22 cmpl $0x22,(%edx)
10f1b4: 74 04 je 10f1ba <rtems_string_to_unsigned_int+0x72><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
10f1b6: 89 33 mov %esi,(%ebx)
#endif
return RTEMS_SUCCESSFUL;
10f1b8: 31 c0 xor %eax,%eax
}
10f1ba: 8d 65 f4 lea -0xc(%ebp),%esp
10f1bd: 5b pop %ebx
10f1be: 5e pop %esi
10f1bf: 5f pop %edi
10f1c0: c9 leave
10f1c1: c3 ret
0010f250 <rtems_string_to_unsigned_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10f250: 55 push %ebp
10f251: 89 e5 mov %esp,%ebp
10f253: 57 push %edi
10f254: 56 push %esi
10f255: 53 push %ebx
10f256: 83 ec 2c sub $0x2c,%esp
10f259: 8b 7d 08 mov 0x8(%ebp),%edi
10f25c: 8b 5d 0c mov 0xc(%ebp),%ebx
10f25f: 8b 55 10 mov 0x10(%ebp),%edx
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10f262: b8 09 00 00 00 mov $0x9,%eax
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10f267: 85 db test %ebx,%ebx
10f269: 74 57 je 10f2c2 <rtems_string_to_unsigned_long+0x72>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f26b: 89 55 d4 mov %edx,-0x2c(%ebp)
10f26e: e8 3d 19 00 00 call 110bb0 <__errno>
10f273: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f279: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
10f27f: 50 push %eax
10f280: ff 75 14 pushl 0x14(%ebp)
10f283: 8d 45 e4 lea -0x1c(%ebp),%eax
10f286: 50 push %eax
10f287: 57 push %edi
10f288: e8 6f 4a 00 00 call 113cfc <strtoul>
10f28d: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
10f28f: 83 c4 10 add $0x10,%esp
10f292: 8b 55 d4 mov -0x2c(%ebp),%edx
10f295: 85 d2 test %edx,%edx
10f297: 74 05 je 10f29e <rtems_string_to_unsigned_long+0x4e>
*endptr = end;
10f299: 8b 45 e4 mov -0x1c(%ebp),%eax
10f29c: 89 02 mov %eax,(%edx)
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
10f29e: b8 0b 00 00 00 mov $0xb,%eax
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
10f2a3: 39 7d e4 cmp %edi,-0x1c(%ebp)
10f2a6: 74 1a je 10f2c2 <rtems_string_to_unsigned_long+0x72>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10f2a8: 83 fe ff cmp $0xffffffff,%esi
10f2ab: 75 11 jne 10f2be <rtems_string_to_unsigned_long+0x6e>
10f2ad: e8 fe 18 00 00 call 110bb0 <__errno>
10f2b2: 89 c2 mov %eax,%edx
return RTEMS_INVALID_NUMBER;
10f2b4: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10f2b9: 83 3a 22 cmpl $0x22,(%edx)
10f2bc: 74 04 je 10f2c2 <rtems_string_to_unsigned_long+0x72><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
10f2be: 89 33 mov %esi,(%ebx)
#endif
return RTEMS_SUCCESSFUL;
10f2c0: 31 c0 xor %eax,%eax
}
10f2c2: 8d 65 f4 lea -0xc(%ebp),%esp
10f2c5: 5b pop %ebx
10f2c6: 5e pop %esi
10f2c7: 5f pop %edi
10f2c8: c9 leave
10f2c9: c3 ret
0010f1c4 <rtems_string_to_unsigned_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10f1c4: 55 push %ebp
10f1c5: 89 e5 mov %esp,%ebp
10f1c7: 57 push %edi
10f1c8: 56 push %esi
10f1c9: 53 push %ebx
10f1ca: 83 ec 2c sub $0x2c,%esp
10f1cd: 8b 5d 0c mov 0xc(%ebp),%ebx
10f1d0: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10f1d3: b8 09 00 00 00 mov $0x9,%eax
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10f1d8: 85 db test %ebx,%ebx
10f1da: 74 6b je 10f247 <rtems_string_to_unsigned_long_long+0x83>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f1dc: e8 cf 19 00 00 call 110bb0 <__errno>
10f1e1: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f1e7: c7 03 00 00 00 00 movl $0x0,(%ebx)
10f1ed: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
10f1f4: 50 push %eax
10f1f5: ff 75 14 pushl 0x14(%ebp)
10f1f8: 8d 45 e4 lea -0x1c(%ebp),%eax
10f1fb: 50 push %eax
10f1fc: ff 75 08 pushl 0x8(%ebp)
10f1ff: e8 14 4b 00 00 call 113d18 <strtoull>
10f204: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
10f206: 83 c4 10 add $0x10,%esp
10f209: 85 ff test %edi,%edi
10f20b: 74 05 je 10f212 <rtems_string_to_unsigned_long_long+0x4e>
*endptr = end;
10f20d: 8b 45 e4 mov -0x1c(%ebp),%eax
10f210: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
10f212: b8 0b 00 00 00 mov $0xb,%eax
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
10f217: 8b 4d 08 mov 0x8(%ebp),%ecx
10f21a: 39 4d e4 cmp %ecx,-0x1c(%ebp)
10f21d: 74 28 je 10f247 <rtems_string_to_unsigned_long_long+0x83>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10f21f: 83 fa ff cmp $0xffffffff,%edx
10f222: 75 1c jne 10f240 <rtems_string_to_unsigned_long_long+0x7c>
10f224: 83 fe ff cmp $0xffffffff,%esi
10f227: 75 17 jne 10f240 <rtems_string_to_unsigned_long_long+0x7c><== NEVER TAKEN
10f229: 89 55 d4 mov %edx,-0x2c(%ebp)
10f22c: e8 7f 19 00 00 call 110bb0 <__errno>
10f231: 89 c1 mov %eax,%ecx
return RTEMS_INVALID_NUMBER;
10f233: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10f238: 83 39 22 cmpl $0x22,(%ecx)
10f23b: 8b 55 d4 mov -0x2c(%ebp),%edx
10f23e: 74 07 je 10f247 <rtems_string_to_unsigned_long_long+0x83><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
10f240: 89 33 mov %esi,(%ebx)
10f242: 89 53 04 mov %edx,0x4(%ebx)
#endif
return RTEMS_SUCCESSFUL;
10f245: 31 c0 xor %eax,%eax
}
10f247: 8d 65 f4 lea -0xc(%ebp),%esp
10f24a: 5b pop %ebx
10f24b: 5e pop %esi
10f24c: 5f pop %edi
10f24d: c9 leave
10f24e: c3 ret
0010707c <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
10707c: 55 push %ebp
10707d: 89 e5 mov %esp,%ebp
10707f: 57 push %edi
107080: 56 push %esi
107081: 53 push %ebx
107082: 81 ec d8 01 00 00 sub $0x1d8,%esp
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
107088: 31 c0 xor %eax,%eax
10708a: 83 c9 ff or $0xffffffff,%ecx
10708d: 8b 7d 08 mov 0x8(%ebp),%edi
107090: f2 ae repnz scas %es:(%edi),%al
107092: f7 d1 not %ecx
107094: 49 dec %ecx
107095: 6a 00 push $0x0
107097: 8d 45 d0 lea -0x30(%ebp),%eax
10709a: 50 push %eax
10709b: 6a 00 push $0x0
10709d: 51 push %ecx
10709e: ff 75 08 pushl 0x8(%ebp)
1070a1: e8 d4 09 00 00 call 107a7a <rtems_filesystem_evaluate_path>
1070a6: 89 85 54 fe ff ff mov %eax,-0x1ac(%ebp)
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
1070ac: 83 c4 20 add $0x20,%esp
1070af: 85 c0 test %eax,%eax
1070b1: 0f 85 d9 01 00 00 jne 107290 <rtems_tarfs_load+0x214>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
1070b7: 8b 45 dc mov -0x24(%ebp),%eax
1070ba: 31 f6 xor %esi,%esi
1070bc: 3d 78 28 12 00 cmp $0x122878,%eax
1070c1: 74 1b je 1070de <rtems_tarfs_load+0x62>
1070c3: 3d 70 32 12 00 cmp $0x123270,%eax
1070c8: 0f 85 c2 01 00 00 jne 107290 <rtems_tarfs_load+0x214><== ALWAYS TAKEN
1070ce: 8b b5 54 fe ff ff mov -0x1ac(%ebp),%esi <== NOT EXECUTED
1070d4: eb 08 jmp 1070de <rtems_tarfs_load+0x62> <== NOT EXECUTED
1070d6: 8b b5 50 fe ff ff mov -0x1b0(%ebp),%esi
1070dc: eb 18 jmp 1070f6 <rtems_tarfs_load+0x7a>
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
1070de: 8d 45 bc lea -0x44(%ebp),%eax
1070e1: 89 85 34 fe ff ff mov %eax,-0x1cc(%ebp)
1070e7: 8d 55 d0 lea -0x30(%ebp),%edx
1070ea: 89 95 30 fe ff ff mov %edx,-0x1d0(%ebp)
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
1070f0: 8d 9d 58 fe ff ff lea -0x1a8(%ebp),%ebx
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
1070f6: 8d 86 00 02 00 00 lea 0x200(%esi),%eax
1070fc: 89 85 50 fe ff ff mov %eax,-0x1b0(%ebp)
107102: 8b 55 10 mov 0x10(%ebp),%edx
107105: 39 d0 cmp %edx,%eax
107107: 0f 87 8d 01 00 00 ja 10729a <rtems_tarfs_load+0x21e><== NEVER TAKEN
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
10710d: 03 75 0c add 0xc(%ebp),%esi
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
107110: 8d 86 01 01 00 00 lea 0x101(%esi),%eax
107116: 52 push %edx
107117: 6a 05 push $0x5
107119: 68 c0 28 12 00 push $0x1228c0
10711e: 50 push %eax
10711f: e8 e8 d1 00 00 call 11430c <strncmp>
107124: 83 c4 10 add $0x10,%esp
107127: 85 c0 test %eax,%eax
107129: 0f 85 6b 01 00 00 jne 10729a <rtems_tarfs_load+0x21e>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
10712f: 50 push %eax
107130: 6a 63 push $0x63
107132: 56 push %esi
107133: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax
107139: 50 push %eax
10713a: e8 5d d2 00 00 call 11439c <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
10713f: c6 45 bb 00 movb $0x0,-0x45(%ebp)
linkflag = hdr_ptr[156];
107143: 8a 96 9c 00 00 00 mov 0x9c(%esi),%dl
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
107149: 59 pop %ecx
10714a: 5f pop %edi
10714b: 6a 08 push $0x8
10714d: 8d 46 64 lea 0x64(%esi),%eax
107150: 50 push %eax
107151: 88 95 44 fe ff ff mov %dl,-0x1bc(%ebp)
107157: e8 34 6c 00 00 call 10dd90 <_rtems_octal2ulong>
10715c: 89 85 48 fe ff ff mov %eax,-0x1b8(%ebp)
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
107162: 5f pop %edi
107163: 58 pop %eax
107164: 6a 0c push $0xc
107166: 8d 46 7c lea 0x7c(%esi),%eax
107169: 50 push %eax
10716a: e8 21 6c 00 00 call 10dd90 <_rtems_octal2ulong>
10716f: 89 85 4c fe ff ff mov %eax,-0x1b4(%ebp)
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
107175: 5a pop %edx
107176: 59 pop %ecx
107177: 6a 08 push $0x8
107179: 8d 86 94 00 00 00 lea 0x94(%esi),%eax
10717f: 50 push %eax
107180: e8 0b 6c 00 00 call 10dd90 <_rtems_octal2ulong>
107185: 89 c7 mov %eax,%edi
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
107187: 89 34 24 mov %esi,(%esp)
10718a: e8 2f 6c 00 00 call 10ddbe <_rtems_tar_header_checksum>
10718f: 83 c4 10 add $0x10,%esp
107192: 39 f8 cmp %edi,%eax
107194: 8a 95 44 fe ff ff mov -0x1bc(%ebp),%dl
10719a: 0f 85 fa 00 00 00 jne 10729a <rtems_tarfs_load+0x21e><== NEVER TAKEN
* Generate an IMFS node depending on the file type.
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
1071a0: 80 fa 35 cmp $0x35,%dl
1071a3: 75 57 jne 1071fc <rtems_tarfs_load+0x180>
strcpy(full_filename, mountpoint);
1071a5: 50 push %eax
1071a6: 50 push %eax
1071a7: ff 75 08 pushl 0x8(%ebp)
1071aa: 53 push %ebx
1071ab: e8 f4 cd 00 00 call 113fa4 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
1071b0: 31 c0 xor %eax,%eax
1071b2: 83 c9 ff or $0xffffffff,%ecx
1071b5: 89 df mov %ebx,%edi
1071b7: f2 ae repnz scas %es:(%edi),%al
1071b9: f7 d1 not %ecx
1071bb: 83 c4 10 add $0x10,%esp
1071be: 80 bc 0d 56 fe ff ff cmpb $0x2f,-0x1aa(%ebp,%ecx,1)
1071c5: 2f
1071c6: 74 10 je 1071d8 <rtems_tarfs_load+0x15c><== ALWAYS TAKEN
strcat(full_filename, "/");
1071c8: 57 push %edi <== NOT EXECUTED
1071c9: 57 push %edi <== NOT EXECUTED
1071ca: 68 99 e7 11 00 push $0x11e799 <== NOT EXECUTED
1071cf: 53 push %ebx <== NOT EXECUTED
1071d0: e8 1b cc 00 00 call 113df0 <strcat> <== NOT EXECUTED
1071d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
strcat(full_filename, filename);
1071d8: 56 push %esi
1071d9: 56 push %esi
1071da: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
1071e0: 52 push %edx
1071e1: 53 push %ebx
1071e2: e8 09 cc 00 00 call 113df0 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
1071e7: 5a pop %edx
1071e8: 59 pop %ecx
1071e9: 68 ff 01 00 00 push $0x1ff
1071ee: 53 push %ebx
1071ef: e8 58 0f 00 00 call 10814c <mkdir>
1071f4: 83 c4 10 add $0x10,%esp
1071f7: e9 da fe ff ff jmp 1070d6 <rtems_tarfs_load+0x5a>
* IMFS_create_node was ONLY passed a NULL when we created the
* root node. We added a new IMFS_create_root_node() so this
* path no longer existed. The result was simpler code which
* should not have this path.
*/
else if (linkflag == REGTYPE) {
1071fc: 80 fa 30 cmp $0x30,%dl
1071ff: 0f 85 d1 fe ff ff jne 1070d6 <rtems_tarfs_load+0x5a>
const char *name;
loc = root_loc;
107205: b9 05 00 00 00 mov $0x5,%ecx
10720a: 8b bd 34 fe ff ff mov -0x1cc(%ebp),%edi
107210: 8b b5 30 fe ff ff mov -0x1d0(%ebp),%esi
107216: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
107218: 50 push %eax
107219: 8d 45 e4 lea -0x1c(%ebp),%eax
10721c: 50 push %eax
10721d: 8d 55 bc lea -0x44(%ebp),%edx
107220: 52 push %edx
107221: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax
107227: 50 push %eax
107228: e8 38 76 00 00 call 10e865 <IMFS_evaluate_for_make>
10722d: 83 c4 10 add $0x10,%esp
107230: 85 c0 test %eax,%eax
107232: 75 41 jne 107275 <rtems_tarfs_load+0x1f9><== NEVER TAKEN
node = IMFS_create_node(
107234: 83 ec 0c sub $0xc,%esp
107237: 6a 00 push $0x0
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
107239: 8b 85 48 fe ff ff mov -0x1b8(%ebp),%eax
10723f: 25 ff 01 00 00 and $0x1ff,%eax
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
107244: 80 cc 80 or $0x80,%ah
107247: 50 push %eax
107248: ff 75 e4 pushl -0x1c(%ebp)
10724b: 6a 06 push $0x6
10724d: 8d 55 bc lea -0x44(%ebp),%edx
107250: 52 push %edx
107251: e8 2b 71 00 00 call 10e381 <IMFS_create_node>
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
107256: 8b 95 4c fe ff ff mov -0x1b4(%ebp),%edx
10725c: 89 50 50 mov %edx,0x50(%eax)
10725f: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.linearfile.direct = &tar_image[offset];
107266: 8b 55 0c mov 0xc(%ebp),%edx
107269: 03 95 50 fe ff ff add -0x1b0(%ebp),%edx
10726f: 89 50 58 mov %edx,0x58(%eax)
107272: 83 c4 20 add $0x20,%esp
}
nblocks = (((file_size) + 511) & ~511) / 512;
107275: 8b 85 4c fe ff ff mov -0x1b4(%ebp),%eax
10727b: 05 ff 01 00 00 add $0x1ff,%eax
offset += 512 * nblocks;
107280: 25 00 fe ff ff and $0xfffffe00,%eax
107285: 01 85 50 fe ff ff add %eax,-0x1b0(%ebp)
10728b: e9 46 fe ff ff jmp 1070d6 <rtems_tarfs_load+0x5a>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
return -1;
107290: c7 85 54 fe ff ff ff movl $0xffffffff,-0x1ac(%ebp)
107297: ff ff ff
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
10729a: 8b 85 54 fe ff ff mov -0x1ac(%ebp),%eax
1072a0: 8d 65 f4 lea -0xc(%ebp),%esp
1072a3: 5b pop %ebx
1072a4: 5e pop %esi
1072a5: 5f pop %edi
1072a6: c9 leave
1072a7: c3 ret
0010fe44 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
10fe44: 55 push %ebp
10fe45: 89 e5 mov %esp,%ebp
10fe47: 57 push %edi
10fe48: 56 push %esi
10fe49: 53 push %ebx
10fe4a: 83 ec 1c sub $0x1c,%esp
10fe4d: 8b 4d 10 mov 0x10(%ebp),%ecx
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
10fe50: b8 09 00 00 00 mov $0x9,%eax
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
10fe55: 85 c9 test %ecx,%ecx
10fe57: 0f 84 fb 00 00 00 je 10ff58 <rtems_task_mode+0x114> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
10fe5d: 8b 35 a8 34 12 00 mov 0x1234a8,%esi
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10fe63: 8b 9e f0 00 00 00 mov 0xf0(%esi),%ebx
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
10fe69: 80 7e 74 01 cmpb $0x1,0x74(%esi)
10fe6d: 19 ff sbb %edi,%edi
10fe6f: 81 e7 00 01 00 00 and $0x100,%edi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
10fe75: 83 7e 7c 00 cmpl $0x0,0x7c(%esi)
10fe79: 74 06 je 10fe81 <rtems_task_mode+0x3d>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
10fe7b: 81 cf 00 02 00 00 or $0x200,%edi
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
10fe81: 80 7b 08 01 cmpb $0x1,0x8(%ebx)
10fe85: 19 d2 sbb %edx,%edx
10fe87: 81 e2 00 04 00 00 and $0x400,%edx
old_mode |= _ISR_Get_level();
10fe8d: 89 55 e4 mov %edx,-0x1c(%ebp)
10fe90: 89 4d e0 mov %ecx,-0x20(%ebp)
10fe93: e8 bd d2 ff ff call 10d155 <_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;
10fe98: 8b 55 e4 mov -0x1c(%ebp),%edx
10fe9b: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
10fe9d: 09 f8 or %edi,%eax
10fe9f: 8b 4d e0 mov -0x20(%ebp),%ecx
10fea2: 89 01 mov %eax,(%ecx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
10fea4: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
10feab: 74 0b je 10feb8 <rtems_task_mode+0x74>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
10fead: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp)
10feb4: 0f 94 46 74 sete 0x74(%esi)
if ( mask & RTEMS_TIMESLICE_MASK ) {
10feb8: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
10febf: 74 21 je 10fee2 <rtems_task_mode+0x9e>
if ( _Modes_Is_timeslice(mode_set) ) {
10fec1: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
10fec8: 74 11 je 10fedb <rtems_task_mode+0x97>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
10feca: c7 46 7c 01 00 00 00 movl $0x1,0x7c(%esi)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10fed1: a1 34 32 12 00 mov 0x123234,%eax
10fed6: 89 46 78 mov %eax,0x78(%esi)
10fed9: eb 07 jmp 10fee2 <rtems_task_mode+0x9e>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
10fedb: c7 46 7c 00 00 00 00 movl $0x0,0x7c(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
10fee2: f6 45 0c 01 testb $0x1,0xc(%ebp)
10fee6: 74 0a je 10fef2 <rtems_task_mode+0xae>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
10fee8: f6 45 08 01 testb $0x1,0x8(%ebp)
10feec: 74 03 je 10fef1 <rtems_task_mode+0xad>
10feee: fa cli
10feef: eb 01 jmp 10fef2 <rtems_task_mode+0xae>
10fef1: fb sti
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
10fef2: 31 c9 xor %ecx,%ecx
if ( mask & RTEMS_ASR_MASK ) {
10fef4: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
10fefb: 74 2a je 10ff27 <rtems_task_mode+0xe3>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
10fefd: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp)
10ff04: 0f 94 c0 sete %al
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
10ff07: 3a 43 08 cmp 0x8(%ebx),%al
10ff0a: 74 1b je 10ff27 <rtems_task_mode+0xe3>
asr->is_enabled = is_asr_enabled;
10ff0c: 88 43 08 mov %al,0x8(%ebx)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
10ff0f: 9c pushf
10ff10: fa cli
10ff11: 58 pop %eax
_signals = information->signals_pending;
10ff12: 8b 53 18 mov 0x18(%ebx),%edx
information->signals_pending = information->signals_posted;
10ff15: 8b 4b 14 mov 0x14(%ebx),%ecx
10ff18: 89 4b 18 mov %ecx,0x18(%ebx)
information->signals_posted = _signals;
10ff1b: 89 53 14 mov %edx,0x14(%ebx)
_ISR_Enable( _level );
10ff1e: 50 push %eax
10ff1f: 9d popf
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
10ff20: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10ff24: 0f 95 c1 setne %cl
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
10ff27: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
10ff29: 83 3d e4 33 12 00 03 cmpl $0x3,0x1233e4
10ff30: 75 26 jne 10ff58 <rtems_task_mode+0x114> <== NEVER TAKEN
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
10ff32: 8b 15 a8 34 12 00 mov 0x1234a8,%edx
if ( are_signals_pending ||
10ff38: 84 c9 test %cl,%cl
10ff3a: 75 0e jne 10ff4a <rtems_task_mode+0x106>
10ff3c: 3b 15 ac 34 12 00 cmp 0x1234ac,%edx
10ff42: 74 14 je 10ff58 <rtems_task_mode+0x114>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
10ff44: 80 7a 74 00 cmpb $0x0,0x74(%edx)
10ff48: 74 0e je 10ff58 <rtems_task_mode+0x114> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
10ff4a: c6 05 b4 34 12 00 01 movb $0x1,0x1234b4
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
10ff51: e8 4e bd ff ff call 10bca4 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
10ff56: 31 c0 xor %eax,%eax
}
10ff58: 83 c4 1c add $0x1c,%esp
10ff5b: 5b pop %ebx
10ff5c: 5e pop %esi
10ff5d: 5f pop %edi
10ff5e: c9 leave
10ff5f: c3 ret
0010dd24 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10dd24: 55 push %ebp
10dd25: 89 e5 mov %esp,%ebp
10dd27: 56 push %esi
10dd28: 53 push %ebx
10dd29: 83 ec 10 sub $0x10,%esp
10dd2c: 8b 5d 0c mov 0xc(%ebp),%ebx
10dd2f: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10dd32: 85 db test %ebx,%ebx
10dd34: 74 10 je 10dd46 <rtems_task_set_priority+0x22>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10dd36: 0f b6 15 d4 34 12 00 movzbl 0x1234d4,%edx
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10dd3d: b8 13 00 00 00 mov $0x13,%eax
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10dd42: 39 d3 cmp %edx,%ebx
10dd44: 77 52 ja 10dd98 <rtems_task_set_priority+0x74>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10dd46: b8 09 00 00 00 mov $0x9,%eax
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10dd4b: 85 f6 test %esi,%esi
10dd4d: 74 49 je 10dd98 <rtems_task_set_priority+0x74>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10dd4f: 51 push %ecx
10dd50: 51 push %ecx
10dd51: 8d 45 f4 lea -0xc(%ebp),%eax
10dd54: 50 push %eax
10dd55: ff 75 08 pushl 0x8(%ebp)
10dd58: e8 17 1b 00 00 call 10f874 <_Thread_Get>
switch ( location ) {
10dd5d: 83 c4 10 add $0x10,%esp
10dd60: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10dd64: 75 2d jne 10dd93 <rtems_task_set_priority+0x6f>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10dd66: 8b 50 14 mov 0x14(%eax),%edx
10dd69: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10dd6b: 85 db test %ebx,%ebx
10dd6d: 74 1b je 10dd8a <rtems_task_set_priority+0x66>
the_thread->real_priority = new_priority;
10dd6f: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10dd72: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10dd76: 74 05 je 10dd7d <rtems_task_set_priority+0x59>
10dd78: 39 58 14 cmp %ebx,0x14(%eax)
10dd7b: 76 0d jbe 10dd8a <rtems_task_set_priority+0x66><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10dd7d: 52 push %edx
10dd7e: 6a 00 push $0x0
10dd80: 53 push %ebx
10dd81: 50 push %eax
10dd82: e8 39 16 00 00 call 10f3c0 <_Thread_Change_priority>
10dd87: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10dd8a: e8 c3 1a 00 00 call 10f852 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10dd8f: 31 c0 xor %eax,%eax
10dd91: eb 05 jmp 10dd98 <rtems_task_set_priority+0x74>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10dd93: b8 04 00 00 00 mov $0x4,%eax
}
10dd98: 8d 65 f8 lea -0x8(%ebp),%esp
10dd9b: 5b pop %ebx
10dd9c: 5e pop %esi
10dd9d: c9 leave
10dd9e: c3 ret
001084f7 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
1084f7: 55 push %ebp
1084f8: 89 e5 mov %esp,%ebp
1084fa: 56 push %esi
1084fb: 53 push %ebx
1084fc: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
1084ff: 8b 06 mov (%esi),%eax
108501: 8b 58 34 mov 0x34(%eax),%ebx
rtems_status_code sc;
sc = rtems_semaphore_obtain(
108504: 51 push %ecx
108505: 6a 00 push $0x0
108507: 6a 00 push $0x0
108509: ff 35 5c 31 12 00 pushl 0x12315c
10850f: e8 40 1c 00 00 call 10a154 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
108514: 83 c4 10 add $0x10,%esp
108517: 85 c0 test %eax,%eax
108519: 0f 85 88 00 00 00 jne 1085a7 <rtems_termios_close+0xb0><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
10851f: 8b 43 08 mov 0x8(%ebx),%eax
108522: 48 dec %eax
108523: 89 43 08 mov %eax,0x8(%ebx)
108526: 85 c0 test %eax,%eax
108528: 0f 85 3e 01 00 00 jne 10866c <rtems_termios_close+0x175>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
10852e: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
108534: c1 e0 05 shl $0x5,%eax
108537: 8b 80 1c 2e 12 00 mov 0x122e1c(%eax),%eax
10853d: 85 c0 test %eax,%eax
10853f: 74 08 je 108549 <rtems_termios_close+0x52>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
108541: 83 ec 0c sub $0xc,%esp
108544: 53 push %ebx
108545: ff d0 call *%eax
108547: eb 26 jmp 10856f <rtems_termios_close+0x78>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108549: 52 push %edx
10854a: 6a 00 push $0x0
10854c: 6a 00 push $0x0
10854e: ff 73 18 pushl 0x18(%ebx)
108551: e8 fe 1b 00 00 call 10a154 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
108556: 83 c4 10 add $0x10,%esp
108559: 85 c0 test %eax,%eax
10855b: 75 4a jne 1085a7 <rtems_termios_close+0xb0><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
10855d: 89 d8 mov %ebx,%eax
10855f: e8 10 fb ff ff call 108074 <drainOutput>
rtems_semaphore_release (tty->osem);
108564: 83 ec 0c sub $0xc,%esp
108567: ff 73 18 pushl 0x18(%ebx)
10856a: e8 d1 1c 00 00 call 10a240 <rtems_semaphore_release>
10856f: 83 c4 10 add $0x10,%esp
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
108572: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
108579: 75 35 jne 1085b0 <rtems_termios_close+0xb9>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
10857b: 50 push %eax
10857c: 50 push %eax
10857d: 6a 01 push $0x1
10857f: ff b3 c4 00 00 00 pushl 0xc4(%ebx)
108585: e8 62 17 00 00 call 109cec <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10858a: 83 c4 10 add $0x10,%esp
10858d: 85 c0 test %eax,%eax
10858f: 75 16 jne 1085a7 <rtems_termios_close+0xb0><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
108591: 51 push %ecx
108592: 51 push %ecx
108593: 6a 01 push $0x1
108595: ff b3 c8 00 00 00 pushl 0xc8(%ebx)
10859b: e8 4c 17 00 00 call 109cec <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
1085a0: 83 c4 10 add $0x10,%esp
1085a3: 85 c0 test %eax,%eax
1085a5: 74 09 je 1085b0 <rtems_termios_close+0xb9><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
1085a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1085aa: 50 push %eax <== NOT EXECUTED
1085ab: e8 64 21 00 00 call 10a714 <rtems_fatal_error_occurred><== NOT EXECUTED
}
if (tty->device.lastClose)
1085b0: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax
1085b6: 85 c0 test %eax,%eax
1085b8: 74 0d je 1085c7 <rtems_termios_close+0xd0>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
1085ba: 52 push %edx
1085bb: 56 push %esi
1085bc: ff 73 10 pushl 0x10(%ebx)
1085bf: ff 73 0c pushl 0xc(%ebx)
1085c2: ff d0 call *%eax
1085c4: 83 c4 10 add $0x10,%esp
if (tty->forw == NULL) {
1085c7: 8b 13 mov (%ebx),%edx
1085c9: 85 d2 test %edx,%edx
1085cb: 8b 43 04 mov 0x4(%ebx),%eax
1085ce: 75 11 jne 1085e1 <rtems_termios_close+0xea>
rtems_termios_ttyTail = tty->back;
1085d0: a3 60 31 12 00 mov %eax,0x123160
if ( rtems_termios_ttyTail != NULL ) {
1085d5: 85 c0 test %eax,%eax
1085d7: 74 0b je 1085e4 <rtems_termios_close+0xed>
rtems_termios_ttyTail->forw = NULL;
1085d9: c7 00 00 00 00 00 movl $0x0,(%eax)
1085df: eb 03 jmp 1085e4 <rtems_termios_close+0xed>
}
} else {
tty->forw->back = tty->back;
1085e1: 89 42 04 mov %eax,0x4(%edx)
}
if (tty->back == NULL) {
1085e4: 8b 53 04 mov 0x4(%ebx),%edx
1085e7: 85 d2 test %edx,%edx
1085e9: 8b 03 mov (%ebx),%eax
1085eb: 75 12 jne 1085ff <rtems_termios_close+0x108><== NEVER TAKEN
rtems_termios_ttyHead = tty->forw;
1085ed: a3 64 31 12 00 mov %eax,0x123164
if ( rtems_termios_ttyHead != NULL ) {
1085f2: 85 c0 test %eax,%eax
1085f4: 74 0b je 108601 <rtems_termios_close+0x10a>
rtems_termios_ttyHead->back = NULL;
1085f6: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
1085fd: eb 02 jmp 108601 <rtems_termios_close+0x10a>
}
} else {
tty->back->forw = tty->forw;
1085ff: 89 02 mov %eax,(%edx)
}
rtems_semaphore_delete (tty->isem);
108601: 83 ec 0c sub $0xc,%esp
108604: ff 73 14 pushl 0x14(%ebx)
108607: e8 b8 1a 00 00 call 10a0c4 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
10860c: 59 pop %ecx
10860d: ff 73 18 pushl 0x18(%ebx)
108610: e8 af 1a 00 00 call 10a0c4 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
108615: 5a pop %edx
108616: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10861c: e8 a3 1a 00 00 call 10a0c4 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
108621: 83 c4 10 add $0x10,%esp
108624: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
10862b: 74 09 je 108636 <rtems_termios_close+0x13f>
10862d: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
108634: 75 0e jne 108644 <rtems_termios_close+0x14d>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
108636: 83 ec 0c sub $0xc,%esp
108639: ff 73 68 pushl 0x68(%ebx)
10863c: e8 83 1a 00 00 call 10a0c4 <rtems_semaphore_delete>
108641: 83 c4 10 add $0x10,%esp
free (tty->rawInBuf.theBuf);
108644: 83 ec 0c sub $0xc,%esp
108647: ff 73 58 pushl 0x58(%ebx)
10864a: e8 e9 ec ff ff call 107338 <free>
free (tty->rawOutBuf.theBuf);
10864f: 58 pop %eax
108650: ff 73 7c pushl 0x7c(%ebx)
108653: e8 e0 ec ff ff call 107338 <free>
free (tty->cbuf);
108658: 5e pop %esi
108659: ff 73 1c pushl 0x1c(%ebx)
10865c: e8 d7 ec ff ff call 107338 <free>
free (tty);
108661: 89 1c 24 mov %ebx,(%esp)
108664: e8 cf ec ff ff call 107338 <free>
108669: 83 c4 10 add $0x10,%esp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
10866c: 83 ec 0c sub $0xc,%esp
10866f: ff 35 5c 31 12 00 pushl 0x12315c
108675: e8 c6 1b 00 00 call 10a240 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
10867a: 31 c0 xor %eax,%eax
10867c: 8d 65 f8 lea -0x8(%ebp),%esp
10867f: 5b pop %ebx
108680: 5e pop %esi
108681: c9 leave
108682: c3 ret
00109830 <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)
{
109830: 55 push %ebp
109831: 89 e5 mov %esp,%ebp
109833: 83 ec 08 sub $0x8,%esp
109836: 8b 45 08 mov 0x8(%ebp),%eax
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
109839: 8b 55 0c mov 0xc(%ebp),%edx
10983c: 01 90 90 00 00 00 add %edx,0x90(%eax)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
109842: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
109849: 75 1f jne 10986a <rtems_termios_dequeue_characters+0x3a>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
10984b: 52 push %edx
10984c: 52 push %edx
10984d: 6a 02 push $0x2
10984f: ff b0 c8 00 00 00 pushl 0xc8(%eax)
109855: e8 92 04 00 00 call 109cec <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10985a: 83 c4 10 add $0x10,%esp
10985d: 85 c0 test %eax,%eax
10985f: 74 30 je 109891 <rtems_termios_dequeue_characters+0x61><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
109861: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109864: 50 push %eax <== NOT EXECUTED
109865: e8 aa 0e 00 00 call 10a714 <rtems_fatal_error_occurred><== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
10986a: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax)
109871: 75 15 jne 109888 <rtems_termios_dequeue_characters+0x58>
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
109873: 8b 15 cc 2e 12 00 mov 0x122ecc,%edx
109879: 85 d2 test %edx,%edx
10987b: 74 14 je 109891 <rtems_termios_dequeue_characters+0x61><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
10987d: 83 ec 0c sub $0xc,%esp
109880: 50 push %eax
109881: ff d2 call *%edx
109883: 83 c4 10 add $0x10,%esp
109886: eb 09 jmp 109891 <rtems_termios_dequeue_characters+0x61>
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
109888: 89 45 08 mov %eax,0x8(%ebp)
}
10988b: c9 leave
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
10988c: e9 6d fd ff ff jmp 1095fe <rtems_termios_refill_transmitter>
}
109891: 31 c0 xor %eax,%eax
109893: c9 leave
109894: c3 ret
0010930f <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, char *buf, int len)
{
10930f: 55 push %ebp
109310: 89 e5 mov %esp,%ebp
109312: 57 push %edi
109313: 56 push %esi
109314: 53 push %ebx
109315: 83 ec 2c sub $0x2c,%esp
109318: 8b 5d 08 mov 0x8(%ebp),%ebx
10931b: 8b 7d 0c mov 0xc(%ebp),%edi
10931e: 8b 4d 10 mov 0x10(%ebp),%ecx
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) {
109321: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
109327: c1 e0 05 shl $0x5,%eax
10932a: 89 ca mov %ecx,%edx
10932c: 83 b8 28 2e 12 00 00 cmpl $0x0,0x122e28(%eax)
109333: 75 3b jne 109370 <rtems_termios_enqueue_raw_characters+0x61>
109335: 89 4d e0 mov %ecx,-0x20(%ebp)
109338: c6 45 df 00 movb $0x0,-0x21(%ebp)
10933c: 31 f6 xor %esi,%esi
/*
* 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);
10933e: 8d 43 30 lea 0x30(%ebx),%eax
109341: 89 45 d4 mov %eax,-0x2c(%ebp)
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,
109344: 8d 53 4a lea 0x4a(%ebx),%edx
109347: 89 55 d0 mov %edx,-0x30(%ebp)
10934a: e9 26 02 00 00 jmp 109575 <rtems_termios_enqueue_raw_characters+0x266>
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
10934f: 0f be 0f movsbl (%edi),%ecx
109352: 47 inc %edi
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
109353: 56 push %esi
109354: 56 push %esi
109355: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10935b: c1 e0 05 shl $0x5,%eax
10935e: 53 push %ebx
10935f: 51 push %ecx
109360: 89 55 cc mov %edx,-0x34(%ebp)
109363: ff 90 28 2e 12 00 call *0x122e28(%eax)
109369: 8b 55 cc mov -0x34(%ebp),%edx
10936c: 4a dec %edx
10936d: 83 c4 10 add $0x10,%esp
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
109370: 85 d2 test %edx,%edx
109372: 75 db jne 10934f <rtems_termios_enqueue_raw_characters+0x40>
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
109374: 31 f6 xor %esi,%esi
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
109376: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx)
10937d: 0f 85 0d 02 00 00 jne 109590 <rtems_termios_enqueue_raw_characters+0x281><== NEVER TAKEN
109383: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
109389: 89 d6 mov %edx,%esi
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
10938b: 85 c0 test %eax,%eax
10938d: 0f 84 fd 01 00 00 je 109590 <rtems_termios_enqueue_raw_characters+0x281><== NEVER TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
109393: 51 push %ecx
109394: 51 push %ecx
109395: ff b3 e0 00 00 00 pushl 0xe0(%ebx)
10939b: 8d 53 30 lea 0x30(%ebx),%edx
10939e: 52 push %edx
10939f: ff d0 call *%eax
tty->tty_rcvwakeup = 1;
1093a1: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx)
1093a8: 00 00 00
1093ab: e9 dd 01 00 00 jmp 10958d <rtems_termios_enqueue_raw_characters+0x27e>
}
return 0;
}
while (len--) {
c = *buf++;
1093b0: 8a 0f mov (%edi),%cl
1093b2: 88 4d de mov %cl,-0x22(%ebp)
1093b5: 47 inc %edi
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
1093b6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1093bc: f6 c4 02 test $0x2,%ah
1093bf: 74 46 je 109407 <rtems_termios_enqueue_raw_characters+0xf8>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
1093c1: 0f be c1 movsbl %cl,%eax
1093c4: 0f b6 53 4a movzbl 0x4a(%ebx),%edx
1093c8: 39 d0 cmp %edx,%eax
1093ca: 75 28 jne 1093f4 <rtems_termios_enqueue_raw_characters+0xe5>
if (c == tty->termios.c_cc[VSTART]) {
1093cc: 0f b6 53 49 movzbl 0x49(%ebx),%edx
1093d0: 39 d0 cmp %edx,%eax
1093d2: 75 0b jne 1093df <rtems_termios_enqueue_raw_characters+0xd0><== ALWAYS TAKEN
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
1093d4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1093da: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED
1093dd: eb 09 jmp 1093e8 <rtems_termios_enqueue_raw_characters+0xd9><== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
1093df: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1093e5: 83 c8 10 or $0x10,%eax
1093e8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
1093ee: c6 45 df 01 movb $0x1,-0x21(%ebp)
1093f2: eb 19 jmp 10940d <rtems_termios_enqueue_raw_characters+0xfe>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
1093f4: 0f b6 53 49 movzbl 0x49(%ebx),%edx
1093f8: 39 d0 cmp %edx,%eax
1093fa: 75 0b jne 109407 <rtems_termios_enqueue_raw_characters+0xf8><== ALWAYS TAKEN
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
1093fc: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109402: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED
109405: eb e1 jmp 1093e8 <rtems_termios_enqueue_raw_characters+0xd9><== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
109407: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
10940b: 74 51 je 10945e <rtems_termios_enqueue_raw_characters+0x14f><== ALWAYS TAKEN
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
10940d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109413: 83 e0 30 and $0x30,%eax
109416: 83 f8 20 cmp $0x20,%eax
109419: 0f 85 53 01 00 00 jne 109572 <rtems_termios_enqueue_raw_characters+0x263><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
10941f: 9c pushf <== NOT EXECUTED
109420: fa cli <== NOT EXECUTED
109421: 8f 45 e4 popl -0x1c(%ebp) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
109424: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10942a: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
10942d: 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) {
109433: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
10943a: 74 19 je 109455 <rtems_termios_enqueue_raw_characters+0x146><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
10943c: 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)(
109442: 52 push %edx <== NOT EXECUTED
109443: 6a 01 push $0x1 <== NOT EXECUTED
109445: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
109448: 50 push %eax <== NOT EXECUTED
109449: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10944c: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
109452: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
109455: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
109458: 9d popf <== NOT EXECUTED
109459: e9 14 01 00 00 jmp 109572 <rtems_termios_enqueue_raw_characters+0x263><== NOT EXECUTED
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
10945e: 8b 43 60 mov 0x60(%ebx),%eax
109461: 8b 4b 64 mov 0x64(%ebx),%ecx
109464: 40 inc %eax
109465: 31 d2 xor %edx,%edx
109467: f7 f1 div %ecx
109469: 89 55 e4 mov %edx,-0x1c(%ebp)
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
10946c: 9c pushf
10946d: fa cli
10946e: 8f 45 d8 popl -0x28(%ebp)
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
109471: 8b 53 5c mov 0x5c(%ebx),%edx
109474: 8b 43 64 mov 0x64(%ebx),%eax
% tty->rawInBuf.Size) > tty->highwater) &&
109477: 8b 4b 64 mov 0x64(%ebx),%ecx
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
10947a: 29 d0 sub %edx,%eax
10947c: 03 45 e4 add -0x1c(%ebp),%eax
% tty->rawInBuf.Size) > tty->highwater) &&
10947f: 31 d2 xor %edx,%edx
109481: f7 f1 div %ecx
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
109483: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx
109489: 0f 86 98 00 00 00 jbe 109527 <rtems_termios_enqueue_raw_characters+0x218><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
10948f: 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) &&
109495: a8 01 test $0x1,%al <== NOT EXECUTED
109497: 0f 85 8a 00 00 00 jne 109527 <rtems_termios_enqueue_raw_characters+0x218><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
10949d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1094a3: 83 c8 01 or $0x1,%eax <== NOT EXECUTED
1094a6: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
1094ac: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1094b2: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED
1094b7: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED
1094bc: 75 33 jne 1094f1 <rtems_termios_enqueue_raw_characters+0x1e2><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
1094be: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1094c4: a8 20 test $0x20,%al <== NOT EXECUTED
1094c6: 75 09 jne 1094d1 <rtems_termios_enqueue_raw_characters+0x1c2><== NOT EXECUTED
1094c8: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
1094cf: 75 56 jne 109527 <rtems_termios_enqueue_raw_characters+0x218><== 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;
1094d1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1094d7: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
1094da: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
1094e0: 51 push %ecx <== NOT EXECUTED
1094e1: 6a 01 push $0x1 <== NOT EXECUTED
1094e3: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
1094e6: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1094e9: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
1094ef: eb 33 jmp 109524 <rtems_termios_enqueue_raw_characters+0x215><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
1094f1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1094f7: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED
1094fc: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED
109501: 75 24 jne 109527 <rtems_termios_enqueue_raw_characters+0x218><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
109503: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109509: 83 c8 04 or $0x4,%eax <== NOT EXECUTED
10950c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
109512: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED
109518: 85 c0 test %eax,%eax <== NOT EXECUTED
10951a: 74 0b je 109527 <rtems_termios_enqueue_raw_characters+0x218><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
10951c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10951f: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
109522: ff d0 call *%eax <== NOT EXECUTED
109524: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
109527: ff 75 d8 pushl -0x28(%ebp)
10952a: 9d popf
if (newTail == tty->rawInBuf.Head) {
10952b: 8b 43 5c mov 0x5c(%ebx),%eax
10952e: 39 45 e4 cmp %eax,-0x1c(%ebp)
109531: 75 03 jne 109536 <rtems_termios_enqueue_raw_characters+0x227><== ALWAYS TAKEN
dropped++;
109533: 46 inc %esi <== NOT EXECUTED
109534: eb 3c jmp 109572 <rtems_termios_enqueue_raw_characters+0x263><== NOT EXECUTED
} else {
tty->rawInBuf.theBuf[newTail] = c;
109536: 8b 43 58 mov 0x58(%ebx),%eax
109539: 8a 4d de mov -0x22(%ebp),%cl
10953c: 8b 55 e4 mov -0x1c(%ebp),%edx
10953f: 88 0c 10 mov %cl,(%eax,%edx,1)
tty->rawInBuf.Tail = newTail;
109542: 89 53 60 mov %edx,0x60(%ebx)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
109545: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx)
10954c: 75 24 jne 109572 <rtems_termios_enqueue_raw_characters+0x263><== NEVER TAKEN
10954e: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
109554: 85 c0 test %eax,%eax
109556: 74 1a je 109572 <rtems_termios_enqueue_raw_characters+0x263><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
109558: 52 push %edx <== NOT EXECUTED
109559: 52 push %edx <== NOT EXECUTED
10955a: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED
109560: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
109563: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
109565: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
10956c: 00 00 00
10956f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109572: ff 4d e0 decl -0x20(%ebp)
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
109575: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
109579: 0f 85 31 fe ff ff jne 1093b0 <rtems_termios_enqueue_raw_characters+0xa1>
}
}
}
}
tty->rawInBufDropped += dropped;
10957f: 01 73 78 add %esi,0x78(%ebx)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
109582: 83 ec 0c sub $0xc,%esp
109585: ff 73 68 pushl 0x68(%ebx)
109588: e8 b3 0c 00 00 call 10a240 <rtems_semaphore_release>
return dropped;
10958d: 83 c4 10 add $0x10,%esp
}
109590: 89 f0 mov %esi,%eax
109592: 8d 65 f4 lea -0xc(%ebp),%esp
109595: 5b pop %ebx
109596: 5e pop %esi
109597: 5f pop %edi
109598: c9 leave
109599: c3 ret
001086a2 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
1086a2: 55 push %ebp
1086a3: 89 e5 mov %esp,%ebp
1086a5: 57 push %edi
1086a6: 56 push %esi
1086a7: 53 push %ebx
1086a8: 83 ec 20 sub $0x20,%esp
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
1086ab: 8b 55 08 mov 0x8(%ebp),%edx
1086ae: 8b 02 mov (%edx),%eax
1086b0: 8b 58 34 mov 0x34(%eax),%ebx
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
1086b3: 8b 72 08 mov 0x8(%edx),%esi
rtems_status_code sc;
args->ioctl_return = 0;
1086b6: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
1086bd: 6a 00 push $0x0
1086bf: 6a 00 push $0x0
1086c1: ff 73 18 pushl 0x18(%ebx)
1086c4: e8 8b 1a 00 00 call 10a154 <rtems_semaphore_obtain>
1086c9: 89 45 e4 mov %eax,-0x1c(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
1086cc: 83 c4 10 add $0x10,%esp
1086cf: 85 c0 test %eax,%eax
1086d1: 74 0b je 1086de <rtems_termios_ioctl+0x3c><== ALWAYS TAKEN
args->ioctl_return = sc;
1086d3: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
1086d6: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED
return sc;
1086d9: e9 05 03 00 00 jmp 1089e3 <rtems_termios_ioctl+0x341><== NOT EXECUTED
}
switch (args->command) {
1086de: 8b 55 08 mov 0x8(%ebp),%edx
1086e1: 8b 42 04 mov 0x4(%edx),%eax
1086e4: 83 f8 04 cmp $0x4,%eax
1086e7: 0f 84 4d 02 00 00 je 10893a <rtems_termios_ioctl+0x298>
1086ed: 77 10 ja 1086ff <rtems_termios_ioctl+0x5d>
1086ef: 83 f8 02 cmp $0x2,%eax
1086f2: 74 77 je 10876b <rtems_termios_ioctl+0xc9>
1086f4: 0f 87 1e 02 00 00 ja 108918 <rtems_termios_ioctl+0x276>
1086fa: 48 dec %eax
1086fb: 75 2f jne 10872c <rtems_termios_ioctl+0x8a><== NEVER TAKEN
1086fd: eb 55 jmp 108754 <rtems_termios_ioctl+0xb2>
1086ff: 3d 7f 66 04 40 cmp $0x4004667f,%eax
108704: 0f 84 a5 02 00 00 je 1089af <rtems_termios_ioctl+0x30d><== NEVER TAKEN
10870a: 77 0a ja 108716 <rtems_termios_ioctl+0x74>
10870c: 83 f8 05 cmp $0x5,%eax
10870f: 75 1b jne 10872c <rtems_termios_ioctl+0x8a>
108711: e9 0e 02 00 00 jmp 108924 <rtems_termios_ioctl+0x282>
108716: 3d 1a 74 04 40 cmp $0x4004741a,%eax
10871b: 0f 84 7e 02 00 00 je 10899f <rtems_termios_ioctl+0x2fd>
108721: 3d 1b 74 04 80 cmp $0x8004741b,%eax
108726: 0f 84 21 02 00 00 je 10894d <rtems_termios_ioctl+0x2ab><== ALWAYS TAKEN
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
10872c: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
108732: c1 e0 05 shl $0x5,%eax
108735: 8b 80 30 2e 12 00 mov 0x122e30(%eax),%eax
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
10873b: c7 45 e4 0a 00 00 00 movl $0xa,-0x1c(%ebp)
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
108742: 85 c0 test %eax,%eax
108744: 0f 84 82 02 00 00 je 1089cc <rtems_termios_ioctl+0x32a><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
10874a: 52 push %edx
10874b: 52 push %edx
10874c: ff 75 08 pushl 0x8(%ebp)
10874f: e9 40 02 00 00 jmp 108994 <rtems_termios_ioctl+0x2f2>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
108754: 8b 4d 08 mov 0x8(%ebp),%ecx
108757: 8b 41 08 mov 0x8(%ecx),%eax
10875a: 8d 73 30 lea 0x30(%ebx),%esi
10875d: b9 09 00 00 00 mov $0x9,%ecx
108762: 89 c7 mov %eax,%edi
108764: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
break;
108766: e9 61 02 00 00 jmp 1089cc <rtems_termios_ioctl+0x32a>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
10876b: 8b 45 08 mov 0x8(%ebp),%eax
10876e: 8b 70 08 mov 0x8(%eax),%esi
108771: 8d 7b 30 lea 0x30(%ebx),%edi
108774: b9 09 00 00 00 mov $0x9,%ecx
108779: 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) &&
10877b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108781: f6 c4 02 test $0x2,%ah
108784: 74 57 je 1087dd <rtems_termios_ioctl+0x13b>
108786: f6 43 31 04 testb $0x4,0x31(%ebx)
10878a: 75 51 jne 1087dd <rtems_termios_ioctl+0x13b><== ALWAYS TAKEN
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
10878c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108792: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED
108797: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
10879d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1087a3: a8 20 test $0x20,%al <== NOT EXECUTED
1087a5: 74 36 je 1087dd <rtems_termios_ioctl+0x13b><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
1087a7: 9c pushf <== NOT EXECUTED
1087a8: fa cli <== NOT EXECUTED
1087a9: 5e pop %esi <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
1087aa: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1087b0: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
1087b3: 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) {
1087b9: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
1087c0: 74 19 je 1087db <rtems_termios_ioctl+0x139><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
1087c2: 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)(
1087c8: 57 push %edi <== NOT EXECUTED
1087c9: 6a 01 push $0x1 <== NOT EXECUTED
1087cb: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
1087ce: 50 push %eax <== NOT EXECUTED
1087cf: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1087d2: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
1087d8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
1087db: 56 push %esi <== NOT EXECUTED
1087dc: 9d popf <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
1087dd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1087e3: f6 c4 04 test $0x4,%ah
1087e6: 74 24 je 10880c <rtems_termios_ioctl+0x16a><== ALWAYS TAKEN
1087e8: f6 43 31 10 testb $0x10,0x31(%ebx) <== NOT EXECUTED
1087ec: 75 1e jne 10880c <rtems_termios_ioctl+0x16a><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
1087ee: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1087f4: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED
1087f7: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
1087fd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108803: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
108806: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
10880c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108812: f6 c4 01 test $0x1,%ah
108815: 74 43 je 10885a <rtems_termios_ioctl+0x1b8><== ALWAYS TAKEN
108817: 83 7b 38 00 cmpl $0x0,0x38(%ebx) <== NOT EXECUTED
10881b: 78 3d js 10885a <rtems_termios_ioctl+0x1b8><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
10881d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108823: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED
108826: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
10882c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108832: a8 04 test $0x4,%al <== NOT EXECUTED
108834: 74 15 je 10884b <rtems_termios_ioctl+0x1a9><== NOT EXECUTED
108836: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
10883c: 85 c0 test %eax,%eax <== NOT EXECUTED
10883e: 74 0b je 10884b <rtems_termios_ioctl+0x1a9><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
108840: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108843: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108846: ff d0 call *%eax <== NOT EXECUTED
108848: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
10884b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108851: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
108854: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
10885a: 83 7b 38 00 cmpl $0x0,0x38(%ebx)
10885e: 79 0f jns 10886f <rtems_termios_ioctl+0x1cd><== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
108860: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108866: 80 cc 01 or $0x1,%ah <== NOT EXECUTED
108869: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
10886f: 8b 53 30 mov 0x30(%ebx),%edx
108872: f6 c6 10 test $0x10,%dh
108875: 74 0f je 108886 <rtems_termios_ioctl+0x1e4>
tty->flow_ctrl |= FL_MDXOF;
108877: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10887d: 80 cc 04 or $0x4,%ah
108880: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
108886: 80 e6 04 and $0x4,%dh
108889: 74 0f je 10889a <rtems_termios_ioctl+0x1f8><== NEVER TAKEN
tty->flow_ctrl |= FL_MDXON;
10888b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108891: 80 cc 02 or $0x2,%ah
108894: 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) {
10889a: f6 43 3c 02 testb $0x2,0x3c(%ebx)
10889e: 75 39 jne 1088d9 <rtems_termios_ioctl+0x237>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
1088a0: 0f b6 73 46 movzbl 0x46(%ebx),%esi
rtems_clock_get_ticks_per_second() / 10;
1088a4: e8 6b 12 00 00 call 109b14 <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] *
1088a9: 0f af c6 imul %esi,%eax
rtems_clock_get_ticks_per_second() / 10;
1088ac: b9 0a 00 00 00 mov $0xa,%ecx
1088b1: 31 d2 xor %edx,%edx
1088b3: f7 f1 div %ecx
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
1088b5: 89 43 54 mov %eax,0x54(%ebx)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
1088b8: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
1088bc: 74 15 je 1088d3 <rtems_termios_ioctl+0x231>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
1088be: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
1088c5: 89 43 70 mov %eax,0x70(%ebx)
if (tty->termios.c_cc[VMIN])
1088c8: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
1088cc: 75 19 jne 1088e7 <rtems_termios_ioctl+0x245>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
1088ce: 89 43 74 mov %eax,0x74(%ebx)
1088d1: eb 24 jmp 1088f7 <rtems_termios_ioctl+0x255>
} else {
if (tty->termios.c_cc[VMIN]) {
1088d3: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
1088d7: 74 17 je 1088f0 <rtems_termios_ioctl+0x24e><== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
1088d9: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
1088e0: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
1088e7: c7 43 74 00 00 00 00 movl $0x0,0x74(%ebx)
1088ee: eb 07 jmp 1088f7 <rtems_termios_ioctl+0x255>
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
1088f0: c7 43 6c 01 00 00 00 movl $0x1,0x6c(%ebx)
}
}
}
if (tty->device.setAttributes)
1088f7: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
1088fd: 85 c0 test %eax,%eax
1088ff: 0f 84 c7 00 00 00 je 1089cc <rtems_termios_ioctl+0x32a><== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
108905: 56 push %esi
108906: 56 push %esi
108907: 8d 53 30 lea 0x30(%ebx),%edx
10890a: 52 push %edx
10890b: ff 73 10 pushl 0x10(%ebx)
10890e: ff d0 call *%eax
108910: 83 c4 10 add $0x10,%esp
108913: e9 b4 00 00 00 jmp 1089cc <rtems_termios_ioctl+0x32a>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
108918: 89 d8 mov %ebx,%eax
10891a: e8 55 f7 ff ff call 108074 <drainOutput>
break;
10891f: e9 a8 00 00 00 jmp 1089cc <rtems_termios_ioctl+0x32a>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
108924: 8b 06 mov (%esi),%eax
108926: 8b 56 04 mov 0x4(%esi),%edx
108929: 89 83 d4 00 00 00 mov %eax,0xd4(%ebx)
10892f: 89 93 d8 00 00 00 mov %edx,0xd8(%ebx)
break;
108935: e9 92 00 00 00 jmp 1089cc <rtems_termios_ioctl+0x32a>
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
10893a: 8b 06 mov (%esi),%eax
10893c: 8b 56 04 mov 0x4(%esi),%edx
10893f: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx)
108945: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx)
break;
10894b: eb 7f jmp 1089cc <rtems_termios_ioctl+0x32a>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
10894d: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
108953: c1 e0 05 shl $0x5,%eax
108956: 8b 80 1c 2e 12 00 mov 0x122e1c(%eax),%eax
10895c: 85 c0 test %eax,%eax
10895e: 74 0c je 10896c <rtems_termios_ioctl+0x2ca>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
108960: 83 ec 0c sub $0xc,%esp
108963: 53 push %ebx
108964: ff d0 call *%eax
108966: 89 45 e4 mov %eax,-0x1c(%ebp)
108969: 83 c4 10 add $0x10,%esp
}
tty->t_line=*(int*)(args->buffer);
10896c: 8b 55 08 mov 0x8(%ebp),%edx
10896f: 8b 42 08 mov 0x8(%edx),%eax
108972: 8b 00 mov (%eax),%eax
108974: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
tty->t_sc = NULL; /* ensure that no more valid data */
10897a: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx)
108981: 00 00 00
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
108984: c1 e0 05 shl $0x5,%eax
108987: 8b 80 18 2e 12 00 mov 0x122e18(%eax),%eax
10898d: 85 c0 test %eax,%eax
10898f: 74 3b je 1089cc <rtems_termios_ioctl+0x32a><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
108991: 83 ec 0c sub $0xc,%esp
108994: 53 push %ebx
108995: ff d0 call *%eax
108997: 89 45 e4 mov %eax,-0x1c(%ebp)
10899a: e9 71 ff ff ff jmp 108910 <rtems_termios_ioctl+0x26e>
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
10899f: 8b 4d 08 mov 0x8(%ebp),%ecx
1089a2: 8b 41 08 mov 0x8(%ecx),%eax
1089a5: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx
1089ab: 89 10 mov %edx,(%eax)
break;
1089ad: eb 1d jmp 1089cc <rtems_termios_ioctl+0x32a>
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
1089af: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
1089b2: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED
if ( rawnc < 0 )
1089b5: 29 d0 sub %edx,%eax <== NOT EXECUTED
1089b7: 79 05 jns 1089be <rtems_termios_ioctl+0x31c><== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
1089b9: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED
1089bc: 01 d0 add %edx,%eax <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
1089be: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
1089c1: 8b 51 08 mov 0x8(%ecx),%edx <== NOT EXECUTED
1089c4: 03 43 20 add 0x20(%ebx),%eax <== NOT EXECUTED
1089c7: 2b 43 24 sub 0x24(%ebx),%eax <== NOT EXECUTED
1089ca: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
1089cc: 83 ec 0c sub $0xc,%esp
1089cf: ff 73 18 pushl 0x18(%ebx)
1089d2: e8 69 18 00 00 call 10a240 <rtems_semaphore_release>
args->ioctl_return = sc;
1089d7: 8b 55 e4 mov -0x1c(%ebp),%edx
1089da: 8b 45 08 mov 0x8(%ebp),%eax
1089dd: 89 50 0c mov %edx,0xc(%eax)
return sc;
1089e0: 83 c4 10 add $0x10,%esp
}
1089e3: 8b 45 e4 mov -0x1c(%ebp),%eax
1089e6: 8d 65 f4 lea -0xc(%ebp),%esp
1089e9: 5b pop %ebx
1089ea: 5e pop %esi
1089eb: 5f pop %edi
1089ec: c9 leave
1089ed: c3 ret
001080d1 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
1080d1: 55 push %ebp
1080d2: 89 e5 mov %esp,%ebp
1080d4: 57 push %edi
1080d5: 56 push %esi
1080d6: 53 push %ebx
1080d7: 83 ec 20 sub $0x20,%esp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
1080da: 6a 00 push $0x0
1080dc: 6a 00 push $0x0
1080de: ff 35 5c 31 12 00 pushl 0x12315c
1080e4: e8 6b 20 00 00 call 10a154 <rtems_semaphore_obtain>
1080e9: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1080ec: 83 c4 10 add $0x10,%esp
1080ef: 85 c0 test %eax,%eax
1080f1: 0f 85 d3 03 00 00 jne 1084ca <rtems_termios_open+0x3f9><== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
1080f7: 8b 35 64 31 12 00 mov 0x123164,%esi
1080fd: 89 f2 mov %esi,%edx
1080ff: eb 16 jmp 108117 <rtems_termios_open+0x46>
if ((tty->major == major) && (tty->minor == minor))
108101: 8b 45 08 mov 0x8(%ebp),%eax
108104: 39 42 0c cmp %eax,0xc(%edx)
108107: 75 0c jne 108115 <rtems_termios_open+0x44>
108109: 8b 4d 0c mov 0xc(%ebp),%ecx
10810c: 39 4a 10 cmp %ecx,0x10(%edx)
10810f: 0f 84 26 03 00 00 je 10843b <rtems_termios_open+0x36a><== ALWAYS TAKEN
sc = rtems_semaphore_obtain(
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
108115: 8b 12 mov (%edx),%edx
108117: 85 d2 test %edx,%edx
108119: 75 e6 jne 108101 <rtems_termios_open+0x30>
10811b: e9 b5 03 00 00 jmp 1084d5 <rtems_termios_open+0x404>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
108120: 83 ec 0c sub $0xc,%esp
108123: eb 30 jmp 108155 <rtems_termios_open+0x84>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
108125: a1 44 10 12 00 mov 0x121044,%eax
10812a: 89 42 64 mov %eax,0x64(%edx)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
10812d: 8b 42 64 mov 0x64(%edx),%eax
108130: 83 ec 0c sub $0xc,%esp
108133: 50 push %eax
108134: 89 55 e0 mov %edx,-0x20(%ebp)
108137: e8 98 f4 ff ff call 1075d4 <malloc>
10813c: 89 c7 mov %eax,%edi
10813e: 8b 55 e0 mov -0x20(%ebp),%edx
108141: 89 42 58 mov %eax,0x58(%edx)
if (tty->rawInBuf.theBuf == NULL) {
108144: 83 c4 10 add $0x10,%esp
108147: 85 c0 test %eax,%eax
108149: 75 24 jne 10816f <rtems_termios_open+0x9e>
free(tty);
10814b: 83 ec 0c sub $0xc,%esp
10814e: 52 push %edx
10814f: e8 e4 f1 ff ff call 107338 <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
108154: 5b pop %ebx
108155: ff 35 5c 31 12 00 pushl 0x12315c
10815b: e8 e0 20 00 00 call 10a240 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
108160: 83 c4 10 add $0x10,%esp
108163: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp)
10816a: e9 5b 03 00 00 jmp 1084ca <rtems_termios_open+0x3f9>
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
10816f: a1 48 10 12 00 mov 0x121048,%eax
108174: 89 82 88 00 00 00 mov %eax,0x88(%edx)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
10817a: 8b 82 88 00 00 00 mov 0x88(%edx),%eax
108180: 83 ec 0c sub $0xc,%esp
108183: 50 push %eax
108184: 89 55 e0 mov %edx,-0x20(%ebp)
108187: e8 48 f4 ff ff call 1075d4 <malloc>
10818c: 8b 55 e0 mov -0x20(%ebp),%edx
10818f: 89 42 7c mov %eax,0x7c(%edx)
if (tty->rawOutBuf.theBuf == NULL) {
108192: 83 c4 10 add $0x10,%esp
108195: 85 c0 test %eax,%eax
108197: 75 05 jne 10819e <rtems_termios_open+0xcd><== ALWAYS TAKEN
free((void *)(tty->rawInBuf.theBuf));
108199: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10819c: eb 2e jmp 1081cc <rtems_termios_open+0xfb><== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
10819e: 83 ec 0c sub $0xc,%esp
1081a1: ff 35 40 10 12 00 pushl 0x121040
1081a7: 89 55 e0 mov %edx,-0x20(%ebp)
1081aa: 89 45 dc mov %eax,-0x24(%ebp)
1081ad: e8 22 f4 ff ff call 1075d4 <malloc>
1081b2: 8b 55 e0 mov -0x20(%ebp),%edx
1081b5: 89 42 1c mov %eax,0x1c(%edx)
if (tty->cbuf == NULL) {
1081b8: 83 c4 10 add $0x10,%esp
1081bb: 85 c0 test %eax,%eax
1081bd: 8b 4d dc mov -0x24(%ebp),%ecx
1081c0: 75 19 jne 1081db <rtems_termios_open+0x10a>
free((void *)(tty->rawOutBuf.theBuf));
1081c2: 83 ec 0c sub $0xc,%esp
1081c5: 51 push %ecx
1081c6: e8 6d f1 ff ff call 107338 <free>
free((void *)(tty->rawInBuf.theBuf));
1081cb: 59 pop %ecx
1081cc: 57 push %edi
1081cd: e8 66 f1 ff ff call 107338 <free>
free(tty);
1081d2: 5a pop %edx
1081d3: 8b 55 e0 mov -0x20(%ebp),%edx
1081d6: e9 73 ff ff ff jmp 10814e <rtems_termios_open+0x7d>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
1081db: c7 82 d4 00 00 00 00 movl $0x0,0xd4(%edx)
1081e2: 00 00 00
tty->tty_snd.sw_arg = NULL;
1081e5: c7 82 d8 00 00 00 00 movl $0x0,0xd8(%edx)
1081ec: 00 00 00
tty->tty_rcv.sw_pfn = NULL;
1081ef: c7 82 dc 00 00 00 00 movl $0x0,0xdc(%edx)
1081f6: 00 00 00
tty->tty_rcv.sw_arg = NULL;
1081f9: c7 82 e0 00 00 00 00 movl $0x0,0xe0(%edx)
108200: 00 00 00
tty->tty_rcvwakeup = 0;
108203: c7 82 e4 00 00 00 00 movl $0x0,0xe4(%edx)
10820a: 00 00 00
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
10820d: 89 32 mov %esi,(%edx)
tty->back = NULL;
10820f: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
if (rtems_termios_ttyHead != NULL)
108216: 85 f6 test %esi,%esi
108218: 74 03 je 10821d <rtems_termios_open+0x14c>
rtems_termios_ttyHead->back = tty;
10821a: 89 56 04 mov %edx,0x4(%esi)
rtems_termios_ttyHead = tty;
10821d: 89 1d 64 31 12 00 mov %ebx,0x123164
if (rtems_termios_ttyTail == NULL)
108223: 83 3d 60 31 12 00 00 cmpl $0x0,0x123160
10822a: 75 06 jne 108232 <rtems_termios_open+0x161>
rtems_termios_ttyTail = tty;
10822c: 89 1d 60 31 12 00 mov %ebx,0x123160
tty->minor = minor;
108232: 8b 45 0c mov 0xc(%ebp),%eax
108235: 89 43 10 mov %eax,0x10(%ebx)
tty->major = major;
108238: 8b 4d 08 mov 0x8(%ebp),%ecx
10823b: 89 4b 0c mov %ecx,0xc(%ebx)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
10823e: 83 ec 0c sub $0xc,%esp
108241: 8d 43 14 lea 0x14(%ebx),%eax
108244: 50 push %eax
108245: 6a 00 push $0x0
108247: 6a 54 push $0x54
108249: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'i', c),
10824b: 0f be 05 4c 10 12 00 movsbl 0x12104c,%eax
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
108252: 0d 00 69 52 54 or $0x54526900,%eax
108257: 50 push %eax
108258: 89 55 e0 mov %edx,-0x20(%ebp)
10825b: e8 cc 1c 00 00 call 109f2c <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)
108260: 83 c4 20 add $0x20,%esp
108263: 85 c0 test %eax,%eax
108265: 8b 55 e0 mov -0x20(%ebp),%edx
108268: 0f 85 42 02 00 00 jne 1084b0 <rtems_termios_open+0x3df>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
10826e: 83 ec 0c sub $0xc,%esp
108271: 8d 43 18 lea 0x18(%ebx),%eax
108274: 50 push %eax
108275: 6a 00 push $0x0
108277: 6a 54 push $0x54
108279: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'o', c),
10827b: 0f be 05 4c 10 12 00 movsbl 0x12104c,%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 (
108282: 0d 00 6f 52 54 or $0x54526f00,%eax
108287: 50 push %eax
108288: 89 55 e0 mov %edx,-0x20(%ebp)
10828b: e8 9c 1c 00 00 call 109f2c <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)
108290: 83 c4 20 add $0x20,%esp
108293: 85 c0 test %eax,%eax
108295: 8b 55 e0 mov -0x20(%ebp),%edx
108298: 0f 85 12 02 00 00 jne 1084b0 <rtems_termios_open+0x3df>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
10829e: 83 ec 0c sub $0xc,%esp
1082a1: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax
1082a7: 50 push %eax
1082a8: 6a 00 push $0x0
1082aa: 6a 20 push $0x20
1082ac: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'x', c),
1082ae: 0f be 05 4c 10 12 00 movsbl 0x12104c,%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 (
1082b5: 0d 00 78 52 54 or $0x54527800,%eax
1082ba: 50 push %eax
1082bb: 89 55 e0 mov %edx,-0x20(%ebp)
1082be: e8 69 1c 00 00 call 109f2c <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)
1082c3: 83 c4 20 add $0x20,%esp
1082c6: 85 c0 test %eax,%eax
1082c8: 8b 55 e0 mov -0x20(%ebp),%edx
1082cb: 0f 85 df 01 00 00 jne 1084b0 <rtems_termios_open+0x3df>
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
1082d1: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
1082d8: 00 00 00
/*
* Set callbacks
*/
tty->device = *callbacks;
1082db: 8d bb 98 00 00 00 lea 0x98(%ebx),%edi
1082e1: b9 08 00 00 00 mov $0x8,%ecx
1082e6: 8b 75 14 mov 0x14(%ebp),%esi
1082e9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
1082eb: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
1082f2: 75 74 jne 108368 <rtems_termios_open+0x297>
sc = rtems_task_create (
1082f4: 50 push %eax
1082f5: 50 push %eax
1082f6: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax
1082fc: 50 push %eax
1082fd: 6a 00 push $0x0
1082ff: 68 00 05 00 00 push $0x500
108304: 68 00 04 00 00 push $0x400
108309: 6a 0a push $0xa
rtems_build_name ('T', 'x', 'T', c),
10830b: 0f be 05 4c 10 12 00 movsbl 0x12104c,%eax
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
108312: 0d 00 54 78 54 or $0x54785400,%eax
108317: 50 push %eax
108318: 89 55 e0 mov %edx,-0x20(%ebp)
10831b: e8 b0 1f 00 00 call 10a2d0 <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)
108320: 83 c4 20 add $0x20,%esp
108323: 85 c0 test %eax,%eax
108325: 8b 55 e0 mov -0x20(%ebp),%edx
108328: 0f 85 82 01 00 00 jne 1084b0 <rtems_termios_open+0x3df><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
10832e: 57 push %edi
10832f: 57 push %edi
108330: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax
108336: 50 push %eax
108337: 6a 00 push $0x0
108339: 68 00 05 00 00 push $0x500
10833e: 68 00 04 00 00 push $0x400
108343: 6a 09 push $0x9
rtems_build_name ('R', 'x', 'T', c),
108345: 0f be 05 4c 10 12 00 movsbl 0x12104c,%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 (
10834c: 0d 00 54 78 52 or $0x52785400,%eax
108351: 50 push %eax
108352: 89 55 e0 mov %edx,-0x20(%ebp)
108355: e8 76 1f 00 00 call 10a2d0 <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)
10835a: 83 c4 20 add $0x20,%esp
10835d: 85 c0 test %eax,%eax
10835f: 8b 55 e0 mov -0x20(%ebp),%edx
108362: 0f 85 48 01 00 00 jne 1084b0 <rtems_termios_open+0x3df><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
108368: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
10836f: 74 09 je 10837a <rtems_termios_open+0x2a9>
108371: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
108378: 75 30 jne 1083aa <rtems_termios_open+0x2d9>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
10837a: 83 ec 0c sub $0xc,%esp
10837d: 8d 43 68 lea 0x68(%ebx),%eax
108380: 50 push %eax
108381: 6a 00 push $0x0
108383: 6a 24 push $0x24
108385: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'r', c),
108387: 0f be 05 4c 10 12 00 movsbl 0x12104c,%eax
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
10838e: 0d 00 72 52 54 or $0x54527200,%eax
108393: 50 push %eax
108394: 89 55 e0 mov %edx,-0x20(%ebp)
108397: e8 90 1b 00 00 call 109f2c <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)
10839c: 83 c4 20 add $0x20,%esp
10839f: 85 c0 test %eax,%eax
1083a1: 8b 55 e0 mov -0x20(%ebp),%edx
1083a4: 0f 85 06 01 00 00 jne 1084b0 <rtems_termios_open+0x3df>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
1083aa: c7 43 30 02 25 00 00 movl $0x2502,0x30(%ebx)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
1083b1: c7 43 34 05 18 00 00 movl $0x1805,0x34(%ebx)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
1083b8: c7 43 38 bd 08 00 00 movl $0x8bd,0x38(%ebx)
tty->termios.c_lflag =
1083bf: c7 43 3c 3b 82 00 00 movl $0x823b,0x3c(%ebx)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
1083c6: c6 43 41 03 movb $0x3,0x41(%ebx)
tty->termios.c_cc[VQUIT] = '\034';
1083ca: c6 43 42 1c movb $0x1c,0x42(%ebx)
tty->termios.c_cc[VERASE] = '\177';
1083ce: c6 43 43 7f movb $0x7f,0x43(%ebx)
tty->termios.c_cc[VKILL] = '\025';
1083d2: c6 43 44 15 movb $0x15,0x44(%ebx)
tty->termios.c_cc[VEOF] = '\004';
1083d6: c6 43 45 04 movb $0x4,0x45(%ebx)
tty->termios.c_cc[VEOL] = '\000';
1083da: c6 43 4c 00 movb $0x0,0x4c(%ebx)
tty->termios.c_cc[VEOL2] = '\000';
1083de: c6 43 51 00 movb $0x0,0x51(%ebx)
tty->termios.c_cc[VSTART] = '\021';
1083e2: c6 43 49 11 movb $0x11,0x49(%ebx)
tty->termios.c_cc[VSTOP] = '\023';
1083e6: c6 43 4a 13 movb $0x13,0x4a(%ebx)
tty->termios.c_cc[VSUSP] = '\032';
1083ea: c6 43 4b 1a movb $0x1a,0x4b(%ebx)
tty->termios.c_cc[VREPRINT] = '\022';
1083ee: c6 43 4d 12 movb $0x12,0x4d(%ebx)
tty->termios.c_cc[VDISCARD] = '\017';
1083f2: c6 43 4e 0f movb $0xf,0x4e(%ebx)
tty->termios.c_cc[VWERASE] = '\027';
1083f6: c6 43 4f 17 movb $0x17,0x4f(%ebx)
tty->termios.c_cc[VLNEXT] = '\026';
1083fa: c6 43 50 16 movb $0x16,0x50(%ebx)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
1083fe: c7 83 b8 00 00 00 00 movl $0x0,0xb8(%ebx)
108405: 00 00 00
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
108408: 8b 43 64 mov 0x64(%ebx),%eax
10840b: d1 e8 shr %eax
10840d: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
tty->highwater = tty->rawInBuf.Size * 3/4;
108413: 8b 43 64 mov 0x64(%ebx),%eax
108416: 8d 04 40 lea (%eax,%eax,2),%eax
108419: c1 e8 02 shr $0x2,%eax
10841c: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx)
/*
* Bump name characer
*/
if (c++ == 'z')
108422: a0 4c 10 12 00 mov 0x12104c,%al
108427: 8d 48 01 lea 0x1(%eax),%ecx
10842a: 88 0d 4c 10 12 00 mov %cl,0x12104c
108430: 3c 7a cmp $0x7a,%al
108432: 75 07 jne 10843b <rtems_termios_open+0x36a>
c = 'a';
108434: c6 05 4c 10 12 00 61 movb $0x61,0x12104c
}
args->iop->data1 = tty;
10843b: 8b 4d 10 mov 0x10(%ebp),%ecx
10843e: 8b 01 mov (%ecx),%eax
108440: 89 50 34 mov %edx,0x34(%eax)
if (!tty->refcount++) {
108443: 8b 42 08 mov 0x8(%edx),%eax
108446: 8d 48 01 lea 0x1(%eax),%ecx
108449: 89 4a 08 mov %ecx,0x8(%edx)
10844c: 85 c0 test %eax,%eax
10844e: 75 69 jne 1084b9 <rtems_termios_open+0x3e8>
if (tty->device.firstOpen)
108450: 8b 82 98 00 00 00 mov 0x98(%edx),%eax
108456: 85 c0 test %eax,%eax
108458: 74 15 je 10846f <rtems_termios_open+0x39e>
(*tty->device.firstOpen)(major, minor, arg);
10845a: 56 push %esi
10845b: ff 75 10 pushl 0x10(%ebp)
10845e: ff 75 0c pushl 0xc(%ebp)
108461: ff 75 08 pushl 0x8(%ebp)
108464: 89 55 e0 mov %edx,-0x20(%ebp)
108467: ff d0 call *%eax
108469: 83 c4 10 add $0x10,%esp
10846c: 8b 55 e0 mov -0x20(%ebp),%edx
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10846f: 83 ba b4 00 00 00 02 cmpl $0x2,0xb4(%edx)
108476: 75 41 jne 1084b9 <rtems_termios_open+0x3e8>
sc = rtems_task_start(
108478: 53 push %ebx
108479: 52 push %edx
10847a: 68 9a 95 10 00 push $0x10959a
10847f: ff b2 c4 00 00 00 pushl 0xc4(%edx)
108485: 89 55 e0 mov %edx,-0x20(%ebp)
108488: e8 b7 20 00 00 call 10a544 <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
10848d: 83 c4 10 add $0x10,%esp
108490: 85 c0 test %eax,%eax
108492: 8b 55 e0 mov -0x20(%ebp),%edx
108495: 75 19 jne 1084b0 <rtems_termios_open+0x3df><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
108497: 51 push %ecx
108498: 52 push %edx
108499: 68 cc 97 10 00 push $0x1097cc
10849e: ff b2 c8 00 00 00 pushl 0xc8(%edx)
1084a4: e8 9b 20 00 00 call 10a544 <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
1084a9: 83 c4 10 add $0x10,%esp
1084ac: 85 c0 test %eax,%eax
1084ae: 74 09 je 1084b9 <rtems_termios_open+0x3e8><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
1084b0: 83 ec 0c sub $0xc,%esp
1084b3: 50 push %eax
1084b4: e8 5b 22 00 00 call 10a714 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
1084b9: 83 ec 0c sub $0xc,%esp
1084bc: ff 35 5c 31 12 00 pushl 0x12315c
1084c2: e8 79 1d 00 00 call 10a240 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
1084c7: 83 c4 10 add $0x10,%esp
}
1084ca: 8b 45 e4 mov -0x1c(%ebp),%eax
1084cd: 8d 65 f4 lea -0xc(%ebp),%esp
1084d0: 5b pop %ebx
1084d1: 5e pop %esi
1084d2: 5f pop %edi
1084d3: c9 leave
1084d4: c3 ret
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
1084d5: 52 push %edx
1084d6: 52 push %edx
1084d7: 68 e8 00 00 00 push $0xe8
1084dc: 6a 01 push $0x1
1084de: e8 e9 ec ff ff call 1071cc <calloc>
1084e3: 89 c2 mov %eax,%edx
1084e5: 89 c3 mov %eax,%ebx
if (tty == NULL) {
1084e7: 83 c4 10 add $0x10,%esp
1084ea: 85 c0 test %eax,%eax
1084ec: 0f 85 33 fc ff ff jne 108125 <rtems_termios_open+0x54>
1084f2: e9 29 fc ff ff jmp 108120 <rtems_termios_open+0x4f>
001089ee <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
1089ee: 55 push %ebp
1089ef: 89 e5 mov %esp,%ebp
1089f1: 57 push %edi
1089f2: 56 push %esi
1089f3: 53 push %ebx
1089f4: 83 ec 3c sub $0x3c,%esp
1089f7: 8b 45 08 mov 0x8(%ebp),%eax
1089fa: 8b 75 0c mov 0xc(%ebp),%esi
1089fd: 8b 5d 10 mov 0x10(%ebp),%ebx
const unsigned char *buf = _buf;
108a00: 89 c7 mov %eax,%edi
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
108a02: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
108a09: 75 1b jne 108a26 <rtems_termios_puts+0x38>
(*tty->device.write)(tty->minor, (void *)buf, len);
108a0b: 89 75 10 mov %esi,0x10(%ebp)
108a0e: 89 45 0c mov %eax,0xc(%ebp)
108a11: 8b 43 10 mov 0x10(%ebx),%eax
108a14: 89 45 08 mov %eax,0x8(%ebp)
108a17: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
108a1d: 8d 65 f4 lea -0xc(%ebp),%esp
108a20: 5b pop %ebx
108a21: 5e pop %esi
108a22: 5f pop %edi
108a23: c9 leave
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
108a24: ff e0 jmp *%eax
return;
}
newHead = tty->rawOutBuf.Head;
108a26: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
108a2c: 89 45 e4 mov %eax,-0x1c(%ebp)
while (len) {
108a2f: e9 ca 00 00 00 jmp 108afe <rtems_termios_puts+0x110>
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
108a34: 8b 45 e4 mov -0x1c(%ebp),%eax
108a37: 40 inc %eax
108a38: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
108a3e: 31 d2 xor %edx,%edx
108a40: f7 f1 div %ecx
108a42: 89 55 c4 mov %edx,-0x3c(%ebp)
108a45: 89 55 e4 mov %edx,-0x1c(%ebp)
rtems_interrupt_disable (level);
108a48: 9c pushf
108a49: fa cli
108a4a: 8f 45 d4 popl -0x2c(%ebp)
108a4d: 8b 55 d4 mov -0x2c(%ebp),%edx
108a50: 8b 4d c4 mov -0x3c(%ebp),%ecx
while (newHead == tty->rawOutBuf.Tail) {
108a53: eb 35 jmp 108a8a <rtems_termios_puts+0x9c>
tty->rawOutBufState = rob_wait;
108a55: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
108a5c: 00 00 00
rtems_interrupt_enable (level);
108a5f: 52 push %edx
108a60: 9d popf
sc = rtems_semaphore_obtain(
108a61: 50 push %eax
108a62: 6a 00 push $0x0
108a64: 6a 00 push $0x0
108a66: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
108a6c: 89 4d e0 mov %ecx,-0x20(%ebp)
108a6f: e8 e0 16 00 00 call 10a154 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
108a74: 83 c4 10 add $0x10,%esp
108a77: 85 c0 test %eax,%eax
108a79: 8b 4d e0 mov -0x20(%ebp),%ecx
108a7c: 74 09 je 108a87 <rtems_termios_puts+0x99><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
108a7e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108a81: 50 push %eax <== NOT EXECUTED
108a82: e8 8d 1c 00 00 call 10a714 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_interrupt_disable (level);
108a87: 9c pushf
108a88: fa cli
108a89: 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) {
108a8a: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
108a90: 39 c1 cmp %eax,%ecx
108a92: 74 c1 je 108a55 <rtems_termios_puts+0x67>
108a94: 89 55 d4 mov %edx,-0x2c(%ebp)
108a97: 89 4d c4 mov %ecx,-0x3c(%ebp)
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++;
108a9a: 8b 8b 80 00 00 00 mov 0x80(%ebx),%ecx
108aa0: 8a 07 mov (%edi),%al
108aa2: 8b 53 7c mov 0x7c(%ebx),%edx
108aa5: 88 04 0a mov %al,(%edx,%ecx,1)
108aa8: 47 inc %edi
tty->rawOutBuf.Head = newHead;
108aa9: 8b 4d c4 mov -0x3c(%ebp),%ecx
108aac: 89 8b 80 00 00 00 mov %ecx,0x80(%ebx)
if (tty->rawOutBufState == rob_idle) {
108ab2: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx)
108ab9: 75 3e jne 108af9 <rtems_termios_puts+0x10b>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
108abb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108ac1: a8 10 test $0x10,%al
108ac3: 75 1b jne 108ae0 <rtems_termios_puts+0xf2><== NEVER TAKEN
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
108ac5: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
108acb: 51 push %ecx
108acc: 6a 01 push $0x1
108ace: 03 43 7c add 0x7c(%ebx),%eax
108ad1: 50 push %eax
108ad2: ff 73 10 pushl 0x10(%ebx)
108ad5: ff 93 a4 00 00 00 call *0xa4(%ebx)
108adb: 83 c4 10 add $0x10,%esp
108ade: eb 0f jmp 108aef <rtems_termios_puts+0x101>
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
108ae0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108ae6: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
108ae9: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
108aef: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
108af6: 00 00 00
}
rtems_interrupt_enable (level);
108af9: ff 75 d4 pushl -0x2c(%ebp)
108afc: 9d popf
len--;
108afd: 4e dec %esi
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
108afe: 85 f6 test %esi,%esi
108b00: 0f 85 2e ff ff ff jne 108a34 <rtems_termios_puts+0x46>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
108b06: 8d 65 f4 lea -0xc(%ebp),%esp
108b09: 5b pop %ebx
108b0a: 5e pop %esi
108b0b: 5f pop %edi
108b0c: c9 leave
108b0d: c3 ret
00109015 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
109015: 55 push %ebp
109016: 89 e5 mov %esp,%ebp
109018: 57 push %edi
109019: 56 push %esi
10901a: 53 push %ebx
10901b: 83 ec 40 sub $0x40,%esp
10901e: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
109021: 8b 06 mov (%esi),%eax
109023: 8b 58 34 mov 0x34(%eax),%ebx
uint32_t count = args->count;
109026: 8b 46 10 mov 0x10(%esi),%eax
109029: 89 45 e4 mov %eax,-0x1c(%ebp)
char *buffer = args->buffer;
10902c: 8b 46 0c mov 0xc(%esi),%eax
10902f: 89 45 e0 mov %eax,-0x20(%ebp)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
109032: 6a 00 push $0x0
109034: 6a 00 push $0x0
109036: ff 73 14 pushl 0x14(%ebx)
109039: e8 16 11 00 00 call 10a154 <rtems_semaphore_obtain>
10903e: 89 45 dc mov %eax,-0x24(%ebp)
if (sc != RTEMS_SUCCESSFUL)
109041: 83 c4 10 add $0x10,%esp
109044: 85 c0 test %eax,%eax
109046: 0f 85 9d 02 00 00 jne 1092e9 <rtems_termios_read+0x2d4><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
10904c: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
109052: c1 e0 05 shl $0x5,%eax
109055: 8b 80 20 2e 12 00 mov 0x122e20(%eax),%eax
10905b: 85 c0 test %eax,%eax
10905d: 74 19 je 109078 <rtems_termios_read+0x63>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
10905f: 57 push %edi
109060: 57 push %edi
109061: 56 push %esi
109062: 53 push %ebx
109063: ff d0 call *%eax
109065: 89 45 dc mov %eax,-0x24(%ebp)
tty->tty_rcvwakeup = 0;
109068: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10906f: 00 00 00
rtems_semaphore_release (tty->isem);
109072: 59 pop %ecx
109073: e9 66 02 00 00 jmp 1092de <rtems_termios_read+0x2c9>
return sc;
}
if (tty->cindex == tty->ccount) {
109078: 8b 43 20 mov 0x20(%ebx),%eax
10907b: 39 43 24 cmp %eax,0x24(%ebx)
10907e: 0f 85 2d 02 00 00 jne 1092b1 <rtems_termios_read+0x29c><== NEVER TAKEN
tty->cindex = tty->ccount = 0;
109084: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
10908b: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
tty->read_start_column = tty->column;
109092: 8b 43 28 mov 0x28(%ebx),%eax
109095: 89 43 2c mov %eax,0x2c(%ebx)
if (tty->device.pollRead != NULL &&
109098: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
10909f: 0f 84 c4 00 00 00 je 109169 <rtems_termios_read+0x154>
1090a5: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
1090ac: 0f 85 b7 00 00 00 jne 109169 <rtems_termios_read+0x154>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
1090b2: f6 43 3c 02 testb $0x2,0x3c(%ebx)
1090b6: 74 35 je 1090ed <rtems_termios_read+0xd8>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
1090b8: 83 ec 0c sub $0xc,%esp
1090bb: ff 73 10 pushl 0x10(%ebx)
1090be: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (n < 0) {
1090c4: 83 c4 10 add $0x10,%esp
1090c7: 85 c0 test %eax,%eax
1090c9: 79 0f jns 1090da <rtems_termios_read+0xc5>
rtems_task_wake_after (1);
1090cb: 83 ec 0c sub $0xc,%esp
1090ce: 6a 01 push $0x1
1090d0: e8 d3 14 00 00 call 10a5a8 <rtems_task_wake_after>
1090d5: 83 c4 10 add $0x10,%esp
1090d8: eb de jmp 1090b8 <rtems_termios_read+0xa3>
} else {
if (siproc (n, tty))
1090da: 0f b6 c0 movzbl %al,%eax
1090dd: 89 da mov %ebx,%edx
1090df: e8 38 fe ff ff call 108f1c <siproc>
1090e4: 85 c0 test %eax,%eax
1090e6: 74 d0 je 1090b8 <rtems_termios_read+0xa3>
1090e8: e9 c4 01 00 00 jmp 1092b1 <rtems_termios_read+0x29c>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
1090ed: e8 36 0a 00 00 call 109b28 <rtems_clock_get_ticks_since_boot>
1090f2: 89 c7 mov %eax,%edi
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
1090f4: 83 ec 0c sub $0xc,%esp
1090f7: ff 73 10 pushl 0x10(%ebx)
1090fa: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (n < 0) {
109100: 83 c4 10 add $0x10,%esp
109103: 85 c0 test %eax,%eax
109105: 79 3d jns 109144 <rtems_termios_read+0x12f>
if (tty->termios.c_cc[VMIN]) {
109107: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
10910b: 74 0e je 10911b <rtems_termios_read+0x106><== NEVER TAKEN
if (tty->termios.c_cc[VTIME] && tty->ccount) {
10910d: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
109111: 74 22 je 109135 <rtems_termios_read+0x120><== NEVER TAKEN
109113: 83 7b 20 00 cmpl $0x0,0x20(%ebx)
109117: 74 1c je 109135 <rtems_termios_read+0x120>
109119: eb 0a jmp 109125 <rtems_termios_read+0x110>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
10911b: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
10911f: 0f 84 8c 01 00 00 je 1092b1 <rtems_termios_read+0x29c><== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
109125: e8 fe 09 00 00 call 109b28 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
10912a: 29 f8 sub %edi,%eax
10912c: 3b 43 54 cmp 0x54(%ebx),%eax
10912f: 0f 87 7c 01 00 00 ja 1092b1 <rtems_termios_read+0x29c>
break;
}
}
rtems_task_wake_after (1);
109135: 83 ec 0c sub $0xc,%esp
109138: 6a 01 push $0x1
10913a: e8 69 14 00 00 call 10a5a8 <rtems_task_wake_after>
10913f: 83 c4 10 add $0x10,%esp
109142: eb b0 jmp 1090f4 <rtems_termios_read+0xdf>
} else {
siproc (n, tty);
109144: 0f b6 c0 movzbl %al,%eax
109147: 89 da mov %ebx,%edx
109149: e8 ce fd ff ff call 108f1c <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
10914e: 8a 43 47 mov 0x47(%ebx),%al
109151: 0f b6 d0 movzbl %al,%edx
109154: 39 53 20 cmp %edx,0x20(%ebx)
109157: 0f 8d 54 01 00 00 jge 1092b1 <rtems_termios_read+0x29c><== NEVER TAKEN
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
10915d: 84 c0 test %al,%al
10915f: 74 93 je 1090f4 <rtems_termios_read+0xdf><== NEVER TAKEN
109161: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
109165: 74 8d je 1090f4 <rtems_termios_read+0xdf><== NEVER TAKEN
109167: eb 84 jmp 1090ed <rtems_termios_read+0xd8>
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
109169: 8b 53 74 mov 0x74(%ebx),%edx
rtems_status_code sc;
int wait = (int)1;
10916c: bf 01 00 00 00 mov $0x1,%edi
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)(
109171: 8d 43 49 lea 0x49(%ebx),%eax
109174: 89 45 d0 mov %eax,-0x30(%ebp)
109177: e9 e6 00 00 00 jmp 109262 <rtems_termios_read+0x24d>
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
10917c: 8b 43 5c mov 0x5c(%ebx),%eax
10917f: 8b 4b 64 mov 0x64(%ebx),%ecx
109182: 40 inc %eax
109183: 31 d2 xor %edx,%edx
109185: f7 f1 div %ecx
c = tty->rawInBuf.theBuf[newHead];
109187: 8b 43 58 mov 0x58(%ebx),%eax
10918a: 8a 04 10 mov (%eax,%edx,1),%al
10918d: 88 45 db mov %al,-0x25(%ebp)
tty->rawInBuf.Head = newHead;
109190: 89 53 5c mov %edx,0x5c(%ebx)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
109193: 8b 43 60 mov 0x60(%ebx),%eax
109196: 89 45 c4 mov %eax,-0x3c(%ebp)
109199: 8b 4b 64 mov 0x64(%ebx),%ecx
% tty->rawInBuf.Size)
10919c: 8b 43 64 mov 0x64(%ebx),%eax
10919f: 89 45 d4 mov %eax,-0x2c(%ebp)
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)
1091a2: 8b 45 c4 mov -0x3c(%ebp),%eax
1091a5: 8d 04 01 lea (%ecx,%eax,1),%eax
1091a8: 29 d0 sub %edx,%eax
% tty->rawInBuf.Size)
1091aa: 31 d2 xor %edx,%edx
1091ac: f7 75 d4 divl -0x2c(%ebp)
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)
1091af: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx
1091b5: 73 74 jae 10922b <rtems_termios_read+0x216><== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
1091b7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1091bd: 83 e0 fe and $0xfffffffe,%eax
1091c0: 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))
1091c6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1091cc: 25 02 02 00 00 and $0x202,%eax
1091d1: 3d 02 02 00 00 cmp $0x202,%eax
1091d6: 75 24 jne 1091fc <rtems_termios_read+0x1e7><== ALWAYS TAKEN
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
1091d8: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
1091df: 74 0a je 1091eb <rtems_termios_read+0x1d6><== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
1091e1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1091e7: a8 20 test $0x20,%al <== NOT EXECUTED
1091e9: 74 11 je 1091fc <rtems_termios_read+0x1e7><== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
1091eb: 52 push %edx <== NOT EXECUTED
1091ec: 6a 01 push $0x1 <== NOT EXECUTED
1091ee: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
1091f1: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1091f4: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
1091fa: eb 2c jmp 109228 <rtems_termios_read+0x213><== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
1091fc: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109202: f6 c4 01 test $0x1,%ah
109205: 74 24 je 10922b <rtems_termios_read+0x216><== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
109207: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10920d: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
109210: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
109216: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
10921c: 85 c0 test %eax,%eax <== NOT EXECUTED
10921e: 74 0b je 10922b <rtems_termios_read+0x216><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
109220: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109223: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
109226: ff d0 call *%eax <== NOT EXECUTED
109228: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
10922b: f6 43 3c 02 testb $0x2,0x3c(%ebx)
10922f: 74 12 je 109243 <rtems_termios_read+0x22e><== NEVER TAKEN
if (siproc (c, tty))
109231: 0f b6 45 db movzbl -0x25(%ebp),%eax
109235: 89 da mov %ebx,%edx
109237: e8 e0 fc ff ff call 108f1c <siproc>
wait = 0;
10923c: 85 c0 test %eax,%eax
10923e: 0f 94 c0 sete %al
109241: eb 15 jmp 109258 <rtems_termios_read+0x243>
} else {
siproc (c, tty);
109243: 0f b6 45 db movzbl -0x25(%ebp),%eax <== NOT EXECUTED
109247: 89 da mov %ebx,%edx <== NOT EXECUTED
109249: e8 ce fc ff ff call 108f1c <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
10924e: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED
wait = 0;
109252: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
109255: 0f 9c c0 setl %al <== NOT EXECUTED
109258: 0f b6 c0 movzbl %al,%eax
10925b: f7 d8 neg %eax
10925d: 21 c7 and %eax,%edi
}
timeout = tty->rawInBufSemaphoreTimeout;
10925f: 8b 53 70 mov 0x70(%ebx),%edx
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
109262: 8b 4b 5c mov 0x5c(%ebx),%ecx
109265: 8b 43 60 mov 0x60(%ebx),%eax
109268: 39 c1 cmp %eax,%ecx
10926a: 74 0f je 10927b <rtems_termios_read+0x266>
(tty->ccount < (CBUFSIZE-1))) {
10926c: a1 40 10 12 00 mov 0x121040,%eax
109271: 48 dec %eax
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
109272: 39 43 20 cmp %eax,0x20(%ebx)
109275: 0f 8c 01 ff ff ff jl 10917c <rtems_termios_read+0x167><== ALWAYS TAKEN
}
/*
* Wait for characters
*/
if ( wait ) {
10927b: 85 ff test %edi,%edi
10927d: 74 32 je 1092b1 <rtems_termios_read+0x29c>
sc = rtems_semaphore_obtain(
10927f: 50 push %eax
109280: 52 push %edx
109281: ff 73 6c pushl 0x6c(%ebx)
109284: ff 73 68 pushl 0x68(%ebx)
109287: 89 55 cc mov %edx,-0x34(%ebp)
10928a: e8 c5 0e 00 00 call 10a154 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
10928f: 83 c4 10 add $0x10,%esp
109292: 85 c0 test %eax,%eax
109294: 8b 55 cc mov -0x34(%ebp),%edx
109297: 74 c9 je 109262 <rtems_termios_read+0x24d><== ALWAYS TAKEN
109299: eb 16 jmp 1092b1 <rtems_termios_read+0x29c><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
10929b: 8b 7b 1c mov 0x1c(%ebx),%edi
10929e: 8b 45 e4 mov -0x1c(%ebp),%eax
1092a1: 8a 04 07 mov (%edi,%eax,1),%al
1092a4: 88 01 mov %al,(%ecx)
1092a6: 41 inc %ecx
1092a7: 8b 45 e4 mov -0x1c(%ebp),%eax
1092aa: 40 inc %eax
1092ab: 89 43 24 mov %eax,0x24(%ebx)
count--;
1092ae: 4a dec %edx
1092af: eb 06 jmp 1092b7 <rtems_termios_read+0x2a2>
1092b1: 8b 55 e4 mov -0x1c(%ebp),%edx
1092b4: 8b 4d e0 mov -0x20(%ebp),%ecx
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
1092b7: 85 d2 test %edx,%edx
1092b9: 74 0b je 1092c6 <rtems_termios_read+0x2b1>
1092bb: 8b 43 24 mov 0x24(%ebx),%eax
1092be: 89 45 e4 mov %eax,-0x1c(%ebp)
1092c1: 3b 43 20 cmp 0x20(%ebx),%eax
1092c4: 7c d5 jl 10929b <rtems_termios_read+0x286>
1092c6: 89 55 e4 mov %edx,-0x1c(%ebp)
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
1092c9: 8b 46 10 mov 0x10(%esi),%eax
1092cc: 29 d0 sub %edx,%eax
1092ce: 89 46 18 mov %eax,0x18(%esi)
tty->tty_rcvwakeup = 0;
1092d1: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
1092d8: 00 00 00
rtems_semaphore_release (tty->isem);
1092db: 83 ec 0c sub $0xc,%esp
1092de: ff 73 14 pushl 0x14(%ebx)
1092e1: e8 5a 0f 00 00 call 10a240 <rtems_semaphore_release>
return sc;
1092e6: 83 c4 10 add $0x10,%esp
}
1092e9: 8b 45 dc mov -0x24(%ebp),%eax
1092ec: 8d 65 f4 lea -0xc(%ebp),%esp
1092ef: 5b pop %ebx
1092f0: 5e pop %esi
1092f1: 5f pop %edi
1092f2: c9 leave
1092f3: c3 ret
001095fe <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
*/
int
rtems_termios_refill_transmitter (struct rtems_termios_tty *tty)
{
1095fe: 55 push %ebp
1095ff: 89 e5 mov %esp,%ebp
109601: 57 push %edi
109602: 56 push %esi
109603: 53 push %ebx
109604: 83 ec 0c sub $0xc,%esp
109607: 8b 5d 08 mov 0x8(%ebp),%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))
10960a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109610: 25 03 04 00 00 and $0x403,%eax
109615: 3d 01 04 00 00 cmp $0x401,%eax
10961a: 75 2c jne 109648 <rtems_termios_refill_transmitter+0x4a><== ALWAYS TAKEN
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
10961c: 57 push %edi <== NOT EXECUTED
10961d: 6a 01 push $0x1 <== NOT EXECUTED
10961f: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED
109622: 50 push %eax <== NOT EXECUTED
109623: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
109626: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
10962c: 9c pushf <== NOT EXECUTED
10962d: fa cli <== NOT EXECUTED
10962e: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
10962f: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
109635: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10963b: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
10963e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
109644: 52 push %edx <== NOT EXECUTED
109645: 9d popf <== NOT EXECUTED
109646: eb 38 jmp 109680 <rtems_termios_refill_transmitter+0x82><== NOT EXECUTED
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
109648: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10964e: 83 e0 03 and $0x3,%eax
109651: 83 f8 02 cmp $0x2,%eax
109654: 75 37 jne 10968d <rtems_termios_refill_transmitter+0x8f><== ALWAYS TAKEN
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
109656: 56 push %esi <== NOT EXECUTED
109657: 6a 01 push $0x1 <== NOT EXECUTED
109659: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED
10965c: 50 push %eax <== NOT EXECUTED
10965d: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
109660: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
109666: 9c pushf <== NOT EXECUTED
109667: fa cli <== NOT EXECUTED
109668: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
109669: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
10966f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109675: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
109678: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
10967e: 52 push %edx <== NOT EXECUTED
10967f: 9d popf <== NOT EXECUTED
109680: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend = 1;
109683: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
109688: e9 35 01 00 00 jmp 1097c2 <rtems_termios_refill_transmitter+0x1c4><== NOT EXECUTED
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
10968d: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
109693: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
109699: 39 c2 cmp %eax,%edx
10969b: 75 25 jne 1096c2 <rtems_termios_refill_transmitter+0xc4>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
10969d: 31 f6 xor %esi,%esi
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
10969f: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
1096a6: 0f 85 16 01 00 00 jne 1097c2 <rtems_termios_refill_transmitter+0x1c4><== ALWAYS TAKEN
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
1096ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1096af: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED
1096b5: e8 86 0b 00 00 call 10a240 <rtems_semaphore_release><== NOT EXECUTED
1096ba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1096bd: e9 00 01 00 00 jmp 1097c2 <rtems_termios_refill_transmitter+0x1c4><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
1096c2: 9c pushf
1096c3: fa cli
1096c4: 58 pop %eax
len = tty->t_dqlen;
1096c5: 8b bb 90 00 00 00 mov 0x90(%ebx),%edi
tty->t_dqlen = 0;
1096cb: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx)
1096d2: 00 00 00
rtems_interrupt_enable(level);
1096d5: 50 push %eax
1096d6: 9d popf
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
1096d7: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
1096dd: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
1096e3: 8d 04 07 lea (%edi,%eax,1),%eax
1096e6: 31 d2 xor %edx,%edx
1096e8: f7 f1 div %ecx
1096ea: 89 d7 mov %edx,%edi
tty->rawOutBuf.Tail = newTail;
1096ec: 89 93 84 00 00 00 mov %edx,0x84(%ebx)
if (tty->rawOutBufState == rob_wait) {
1096f2: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
1096f9: 75 11 jne 10970c <rtems_termios_refill_transmitter+0x10e>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
1096fb: 83 ec 0c sub $0xc,%esp
1096fe: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
109704: e8 37 0b 00 00 call 10a240 <rtems_semaphore_release>
109709: 83 c4 10 add $0x10,%esp
}
if (newTail == tty->rawOutBuf.Head) {
10970c: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
109712: 39 c7 cmp %eax,%edi
109714: 75 2a jne 109740 <rtems_termios_refill_transmitter+0x142>
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
109716: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
10971d: 00 00 00
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
109720: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
109726: 31 f6 xor %esi,%esi
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
109728: 85 c0 test %eax,%eax
10972a: 0f 84 8c 00 00 00 je 1097bc <rtems_termios_refill_transmitter+0x1be><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
109730: 51 push %ecx <== NOT EXECUTED
109731: 51 push %ecx <== NOT EXECUTED
109732: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED
109738: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
10973b: 52 push %edx <== NOT EXECUTED
10973c: ff d0 call *%eax <== NOT EXECUTED
10973e: eb 79 jmp 1097b9 <rtems_termios_refill_transmitter+0x1bb><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
109740: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109746: 25 10 02 00 00 and $0x210,%eax
10974b: 3d 10 02 00 00 cmp $0x210,%eax
109750: 75 22 jne 109774 <rtems_termios_refill_transmitter+0x176><== ALWAYS TAKEN
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
109752: 9c pushf <== NOT EXECUTED
109753: fa cli <== NOT EXECUTED
109754: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
109755: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10975b: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
10975e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
109764: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED
10976b: 00 00 00
rtems_interrupt_enable(level);
10976e: 52 push %edx <== NOT EXECUTED
10976f: 9d popf <== NOT EXECUTED
nToSend = 0;
109770: 31 f6 xor %esi,%esi <== NOT EXECUTED
109772: eb 48 jmp 1097bc <rtems_termios_refill_transmitter+0x1be><== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
109774: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
10977a: 39 c7 cmp %eax,%edi
10977c: 76 08 jbe 109786 <rtems_termios_refill_transmitter+0x188>
nToSend = tty->rawOutBuf.Size - newTail;
10977e: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi
109784: eb 06 jmp 10978c <rtems_termios_refill_transmitter+0x18e>
else
nToSend = tty->rawOutBuf.Head - newTail;
109786: 8b b3 80 00 00 00 mov 0x80(%ebx),%esi
10978c: 29 fe sub %edi,%esi
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
10978e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109794: f6 c4 06 test $0x6,%ah
109797: 74 05 je 10979e <rtems_termios_refill_transmitter+0x1a0>
nToSend = 1;
109799: be 01 00 00 00 mov $0x1,%esi
}
tty->rawOutBufState = rob_busy; /*apm*/
10979e: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
1097a5: 00 00 00
(*tty->device.write)(
1097a8: 52 push %edx
1097a9: 56 push %esi
1097aa: 8b 43 7c mov 0x7c(%ebx),%eax
1097ad: 01 f8 add %edi,%eax
1097af: 50 push %eax
1097b0: ff 73 10 pushl 0x10(%ebx)
1097b3: ff 93 a4 00 00 00 call *0xa4(%ebx)
1097b9: 83 c4 10 add $0x10,%esp
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
1097bc: 89 bb 84 00 00 00 mov %edi,0x84(%ebx)
}
return nToSend;
}
1097c2: 89 f0 mov %esi,%eax
1097c4: 8d 65 f4 lea -0xc(%ebp),%esp
1097c7: 5b pop %ebx
1097c8: 5e pop %esi
1097c9: 5f pop %edi
1097ca: c9 leave
1097cb: c3 ret
0010959a <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
10959a: 55 push %ebp
10959b: 89 e5 mov %esp,%ebp
10959d: 57 push %edi
10959e: 56 push %esi
10959f: 53 push %ebx
1095a0: 83 ec 1c sub $0x1c,%esp
1095a3: 8b 5d 08 mov 0x8(%ebp),%ebx
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
1095a6: 8d 7d e0 lea -0x20(%ebp),%edi
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
1095a9: 8d 75 e7 lea -0x19(%ebp),%esi
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
1095ac: 57 push %edi
1095ad: 6a 00 push $0x0
1095af: 6a 02 push $0x2
1095b1: 6a 03 push $0x3
1095b3: e8 d4 05 00 00 call 109b8c <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) {
1095b8: 83 c4 10 add $0x10,%esp
1095bb: f6 45 e0 01 testb $0x1,-0x20(%ebp)
1095bf: 74 17 je 1095d8 <rtems_termios_rxdaemon+0x3e><== ALWAYS TAKEN
tty->rxTaskId = 0;
1095c1: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED
1095c8: 00 00 00
rtems_task_delete(RTEMS_SELF);
1095cb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1095ce: 6a 00 push $0x0 <== NOT EXECUTED
1095d0: e8 33 0e 00 00 call 10a408 <rtems_task_delete> <== NOT EXECUTED
1095d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
1095d8: 83 ec 0c sub $0xc,%esp
1095db: ff 73 10 pushl 0x10(%ebx)
1095de: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (c != EOF) {
1095e4: 83 c4 10 add $0x10,%esp
1095e7: 83 f8 ff cmp $0xffffffff,%eax
1095ea: 74 c0 je 1095ac <rtems_termios_rxdaemon+0x12>
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
1095ec: 88 45 e7 mov %al,-0x19(%ebp)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
1095ef: 50 push %eax
1095f0: 6a 01 push $0x1
1095f2: 56 push %esi
1095f3: 53 push %ebx
1095f4: e8 16 fd ff ff call 10930f <rtems_termios_enqueue_raw_characters>
1095f9: 83 c4 10 add $0x10,%esp
1095fc: eb ae jmp 1095ac <rtems_termios_rxdaemon+0x12>
001097cc <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
1097cc: 55 push %ebp
1097cd: 89 e5 mov %esp,%ebp
1097cf: 56 push %esi
1097d0: 53 push %ebx
1097d1: 83 ec 10 sub $0x10,%esp
1097d4: 8b 5d 08 mov 0x8(%ebp),%ebx
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
1097d7: 8d 75 f4 lea -0xc(%ebp),%esi
1097da: 56 push %esi
1097db: 6a 00 push $0x0
1097dd: 6a 02 push $0x2
1097df: 6a 03 push $0x3
1097e1: e8 a6 03 00 00 call 109b8c <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) {
1097e6: 83 c4 10 add $0x10,%esp
1097e9: f6 45 f4 01 testb $0x1,-0xc(%ebp)
1097ed: 74 17 je 109806 <rtems_termios_txdaemon+0x3a><== ALWAYS TAKEN
tty->txTaskId = 0;
1097ef: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED
1097f6: 00 00 00
rtems_task_delete(RTEMS_SELF);
1097f9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1097fc: 6a 00 push $0x0 <== NOT EXECUTED
1097fe: e8 05 0c 00 00 call 10a408 <rtems_task_delete> <== NOT EXECUTED
109803: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
109806: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10980c: c1 e0 05 shl $0x5,%eax
10980f: 8b 80 2c 2e 12 00 mov 0x122e2c(%eax),%eax
109815: 85 c0 test %eax,%eax
109817: 74 09 je 109822 <rtems_termios_txdaemon+0x56><== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
109819: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10981c: 53 push %ebx <== NOT EXECUTED
10981d: ff d0 call *%eax <== NOT EXECUTED
10981f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
109822: 83 ec 0c sub $0xc,%esp
109825: 53 push %ebx
109826: e8 d3 fd ff ff call 1095fe <rtems_termios_refill_transmitter>
}
10982b: 83 c4 10 add $0x10,%esp
10982e: eb aa jmp 1097da <rtems_termios_txdaemon+0xe>
00108f6e <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
108f6e: 55 push %ebp
108f6f: 89 e5 mov %esp,%ebp
108f71: 57 push %edi
108f72: 56 push %esi
108f73: 53 push %ebx
108f74: 83 ec 20 sub $0x20,%esp
108f77: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
108f7a: 8b 03 mov (%ebx),%eax
108f7c: 8b 70 34 mov 0x34(%eax),%esi
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108f7f: 6a 00 push $0x0
108f81: 6a 00 push $0x0
108f83: ff 76 18 pushl 0x18(%esi)
108f86: e8 c9 11 00 00 call 10a154 <rtems_semaphore_obtain>
108f8b: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL)
108f8d: 83 c4 10 add $0x10,%esp
108f90: 85 c0 test %eax,%eax
108f92: 75 77 jne 10900b <rtems_termios_write+0x9d><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
108f94: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
108f9a: c1 e0 05 shl $0x5,%eax
108f9d: 8b 80 24 2e 12 00 mov 0x122e24(%eax),%eax
108fa3: 85 c0 test %eax,%eax
108fa5: 74 0b je 108fb2 <rtems_termios_write+0x44>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
108fa7: 57 push %edi
108fa8: 57 push %edi
108fa9: 53 push %ebx
108faa: 56 push %esi
108fab: ff d0 call *%eax
108fad: 89 c7 mov %eax,%edi
rtems_semaphore_release (tty->osem);
108faf: 5b pop %ebx
108fb0: eb 4e jmp 109000 <rtems_termios_write+0x92>
return sc;
}
if (tty->termios.c_oflag & OPOST) {
108fb2: f6 46 34 01 testb $0x1,0x34(%esi)
108fb6: 74 2f je 108fe7 <rtems_termios_write+0x79><== NEVER TAKEN
uint32_t count = args->count;
108fb8: 8b 4b 10 mov 0x10(%ebx),%ecx
char *buffer = args->buffer;
108fbb: 8b 43 0c mov 0xc(%ebx),%eax
108fbe: 89 45 e4 mov %eax,-0x1c(%ebp)
while (count--)
108fc1: eb 18 jmp 108fdb <rtems_termios_write+0x6d>
oproc (*buffer++, tty);
108fc3: 8b 55 e4 mov -0x1c(%ebp),%edx
108fc6: 0f b6 02 movzbl (%edx),%eax
108fc9: 42 inc %edx
108fca: 89 55 e4 mov %edx,-0x1c(%ebp)
108fcd: 89 f2 mov %esi,%edx
108fcf: 89 4d e0 mov %ecx,-0x20(%ebp)
108fd2: e8 37 fb ff ff call 108b0e <oproc>
108fd7: 8b 4d e0 mov -0x20(%ebp),%ecx
108fda: 49 dec %ecx
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
108fdb: 85 c9 test %ecx,%ecx
108fdd: 75 e4 jne 108fc3 <rtems_termios_write+0x55>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
108fdf: 8b 43 10 mov 0x10(%ebx),%eax
108fe2: 89 43 18 mov %eax,0x18(%ebx)
108fe5: eb 16 jmp 108ffd <rtems_termios_write+0x8f>
} else {
rtems_termios_puts (args->buffer, args->count, tty);
108fe7: 51 push %ecx <== NOT EXECUTED
108fe8: 56 push %esi <== NOT EXECUTED
108fe9: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108fec: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
108fef: e8 fa f9 ff ff call 1089ee <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
108ff4: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
108ff7: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED
108ffa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_semaphore_release (tty->osem);
108ffd: 83 ec 0c sub $0xc,%esp
109000: ff 76 18 pushl 0x18(%esi)
109003: e8 38 12 00 00 call 10a240 <rtems_semaphore_release>
return sc;
109008: 83 c4 10 add $0x10,%esp
}
10900b: 89 f8 mov %edi,%eax
10900d: 8d 65 f4 lea -0xc(%ebp),%esp
109010: 5b pop %ebx
109011: 5e pop %esi
109012: 5f pop %edi
109013: c9 leave
109014: c3 ret
00116384 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
116384: 55 push %ebp
116385: 89 e5 mov %esp,%ebp
116387: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
11638a: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
11638d: 50 push %eax
11638e: ff 75 08 pushl 0x8(%ebp)
116391: 68 d8 c8 13 00 push $0x13c8d8
116396: e8 3d 26 00 00 call 1189d8 <_Objects_Get>
switch ( location ) {
11639b: 83 c4 10 add $0x10,%esp
11639e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1163a2: 75 1e jne 1163c2 <rtems_timer_cancel+0x3e>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
1163a4: 83 78 38 04 cmpl $0x4,0x38(%eax)
1163a8: 74 0f je 1163b9 <rtems_timer_cancel+0x35><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
1163aa: 83 ec 0c sub $0xc,%esp
1163ad: 83 c0 10 add $0x10,%eax
1163b0: 50 push %eax
1163b1: e8 ba 3f 00 00 call 11a370 <_Watchdog_Remove>
1163b6: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
1163b9: e8 cc 2d 00 00 call 11918a <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1163be: 31 c0 xor %eax,%eax
1163c0: eb 05 jmp 1163c7 <rtems_timer_cancel+0x43>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1163c2: b8 04 00 00 00 mov $0x4,%eax
}
1163c7: c9 leave
1163c8: c3 ret
001167e4 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
1167e4: 55 push %ebp
1167e5: 89 e5 mov %esp,%ebp
1167e7: 57 push %edi
1167e8: 56 push %esi
1167e9: 53 push %ebx
1167ea: 83 ec 1c sub $0x1c,%esp
1167ed: 8b 7d 0c mov 0xc(%ebp),%edi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
1167f0: 8b 35 18 c9 13 00 mov 0x13c918,%esi
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
1167f6: bb 0e 00 00 00 mov $0xe,%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
1167fb: 85 f6 test %esi,%esi
1167fd: 0f 84 b1 00 00 00 je 1168b4 <rtems_timer_server_fire_when+0xd0>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
116803: b3 0b mov $0xb,%bl
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
116805: 80 3d 4c c6 13 00 00 cmpb $0x0,0x13c64c
11680c: 0f 84 a2 00 00 00 je 1168b4 <rtems_timer_server_fire_when+0xd0><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
116812: b3 09 mov $0x9,%bl
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
116814: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
116818: 0f 84 96 00 00 00 je 1168b4 <rtems_timer_server_fire_when+0xd0>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
11681e: 83 ec 0c sub $0xc,%esp
116821: 57 push %edi
116822: e8 b5 d6 ff ff call 113edc <_TOD_Validate>
116827: 83 c4 10 add $0x10,%esp
return RTEMS_INVALID_CLOCK;
11682a: b3 14 mov $0x14,%bl
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
11682c: 84 c0 test %al,%al
11682e: 0f 84 80 00 00 00 je 1168b4 <rtems_timer_server_fire_when+0xd0>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
116834: 83 ec 0c sub $0xc,%esp
116837: 57 push %edi
116838: e8 37 d6 ff ff call 113e74 <_TOD_To_seconds>
11683d: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
11683f: 83 c4 10 add $0x10,%esp
116842: 3b 05 c4 c6 13 00 cmp 0x13c6c4,%eax
116848: 76 6a jbe 1168b4 <rtems_timer_server_fire_when+0xd0>
11684a: 51 push %ecx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
11684b: 8d 45 e4 lea -0x1c(%ebp),%eax
11684e: 50 push %eax
11684f: ff 75 08 pushl 0x8(%ebp)
116852: 68 d8 c8 13 00 push $0x13c8d8
116857: e8 7c 21 00 00 call 1189d8 <_Objects_Get>
11685c: 89 c3 mov %eax,%ebx
switch ( location ) {
11685e: 83 c4 10 add $0x10,%esp
116861: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
116865: 75 48 jne 1168af <rtems_timer_server_fire_when+0xcb>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
116867: 83 ec 0c sub $0xc,%esp
11686a: 8d 40 10 lea 0x10(%eax),%eax
11686d: 50 push %eax
11686e: e8 fd 3a 00 00 call 11a370 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
116873: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11687a: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_watchdog->routine = routine;
116881: 8b 45 10 mov 0x10(%ebp),%eax
116884: 89 43 2c mov %eax,0x2c(%ebx)
the_watchdog->id = id;
116887: 8b 45 08 mov 0x8(%ebp),%eax
11688a: 89 43 30 mov %eax,0x30(%ebx)
the_watchdog->user_data = user_data;
11688d: 8b 45 14 mov 0x14(%ebp),%eax
116890: 89 43 34 mov %eax,0x34(%ebx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
116893: 2b 3d c4 c6 13 00 sub 0x13c6c4,%edi
116899: 89 7b 1c mov %edi,0x1c(%ebx)
(*timer_server->schedule_operation)( timer_server, the_timer );
11689c: 58 pop %eax
11689d: 5a pop %edx
11689e: 53 push %ebx
11689f: 56 push %esi
1168a0: ff 56 04 call *0x4(%esi)
_Thread_Enable_dispatch();
1168a3: e8 e2 28 00 00 call 11918a <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1168a8: 83 c4 10 add $0x10,%esp
1168ab: 31 db xor %ebx,%ebx
1168ad: eb 05 jmp 1168b4 <rtems_timer_server_fire_when+0xd0>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1168af: bb 04 00 00 00 mov $0x4,%ebx
}
1168b4: 89 d8 mov %ebx,%eax
1168b6: 8d 65 f4 lea -0xc(%ebp),%esp
1168b9: 5b pop %ebx
1168ba: 5e pop %esi
1168bb: 5f pop %edi
1168bc: c9 leave
1168bd: c3 ret
0010b145 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
10b145: 55 push %ebp
10b146: 89 e5 mov %esp,%ebp
10b148: 57 push %edi
10b149: 56 push %esi
10b14a: 53 push %ebx
10b14b: 83 ec 1c sub $0x1c,%esp
10b14e: 89 c3 mov %eax,%ebx
10b150: 89 55 e4 mov %edx,-0x1c(%ebp)
10b153: 89 4d e0 mov %ecx,-0x20(%ebp)
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
10b156: a9 00 00 00 20 test $0x20000000,%eax
10b15b: 74 2c je 10b189 <rtems_verror+0x44>
if (rtems_panic_in_progress++)
10b15d: a1 d0 99 12 00 mov 0x1299d0,%eax
10b162: 8d 50 01 lea 0x1(%eax),%edx
10b165: 89 15 d0 99 12 00 mov %edx,0x1299d0
10b16b: 85 c0 test %eax,%eax
10b16d: 74 0b je 10b17a <rtems_verror+0x35> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b16f: a1 20 9b 12 00 mov 0x129b20,%eax <== NOT EXECUTED
10b174: 40 inc %eax <== NOT EXECUTED
10b175: a3 20 9b 12 00 mov %eax,0x129b20 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
10b17a: 31 f6 xor %esi,%esi
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
10b17c: 83 3d d0 99 12 00 02 cmpl $0x2,0x1299d0
10b183: 0f 8f da 00 00 00 jg 10b263 <rtems_verror+0x11e> <== NEVER TAKEN
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
10b189: 83 ec 0c sub $0xc,%esp
10b18c: a1 a0 78 12 00 mov 0x1278a0,%eax
10b191: ff 70 08 pushl 0x8(%eax)
10b194: e8 4f 9c 00 00 call 114de8 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
10b199: 89 df mov %ebx,%edi
10b19b: 81 e7 ff ff ff 8f and $0x8fffffff,%edi
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
10b1a1: 83 c4 10 add $0x10,%esp
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
10b1a4: 31 f6 xor %esi,%esi
}
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
10b1a6: 81 e3 00 00 00 40 and $0x40000000,%ebx
10b1ac: 74 07 je 10b1b5 <rtems_verror+0x70>
local_errno = errno;
10b1ae: e8 9d 98 00 00 call 114a50 <__errno>
10b1b3: 8b 30 mov (%eax),%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);
10b1b5: 53 push %ebx
10b1b6: ff 75 e0 pushl -0x20(%ebp)
10b1b9: ff 75 e4 pushl -0x1c(%ebp)
10b1bc: a1 a0 78 12 00 mov 0x1278a0,%eax
10b1c1: ff 70 0c pushl 0xc(%eax)
10b1c4: e8 77 fa 00 00 call 11ac40 <vfprintf>
10b1c9: 89 c3 mov %eax,%ebx
if (status)
10b1cb: 83 c4 10 add $0x10,%esp
10b1ce: 85 ff test %edi,%edi
10b1d0: 74 24 je 10b1f6 <rtems_verror+0xb1>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
10b1d2: 83 ec 0c sub $0xc,%esp
10b1d5: 57 push %edi
10b1d6: e8 55 ff ff ff call 10b130 <rtems_status_text>
10b1db: 83 c4 0c add $0xc,%esp
10b1de: 50 push %eax
10b1df: 68 db 27 12 00 push $0x1227db
10b1e4: a1 a0 78 12 00 mov 0x1278a0,%eax
10b1e9: ff 70 0c pushl 0xc(%eax)
10b1ec: e8 eb 9f 00 00 call 1151dc <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
10b1f1: 01 c3 add %eax,%ebx
10b1f3: 83 c4 10 add $0x10,%esp
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
10b1f6: 83 fe 00 cmp $0x0,%esi
10b1f9: 74 40 je 10b23b <rtems_verror+0xf6>
if ((local_errno > 0) && *strerror(local_errno))
10b1fb: 7e 25 jle 10b222 <rtems_verror+0xdd>
10b1fd: 83 ec 0c sub $0xc,%esp
10b200: 56 push %esi
10b201: e8 76 a8 00 00 call 115a7c <strerror>
10b206: 83 c4 10 add $0x10,%esp
10b209: 80 38 00 cmpb $0x0,(%eax)
10b20c: 74 14 je 10b222 <rtems_verror+0xdd> <== NEVER TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
10b20e: 83 ec 0c sub $0xc,%esp
10b211: 56 push %esi
10b212: e8 65 a8 00 00 call 115a7c <strerror>
10b217: 83 c4 0c add $0xc,%esp
10b21a: 50 push %eax
10b21b: 68 e9 27 12 00 push $0x1227e9
10b220: eb 07 jmp 10b229 <rtems_verror+0xe4>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
10b222: 51 push %ecx
10b223: 56 push %esi
10b224: 68 f6 27 12 00 push $0x1227f6
10b229: a1 a0 78 12 00 mov 0x1278a0,%eax
10b22e: ff 70 0c pushl 0xc(%eax)
10b231: e8 a6 9f 00 00 call 1151dc <fprintf>
10b236: 01 c3 add %eax,%ebx
10b238: 83 c4 10 add $0x10,%esp
}
chars_written += fprintf(stderr, "\n");
10b23b: 52 push %edx
10b23c: 52 push %edx
10b23d: 68 68 2f 12 00 push $0x122f68
10b242: a1 a0 78 12 00 mov 0x1278a0,%eax
10b247: ff 70 0c pushl 0xc(%eax)
10b24a: e8 8d 9f 00 00 call 1151dc <fprintf>
10b24f: 8d 34 18 lea (%eax,%ebx,1),%esi
(void) fflush(stderr);
10b252: 58 pop %eax
10b253: a1 a0 78 12 00 mov 0x1278a0,%eax
10b258: ff 70 0c pushl 0xc(%eax)
10b25b: e8 88 9b 00 00 call 114de8 <fflush>
return chars_written;
10b260: 83 c4 10 add $0x10,%esp
}
10b263: 89 f0 mov %esi,%eax
10b265: 8d 65 f4 lea -0xc(%ebp),%esp
10b268: 5b pop %ebx
10b269: 5e pop %esi
10b26a: 5f pop %edi
10b26b: c9 leave
10b26c: c3 ret
00107920 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
107920: 55 push %ebp
107921: 89 e5 mov %esp,%ebp
107923: 57 push %edi
107924: 56 push %esi
107925: 53 push %ebx
107926: 83 ec 3c sub $0x3c,%esp
107929: 89 c3 mov %eax,%ebx
10792b: 89 55 e0 mov %edx,-0x20(%ebp)
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
10792e: 31 f6 xor %esi,%esi
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
107930: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp)
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
107937: 31 ff xor %edi,%edi
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
107939: 89 7d c4 mov %edi,-0x3c(%ebp)
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
10793c: 8b 43 04 mov 0x4(%ebx),%eax
10793f: 48 dec %eax
107940: 89 43 04 mov %eax,0x4(%ebx)
107943: 85 c0 test %eax,%eax
107945: 79 15 jns 10795c <scanInt+0x3c> <== ALWAYS TAKEN
107947: 50 push %eax <== NOT EXECUTED
107948: 50 push %eax <== NOT EXECUTED
107949: 53 push %ebx <== NOT EXECUTED
10794a: ff 35 a0 33 12 00 pushl 0x1233a0 <== NOT EXECUTED
107950: e8 0f b0 00 00 call 112964 <__srget_r> <== NOT EXECUTED
107955: 89 c1 mov %eax,%ecx <== NOT EXECUTED
107957: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10795a: eb 08 jmp 107964 <scanInt+0x44> <== NOT EXECUTED
10795c: 8b 03 mov (%ebx),%eax
10795e: 0f b6 08 movzbl (%eax),%ecx
107961: 40 inc %eax
107962: 89 03 mov %eax,(%ebx)
if (c == ':')
107964: 83 f9 3a cmp $0x3a,%ecx
107967: 74 4a je 1079b3 <scanInt+0x93>
break;
if (sign == 0) {
107969: 85 f6 test %esi,%esi
10796b: 75 11 jne 10797e <scanInt+0x5e>
if (c == '-') {
sign = -1;
limit++;
continue;
}
sign = 1;
10796d: 66 be 01 00 mov $0x1,%si
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
107971: 83 f9 2d cmp $0x2d,%ecx
107974: 75 08 jne 10797e <scanInt+0x5e>
sign = -1;
limit++;
107976: ff 45 e4 incl -0x1c(%ebp)
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
107979: 83 ce ff or $0xffffffff,%esi
limit++;
continue;
10797c: eb be jmp 10793c <scanInt+0x1c>
}
sign = 1;
}
if (!isdigit(c))
10797e: a1 84 33 12 00 mov 0x123384,%eax
107983: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1)
107988: 74 41 je 1079cb <scanInt+0xab>
return 0;
d = c - '0';
if ((i > (limit / 10))
10798a: 8b 45 e4 mov -0x1c(%ebp),%eax
10798d: bf 0a 00 00 00 mov $0xa,%edi
107992: 31 d2 xor %edx,%edx
107994: f7 f7 div %edi
107996: 89 55 d4 mov %edx,-0x2c(%ebp)
107999: 39 45 c4 cmp %eax,-0x3c(%ebp)
10799c: 77 2d ja 1079cb <scanInt+0xab>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
10799e: 83 e9 30 sub $0x30,%ecx
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
1079a1: 39 45 c4 cmp %eax,-0x3c(%ebp)
1079a4: 75 04 jne 1079aa <scanInt+0x8a>
1079a6: 39 d1 cmp %edx,%ecx
1079a8: 77 21 ja 1079cb <scanInt+0xab> <== ALWAYS TAKEN
return 0;
i = i * 10 + d;
1079aa: 6b 7d c4 0a imul $0xa,-0x3c(%ebp),%edi
1079ae: 8d 3c 39 lea (%ecx,%edi,1),%edi
1079b1: eb 86 jmp 107939 <scanInt+0x19>
1079b3: 8b 7d c4 mov -0x3c(%ebp),%edi
}
if (sign == 0)
return 0;
1079b6: 31 c0 xor %eax,%eax
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
1079b8: 85 f6 test %esi,%esi
1079ba: 74 11 je 1079cd <scanInt+0xad> <== NEVER TAKEN
return 0;
*val = i * sign;
1079bc: 0f af f7 imul %edi,%esi
1079bf: 8b 45 e0 mov -0x20(%ebp),%eax
1079c2: 89 30 mov %esi,(%eax)
return 1;
1079c4: b8 01 00 00 00 mov $0x1,%eax
1079c9: eb 02 jmp 1079cd <scanInt+0xad>
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
1079cb: 31 c0 xor %eax,%eax
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
1079cd: 8d 65 f4 lea -0xc(%ebp),%esp
1079d0: 5b pop %ebx
1079d1: 5e pop %esi
1079d2: 5f pop %edi
1079d3: c9 leave
1079d4: c3 ret
00107a60 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
107a60: 55 push %ebp
107a61: 89 e5 mov %esp,%ebp
107a63: 57 push %edi
107a64: 56 push %esi
107a65: 53 push %ebx
107a66: 83 ec 34 sub $0x34,%esp
107a69: 89 c7 mov %eax,%edi
107a6b: 89 d3 mov %edx,%ebx
107a6d: 89 4d d4 mov %ecx,-0x2c(%ebp)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
107a70: 6a 00 push $0x0
107a72: 8d 45 08 lea 0x8(%ebp),%eax
107a75: 50 push %eax
107a76: 8d 4d d4 lea -0x2c(%ebp),%ecx
107a79: 89 f8 mov %edi,%eax
107a7b: e8 55 ff ff ff call 1079d5 <scanString>
107a80: 83 c4 10 add $0x10,%esp
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
107a83: 31 f6 xor %esi,%esi
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
107a85: 85 c0 test %eax,%eax
107a87: 0f 84 c2 00 00 00 je 107b4f <scangr+0xef>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
107a8d: 50 push %eax
107a8e: 50 push %eax
107a8f: 8d 53 04 lea 0x4(%ebx),%edx
107a92: 6a 00 push $0x0
107a94: 8d 45 08 lea 0x8(%ebp),%eax
107a97: 50 push %eax
107a98: 8d 4d d4 lea -0x2c(%ebp),%ecx
107a9b: 89 f8 mov %edi,%eax
107a9d: e8 33 ff ff ff call 1079d5 <scanString>
107aa2: 83 c4 10 add $0x10,%esp
107aa5: 85 c0 test %eax,%eax
107aa7: 0f 84 a2 00 00 00 je 107b4f <scangr+0xef> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
107aad: 8d 55 e4 lea -0x1c(%ebp),%edx
107ab0: 89 f8 mov %edi,%eax
107ab2: e8 69 fe ff ff call 107920 <scanInt>
107ab7: 85 c0 test %eax,%eax
107ab9: 0f 84 90 00 00 00 je 107b4f <scangr+0xef> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
107abf: 51 push %ecx
107ac0: 51 push %ecx
107ac1: 8d 55 e0 lea -0x20(%ebp),%edx
107ac4: 6a 01 push $0x1
107ac6: 8d 45 08 lea 0x8(%ebp),%eax
107ac9: 50 push %eax
107aca: 8d 4d d4 lea -0x2c(%ebp),%ecx
107acd: 89 f8 mov %edi,%eax
107acf: e8 01 ff ff ff call 1079d5 <scanString>
107ad4: 83 c4 10 add $0x10,%esp
107ad7: 85 c0 test %eax,%eax
107ad9: 74 74 je 107b4f <scangr+0xef> <== NEVER TAKEN
return 0;
grp->gr_gid = grgid;
107adb: 8b 45 e4 mov -0x1c(%ebp),%eax
107ade: 66 89 43 08 mov %ax,0x8(%ebx)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
107ae2: 8b 4d e0 mov -0x20(%ebp),%ecx
107ae5: 89 ca mov %ecx,%edx
107ae7: b8 01 00 00 00 mov $0x1,%eax
107aec: 89 c6 mov %eax,%esi
107aee: eb 0b jmp 107afb <scangr+0x9b>
if(*cp == ',')
memcount++;
107af0: 3c 2c cmp $0x2c,%al
107af2: 0f 94 c0 sete %al
107af5: 0f b6 c0 movzbl %al,%eax
107af8: 01 c6 add %eax,%esi
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
107afa: 42 inc %edx
107afb: 8a 02 mov (%edx),%al
107afd: 84 c0 test %al,%al
107aff: 75 ef jne 107af0 <scangr+0x90>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
107b01: 8d 04 b5 13 00 00 00 lea 0x13(,%esi,4),%eax
return 0;
107b08: 31 f6 xor %esi,%esi
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
107b0a: 39 45 08 cmp %eax,0x8(%ebp)
107b0d: 72 40 jb 107b4f <scangr+0xef> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
107b0f: 8b 45 d4 mov -0x2c(%ebp),%eax
107b12: 83 c0 0f add $0xf,%eax
107b15: 83 e0 f0 and $0xfffffff0,%eax
107b18: 89 43 0c mov %eax,0xc(%ebx)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
107b1b: 89 08 mov %ecx,(%eax)
}
/*
* Extract a single group record from the database
*/
static int scangr(
107b1d: 8b 45 e0 mov -0x20(%ebp),%eax
107b20: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
107b21: ba 01 00 00 00 mov $0x1,%edx
107b26: eb 11 jmp 107b39 <scangr+0xd9>
if(*cp == ',') {
107b28: 80 f9 2c cmp $0x2c,%cl
107b2b: 75 0b jne 107b38 <scangr+0xd8>
*cp = '\0';
107b2d: c6 40 ff 00 movb $0x0,-0x1(%eax)
grp->gr_mem[memcount++] = cp + 1;
107b31: 8b 4b 0c mov 0xc(%ebx),%ecx
107b34: 89 04 91 mov %eax,(%ecx,%edx,4)
107b37: 42 inc %edx
107b38: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
107b39: 8a 48 ff mov -0x1(%eax),%cl
107b3c: 84 c9 test %cl,%cl
107b3e: 75 e8 jne 107b28 <scangr+0xc8>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
107b40: 8b 43 0c mov 0xc(%ebx),%eax
107b43: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
return 1;
107b4a: be 01 00 00 00 mov $0x1,%esi
}
107b4f: 89 f0 mov %esi,%eax
107b51: 8d 65 f4 lea -0xc(%ebp),%esp
107b54: 5b pop %ebx
107b55: 5e pop %esi
107b56: 5f pop %edi
107b57: c9 leave
107b58: c3 ret
00107b59 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
107b59: 55 push %ebp
107b5a: 89 e5 mov %esp,%ebp
107b5c: 57 push %edi
107b5d: 56 push %esi
107b5e: 53 push %ebx
107b5f: 83 ec 34 sub $0x34,%esp
107b62: 89 c6 mov %eax,%esi
107b64: 89 d3 mov %edx,%ebx
107b66: 89 4d d4 mov %ecx,-0x2c(%ebp)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
107b69: 8d 7d d4 lea -0x2c(%ebp),%edi
107b6c: 6a 00 push $0x0
107b6e: 8d 45 08 lea 0x8(%ebp),%eax
107b71: 50 push %eax
107b72: 89 f9 mov %edi,%ecx
107b74: 89 f0 mov %esi,%eax
107b76: e8 5a fe ff ff call 1079d5 <scanString>
107b7b: 83 c4 10 add $0x10,%esp
|| !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;
107b7e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
107b85: 85 c0 test %eax,%eax
107b87: 0f 84 c4 00 00 00 je 107c51 <scanpw+0xf8>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
107b8d: 51 push %ecx
107b8e: 51 push %ecx
107b8f: 8d 53 04 lea 0x4(%ebx),%edx
107b92: 6a 00 push $0x0
107b94: 8d 45 08 lea 0x8(%ebp),%eax
107b97: 50 push %eax
107b98: 89 f9 mov %edi,%ecx
107b9a: 89 f0 mov %esi,%eax
107b9c: e8 34 fe ff ff call 1079d5 <scanString>
107ba1: 83 c4 10 add $0x10,%esp
107ba4: 85 c0 test %eax,%eax
107ba6: 0f 84 a5 00 00 00 je 107c51 <scanpw+0xf8> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
107bac: 8d 55 e4 lea -0x1c(%ebp),%edx
107baf: 89 f0 mov %esi,%eax
107bb1: e8 6a fd ff ff call 107920 <scanInt>
107bb6: 85 c0 test %eax,%eax
107bb8: 0f 84 93 00 00 00 je 107c51 <scanpw+0xf8>
|| !scanInt(fp, &pwgid)
107bbe: 8d 55 e0 lea -0x20(%ebp),%edx
107bc1: 89 f0 mov %esi,%eax
107bc3: e8 58 fd ff ff call 107920 <scanInt>
107bc8: 85 c0 test %eax,%eax
107bca: 0f 84 81 00 00 00 je 107c51 <scanpw+0xf8>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
107bd0: 52 push %edx
107bd1: 52 push %edx
107bd2: 8d 53 0c lea 0xc(%ebx),%edx
107bd5: 6a 00 push $0x0
107bd7: 8d 45 08 lea 0x8(%ebp),%eax
107bda: 50 push %eax
107bdb: 89 f9 mov %edi,%ecx
107bdd: 89 f0 mov %esi,%eax
107bdf: e8 f1 fd ff ff call 1079d5 <scanString>
107be4: 83 c4 10 add $0x10,%esp
107be7: 85 c0 test %eax,%eax
107be9: 74 66 je 107c51 <scanpw+0xf8> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
107beb: 50 push %eax
107bec: 50 push %eax
107bed: 8d 53 10 lea 0x10(%ebx),%edx
107bf0: 6a 00 push $0x0
107bf2: 8d 45 08 lea 0x8(%ebp),%eax
107bf5: 50 push %eax
107bf6: 89 f9 mov %edi,%ecx
107bf8: 89 f0 mov %esi,%eax
107bfa: e8 d6 fd ff ff call 1079d5 <scanString>
107bff: 83 c4 10 add $0x10,%esp
107c02: 85 c0 test %eax,%eax
107c04: 74 4b je 107c51 <scanpw+0xf8> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
107c06: 51 push %ecx
107c07: 51 push %ecx
107c08: 8d 53 14 lea 0x14(%ebx),%edx
107c0b: 6a 00 push $0x0
107c0d: 8d 45 08 lea 0x8(%ebp),%eax
107c10: 50 push %eax
107c11: 89 f9 mov %edi,%ecx
107c13: 89 f0 mov %esi,%eax
107c15: e8 bb fd ff ff call 1079d5 <scanString>
107c1a: 83 c4 10 add $0x10,%esp
107c1d: 85 c0 test %eax,%eax
107c1f: 74 30 je 107c51 <scanpw+0xf8> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
107c21: 52 push %edx
107c22: 52 push %edx
107c23: 8d 53 18 lea 0x18(%ebx),%edx
107c26: 6a 01 push $0x1
107c28: 8d 45 08 lea 0x8(%ebp),%eax
107c2b: 50 push %eax
107c2c: 89 f9 mov %edi,%ecx
107c2e: 89 f0 mov %esi,%eax
107c30: e8 a0 fd ff ff call 1079d5 <scanString>
107c35: 83 c4 10 add $0x10,%esp
107c38: 85 c0 test %eax,%eax
107c3a: 74 15 je 107c51 <scanpw+0xf8>
return 0;
pwd->pw_uid = pwuid;
107c3c: 8b 45 e4 mov -0x1c(%ebp),%eax
107c3f: 66 89 43 08 mov %ax,0x8(%ebx)
pwd->pw_gid = pwgid;
107c43: 8b 45 e0 mov -0x20(%ebp),%eax
107c46: 66 89 43 0a mov %ax,0xa(%ebx)
return 1;
107c4a: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp)
}
107c51: 8b 45 d0 mov -0x30(%ebp),%eax
107c54: 8d 65 f4 lea -0xc(%ebp),%esp
107c57: 5b pop %ebx
107c58: 5e pop %esi
107c59: 5f pop %edi
107c5a: c9 leave
107c5b: c3 ret
00108f1c <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
108f1c: 55 push %ebp
108f1d: 89 e5 mov %esp,%ebp
108f1f: 56 push %esi
108f20: 53 push %ebx
108f21: 89 d3 mov %edx,%ebx
108f23: 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)) {
108f25: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx)
108f2c: 74 30 je 108f5e <siproc+0x42> <== NEVER TAKEN
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108f2e: 52 push %edx
108f2f: 6a 00 push $0x0
108f31: 6a 00 push $0x0
108f33: ff 73 18 pushl 0x18(%ebx)
108f36: e8 19 12 00 00 call 10a154 <rtems_semaphore_obtain>
i = iproc (c, tty);
108f3b: 89 f2 mov %esi,%edx
108f3d: 0f b6 c2 movzbl %dl,%eax
108f40: 89 da mov %ebx,%edx
108f42: e8 b5 fe ff ff call 108dfc <iproc>
108f47: 89 c6 mov %eax,%esi
rtems_semaphore_release (tty->osem);
108f49: 58 pop %eax
108f4a: ff 73 18 pushl 0x18(%ebx)
108f4d: e8 ee 12 00 00 call 10a240 <rtems_semaphore_release>
108f52: 83 c4 10 add $0x10,%esp
}
else {
i = iproc (c, tty);
}
return i;
}
108f55: 89 f0 mov %esi,%eax
108f57: 8d 65 f8 lea -0x8(%ebp),%esp
108f5a: 5b pop %ebx
108f5b: 5e pop %esi
108f5c: c9 leave
108f5d: c3 ret
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
108f5e: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
108f61: 89 da mov %ebx,%edx <== NOT EXECUTED
}
return i;
}
108f63: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
108f66: 5b pop %ebx <== NOT EXECUTED
108f67: 5e pop %esi <== NOT EXECUTED
108f68: c9 leave <== 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);
108f69: e9 8e fe ff ff jmp 108dfc <iproc> <== NOT EXECUTED
0010a0f0 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
10a0f0: 55 push %ebp
10a0f1: 89 e5 mov %esp,%ebp
10a0f3: 57 push %edi
10a0f4: 56 push %esi
10a0f5: 53 push %ebx
10a0f6: 83 ec 38 sub $0x38,%esp
10a0f9: 8b 55 08 mov 0x8(%ebp),%edx
10a0fc: 8b 75 0c mov 0xc(%ebp),%esi
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
10a0ff: 31 c0 xor %eax,%eax
10a101: 83 c9 ff or $0xffffffff,%ecx
10a104: 89 d7 mov %edx,%edi
10a106: f2 ae repnz scas %es:(%edi),%al
10a108: f7 d1 not %ecx
10a10a: 49 dec %ecx
10a10b: 6a 01 push $0x1
10a10d: 8d 5d d4 lea -0x2c(%ebp),%ebx
10a110: 53 push %ebx
10a111: 6a 00 push $0x0
10a113: 51 push %ecx
10a114: 52 push %edx
10a115: e8 28 ee ff ff call 108f42 <rtems_filesystem_evaluate_path>
10a11a: 83 c4 20 add $0x20,%esp
return -1;
10a11d: 83 cf ff or $0xffffffff,%edi
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
10a120: 85 c0 test %eax,%eax
10a122: 75 26 jne 10a14a <statvfs+0x5a> <== NEVER TAKEN
return -1;
mt_entry = loc.mt_entry;
10a124: 8b 55 e4 mov -0x1c(%ebp),%edx
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
10a127: b9 0e 00 00 00 mov $0xe,%ecx
10a12c: 89 f7 mov %esi,%edi
10a12e: f3 ab rep stos %eax,%es:(%edi)
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
10a130: 50 push %eax
10a131: 50 push %eax
10a132: 8b 42 28 mov 0x28(%edx),%eax
10a135: 56 push %esi
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
fs_mount_root = &mt_entry->mt_fs_root;
10a136: 83 c2 1c add $0x1c,%edx
memset (sb, 0, sizeof (struct statvfs));
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
10a139: 52 push %edx
10a13a: ff 50 44 call *0x44(%eax)
10a13d: 89 c7 mov %eax,%edi
rtems_filesystem_freenode( &loc );
10a13f: 89 1c 24 mov %ebx,(%esp)
10a142: e8 b9 ee ff ff call 109000 <rtems_filesystem_freenode>
return result;
10a147: 83 c4 10 add $0x10,%esp
}
10a14a: 89 f8 mov %edi,%eax
10a14c: 8d 65 f4 lea -0xc(%ebp),%esp
10a14f: 5b pop %ebx
10a150: 5e pop %esi
10a151: 5f pop %edi
10a152: c9 leave
10a153: c3 ret
00108f68 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
108f68: 55 push %ebp
108f69: 89 e5 mov %esp,%ebp
108f6b: 53 push %ebx
108f6c: 83 ec 04 sub $0x4,%esp
108f6f: 8b 45 08 mov 0x8(%ebp),%eax
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
108f72: 8b 88 ec 00 00 00 mov 0xec(%eax),%ecx
if ( this_reent ) {
108f78: 85 c9 test %ecx,%ecx
108f7a: 74 32 je 108fae <sync_per_thread+0x46> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
108f7c: 8b 15 c8 57 12 00 mov 0x1257c8,%edx
108f82: 8b 9a ec 00 00 00 mov 0xec(%edx),%ebx
_Thread_Executing->libc_reent = this_reent;
108f88: 89 8a ec 00 00 00 mov %ecx,0xec(%edx)
_fwalk (t->libc_reent, sync_wrapper);
108f8e: 52 push %edx
108f8f: 52 push %edx
108f90: 68 b3 8f 10 00 push $0x108fb3
108f95: ff b0 ec 00 00 00 pushl 0xec(%eax)
108f9b: e8 a8 8f 00 00 call 111f48 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
108fa0: a1 c8 57 12 00 mov 0x1257c8,%eax
108fa5: 89 98 ec 00 00 00 mov %ebx,0xec(%eax)
108fab: 83 c4 10 add $0x10,%esp
}
}
108fae: 8b 5d fc mov -0x4(%ebp),%ebx
108fb1: c9 leave
108fb2: c3 ret
00109818 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
109818: 55 push %ebp
109819: 89 e5 mov %esp,%ebp
10981b: 56 push %esi
10981c: 53 push %ebx
10981d: 8b 5d 08 mov 0x8(%ebp),%ebx
109820: 8b 45 0c mov 0xc(%ebp),%eax
109823: 8b 75 10 mov 0x10(%ebp),%esi
switch (opt) {
109826: 85 c0 test %eax,%eax
109828: 74 22 je 10984c <tcsetattr+0x34>
10982a: 48 dec %eax
10982b: 74 0d je 10983a <tcsetattr+0x22>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
10982d: e8 4a 83 00 00 call 111b7c <__errno>
109832: c7 00 86 00 00 00 movl $0x86,(%eax)
109838: eb 2a jmp 109864 <tcsetattr+0x4c>
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
10983a: 50 push %eax
10983b: 6a 00 push $0x0
10983d: 6a 03 push $0x3
10983f: 53 push %ebx
109840: e8 a7 61 00 00 call 10f9ec <ioctl>
109845: 83 c4 10 add $0x10,%esp
109848: 85 c0 test %eax,%eax
10984a: 78 18 js 109864 <tcsetattr+0x4c> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
10984c: 89 75 10 mov %esi,0x10(%ebp)
10984f: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp)
109856: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
109859: 8d 65 f8 lea -0x8(%ebp),%esp
10985c: 5b pop %ebx
10985d: 5e pop %esi
10985e: c9 leave
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
10985f: e9 88 61 00 00 jmp 10f9ec <ioctl>
}
}
109864: 83 c8 ff or $0xffffffff,%eax
109867: 8d 65 f8 lea -0x8(%ebp),%esp
10986a: 5b pop %ebx
10986b: 5e pop %esi
10986c: c9 leave
10986d: c3 ret
0010a6c4 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
10a6c4: 55 push %ebp
10a6c5: 89 e5 mov %esp,%ebp
10a6c7: 57 push %edi
10a6c8: 56 push %esi
10a6c9: 53 push %ebx
10a6ca: 83 ec 58 sub $0x58,%esp
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
10a6cd: ff 75 08 pushl 0x8(%ebp)
10a6d0: e8 1a d9 ff ff call 107fef <rtems_filesystem_dirname>
10a6d5: 89 45 b4 mov %eax,-0x4c(%ebp)
if ( parentpathlen == 0 )
10a6d8: 83 c4 10 add $0x10,%esp
10a6db: 85 c0 test %eax,%eax
10a6dd: 8d 45 d0 lea -0x30(%ebp),%eax
10a6e0: 75 15 jne 10a6f7 <unlink+0x33>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
10a6e2: 51 push %ecx
10a6e3: 50 push %eax
10a6e4: 8d 45 e4 lea -0x1c(%ebp),%eax
10a6e7: 50 push %eax
10a6e8: ff 75 08 pushl 0x8(%ebp)
10a6eb: e8 d4 e6 ff ff call 108dc4 <rtems_filesystem_get_start_loc>
10a6f0: 83 c4 10 add $0x10,%esp
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
10a6f3: 31 db xor %ebx,%ebx
10a6f5: eb 25 jmp 10a71c <unlink+0x58>
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
10a6f7: 83 ec 0c sub $0xc,%esp
10a6fa: 6a 00 push $0x0
10a6fc: 50 push %eax
10a6fd: 6a 02 push $0x2
10a6ff: ff 75 b4 pushl -0x4c(%ebp)
10a702: ff 75 08 pushl 0x8(%ebp)
10a705: e8 a4 d8 ff ff call 107fae <rtems_filesystem_evaluate_path>
10a70a: 89 c2 mov %eax,%edx
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
10a70c: 83 c4 20 add $0x20,%esp
return -1;
10a70f: 83 c8 ff or $0xffffffff,%eax
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
10a712: 85 d2 test %edx,%edx
10a714: 0f 85 d6 00 00 00 jne 10a7f0 <unlink+0x12c> <== NEVER TAKEN
return -1;
free_parentloc = true;
10a71a: b3 01 mov $0x1,%bl
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
10a71c: 8d 7d bc lea -0x44(%ebp),%edi
10a71f: 8d 75 d0 lea -0x30(%ebp),%esi
10a722: b9 05 00 00 00 mov $0x5,%ecx
10a727: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = path + parentpathlen;
10a729: 8b 75 08 mov 0x8(%ebp),%esi
10a72c: 03 75 b4 add -0x4c(%ebp),%esi
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
10a72f: 83 c9 ff or $0xffffffff,%ecx
10a732: 89 f7 mov %esi,%edi
10a734: 31 c0 xor %eax,%eax
10a736: f2 ae repnz scas %es:(%edi),%al
10a738: f7 d1 not %ecx
10a73a: 49 dec %ecx
10a73b: 52 push %edx
10a73c: 52 push %edx
10a73d: 51 push %ecx
10a73e: 56 push %esi
10a73f: e8 ea d8 ff ff call 10802e <rtems_filesystem_prefix_separators>
10a744: 01 c6 add %eax,%esi
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
10a746: 83 c9 ff or $0xffffffff,%ecx
10a749: 89 f7 mov %esi,%edi
10a74b: 31 c0 xor %eax,%eax
10a74d: f2 ae repnz scas %es:(%edi),%al
10a74f: f7 d1 not %ecx
10a751: 49 dec %ecx
10a752: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10a759: 8d 7d bc lea -0x44(%ebp),%edi
10a75c: 57 push %edi
10a75d: 6a 00 push $0x0
10a75f: 51 push %ecx
10a760: 56 push %esi
10a761: e8 ea d7 ff ff call 107f50 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
10a766: 83 c4 20 add $0x20,%esp
10a769: 85 c0 test %eax,%eax
10a76b: 74 13 je 10a780 <unlink+0xbc>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
10a76d: 83 c8 ff or $0xffffffff,%eax
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
10a770: 84 db test %bl,%bl
10a772: 74 7c je 10a7f0 <unlink+0x12c> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
10a774: 83 ec 0c sub $0xc,%esp
10a777: 8d 55 d0 lea -0x30(%ebp),%edx
10a77a: 52 push %edx
10a77b: 89 45 b0 mov %eax,-0x50(%ebp)
10a77e: eb 65 jmp 10a7e5 <unlink+0x121>
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
10a780: 83 ec 0c sub $0xc,%esp
10a783: 57 push %edi
10a784: 8b 45 c8 mov -0x38(%ebp),%eax
10a787: ff 50 10 call *0x10(%eax)
10a78a: 83 c4 10 add $0x10,%esp
10a78d: 48 dec %eax
10a78e: 75 2f jne 10a7bf <unlink+0xfb>
rtems_filesystem_freenode( &loc );
10a790: 83 ec 0c sub $0xc,%esp
10a793: 57 push %edi
10a794: e8 d3 d8 ff ff call 10806c <rtems_filesystem_freenode>
if ( free_parentloc )
10a799: 83 c4 10 add $0x10,%esp
10a79c: 84 db test %bl,%bl
10a79e: 74 0f je 10a7af <unlink+0xeb>
rtems_filesystem_freenode( &parentloc );
10a7a0: 83 ec 0c sub $0xc,%esp
10a7a3: 8d 45 d0 lea -0x30(%ebp),%eax
10a7a6: 50 push %eax
10a7a7: e8 c0 d8 ff ff call 10806c <rtems_filesystem_freenode>
10a7ac: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EISDIR );
10a7af: e8 10 91 00 00 call 1138c4 <__errno>
10a7b4: c7 00 15 00 00 00 movl $0x15,(%eax)
10a7ba: 83 c8 ff or $0xffffffff,%eax
10a7bd: eb 31 jmp 10a7f0 <unlink+0x12c>
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
10a7bf: 50 push %eax
10a7c0: 50 push %eax
10a7c1: 57 push %edi
10a7c2: 8d 75 d0 lea -0x30(%ebp),%esi
10a7c5: 56 push %esi
10a7c6: 8b 45 c8 mov -0x38(%ebp),%eax
10a7c9: ff 50 0c call *0xc(%eax)
rtems_filesystem_freenode( &loc );
10a7cc: 89 3c 24 mov %edi,(%esp)
10a7cf: 89 45 b0 mov %eax,-0x50(%ebp)
10a7d2: e8 95 d8 ff ff call 10806c <rtems_filesystem_freenode>
if ( free_parentloc )
10a7d7: 83 c4 10 add $0x10,%esp
10a7da: 84 db test %bl,%bl
10a7dc: 8b 45 b0 mov -0x50(%ebp),%eax
10a7df: 74 0f je 10a7f0 <unlink+0x12c>
rtems_filesystem_freenode( &parentloc );
10a7e1: 83 ec 0c sub $0xc,%esp
10a7e4: 56 push %esi
10a7e5: e8 82 d8 ff ff call 10806c <rtems_filesystem_freenode>
10a7ea: 83 c4 10 add $0x10,%esp
10a7ed: 8b 45 b0 mov -0x50(%ebp),%eax
return result;
}
10a7f0: 8d 65 f4 lea -0xc(%ebp),%esp
10a7f3: 5b pop %ebx
10a7f4: 5e pop %esi
10a7f5: 5f pop %edi
10a7f6: c9 leave
10a7f7: c3 ret
0010a925 <unmount>:
*/
int unmount(
const char *path
)
{
10a925: 55 push %ebp
10a926: 89 e5 mov %esp,%ebp
10a928: 57 push %edi
10a929: 56 push %esi
10a92a: 53 push %ebx
10a92b: 83 ec 38 sub $0x38,%esp
10a92e: 8b 55 08 mov 0x8(%ebp),%edx
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
10a931: 83 cb ff or $0xffffffff,%ebx
10a934: 31 c0 xor %eax,%eax
10a936: 89 d9 mov %ebx,%ecx
10a938: 89 d7 mov %edx,%edi
10a93a: f2 ae repnz scas %es:(%edi),%al
10a93c: f7 d1 not %ecx
10a93e: 49 dec %ecx
10a93f: 6a 01 push $0x1
10a941: 8d 7d d4 lea -0x2c(%ebp),%edi
10a944: 57 push %edi
10a945: 6a 00 push $0x0
10a947: 51 push %ecx
10a948: 52 push %edx
10a949: e8 e8 d5 ff ff call 107f36 <rtems_filesystem_evaluate_path>
10a94e: 83 c4 20 add $0x20,%esp
10a951: 85 c0 test %eax,%eax
10a953: 0f 85 f2 00 00 00 jne 10aa4b <unmount+0x126>
return -1;
mt_entry = loc.mt_entry;
10a959: 8b 75 e4 mov -0x1c(%ebp),%esi
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
10a95c: 8b 45 d4 mov -0x2c(%ebp),%eax
10a95f: 39 46 1c cmp %eax,0x1c(%esi)
10a962: 74 1c je 10a980 <unmount+0x5b>
rtems_filesystem_freenode( &loc );
10a964: 83 ec 0c sub $0xc,%esp
10a967: 57 push %edi
10a968: e8 87 d6 ff ff call 107ff4 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
10a96d: e8 be 67 00 00 call 111130 <__errno>
10a972: c7 00 0d 00 00 00 movl $0xd,(%eax)
10a978: 83 c4 10 add $0x10,%esp
10a97b: e9 cb 00 00 00 jmp 10aa4b <unmount+0x126>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
10a980: 83 ec 0c sub $0xc,%esp
10a983: 57 push %edi
10a984: e8 6b d6 ff ff call 107ff4 <rtems_filesystem_freenode>
* that made the current node thread based instead
* of system based? I thought it was but it doesn't
* look like it in this version.
*/
if ( rtems_filesystem_current.mt_entry == mt_entry )
10a989: 83 c4 10 add $0x10,%esp
10a98c: a1 dc 43 12 00 mov 0x1243dc,%eax
10a991: 39 70 14 cmp %esi,0x14(%eax)
10a994: 74 25 je 10a9bb <unmount+0x96>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
10a996: 51 push %ecx
10a997: 51 push %ecx
10a998: ff 76 2c pushl 0x2c(%esi)
10a99b: 68 14 a9 10 00 push $0x10a914
10a9a0: e8 44 dd ff ff call 1086e9 <rtems_filesystem_mount_iterate>
10a9a5: 83 c4 10 add $0x10,%esp
10a9a8: 84 c0 test %al,%al
10a9aa: 75 0f jne 10a9bb <unmount+0x96>
* Run the file descriptor table to determine if there are any file
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
10a9ac: 83 ec 0c sub $0xc,%esp
10a9af: 56 push %esi
10a9b0: e8 27 d9 ff ff call 1082dc <rtems_libio_is_open_files_in_fs>
10a9b5: 83 c4 10 add $0x10,%esp
10a9b8: 48 dec %eax
10a9b9: 75 10 jne 10a9cb <unmount+0xa6>
rtems_set_errno_and_return_minus_one( EBUSY );
10a9bb: e8 70 67 00 00 call 111130 <__errno>
10a9c0: c7 00 10 00 00 00 movl $0x10,(%eax)
10a9c6: e9 80 00 00 00 jmp 10aa4b <unmount+0x126>
* Allow the file system being unmounted on to do its cleanup.
* If it fails it will set the errno to the approprate value
* and the fileystem will not be modified.
*/
if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 )
10a9cb: 83 ec 0c sub $0xc,%esp
10a9ce: 8b 46 14 mov 0x14(%esi),%eax
10a9d1: 56 push %esi
10a9d2: ff 50 28 call *0x28(%eax)
10a9d5: 83 c4 10 add $0x10,%esp
return -1;
10a9d8: 83 ca ff or $0xffffffff,%edx
* Allow the file system being unmounted on to do its cleanup.
* If it fails it will set the errno to the approprate value
* and the fileystem will not be modified.
*/
if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 )
10a9db: 85 c0 test %eax,%eax
10a9dd: 75 6f jne 10aa4e <unmount+0x129> <== NEVER TAKEN
* NOTE: Fatal error is called in a case which should never happen
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
10a9df: 83 ec 0c sub $0xc,%esp
10a9e2: 8b 46 28 mov 0x28(%esi),%eax
10a9e5: 56 push %esi
10a9e6: ff 50 2c call *0x2c(%eax)
10a9e9: 83 c4 10 add $0x10,%esp
10a9ec: 85 c0 test %eax,%eax
10a9ee: 74 1d je 10aa0d <unmount+0xe8> <== ALWAYS TAKEN
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
10a9f0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a9f3: 8b 46 14 mov 0x14(%esi),%eax <== NOT EXECUTED
10a9f6: 56 push %esi <== NOT EXECUTED
10a9f7: ff 50 20 call *0x20(%eax) <== NOT EXECUTED
10a9fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
return -1;
10a9fd: 89 da mov %ebx,%edx <== NOT EXECUTED
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
10a9ff: 85 c0 test %eax,%eax <== NOT EXECUTED
10aa01: 74 4b je 10aa4e <unmount+0x129> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
10aa03: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10aa06: 6a 00 push $0x0 <== NOT EXECUTED
10aa08: e8 83 0e 00 00 call 10b890 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10aa0d: 52 push %edx
10aa0e: 6a 00 push $0x0
10aa10: 6a 00 push $0x0
10aa12: ff 35 48 65 12 00 pushl 0x126548
10aa18: e8 f7 08 00 00 call 10b314 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10aa1d: 89 34 24 mov %esi,(%esp)
10aa20: e8 eb 10 00 00 call 10bb10 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10aa25: 58 pop %eax
10aa26: ff 35 48 65 12 00 pushl 0x126548
10aa2c: e8 cf 09 00 00 call 10b400 <rtems_semaphore_release>
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
fs_mount_loc = &mt_entry->mt_point_node;
10aa31: 8d 46 08 lea 0x8(%esi),%eax
/*
* Free the memory node that was allocated in mount
* Free the memory associated with the extracted mount table entry.
*/
rtems_filesystem_freenode( fs_mount_loc );
10aa34: 89 04 24 mov %eax,(%esp)
10aa37: e8 b8 d5 ff ff call 107ff4 <rtems_filesystem_freenode>
free( mt_entry );
10aa3c: 89 34 24 mov %esi,(%esp)
10aa3f: e8 c4 d5 ff ff call 108008 <free>
return 0;
10aa44: 83 c4 10 add $0x10,%esp
10aa47: 31 d2 xor %edx,%edx
10aa49: eb 03 jmp 10aa4e <unmount+0x129>
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
10aa4b: 83 ca ff or $0xffffffff,%edx
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10aa4e: 89 d0 mov %edx,%eax
10aa50: 8d 65 f4 lea -0xc(%ebp),%esp
10aa53: 5b pop %ebx
10aa54: 5e pop %esi
10aa55: 5f pop %edi
10aa56: c9 leave
10aa57: c3 ret
00109898 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
109898: 55 push %ebp
109899: 89 e5 mov %esp,%ebp
10989b: 57 push %edi
10989c: 56 push %esi
10989d: 53 push %ebx
10989e: 83 ec 4c sub $0x4c,%esp
1098a1: 8b 5d 08 mov 0x8(%ebp),%ebx
1098a4: 8b 7d 0c mov 0xc(%ebp),%edi
1098a7: 89 f8 mov %edi,%eax
for (; *fmt != '\0'; fmt++) {
1098a9: e9 51 02 00 00 jmp 109aff <vprintk+0x267>
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
1098ae: 80 fa 25 cmp $0x25,%dl
1098b1: 74 0b je 1098be <vprintk+0x26>
BSP_output_char(*fmt);
1098b3: 83 ec 0c sub $0xc,%esp
1098b6: 0f be d2 movsbl %dl,%edx
1098b9: e9 5b 01 00 00 jmp 109a19 <vprintk+0x181>
continue;
}
fmt++;
1098be: 43 inc %ebx
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
1098bf: c6 45 c0 20 movb $0x20,-0x40(%ebp)
if (*fmt != '%') {
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
1098c3: 80 3b 30 cmpb $0x30,(%ebx)
1098c6: 75 05 jne 1098cd <vprintk+0x35>
lead = '0';
fmt++;
1098c8: 43 inc %ebx
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
1098c9: c6 45 c0 30 movb $0x30,-0x40(%ebp)
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
1098cd: 31 d2 xor %edx,%edx
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
1098cf: 80 3b 2d cmpb $0x2d,(%ebx)
1098d2: 75 03 jne 1098d7 <vprintk+0x3f>
minus = true;
fmt++;
1098d4: 43 inc %ebx
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
1098d5: b2 01 mov $0x1,%dl
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
1098d7: 31 ff xor %edi,%edi
1098d9: eb 0c jmp 1098e7 <vprintk+0x4f>
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
1098db: 6b ff 0a imul $0xa,%edi,%edi
width += ((unsigned) *fmt - '0');
1098de: 0f be 4d c4 movsbl -0x3c(%ebp),%ecx
1098e2: 8d 7c 0f d0 lea -0x30(%edi,%ecx,1),%edi
fmt++;
1098e6: 43 inc %ebx
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
1098e7: 8a 0b mov (%ebx),%cl
1098e9: 88 4d c4 mov %cl,-0x3c(%ebp)
1098ec: 83 e9 30 sub $0x30,%ecx
1098ef: 80 f9 09 cmp $0x9,%cl
1098f2: 76 e7 jbe 1098db <vprintk+0x43>
1098f4: 89 7d bc mov %edi,-0x44(%ebp)
)
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
1098f7: c6 45 b8 00 movb $0x0,-0x48(%ebp)
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
1098fb: 80 7d c4 6c cmpb $0x6c,-0x3c(%ebp)
1098ff: 75 0a jne 10990b <vprintk+0x73>
lflag = true;
c = *++fmt;
109901: 43 inc %ebx
109902: 8a 0b mov (%ebx),%cl
109904: 88 4d c4 mov %cl,-0x3c(%ebp)
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
109907: c6 45 b8 01 movb $0x1,-0x48(%ebp)
c = *++fmt;
}
if ( c == 'c' ) {
10990b: 80 7d c4 63 cmpb $0x63,-0x3c(%ebp)
10990f: 75 1b jne 10992c <vprintk+0x94>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
109911: 8d 50 04 lea 0x4(%eax),%edx
109914: 89 55 c4 mov %edx,-0x3c(%ebp)
BSP_output_char(chr);
109917: 83 ec 0c sub $0xc,%esp
10991a: 0f be 00 movsbl (%eax),%eax
10991d: 50 push %eax
10991e: ff 15 5c f2 11 00 call *0x11f25c
continue;
109924: 83 c4 10 add $0x10,%esp
109927: e9 cf 01 00 00 jmp 109afb <vprintk+0x263>
}
if ( c == 's' ) {
10992c: 80 7d c4 73 cmpb $0x73,-0x3c(%ebp)
109930: 0f 85 9a 00 00 00 jne 1099d0 <vprintk+0x138>
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
109936: 8d 48 04 lea 0x4(%eax),%ecx
109939: 89 4d c4 mov %ecx,-0x3c(%ebp)
10993c: 8b 00 mov (%eax),%eax
if ( str == NULL ) {
10993e: 85 c0 test %eax,%eax
109940: 75 05 jne 109947 <vprintk+0xaf>
str = "";
109942: b8 b1 d7 11 00 mov $0x11d7b1,%eax
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
109947: 31 f6 xor %esi,%esi
109949: eb 01 jmp 10994c <vprintk+0xb4>
10994b: 46 inc %esi
10994c: 80 3c 30 00 cmpb $0x0,(%eax,%esi,1)
109950: 75 f9 jne 10994b <vprintk+0xb3>
;
/* leading spaces */
if ( !minus )
109952: 89 f1 mov %esi,%ecx
109954: 84 d2 test %dl,%dl
109956: 74 23 je 10997b <vprintk+0xe3>
109958: eb 25 jmp 10997f <vprintk+0xe7>
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
10995a: 83 ec 0c sub $0xc,%esp
10995d: 6a 20 push $0x20
10995f: 89 45 b0 mov %eax,-0x50(%ebp)
109962: 88 55 a8 mov %dl,-0x58(%ebp)
109965: 89 4d ac mov %ecx,-0x54(%ebp)
109968: ff 15 5c f2 11 00 call *0x11f25c
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
10996e: 8b 4d ac mov -0x54(%ebp),%ecx
109971: 41 inc %ecx
109972: 83 c4 10 add $0x10,%esp
109975: 8a 55 a8 mov -0x58(%ebp),%dl
109978: 8b 45 b0 mov -0x50(%ebp),%eax
10997b: 39 f9 cmp %edi,%ecx
10997d: 72 db jb 10995a <vprintk+0xc2>
BSP_output_char(' ');
/* no width option */
if (width == 0) {
10997f: 85 ff test %edi,%edi
109981: 75 25 jne 1099a8 <vprintk+0x110>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
109983: 85 f6 test %esi,%esi
109985: 74 27 je 1099ae <vprintk+0x116>
109987: 89 f7 mov %esi,%edi
109989: eb 1d jmp 1099a8 <vprintk+0x110>
BSP_output_char(*str);
10998b: 83 ec 0c sub $0xc,%esp
10998e: 0f be c9 movsbl %cl,%ecx
109991: 51 push %ecx
109992: 89 45 b0 mov %eax,-0x50(%ebp)
109995: 88 55 a8 mov %dl,-0x58(%ebp)
109998: ff 15 5c f2 11 00 call *0x11f25c
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10999e: 8b 45 b0 mov -0x50(%ebp),%eax
1099a1: 40 inc %eax
1099a2: 83 c4 10 add $0x10,%esp
1099a5: 8a 55 a8 mov -0x58(%ebp),%dl
1099a8: 8a 08 mov (%eax),%cl
1099aa: 84 c9 test %cl,%cl
1099ac: 75 dd jne 10998b <vprintk+0xf3>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
1099ae: 84 d2 test %dl,%dl
1099b0: 0f 84 45 01 00 00 je 109afb <vprintk+0x263>
1099b6: eb 0f jmp 1099c7 <vprintk+0x12f>
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
1099b8: 83 ec 0c sub $0xc,%esp
1099bb: 6a 20 push $0x20
1099bd: ff 15 5c f2 11 00 call *0x11f25c
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
1099c3: 46 inc %esi
1099c4: 83 c4 10 add $0x10,%esp
1099c7: 39 fe cmp %edi,%esi
1099c9: 72 ed jb 1099b8 <vprintk+0x120>
1099cb: e9 2b 01 00 00 jmp 109afb <vprintk+0x263>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
1099d0: 80 7d c4 4f cmpb $0x4f,-0x3c(%ebp)
1099d4: 74 5b je 109a31 <vprintk+0x199>
1099d6: 80 7d c4 6f cmpb $0x6f,-0x3c(%ebp)
1099da: 74 55 je 109a31 <vprintk+0x199> <== NEVER TAKEN
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
1099dc: 80 7d c4 49 cmpb $0x49,-0x3c(%ebp)
1099e0: 74 58 je 109a3a <vprintk+0x1a2>
1099e2: 80 7d c4 69 cmpb $0x69,-0x3c(%ebp)
1099e6: 74 52 je 109a3a <vprintk+0x1a2>
c == 'd' || c == 'D' ) {
1099e8: 80 7d c4 44 cmpb $0x44,-0x3c(%ebp)
1099ec: 74 4c je 109a3a <vprintk+0x1a2>
1099ee: 80 7d c4 64 cmpb $0x64,-0x3c(%ebp)
1099f2: 74 46 je 109a3a <vprintk+0x1a2>
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
1099f4: 80 7d c4 55 cmpb $0x55,-0x3c(%ebp)
1099f8: 74 44 je 109a3e <vprintk+0x1a6>
1099fa: 80 7d c4 75 cmpb $0x75,-0x3c(%ebp)
1099fe: 74 3e je 109a3e <vprintk+0x1a6>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
109a00: 80 7d c4 58 cmpb $0x58,-0x3c(%ebp)
109a04: 74 41 je 109a47 <vprintk+0x1af>
109a06: 80 7d c4 78 cmpb $0x78,-0x3c(%ebp)
109a0a: 74 3b je 109a47 <vprintk+0x1af>
base = 16; sign = false;
} else if ( c == 'p' ) {
109a0c: 80 7d c4 70 cmpb $0x70,-0x3c(%ebp)
109a10: 74 39 je 109a4b <vprintk+0x1b3>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
109a12: 83 ec 0c sub $0xc,%esp
109a15: 0f be 55 c4 movsbl -0x3c(%ebp),%edx
109a19: 52 push %edx
109a1a: 89 45 b0 mov %eax,-0x50(%ebp)
109a1d: ff 15 5c f2 11 00 call *0x11f25c
continue;
109a23: 83 c4 10 add $0x10,%esp
109a26: 8b 45 b0 mov -0x50(%ebp),%eax
109a29: 89 45 c4 mov %eax,-0x3c(%ebp)
109a2c: e9 ca 00 00 00 jmp 109afb <vprintk+0x263>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
109a31: 31 d2 xor %edx,%edx
109a33: be 08 00 00 00 mov $0x8,%esi
109a38: eb 1c jmp 109a56 <vprintk+0x1be>
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
109a3a: b2 01 mov $0x1,%dl
109a3c: eb 02 jmp 109a40 <vprintk+0x1a8>
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
109a3e: 31 d2 xor %edx,%edx
109a40: be 0a 00 00 00 mov $0xa,%esi
109a45: eb 0f jmp 109a56 <vprintk+0x1be>
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
109a47: 31 d2 xor %edx,%edx
109a49: eb 06 jmp 109a51 <vprintk+0x1b9>
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
109a4b: 31 d2 xor %edx,%edx
109a4d: c6 45 b8 01 movb $0x1,-0x48(%ebp)
109a51: be 10 00 00 00 mov $0x10,%esi
} else {
BSP_output_char(c);
continue;
}
printNum(
109a56: 0f be 4d c0 movsbl -0x40(%ebp),%ecx
109a5a: 89 4d b4 mov %ecx,-0x4c(%ebp)
109a5d: 8d 48 04 lea 0x4(%eax),%ecx
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
109a60: 89 4d c4 mov %ecx,-0x3c(%ebp)
} else {
BSP_output_char(c);
continue;
}
printNum(
109a63: 8b 08 mov (%eax),%ecx
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
109a65: 84 d2 test %dl,%dl
109a67: 74 1f je 109a88 <vprintk+0x1f0>
109a69: 85 c9 test %ecx,%ecx
109a6b: 79 1b jns 109a88 <vprintk+0x1f0>
BSP_output_char('-');
109a6d: 83 ec 0c sub $0xc,%esp
109a70: 6a 2d push $0x2d
109a72: 89 4d ac mov %ecx,-0x54(%ebp)
109a75: ff 15 5c f2 11 00 call *0x11f25c
unsigned_num = (unsigned long) -num;
109a7b: 8b 4d ac mov -0x54(%ebp),%ecx
109a7e: f7 d9 neg %ecx
if (maxwidth) maxwidth--;
109a80: 83 c4 10 add $0x10,%esp
109a83: 85 ff test %edi,%edi
109a85: 74 04 je 109a8b <vprintk+0x1f3>
109a87: 4f dec %edi
} else {
unsigned_num = (unsigned long) num;
109a88: 89 7d bc mov %edi,-0x44(%ebp)
}
count = 0;
109a8b: 31 ff xor %edi,%edi
109a8d: eb 11 jmp 109aa0 <vprintk+0x208>
while ((n = unsigned_num / base) > 0) {
toPrint[count++] = (char) (unsigned_num - (n * base));
109a8f: 89 f0 mov %esi,%eax
109a91: f6 65 c0 mulb -0x40(%ebp)
109a94: 28 c1 sub %al,%cl
109a96: 88 4c 3d d4 mov %cl,-0x2c(%ebp,%edi,1)
109a9a: 8b 7d b8 mov -0x48(%ebp),%edi
109a9d: 8b 4d c0 mov -0x40(%ebp),%ecx
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
109aa0: 89 c8 mov %ecx,%eax
109aa2: 31 d2 xor %edx,%edx
109aa4: f7 f6 div %esi
109aa6: 89 45 c0 mov %eax,-0x40(%ebp)
109aa9: 85 c0 test %eax,%eax
109aab: 8d 57 01 lea 0x1(%edi),%edx
109aae: 89 55 b8 mov %edx,-0x48(%ebp)
109ab1: 75 dc jne 109a8f <vprintk+0x1f7>
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
109ab3: 88 4c 3d d4 mov %cl,-0x2c(%ebp,%edi,1)
109ab7: eb 12 jmp 109acb <vprintk+0x233>
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
109ab9: 83 ec 0c sub $0xc,%esp
109abc: ff 75 b4 pushl -0x4c(%ebp)
109abf: ff 15 5c f2 11 00 call *0x11f25c
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
109ac5: ff 4d bc decl -0x44(%ebp)
109ac8: 83 c4 10 add $0x10,%esp
109acb: 8b 4d b8 mov -0x48(%ebp),%ecx
109ace: 39 4d bc cmp %ecx,-0x44(%ebp)
109ad1: 77 e6 ja 109ab9 <vprintk+0x221>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
109ad3: 8d 45 d4 lea -0x2c(%ebp),%eax
109ad6: 8d 3c 38 lea (%eax,%edi,1),%edi
109ad9: 31 f6 xor %esi,%esi
109adb: eb 19 jmp 109af6 <vprintk+0x25e>
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
109add: 83 ec 0c sub $0xc,%esp
109ae0: 0f be 07 movsbl (%edi),%eax
109ae3: 0f be 80 b2 d7 11 00 movsbl 0x11d7b2(%eax),%eax
109aea: 50 push %eax
109aeb: ff 15 5c f2 11 00 call *0x11f25c
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
109af1: 46 inc %esi
109af2: 4f dec %edi
109af3: 83 c4 10 add $0x10,%esp
109af6: 3b 75 b8 cmp -0x48(%ebp),%esi
109af9: 72 e2 jb 109add <vprintk+0x245>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
109afb: 43 inc %ebx
109afc: 8b 45 c4 mov -0x3c(%ebp),%eax
109aff: 8a 13 mov (%ebx),%dl
109b01: 84 d2 test %dl,%dl
109b03: 0f 85 a5 fd ff ff jne 1098ae <vprintk+0x16>
sign,
width,
lead
);
}
}
109b09: 8d 65 f4 lea -0xc(%ebp),%esp
109b0c: 5b pop %ebx
109b0d: 5e pop %esi
109b0e: 5f pop %edi
109b0f: c9 leave
109b10: c3 ret
0011baac <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
11baac: 55 push %ebp
11baad: 89 e5 mov %esp,%ebp
11baaf: 56 push %esi
11bab0: 53 push %ebx
11bab1: 8b 5d 08 mov 0x8(%ebp),%ebx
11bab4: 8b 55 0c mov 0xc(%ebp),%edx
11bab7: 8b 4d 10 mov 0x10(%ebp),%ecx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11baba: 3b 1d 44 f1 11 00 cmp 0x11f144,%ebx
11bac0: 73 14 jae 11bad6 <write+0x2a>
iop = rtems_libio_iop( fd );
11bac2: 6b db 38 imul $0x38,%ebx,%ebx
11bac5: 03 1d 18 31 12 00 add 0x123118,%ebx
rtems_libio_check_is_open( iop );
11bacb: 8b 73 14 mov 0x14(%ebx),%esi
11bace: f7 c6 00 01 00 00 test $0x100,%esi
11bad4: 75 0d jne 11bae3 <write+0x37>
11bad6: e8 dd 46 ff ff call 1101b8 <__errno>
11badb: c7 00 09 00 00 00 movl $0x9,(%eax)
11bae1: eb 1a jmp 11bafd <write+0x51>
rtems_libio_check_buffer( buffer );
11bae3: 85 d2 test %edx,%edx
11bae5: 74 0b je 11baf2 <write+0x46> <== NEVER TAKEN
rtems_libio_check_count( count );
11bae7: 31 c0 xor %eax,%eax
11bae9: 85 c9 test %ecx,%ecx
11baeb: 74 31 je 11bb1e <write+0x72>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
11baed: 83 e6 04 and $0x4,%esi
11baf0: 75 10 jne 11bb02 <write+0x56>
11baf2: e8 c1 46 ff ff call 1101b8 <__errno>
11baf7: c7 00 16 00 00 00 movl $0x16,(%eax)
11bafd: 83 c8 ff or $0xffffffff,%eax
11bb00: eb 1c jmp 11bb1e <write+0x72>
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
11bb02: 50 push %eax
11bb03: 8b 43 20 mov 0x20(%ebx),%eax
11bb06: 51 push %ecx
11bb07: 52 push %edx
11bb08: 53 push %ebx
11bb09: ff 50 0c call *0xc(%eax)
if ( rc > 0 )
11bb0c: 83 c4 10 add $0x10,%esp
11bb0f: 85 c0 test %eax,%eax
11bb11: 7e 0b jle 11bb1e <write+0x72>
iop->offset += rc;
11bb13: 89 c1 mov %eax,%ecx
11bb15: c1 f9 1f sar $0x1f,%ecx
11bb18: 01 43 0c add %eax,0xc(%ebx)
11bb1b: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
11bb1e: 8d 65 f8 lea -0x8(%ebp),%esp
11bb21: 5b pop %ebx
11bb22: 5e pop %esi
11bb23: c9 leave
11bb24: c3 ret
0010a938 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
10a938: 55 push %ebp
10a939: 89 e5 mov %esp,%ebp
10a93b: 57 push %edi
10a93c: 56 push %esi
10a93d: 53 push %ebx
10a93e: 83 ec 1c sub $0x1c,%esp
10a941: 8b 75 08 mov 0x8(%ebp),%esi
10a944: 8b 7d 0c mov 0xc(%ebp),%edi
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
10a947: 3b 35 44 01 12 00 cmp 0x120144,%esi
10a94d: 73 11 jae 10a960 <writev+0x28>
iop = rtems_libio_iop( fd );
10a94f: 6b f6 38 imul $0x38,%esi,%esi
10a952: 03 35 18 41 12 00 add 0x124118,%esi
rtems_libio_check_is_open( iop );
10a958: 8b 46 14 mov 0x14(%esi),%eax
10a95b: f6 c4 01 test $0x1,%ah
10a95e: 75 10 jne 10a970 <writev+0x38>
10a960: e8 33 64 00 00 call 110d98 <__errno>
10a965: c7 00 09 00 00 00 movl $0x9,(%eax)
10a96b: e9 ad 00 00 00 jmp 10aa1d <writev+0xe5>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
10a970: a8 04 test $0x4,%al
10a972: 74 42 je 10a9b6 <writev+0x7e> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
10a974: 85 ff test %edi,%edi
10a976: 74 3e je 10a9b6 <writev+0x7e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
10a978: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10a97c: 7e 38 jle 10a9b6 <writev+0x7e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
10a97e: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp)
10a985: 7f 2f jg 10a9b6 <writev+0x7e> <== NEVER TAKEN
10a987: b2 01 mov $0x1,%dl
10a989: 31 c0 xor %eax,%eax
10a98b: 31 c9 xor %ecx,%ecx
10a98d: eb 02 jmp 10a991 <writev+0x59>
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
10a98f: 89 d9 mov %ebx,%ecx
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
10a991: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8)
10a995: 74 1f je 10a9b6 <writev+0x7e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
10a997: 83 7c c7 04 00 cmpl $0x0,0x4(%edi,%eax,8)
10a99c: 0f 94 c3 sete %bl
10a99f: f7 db neg %ebx
10a9a1: 21 da and %ebx,%edx
/* check for wrap */
old = total;
total += iov[v].iov_len;
10a9a3: 8b 5c c7 04 mov 0x4(%edi,%eax,8),%ebx
10a9a7: 8d 1c 19 lea (%ecx,%ebx,1),%ebx
if ( total < old || total > SSIZE_MAX )
10a9aa: 81 fb ff 7f 00 00 cmp $0x7fff,%ebx
10a9b0: 7f 04 jg 10a9b6 <writev+0x7e> <== NEVER TAKEN
10a9b2: 39 cb cmp %ecx,%ebx
10a9b4: 7d 0d jge 10a9c3 <writev+0x8b>
rtems_set_errno_and_return_minus_one( EINVAL );
10a9b6: e8 dd 63 00 00 call 110d98 <__errno>
10a9bb: c7 00 16 00 00 00 movl $0x16,(%eax)
10a9c1: eb 5a jmp 10aa1d <writev+0xe5>
* 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++ ) {
10a9c3: 40 inc %eax
10a9c4: 3b 45 10 cmp 0x10(%ebp),%eax
10a9c7: 7c c6 jl 10a98f <writev+0x57>
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
return 0;
10a9c9: 31 db xor %ebx,%ebx
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
10a9cb: 84 d2 test %dl,%dl
10a9cd: 75 51 jne 10aa20 <writev+0xe8>
10a9cf: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
10a9d6: 8b 55 e4 mov -0x1c(%ebp),%edx
10a9d9: 8b 44 d7 04 mov 0x4(%edi,%edx,8),%eax
10a9dd: 85 c0 test %eax,%eax
10a9df: 74 2f je 10aa10 <writev+0xd8> <== NEVER TAKEN
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
10a9e1: 52 push %edx
10a9e2: 8b 56 20 mov 0x20(%esi),%edx
10a9e5: 50 push %eax
10a9e6: 8b 45 e4 mov -0x1c(%ebp),%eax
10a9e9: ff 34 c7 pushl (%edi,%eax,8)
10a9ec: 56 push %esi
10a9ed: ff 52 0c call *0xc(%edx)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
10a9f0: 83 c4 10 add $0x10,%esp
10a9f3: 83 f8 00 cmp $0x0,%eax
10a9f6: 7c 25 jl 10aa1d <writev+0xe5> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
10a9f8: 74 0d je 10aa07 <writev+0xcf> <== NEVER TAKEN
iop->offset += bytes;
10a9fa: 89 c1 mov %eax,%ecx
10a9fc: c1 f9 1f sar $0x1f,%ecx
10a9ff: 01 46 0c add %eax,0xc(%esi)
10aa02: 11 4e 10 adc %ecx,0x10(%esi)
total += bytes;
10aa05: 01 c3 add %eax,%ebx
}
if (bytes != iov[ v ].iov_len)
10aa07: 8b 55 e4 mov -0x1c(%ebp),%edx
10aa0a: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax
10aa0e: 75 10 jne 10aa20 <writev+0xe8> <== NEVER TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
10aa10: ff 45 e4 incl -0x1c(%ebp)
10aa13: 8b 45 10 mov 0x10(%ebp),%eax
10aa16: 39 45 e4 cmp %eax,-0x1c(%ebp)
10aa19: 7c bb jl 10a9d6 <writev+0x9e>
10aa1b: eb 03 jmp 10aa20 <writev+0xe8>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
10aa1d: 83 cb ff or $0xffffffff,%ebx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10aa20: 89 d8 mov %ebx,%eax
10aa22: 8d 65 f4 lea -0xc(%ebp),%esp
10aa25: 5b pop %ebx
10aa26: 5e pop %esi
10aa27: 5f pop %edi
10aa28: c9 leave
10aa29: c3 ret