RTEMS 4.10Annotated Report
Fri May 21 22:32:56 2010
0010d100 <IMFS_Set_handlers>:
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
10d100: 55 push %ebp
10d101: 89 e5 mov %esp,%ebp
10d103: 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;
10d106: 8b 50 10 mov 0x10(%eax),%edx
10d109: 8b 52 34 mov 0x34(%edx),%edx
switch( node->type ) {
10d10c: 8b 08 mov (%eax),%ecx
10d10e: 8b 49 4c mov 0x4c(%ecx),%ecx
10d111: 49 dec %ecx
10d112: 83 f9 06 cmp $0x6,%ecx
10d115: 77 2d ja 10d144 <IMFS_Set_handlers+0x44><== NEVER TAKEN
10d117: ff 24 8d 5c ea 11 00 jmp *0x11ea5c(,%ecx,4)
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
10d11e: 8b 52 0c mov 0xc(%edx),%edx
10d121: eb 15 jmp 10d138 <IMFS_Set_handlers+0x38>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
10d123: c7 40 08 2c eb 11 00 movl $0x11eb2c,0x8(%eax)
break;
10d12a: eb 18 jmp 10d144 <IMFS_Set_handlers+0x44>
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
10d12c: c7 40 08 64 eb 11 00 movl $0x11eb64,0x8(%eax)
break;
10d133: eb 0f jmp 10d144 <IMFS_Set_handlers+0x44>
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
10d135: 8b 52 08 mov 0x8(%edx),%edx
10d138: 89 50 08 mov %edx,0x8(%eax)
break;
10d13b: eb 07 jmp 10d144 <IMFS_Set_handlers+0x44>
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
10d13d: c7 40 08 78 ea 11 00 movl $0x11ea78,0x8(%eax)
break;
}
return 0;
}
10d144: 31 c0 xor %eax,%eax
10d146: c9 leave
10d147: c3 ret
0010ffb0 <IMFS_allocate_node>:
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
10ffb0: 55 push %ebp
10ffb1: 89 e5 mov %esp,%ebp
10ffb3: 53 push %ebx
10ffb4: 83 ec 1c sub $0x1c,%esp
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
10ffb7: 6a 64 push $0x64
10ffb9: 6a 01 push $0x1
10ffbb: e8 28 dd ff ff call 10dce8 <calloc>
10ffc0: 89 c3 mov %eax,%ebx
if ( !node )
10ffc2: 83 c4 10 add $0x10,%esp
10ffc5: 85 c0 test %eax,%eax
10ffc7: 74 4f je 110018 <IMFS_allocate_node+0x68><== NEVER TAKEN
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
10ffc9: 66 c7 40 34 01 00 movw $0x1,0x34(%eax)
node->type = type;
10ffcf: 8b 45 08 mov 0x8(%ebp),%eax
10ffd2: 89 43 4c mov %eax,0x4c(%ebx)
strncpy( node->name, name, IMFS_NAME_MAX );
10ffd5: 51 push %ecx
10ffd6: 6a 20 push $0x20
10ffd8: ff 75 0c pushl 0xc(%ebp)
10ffdb: 8d 43 0c lea 0xc(%ebx),%eax
10ffde: 50 push %eax
10ffdf: e8 e4 20 00 00 call 1120c8 <strncpy>
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
10ffe4: 8b 45 10 mov 0x10(%ebp),%eax
10ffe7: 89 43 30 mov %eax,0x30(%ebx)
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
10ffea: e8 81 de ff ff call 10de70 <geteuid>
10ffef: 66 89 43 3c mov %ax,0x3c(%ebx)
node->st_gid = getegid();
10fff3: e8 68 de ff ff call 10de60 <getegid>
10fff8: 66 89 43 3e mov %ax,0x3e(%ebx)
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
10fffc: 58 pop %eax
10fffd: 5a pop %edx
10fffe: 6a 00 push $0x0
110000: 8d 45 f0 lea -0x10(%ebp),%eax
110003: 50 push %eax
110004: e8 77 de ff ff call 10de80 <gettimeofday>
node->stat_atime = (time_t) tv.tv_sec;
110009: 8b 45 f0 mov -0x10(%ebp),%eax
11000c: 89 43 40 mov %eax,0x40(%ebx)
node->stat_mtime = (time_t) tv.tv_sec;
11000f: 89 43 44 mov %eax,0x44(%ebx)
node->stat_ctime = (time_t) tv.tv_sec;
110012: 89 43 48 mov %eax,0x48(%ebx)
return node;
110015: 83 c4 10 add $0x10,%esp
}
110018: 89 d8 mov %ebx,%eax
11001a: 8b 5d fc mov -0x4(%ebp),%ebx
11001d: c9 leave
11001e: c3 ret
00111408 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
111408: 55 push %ebp
111409: 89 e5 mov %esp,%ebp
11140b: 57 push %edi
11140c: 56 push %esi
11140d: 53 push %ebx
11140e: 83 ec 1c sub $0x1c,%esp
111411: 8b 7d 0c mov 0xc(%ebp),%edi
111414: 8b 75 10 mov 0x10(%ebp),%esi
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
111417: 8b 45 08 mov 0x8(%ebp),%eax
11141a: 8b 18 mov (%eax),%ebx
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
11141c: e8 1b 0e 00 00 call 11223c <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
111421: 66 85 c0 test %ax,%ax
111424: 74 16 je 11143c <IMFS_chown+0x34> <== ALWAYS TAKEN
111426: 66 3b 43 3c cmp 0x3c(%ebx),%ax <== NOT EXECUTED
11142a: 74 10 je 11143c <IMFS_chown+0x34> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
11142c: e8 37 48 00 00 call 115c68 <__errno> <== NOT EXECUTED
111431: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
111437: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
11143a: eb 20 jmp 11145c <IMFS_chown+0x54> <== NOT EXECUTED
#endif
jnode->st_uid = owner;
11143c: 66 89 7b 3c mov %di,0x3c(%ebx)
jnode->st_gid = group;
111440: 66 89 73 3e mov %si,0x3e(%ebx)
IMFS_update_ctime( jnode );
111444: 50 push %eax
111445: 50 push %eax
111446: 6a 00 push $0x0
111448: 8d 45 e0 lea -0x20(%ebp),%eax
11144b: 50 push %eax
11144c: e8 df 6f ff ff call 108430 <gettimeofday>
111451: 8b 45 e0 mov -0x20(%ebp),%eax
111454: 89 43 48 mov %eax,0x48(%ebx)
111457: 31 c0 xor %eax,%eax
return 0;
111459: 83 c4 10 add $0x10,%esp
}
11145c: 8d 65 f4 lea -0xc(%ebp),%esp
11145f: 5b pop %ebx
111460: 5e pop %esi
111461: 5f pop %edi
111462: c9 leave
111463: c3 ret
00110052 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
110052: 55 push %ebp
110053: 89 e5 mov %esp,%ebp
110055: 57 push %edi
110056: 56 push %esi
110057: 53 push %ebx
110058: 83 ec 1c sub $0x1c,%esp
11005b: 8b 75 08 mov 0x8(%ebp),%esi
11005e: 8b 7d 0c mov 0xc(%ebp),%edi
110061: 8b 5d 18 mov 0x18(%ebp),%ebx
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
110064: 31 c0 xor %eax,%eax
110066: 85 f6 test %esi,%esi
110068: 0f 84 dc 00 00 00 je 11014a <IMFS_create_node+0xf8> <== NEVER TAKEN
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
11006e: 50 push %eax
11006f: a1 48 1f 12 00 mov 0x121f48,%eax
110074: 8b 40 2c mov 0x2c(%eax),%eax
110077: f7 d0 not %eax
110079: 23 45 14 and 0x14(%ebp),%eax
11007c: 50 push %eax
11007d: ff 75 10 pushl 0x10(%ebp)
110080: 57 push %edi
110081: e8 2a ff ff ff call 10ffb0 <IMFS_allocate_node>
if ( !node )
110086: 83 c4 10 add $0x10,%esp
110089: 85 c0 test %eax,%eax
11008b: 0f 84 b9 00 00 00 je 11014a <IMFS_create_node+0xf8> <== NEVER TAKEN
return NULL;
/*
* Set the type specific information
*/
switch (type) {
110091: 4f dec %edi
110092: 83 ff 06 cmp $0x6,%edi
110095: 77 73 ja 11010a <IMFS_create_node+0xb8> <== NEVER TAKEN
110097: ff 24 bd bc ee 11 00 jmp *0x11eebc(,%edi,4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
11009e: 8d 50 54 lea 0x54(%eax),%edx
1100a1: 89 50 50 mov %edx,0x50(%eax)
the_chain->permanent_null = NULL;
1100a4: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
the_chain->last = _Chain_Head(the_chain);
1100ab: 8d 50 50 lea 0x50(%eax),%edx
1100ae: 89 50 58 mov %edx,0x58(%eax)
1100b1: eb 6d jmp 110120 <IMFS_create_node+0xce>
case IMFS_HARD_LINK:
node->info.hard_link.link_node = info->hard_link.link_node;
break;
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
1100b3: 8b 13 mov (%ebx),%edx
1100b5: 89 50 50 mov %edx,0x50(%eax)
break;
1100b8: eb 66 jmp 110120 <IMFS_create_node+0xce>
case IMFS_DEVICE:
node->info.device.major = info->device.major;
1100ba: 8b 13 mov (%ebx),%edx
1100bc: 89 50 50 mov %edx,0x50(%eax)
node->info.device.minor = info->device.minor;
1100bf: 8b 53 04 mov 0x4(%ebx),%edx
1100c2: 89 50 54 mov %edx,0x54(%eax)
break;
1100c5: eb 59 jmp 110120 <IMFS_create_node+0xce>
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
1100c7: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED
1100ce: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED
node->info.linearfile.direct = 0;
1100d5: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
1100dc: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
1100e3: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.file.indirect = 0;
1100ea: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
node->info.file.doubly_indirect = 0;
1100f1: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
node->info.file.triply_indirect = 0;
1100f8: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
break;
1100ff: eb 1f jmp 110120 <IMFS_create_node+0xce>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
110101: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
break;
110108: eb 16 jmp 110120 <IMFS_create_node+0xce>
default:
assert(0);
11010a: 68 c4 de 11 00 push $0x11dec4 <== NOT EXECUTED
11010f: 68 d8 ee 11 00 push $0x11eed8 <== NOT EXECUTED
110114: 6a 5c push $0x5c <== NOT EXECUTED
110116: 68 70 ee 11 00 push $0x11ee70 <== NOT EXECUTED
11011b: e8 e0 6d ff ff call 106f00 <__assert_func> <== NOT EXECUTED
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
110120: 8b 16 mov (%esi),%edx
fs_info = parent_loc->mt_entry->fs_info;
110122: 8b 4e 10 mov 0x10(%esi),%ecx
110125: 8b 59 34 mov 0x34(%ecx),%ebx
node->Parent = parent;
110128: 89 50 08 mov %edx,0x8(%eax)
node->st_ino = ++fs_info->ino_count;
11012b: 8b 4b 04 mov 0x4(%ebx),%ecx
11012e: 41 inc %ecx
11012f: 89 4b 04 mov %ecx,0x4(%ebx)
110132: 89 48 38 mov %ecx,0x38(%eax)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
110135: 53 push %ebx
110136: 53 push %ebx
110137: 50 push %eax
110138: 83 c2 50 add $0x50,%edx
11013b: 52 push %edx
11013c: 89 45 e4 mov %eax,-0x1c(%ebp)
11013f: e8 0c a7 ff ff call 10a850 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
110144: 83 c4 10 add $0x10,%esp
110147: 8b 45 e4 mov -0x1c(%ebp),%eax
}
11014a: 8d 65 f4 lea -0xc(%ebp),%esp
11014d: 5b pop %ebx
11014e: 5e pop %esi
11014f: 5f pop %edi
110150: c9 leave
110151: c3 ret
0011001f <IMFS_create_root_node>:
IMFS_jnode_t *IMFS_create_root_node(void)
{
11001f: 55 push %ebp
110020: 89 e5 mov %esp,%ebp
110022: 83 ec 0c sub $0xc,%esp
IMFS_jnode_t *node;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) );
110025: 68 ed 41 00 00 push $0x41ed
11002a: 68 fe e6 11 00 push $0x11e6fe
11002f: 6a 01 push $0x1
110031: e8 7a ff ff ff call 10ffb0 <IMFS_allocate_node>
if ( !node )
110036: 83 c4 10 add $0x10,%esp
110039: 85 c0 test %eax,%eax
11003b: 74 13 je 110050 <IMFS_create_root_node+0x31><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
11003d: 8d 50 54 lea 0x54(%eax),%edx
110040: 89 50 50 mov %edx,0x50(%eax)
the_chain->permanent_null = NULL;
110043: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
the_chain->last = _Chain_Head(the_chain);
11004a: 8d 50 50 lea 0x50(%eax),%edx
11004d: 89 50 58 mov %edx,0x58(%eax)
* NOTE: Root node is always a directory.
*/
rtems_chain_initialize_empty(&node->info.directory.Entries);
return node;
}
110050: c9 leave
110051: c3 ret
00108e3b <IMFS_dump_directory>:
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
108e3b: 55 push %ebp
108e3c: 89 e5 mov %esp,%ebp
108e3e: 57 push %edi
108e3f: 56 push %esi
108e40: 53 push %ebx
108e41: 83 ec 1c sub $0x1c,%esp
108e44: 8b 45 08 mov 0x8(%ebp),%eax
108e47: 8b 75 0c mov 0xc(%ebp),%esi
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
108e4a: 85 c0 test %eax,%eax
108e4c: 75 11 jne 108e5f <IMFS_dump_directory+0x24><== ALWAYS TAKEN
108e4e: 68 2e 4d 12 00 push $0x124d2e <== NOT EXECUTED
108e53: 68 18 4e 12 00 push $0x124e18 <== NOT EXECUTED
108e58: 68 84 00 00 00 push $0x84 <== NOT EXECUTED
108e5d: eb 13 jmp 108e72 <IMFS_dump_directory+0x37><== NOT EXECUTED
assert( level >= 0 );
108e5f: 85 f6 test %esi,%esi
108e61: 79 19 jns 108e7c <IMFS_dump_directory+0x41><== ALWAYS TAKEN
108e63: 68 3c 4d 12 00 push $0x124d3c <== NOT EXECUTED
108e68: 68 18 4e 12 00 push $0x124e18 <== NOT EXECUTED
108e6d: 68 86 00 00 00 push $0x86 <== NOT EXECUTED
108e72: 68 82 4c 12 00 push $0x124c82 <== NOT EXECUTED
108e77: e8 24 07 00 00 call 1095a0 <__assert_func> <== NOT EXECUTED
assert( the_directory->type == IMFS_DIRECTORY );
108e7c: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
108e80: 74 11 je 108e93 <IMFS_dump_directory+0x58><== ALWAYS TAKEN
108e82: 68 47 4d 12 00 push $0x124d47 <== NOT EXECUTED
108e87: 68 18 4e 12 00 push $0x124e18 <== NOT EXECUTED
108e8c: 68 88 00 00 00 push $0x88 <== NOT EXECUTED
108e91: eb df jmp 108e72 <IMFS_dump_directory+0x37><== NOT EXECUTED
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
108e93: 8b 58 50 mov 0x50(%eax),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
108e96: 83 c0 54 add $0x54,%eax
108e99: 89 45 e4 mov %eax,-0x1c(%ebp)
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
108e9c: 8d 46 01 lea 0x1(%esi),%eax
108e9f: 89 45 e0 mov %eax,-0x20(%ebp)
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
108ea2: eb 40 jmp 108ee4 <IMFS_dump_directory+0xa9>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
108ea4: 31 ff xor %edi,%edi
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
108ea6: 51 push %ecx
108ea7: 51 push %ecx
108ea8: a1 40 90 12 00 mov 0x129040,%eax
108ead: ff 70 08 pushl 0x8(%eax)
108eb0: 68 6d 4d 12 00 push $0x124d6d
108eb5: e8 be d0 00 00 call 115f78 <fputs>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
108eba: 47 inc %edi
108ebb: 83 c4 10 add $0x10,%esp
108ebe: 39 f7 cmp %esi,%edi
108ec0: 7e e4 jle 108ea6 <IMFS_dump_directory+0x6b>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
108ec2: 83 ec 0c sub $0xc,%esp
108ec5: 53 push %ebx
108ec6: e8 53 fe ff ff call 108d1e <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
108ecb: 83 c4 10 add $0x10,%esp
108ece: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
108ed2: 75 0e jne 108ee2 <IMFS_dump_directory+0xa7>
IMFS_dump_directory( the_jnode, level + 1 );
108ed4: 52 push %edx
108ed5: 52 push %edx
108ed6: ff 75 e0 pushl -0x20(%ebp)
108ed9: 53 push %ebx
108eda: e8 5c ff ff ff call 108e3b <IMFS_dump_directory>
108edf: 83 c4 10 add $0x10,%esp
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
108ee2: 8b 1b mov (%ebx),%ebx
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
108ee4: 3b 5d e4 cmp -0x1c(%ebp),%ebx
108ee7: 75 bb jne 108ea4 <IMFS_dump_directory+0x69>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
108ee9: 8d 65 f4 lea -0xc(%ebp),%esp
108eec: 5b pop %ebx
108eed: 5e pop %esi
108eee: 5f pop %edi
108eef: c9 leave
108ef0: c3 ret
0010d29a <IMFS_eval_path>:
const char *pathname, /* IN */
int pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
10d29a: 55 push %ebp
10d29b: 89 e5 mov %esp,%ebp
10d29d: 57 push %edi
10d29e: 56 push %esi
10d29f: 53 push %ebx
10d2a0: 83 ec 5c sub $0x5c,%esp
10d2a3: 8b 5d 14 mov 0x14(%ebp),%ebx
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10d2a6: 8b 3b mov (%ebx),%edi
10d2a8: be 01 00 00 00 mov $0x1,%esi
10d2ad: 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) ) {
10d2b4: e9 20 01 00 00 jmp 10d3d9 <IMFS_eval_path+0x13f>
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
10d2b9: 8d 45 e4 lea -0x1c(%ebp),%eax
10d2bc: 50 push %eax
10d2bd: 8d 4d af lea -0x51(%ebp),%ecx
10d2c0: 51 push %ecx
10d2c1: ff 75 0c pushl 0xc(%ebp)
10d2c4: 8b 45 08 mov 0x8(%ebp),%eax
10d2c7: 03 45 a4 add -0x5c(%ebp),%eax
10d2ca: 50 push %eax
10d2cb: e8 a8 06 00 00 call 10d978 <IMFS_get_token>
10d2d0: 89 c6 mov %eax,%esi
pathnamelen -= len;
10d2d2: 8b 55 e4 mov -0x1c(%ebp),%edx
i += len;
if ( !pathloc->node_access )
10d2d5: 83 c4 10 add $0x10,%esp
10d2d8: 83 3b 00 cmpl $0x0,(%ebx)
10d2db: 0f 84 d4 00 00 00 je 10d3b5 <IMFS_eval_path+0x11b> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
10d2e1: 85 c0 test %eax,%eax
10d2e3: 74 21 je 10d306 <IMFS_eval_path+0x6c>
if ( node->type == IMFS_DIRECTORY )
10d2e5: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10d2e9: 75 1b jne 10d306 <IMFS_eval_path+0x6c>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
10d2eb: 50 push %eax
10d2ec: 50 push %eax
10d2ed: 6a 01 push $0x1
10d2ef: 53 push %ebx
10d2f0: 89 55 a0 mov %edx,-0x60(%ebp)
10d2f3: e8 50 fe ff ff call 10d148 <IMFS_evaluate_permission>
10d2f8: 83 c4 10 add $0x10,%esp
10d2fb: 85 c0 test %eax,%eax
10d2fd: 8b 55 a0 mov -0x60(%ebp),%edx
10d300: 0f 84 44 01 00 00 je 10d44a <IMFS_eval_path+0x1b0>
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
10d306: 29 55 0c sub %edx,0xc(%ebp)
i += len;
10d309: 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;
10d30c: 8b 3b mov (%ebx),%edi
switch( type ) {
10d30e: 83 fe 03 cmp $0x3,%esi
10d311: 74 34 je 10d347 <IMFS_eval_path+0xad>
10d313: 83 fe 04 cmp $0x4,%esi
10d316: 0f 84 b0 00 00 00 je 10d3cc <IMFS_eval_path+0x132>
10d31c: 83 fe 02 cmp $0x2,%esi
10d31f: 0f 85 b4 00 00 00 jne 10d3d9 <IMFS_eval_path+0x13f>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10d325: a1 48 1f 12 00 mov 0x121f48,%eax
10d32a: 3b 78 18 cmp 0x18(%eax),%edi
10d32d: 74 8a je 10d2b9 <IMFS_eval_path+0x1f>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
10d32f: 8b 73 10 mov 0x10(%ebx),%esi
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
10d332: 3b 7e 1c cmp 0x1c(%esi),%edi
10d335: 75 0b jne 10d342 <IMFS_eval_path+0xa8>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
10d337: 8d 7d d0 lea -0x30(%ebp),%edi
10d33a: 83 c6 08 add $0x8,%esi
10d33d: e9 b7 00 00 00 jmp 10d3f9 <IMFS_eval_path+0x15f>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
10d342: 8b 7f 08 mov 0x8(%edi),%edi
10d345: eb 6a jmp 10d3b1 <IMFS_eval_path+0x117>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
10d347: 8b 47 4c mov 0x4c(%edi),%eax
10d34a: 83 f8 03 cmp $0x3,%eax
10d34d: 75 15 jne 10d364 <IMFS_eval_path+0xca>
IMFS_evaluate_hard_link( pathloc, 0 );
10d34f: 57 push %edi
10d350: 57 push %edi
10d351: 6a 00 push $0x0
10d353: 53 push %ebx
10d354: e8 3d fe ff ff call 10d196 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
10d359: 8b 3b mov (%ebx),%edi
if ( !node )
10d35b: 83 c4 10 add $0x10,%esp
10d35e: 85 ff test %edi,%edi
10d360: 75 21 jne 10d383 <IMFS_eval_path+0xe9> <== ALWAYS TAKEN
10d362: eb 25 jmp 10d389 <IMFS_eval_path+0xef> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
10d364: 83 f8 04 cmp $0x4,%eax
10d367: 75 1a jne 10d383 <IMFS_eval_path+0xe9>
result = IMFS_evaluate_sym_link( pathloc, 0 );
10d369: 56 push %esi
10d36a: 56 push %esi
10d36b: 6a 00 push $0x0
10d36d: 53 push %ebx
10d36e: e8 79 fe ff ff call 10d1ec <IMFS_evaluate_sym_link>
10d373: 89 c6 mov %eax,%esi
node = pathloc->node_access;
10d375: 8b 3b mov (%ebx),%edi
if ( result == -1 )
10d377: 83 c4 10 add $0x10,%esp
10d37a: 83 f8 ff cmp $0xffffffff,%eax
10d37d: 0f 84 d5 00 00 00 je 10d458 <IMFS_eval_path+0x1be> <== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10d383: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10d387: 74 10 je 10d399 <IMFS_eval_path+0xff>
rtems_set_errno_and_return_minus_one( ENOTDIR );
10d389: e8 76 40 00 00 call 111404 <__errno>
10d38e: c7 00 14 00 00 00 movl $0x14,(%eax)
10d394: e9 bc 00 00 00 jmp 10d455 <IMFS_eval_path+0x1bb>
/*
* 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 ) {
10d399: 8b 77 5c mov 0x5c(%edi),%esi
10d39c: 85 f6 test %esi,%esi
10d39e: 75 53 jne 10d3f3 <IMFS_eval_path+0x159>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10d3a0: 51 push %ecx
10d3a1: 51 push %ecx
10d3a2: 8d 45 af lea -0x51(%ebp),%eax
10d3a5: 50 push %eax
10d3a6: 57 push %edi
10d3a7: e8 40 05 00 00 call 10d8ec <IMFS_find_match_in_dir>
10d3ac: 89 c7 mov %eax,%edi
if ( !node )
10d3ae: 83 c4 10 add $0x10,%esp
10d3b1: 85 ff test %edi,%edi
10d3b3: 75 10 jne 10d3c5 <IMFS_eval_path+0x12b>
rtems_set_errno_and_return_minus_one( ENOENT );
10d3b5: e8 4a 40 00 00 call 111404 <__errno>
10d3ba: c7 00 02 00 00 00 movl $0x2,(%eax)
10d3c0: e9 90 00 00 00 jmp 10d455 <IMFS_eval_path+0x1bb>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
10d3c5: 89 3b mov %edi,(%ebx)
10d3c7: e9 ed fe ff ff jmp 10d2b9 <IMFS_eval_path+0x1f>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
10d3cc: e8 33 40 00 00 call 111404 <__errno>
10d3d1: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10d3d7: eb 7c jmp 10d455 <IMFS_eval_path+0x1bb>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
10d3d9: 83 fe 04 cmp $0x4,%esi
10d3dc: 74 08 je 10d3e6 <IMFS_eval_path+0x14c> <== NEVER TAKEN
10d3de: 85 f6 test %esi,%esi
10d3e0: 0f 85 d3 fe ff ff jne 10d2b9 <IMFS_eval_path+0x1f>
* 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 ) {
10d3e6: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10d3ea: 75 41 jne 10d42d <IMFS_eval_path+0x193>
if ( node->info.directory.mt_fs != NULL ) {
10d3ec: 8b 77 5c mov 0x5c(%edi),%esi
10d3ef: 85 f6 test %esi,%esi
10d3f1: 74 3a je 10d42d <IMFS_eval_path+0x193>
newloc = node->info.directory.mt_fs->mt_fs_root;
10d3f3: 8d 7d d0 lea -0x30(%ebp),%edi
10d3f6: 83 c6 1c add $0x1c,%esi
10d3f9: b9 05 00 00 00 mov $0x5,%ecx
10d3fe: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10d400: 8d 75 d0 lea -0x30(%ebp),%esi
10d403: b1 05 mov $0x5,%cl
10d405: 89 df mov %ebx,%edi
10d407: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
10d409: 8b 45 e4 mov -0x1c(%ebp),%eax
10d40c: 8b 53 0c mov 0xc(%ebx),%edx
10d40f: 53 push %ebx
10d410: ff 75 10 pushl 0x10(%ebp)
10d413: 8b 4d 0c mov 0xc(%ebp),%ecx
10d416: 01 c1 add %eax,%ecx
10d418: 51 push %ecx
10d419: 8b 4d a4 mov -0x5c(%ebp),%ecx
10d41c: 29 c1 sub %eax,%ecx
10d41e: 8b 45 08 mov 0x8(%ebp),%eax
10d421: 01 c8 add %ecx,%eax
10d423: 50 push %eax
10d424: ff 12 call *(%edx)
10d426: 89 c6 mov %eax,%esi
10d428: 83 c4 10 add $0x10,%esp
10d42b: eb 2b jmp 10d458 <IMFS_eval_path+0x1be>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
10d42d: 83 ec 0c sub $0xc,%esp
10d430: 53 push %ebx
10d431: e8 ca fc ff ff call 10d100 <IMFS_Set_handlers>
10d436: 89 c6 mov %eax,%esi
10d438: 58 pop %eax
10d439: 5a pop %edx
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
10d43a: ff 75 10 pushl 0x10(%ebp)
10d43d: 53 push %ebx
10d43e: e8 05 fd ff ff call 10d148 <IMFS_evaluate_permission>
10d443: 83 c4 10 add $0x10,%esp
10d446: 85 c0 test %eax,%eax
10d448: 75 0e jne 10d458 <IMFS_eval_path+0x1be>
rtems_set_errno_and_return_minus_one( EACCES );
10d44a: e8 b5 3f 00 00 call 111404 <__errno>
10d44f: c7 00 0d 00 00 00 movl $0xd,(%eax)
10d455: 83 ce ff or $0xffffffff,%esi
return result;
}
10d458: 89 f0 mov %esi,%eax
10d45a: 8d 65 f4 lea -0xc(%ebp),%esp
10d45d: 5b pop %ebx
10d45e: 5e pop %esi
10d45f: 5f pop %edi
10d460: c9 leave
10d461: c3 ret
0010d4e5 <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 */
)
{
10d4e5: 55 push %ebp
10d4e6: 89 e5 mov %esp,%ebp
10d4e8: 57 push %edi
10d4e9: 56 push %esi
10d4ea: 53 push %ebx
10d4eb: 83 ec 5c sub $0x5c,%esp
10d4ee: 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;
10d4f1: 8b 1a mov (%edx),%ebx
/*
* Get the path length.
*/
pathlen = strlen( path );
10d4f3: 31 c0 xor %eax,%eax
10d4f5: 83 c9 ff or $0xffffffff,%ecx
10d4f8: 8b 7d 08 mov 0x8(%ebp),%edi
10d4fb: f2 ae repnz scas %es:(%edi),%al
10d4fd: f7 d1 not %ecx
10d4ff: 49 dec %ecx
10d500: 89 4d a0 mov %ecx,-0x60(%ebp)
10d503: 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 );
10d50a: 8d 7d af lea -0x51(%ebp),%edi
10d50d: 89 d6 mov %edx,%esi
10d50f: 8d 45 e4 lea -0x1c(%ebp),%eax
10d512: 50 push %eax
10d513: 57 push %edi
10d514: ff 75 a0 pushl -0x60(%ebp)
10d517: 8b 45 08 mov 0x8(%ebp),%eax
10d51a: 03 45 a4 add -0x5c(%ebp),%eax
10d51d: 50 push %eax
10d51e: e8 55 04 00 00 call 10d978 <IMFS_get_token>
10d523: 89 c2 mov %eax,%edx
pathlen -= len;
10d525: 8b 4d e4 mov -0x1c(%ebp),%ecx
10d528: 29 4d a0 sub %ecx,-0x60(%ebp)
i += len;
if ( !pathloc->node_access )
10d52b: 83 c4 10 add $0x10,%esp
10d52e: 83 3e 00 cmpl $0x0,(%esi)
10d531: 0f 84 6a 01 00 00 je 10d6a1 <IMFS_evaluate_for_make+0x1bc><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
10d537: 85 c0 test %eax,%eax
10d539: 74 36 je 10d571 <IMFS_evaluate_for_make+0x8c>
if ( node->type == IMFS_DIRECTORY )
10d53b: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10d53f: 75 30 jne 10d571 <IMFS_evaluate_for_make+0x8c>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
10d541: 50 push %eax
10d542: 50 push %eax
10d543: 6a 01 push $0x1
10d545: 56 push %esi
10d546: 89 55 9c mov %edx,-0x64(%ebp)
10d549: 89 4d 98 mov %ecx,-0x68(%ebp)
10d54c: e8 f7 fb ff ff call 10d148 <IMFS_evaluate_permission>
10d551: 83 c4 10 add $0x10,%esp
10d554: 85 c0 test %eax,%eax
10d556: 8b 55 9c mov -0x64(%ebp),%edx
10d559: 8b 4d 98 mov -0x68(%ebp),%ecx
10d55c: 75 13 jne 10d571 <IMFS_evaluate_for_make+0x8c>
rtems_set_errno_and_return_minus_one( EACCES );
10d55e: e8 a1 3e 00 00 call 111404 <__errno>
10d563: c7 00 0d 00 00 00 movl $0xd,(%eax)
10d569: 83 cb ff or $0xffffffff,%ebx
10d56c: e9 8a 01 00 00 jmp 10d6fb <IMFS_evaluate_for_make+0x216>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
10d571: 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;
10d574: 8b 1e mov (%esi),%ebx
switch( type ) {
10d576: 83 fa 02 cmp $0x2,%edx
10d579: 74 1f je 10d59a <IMFS_evaluate_for_make+0xb5>
10d57b: 77 0a ja 10d587 <IMFS_evaluate_for_make+0xa2>
10d57d: 85 d2 test %edx,%edx
10d57f: 0f 84 d9 00 00 00 je 10d65e <IMFS_evaluate_for_make+0x179>
10d585: eb 88 jmp 10d50f <IMFS_evaluate_for_make+0x2a>
10d587: 83 fa 03 cmp $0x3,%edx
10d58a: 74 40 je 10d5cc <IMFS_evaluate_for_make+0xe7>
10d58c: 83 fa 04 cmp $0x4,%edx
10d58f: 0f 85 7a ff ff ff jne 10d50f <IMFS_evaluate_for_make+0x2a><== NEVER TAKEN
10d595: e9 d4 00 00 00 jmp 10d66e <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 )
10d59a: a1 48 1f 12 00 mov 0x121f48,%eax
10d59f: 3b 58 18 cmp 0x18(%eax),%ebx
10d5a2: 0f 84 67 ff ff ff je 10d50f <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){
10d5a8: 8b 46 10 mov 0x10(%esi),%eax
10d5ab: 3b 58 1c cmp 0x1c(%eax),%ebx
10d5ae: 75 0c jne 10d5bc <IMFS_evaluate_for_make+0xd7>
10d5b0: 89 f2 mov %esi,%edx
10d5b2: 89 c6 mov %eax,%esi
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
10d5b4: 8d 7d d0 lea -0x30(%ebp),%edi
10d5b7: 83 c6 08 add $0x8,%esi
10d5ba: eb 5a jmp 10d616 <IMFS_evaluate_for_make+0x131>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
10d5bc: 8b 5b 08 mov 0x8(%ebx),%ebx
10d5bf: 85 db test %ebx,%ebx
10d5c1: 0f 85 90 00 00 00 jne 10d657 <IMFS_evaluate_for_make+0x172>
10d5c7: e9 d5 00 00 00 jmp 10d6a1 <IMFS_evaluate_for_make+0x1bc>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
10d5cc: 8b 43 4c mov 0x4c(%ebx),%eax
10d5cf: 83 f8 03 cmp $0x3,%eax
10d5d2: 74 05 je 10d5d9 <IMFS_evaluate_for_make+0xf4>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
10d5d4: 83 f8 04 cmp $0x4,%eax
10d5d7: 75 16 jne 10d5ef <IMFS_evaluate_for_make+0x10a>
result = IMFS_evaluate_link( pathloc, 0 );
10d5d9: 53 push %ebx
10d5da: 53 push %ebx
10d5db: 6a 00 push $0x0
10d5dd: 56 push %esi
10d5de: e8 7f fe ff ff call 10d462 <IMFS_evaluate_link>
if ( result == -1 )
10d5e3: 83 c4 10 add $0x10,%esp
10d5e6: 83 f8 ff cmp $0xffffffff,%eax
10d5e9: 0f 84 0a 01 00 00 je 10d6f9 <IMFS_evaluate_for_make+0x214><== NEVER TAKEN
return -1;
}
node = pathloc->node_access;
10d5ef: 8b 06 mov (%esi),%eax
if ( !node )
10d5f1: 85 c0 test %eax,%eax
10d5f3: 0f 84 da 00 00 00 je 10d6d3 <IMFS_evaluate_for_make+0x1ee><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10d5f9: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10d5fd: 0f 85 d0 00 00 00 jne 10d6d3 <IMFS_evaluate_for_make+0x1ee>
/*
* 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 ) {
10d603: 8b 50 5c mov 0x5c(%eax),%edx
10d606: 85 d2 test %edx,%edx
10d608: 74 3b je 10d645 <IMFS_evaluate_for_make+0x160>
10d60a: 89 f0 mov %esi,%eax
10d60c: 89 d6 mov %edx,%esi
10d60e: 89 c2 mov %eax,%edx
newloc = node->info.directory.mt_fs->mt_fs_root;
10d610: 8d 7d d0 lea -0x30(%ebp),%edi
10d613: 83 c6 1c add $0x1c,%esi
10d616: b9 05 00 00 00 mov $0x5,%ecx
10d61b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10d61d: 8d 75 d0 lea -0x30(%ebp),%esi
10d620: b1 05 mov $0x5,%cl
10d622: 89 d7 mov %edx,%edi
10d624: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
10d626: 51 push %ecx
10d627: 8b 42 0c mov 0xc(%edx),%eax
10d62a: ff 75 10 pushl 0x10(%ebp)
10d62d: 52 push %edx
10d62e: 8b 55 a4 mov -0x5c(%ebp),%edx
10d631: 2b 55 e4 sub -0x1c(%ebp),%edx
10d634: 03 55 08 add 0x8(%ebp),%edx
10d637: 52 push %edx
10d638: ff 50 04 call *0x4(%eax)
10d63b: 89 c3 mov %eax,%ebx
10d63d: 83 c4 10 add $0x10,%esp
10d640: e9 b6 00 00 00 jmp 10d6fb <IMFS_evaluate_for_make+0x216>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10d645: 52 push %edx
10d646: 52 push %edx
10d647: 57 push %edi
10d648: 50 push %eax
10d649: e8 9e 02 00 00 call 10d8ec <IMFS_find_match_in_dir>
10d64e: 89 c3 mov %eax,%ebx
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
10d650: 83 c4 10 add $0x10,%esp
10d653: 85 c0 test %eax,%eax
10d655: 74 27 je 10d67e <IMFS_evaluate_for_make+0x199>
done = true;
else
pathloc->node_access = node;
10d657: 89 1e mov %ebx,(%esi)
10d659: e9 b1 fe ff ff jmp 10d50f <IMFS_evaluate_for_make+0x2a>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
10d65e: e8 a1 3d 00 00 call 111404 <__errno>
10d663: c7 00 11 00 00 00 movl $0x11,(%eax)
10d669: e9 fb fe ff ff jmp 10d569 <IMFS_evaluate_for_make+0x84>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
10d66e: e8 91 3d 00 00 call 111404 <__errno>
10d673: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10d679: e9 eb fe ff ff jmp 10d569 <IMFS_evaluate_for_make+0x84>
10d67e: 89 f2 mov %esi,%edx
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
10d680: 8b 45 a4 mov -0x5c(%ebp),%eax
10d683: 2b 45 e4 sub -0x1c(%ebp),%eax
10d686: 03 45 08 add 0x8(%ebp),%eax
10d689: 8b 4d 10 mov 0x10(%ebp),%ecx
10d68c: 89 01 mov %eax,(%ecx)
10d68e: 8b 45 08 mov 0x8(%ebp),%eax
10d691: 03 45 a4 add -0x5c(%ebp),%eax
/*
* 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++) {
10d694: eb 1b jmp 10d6b1 <IMFS_evaluate_for_make+0x1cc>
10d696: 40 inc %eax
if ( !IMFS_is_separator( path[ i ] ) )
10d697: 80 f9 5c cmp $0x5c,%cl
10d69a: 74 15 je 10d6b1 <IMFS_evaluate_for_make+0x1cc>
10d69c: 80 f9 2f cmp $0x2f,%cl
10d69f: 74 10 je 10d6b1 <IMFS_evaluate_for_make+0x1cc>
rtems_set_errno_and_return_minus_one( ENOENT );
10d6a1: e8 5e 3d 00 00 call 111404 <__errno>
10d6a6: c7 00 02 00 00 00 movl $0x2,(%eax)
10d6ac: e9 b8 fe ff ff jmp 10d569 <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++) {
10d6b1: 8a 08 mov (%eax),%cl
10d6b3: 84 c9 test %cl,%cl
10d6b5: 75 df jne 10d696 <IMFS_evaluate_for_make+0x1b1>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
10d6b7: 83 ec 0c sub $0xc,%esp
10d6ba: 52 push %edx
10d6bb: 89 55 9c mov %edx,-0x64(%ebp)
10d6be: e8 3d fa ff ff call 10d100 <IMFS_Set_handlers>
10d6c3: 89 c3 mov %eax,%ebx
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
10d6c5: 8b 55 9c mov -0x64(%ebp),%edx
10d6c8: 8b 02 mov (%edx),%eax
10d6ca: 83 c4 10 add $0x10,%esp
10d6cd: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10d6d1: 74 10 je 10d6e3 <IMFS_evaluate_for_make+0x1fe><== ALWAYS TAKEN
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
10d6d3: e8 2c 3d 00 00 call 111404 <__errno>
10d6d8: c7 00 14 00 00 00 movl $0x14,(%eax)
10d6de: e9 86 fe ff ff jmp 10d569 <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 ) )
10d6e3: 56 push %esi
10d6e4: 56 push %esi
10d6e5: 6a 03 push $0x3
10d6e7: 52 push %edx
10d6e8: e8 5b fa ff ff call 10d148 <IMFS_evaluate_permission>
10d6ed: 83 c4 10 add $0x10,%esp
10d6f0: 85 c0 test %eax,%eax
10d6f2: 75 07 jne 10d6fb <IMFS_evaluate_for_make+0x216>
10d6f4: e9 65 fe ff ff jmp 10d55e <IMFS_evaluate_for_make+0x79>
10d6f9: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10d6fb: 89 d8 mov %ebx,%eax
10d6fd: 8d 65 f4 lea -0xc(%ebp),%esp
10d700: 5b pop %ebx
10d701: 5e pop %esi
10d702: 5f pop %edi
10d703: c9 leave
10d704: c3 ret
0010d196 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10d196: 55 push %ebp
10d197: 89 e5 mov %esp,%ebp
10d199: 53 push %ebx
10d19a: 83 ec 04 sub $0x4,%esp
10d19d: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *jnode = node->node_access;
10d1a0: 8b 03 mov (%ebx),%eax
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
10d1a2: 83 78 4c 03 cmpl $0x3,0x4c(%eax)
10d1a6: 74 0d je 10d1b5 <IMFS_evaluate_hard_link+0x1f><== ALWAYS TAKEN
rtems_fatal_error_occurred (0xABCD0000);
10d1a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10d1ab: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED
10d1b0: e8 f7 d3 ff ff call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
10d1b5: 8b 40 50 mov 0x50(%eax),%eax
10d1b8: 89 03 mov %eax,(%ebx)
IMFS_Set_handlers( node );
10d1ba: 83 ec 0c sub $0xc,%esp
10d1bd: 53 push %ebx
10d1be: e8 3d ff ff ff call 10d100 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
10d1c3: 58 pop %eax
10d1c4: 5a pop %edx
10d1c5: ff 75 0c pushl 0xc(%ebp)
10d1c8: 53 push %ebx
10d1c9: e8 7a ff ff ff call 10d148 <IMFS_evaluate_permission>
10d1ce: 89 c2 mov %eax,%edx
10d1d0: 83 c4 10 add $0x10,%esp
10d1d3: 31 c0 xor %eax,%eax
10d1d5: 85 d2 test %edx,%edx
10d1d7: 75 0e jne 10d1e7 <IMFS_evaluate_hard_link+0x51><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
10d1d9: e8 26 42 00 00 call 111404 <__errno> <== NOT EXECUTED
10d1de: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED
10d1e4: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
return result;
}
10d1e7: 8b 5d fc mov -0x4(%ebp),%ebx
10d1ea: c9 leave
10d1eb: c3 ret
0010d148 <IMFS_evaluate_permission>:
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
10d148: 55 push %ebp
10d149: 89 e5 mov %esp,%ebp
10d14b: 57 push %edi
10d14c: 56 push %esi
10d14d: 53 push %ebx
10d14e: 83 ec 0c sub $0xc,%esp
10d151: 8b 75 0c mov 0xc(%ebp),%esi
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
10d154: 8b 45 08 mov 0x8(%ebp),%eax
10d157: 8b 18 mov (%eax),%ebx
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
10d159: e8 12 0d 00 00 call 10de70 <geteuid>
10d15e: 89 c7 mov %eax,%edi
st_gid = getegid();
10d160: e8 fb 0c 00 00 call 10de60 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
10d165: 66 3b 7b 3c cmp 0x3c(%ebx),%di
10d169: 75 07 jne 10d172 <IMFS_evaluate_permission+0x2a>
flags_to_test <<= 6;
10d16b: 89 f2 mov %esi,%edx
10d16d: c1 e2 06 shl $0x6,%edx
10d170: eb 0f jmp 10d181 <IMFS_evaluate_permission+0x39>
else if ( st_gid == jnode->st_gid )
10d172: 89 f2 mov %esi,%edx
10d174: 66 3b 43 3e cmp 0x3e(%ebx),%ax
10d178: 75 07 jne 10d181 <IMFS_evaluate_permission+0x39><== NEVER TAKEN
flags_to_test <<= 3;
10d17a: 8d 14 f5 00 00 00 00 lea 0x0(,%esi,8),%edx
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
10d181: 8b 43 30 mov 0x30(%ebx),%eax
10d184: 21 d0 and %edx,%eax
10d186: 39 d0 cmp %edx,%eax
10d188: 0f 94 c0 sete %al
10d18b: 0f b6 c0 movzbl %al,%eax
return 1;
return 0;
}
10d18e: 83 c4 0c add $0xc,%esp
10d191: 5b pop %ebx
10d192: 5e pop %esi
10d193: 5f pop %edi
10d194: c9 leave
10d195: c3 ret
0010d1ec <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10d1ec: 55 push %ebp
10d1ed: 89 e5 mov %esp,%ebp
10d1ef: 57 push %edi
10d1f0: 56 push %esi
10d1f1: 53 push %ebx
10d1f2: 83 ec 0c sub $0xc,%esp
10d1f5: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *jnode = node->node_access;
10d1f8: 8b 03 mov (%ebx),%eax
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
10d1fa: 83 78 4c 04 cmpl $0x4,0x4c(%eax)
10d1fe: 74 0a je 10d20a <IMFS_evaluate_sym_link+0x1e><== ALWAYS TAKEN
rtems_fatal_error_occurred (0xABCD0000);
10d200: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10d203: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED
10d208: eb 0f jmp 10d219 <IMFS_evaluate_sym_link+0x2d><== NOT EXECUTED
if ( !jnode->Parent )
10d20a: 8b 50 08 mov 0x8(%eax),%edx
10d20d: 85 d2 test %edx,%edx
10d20f: 75 0d jne 10d21e <IMFS_evaluate_sym_link+0x32><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xBAD00000 );
10d211: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10d214: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED
10d219: e8 8e d3 ff ff call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
10d21e: 89 13 mov %edx,(%ebx)
rtems_filesystem_get_sym_start_loc(
10d220: 8b 50 50 mov 0x50(%eax),%edx
10d223: 8a 0a mov (%edx),%cl
10d225: 80 f9 5c cmp $0x5c,%cl
10d228: 74 0b je 10d235 <IMFS_evaluate_sym_link+0x49><== NEVER TAKEN
10d22a: 80 f9 2f cmp $0x2f,%cl
10d22d: 74 06 je 10d235 <IMFS_evaluate_sym_link+0x49>
10d22f: 31 d2 xor %edx,%edx
10d231: 84 c9 test %cl,%cl
10d233: 75 17 jne 10d24c <IMFS_evaluate_sym_link+0x60><== ALWAYS TAKEN
10d235: 8b 35 48 1f 12 00 mov 0x121f48,%esi
10d23b: 83 c6 18 add $0x18,%esi
10d23e: b9 05 00 00 00 mov $0x5,%ecx
10d243: 89 df mov %ebx,%edi
10d245: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10d247: ba 01 00 00 00 mov $0x1,%edx
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
&jnode->info.sym_link.name[i],
strlen( &jnode->info.sym_link.name[i] ),
10d24c: 03 50 50 add 0x50(%eax),%edx
10d24f: 31 c0 xor %eax,%eax
10d251: 83 c9 ff or $0xffffffff,%ecx
10d254: 89 d7 mov %edx,%edi
10d256: f2 ae repnz scas %es:(%edi),%al
10d258: f7 d1 not %ecx
10d25a: 49 dec %ecx
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
10d25b: 53 push %ebx
10d25c: ff 75 0c pushl 0xc(%ebp)
10d25f: 51 push %ecx
10d260: 52 push %edx
10d261: e8 34 00 00 00 call 10d29a <IMFS_eval_path>
10d266: 89 c6 mov %eax,%esi
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
10d268: 89 1c 24 mov %ebx,(%esp)
10d26b: e8 90 fe ff ff call 10d100 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
10d270: 59 pop %ecx
10d271: 5f pop %edi
10d272: ff 75 0c pushl 0xc(%ebp)
10d275: 53 push %ebx
10d276: e8 cd fe ff ff call 10d148 <IMFS_evaluate_permission>
10d27b: 83 c4 10 add $0x10,%esp
10d27e: 85 c0 test %eax,%eax
10d280: 75 0e jne 10d290 <IMFS_evaluate_sym_link+0xa4><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
10d282: e8 7d 41 00 00 call 111404 <__errno> <== NOT EXECUTED
10d287: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED
10d28d: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
return result;
}
10d290: 89 f0 mov %esi,%eax
10d292: 8d 65 f4 lea -0xc(%ebp),%esp
10d295: 5b pop %ebx
10d296: 5e pop %esi
10d297: 5f pop %edi
10d298: c9 leave
10d299: c3 ret
00110154 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
110154: 55 push %ebp
110155: 89 e5 mov %esp,%ebp
110157: 53 push %ebx
110158: 83 ec 14 sub $0x14,%esp
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
11015b: 8b 45 08 mov 0x8(%ebp),%eax
11015e: 8b 18 mov (%eax),%ebx
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
110160: e8 0b dd ff ff call 10de70 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
110165: 66 85 c0 test %ax,%ax
110168: 74 16 je 110180 <IMFS_fchmod+0x2c> <== ALWAYS TAKEN
11016a: 66 3b 43 3c cmp 0x3c(%ebx),%ax <== NOT EXECUTED
11016e: 74 10 je 110180 <IMFS_fchmod+0x2c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
110170: e8 8f 12 00 00 call 111404 <__errno> <== NOT EXECUTED
110175: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
11017b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
11017e: eb 2e jmp 1101ae <IMFS_fchmod+0x5a> <== NOT EXECUTED
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
110180: 8b 45 0c mov 0xc(%ebp),%eax
110183: 25 ff 0f 00 00 and $0xfff,%eax
110188: 8b 53 30 mov 0x30(%ebx),%edx
11018b: 81 e2 00 f0 ff ff and $0xfffff000,%edx
110191: 09 d0 or %edx,%eax
110193: 89 43 30 mov %eax,0x30(%ebx)
IMFS_update_ctime( jnode );
110196: 50 push %eax
110197: 50 push %eax
110198: 6a 00 push $0x0
11019a: 8d 45 f0 lea -0x10(%ebp),%eax
11019d: 50 push %eax
11019e: e8 dd dc ff ff call 10de80 <gettimeofday>
1101a3: 8b 45 f0 mov -0x10(%ebp),%eax
1101a6: 89 43 48 mov %eax,0x48(%ebx)
1101a9: 31 c0 xor %eax,%eax
return 0;
1101ab: 83 c4 10 add $0x10,%esp
}
1101ae: 8b 5d fc mov -0x4(%ebp),%ebx
1101b1: c9 leave
1101b2: c3 ret
0010d851 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
10d851: 55 push %ebp <== NOT EXECUTED
10d852: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10d854: 57 push %edi <== NOT EXECUTED
10d855: 56 push %esi <== NOT EXECUTED
10d856: 53 push %ebx <== NOT EXECUTED
10d857: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
10d85a: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
10d85d: 8b 77 38 mov 0x38(%edi),%esi <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
10d860: 57 push %edi <== NOT EXECUTED
10d861: 8d 46 50 lea 0x50(%esi),%eax <== NOT EXECUTED
10d864: 50 push %eax <== NOT EXECUTED
10d865: e8 09 23 00 00 call 10fb73 <pipe_release> <== NOT EXECUTED
10d86a: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (! err) {
10d86c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d86f: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED
10d872: 75 2c jne 10d8a0 <IMFS_fifo_close+0x4f> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_OPEN;
10d874: 81 67 14 ff fe ff ff andl $0xfffffeff,0x14(%edi) <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
10d87b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10d87e: 56 push %esi <== NOT EXECUTED
10d87f: e8 ae 06 00 00 call 10df32 <rtems_libio_is_file_open><== NOT EXECUTED
10d884: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d887: 85 c0 test %eax,%eax <== NOT EXECUTED
10d889: 75 23 jne 10d8ae <IMFS_fifo_close+0x5d> <== NOT EXECUTED
10d88b: 66 83 7e 34 00 cmpw $0x0,0x34(%esi) <== NOT EXECUTED
10d890: 75 1c jne 10d8ae <IMFS_fifo_close+0x5d> <== NOT EXECUTED
free(jnode);
10d892: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10d895: 56 push %esi <== NOT EXECUTED
10d896: e8 55 99 ff ff call 1071f0 <free> <== NOT EXECUTED
10d89b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d89e: eb 0e jmp 10d8ae <IMFS_fifo_close+0x5d> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
10d8a0: 7d 0c jge 10d8ae <IMFS_fifo_close+0x5d> <== NOT EXECUTED
10d8a2: e8 5d 3b 00 00 call 111404 <__errno> <== NOT EXECUTED
10d8a7: f7 db neg %ebx <== NOT EXECUTED
10d8a9: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
10d8ab: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
}
10d8ae: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10d8b0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10d8b3: 5b pop %ebx <== NOT EXECUTED
10d8b4: 5e pop %esi <== NOT EXECUTED
10d8b5: 5f pop %edi <== NOT EXECUTED
10d8b6: c9 leave <== NOT EXECUTED
10d8b7: c3 ret <== NOT EXECUTED
0010d744 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
10d744: 55 push %ebp <== NOT EXECUTED
10d745: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10d747: 53 push %ebx <== NOT EXECUTED
10d748: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
10d74b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10d74e: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
10d751: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
int err;
if (command == FIONBIO) {
10d754: 81 f9 7e 66 04 80 cmp $0x8004667e,%ecx <== NOT EXECUTED
10d75a: 75 1c jne 10d778 <IMFS_fifo_ioctl+0x34> <== NOT EXECUTED
if (buffer == NULL)
10d75c: bb f2 ff ff ff mov $0xfffffff2,%ebx <== NOT EXECUTED
10d761: 85 d2 test %edx,%edx <== NOT EXECUTED
10d763: 74 2a je 10d78f <IMFS_fifo_ioctl+0x4b> <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
10d765: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED
10d768: 74 06 je 10d770 <IMFS_fifo_ioctl+0x2c> <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
10d76a: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED
10d76e: eb 04 jmp 10d774 <IMFS_fifo_ioctl+0x30> <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
10d770: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED
10d774: 31 db xor %ebx,%ebx <== NOT EXECUTED
10d776: eb 23 jmp 10d79b <IMFS_fifo_ioctl+0x57> <== NOT EXECUTED
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
10d778: 50 push %eax <== NOT EXECUTED
10d779: 52 push %edx <== NOT EXECUTED
10d77a: 51 push %ecx <== NOT EXECUTED
10d77b: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED
10d77e: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED
10d781: e8 51 20 00 00 call 10f7d7 <pipe_ioctl> <== NOT EXECUTED
10d786: 89 c3 mov %eax,%ebx <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
10d788: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d78b: 85 c0 test %eax,%eax <== NOT EXECUTED
10d78d: 79 0c jns 10d79b <IMFS_fifo_ioctl+0x57> <== NOT EXECUTED
10d78f: e8 70 3c 00 00 call 111404 <__errno> <== NOT EXECUTED
10d794: f7 db neg %ebx <== NOT EXECUTED
10d796: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
10d798: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
}
10d79b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10d79d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10d7a0: c9 leave <== NOT EXECUTED
10d7a1: c3 ret <== NOT EXECUTED
0010d708 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
10d708: 55 push %ebp <== NOT EXECUTED
10d709: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10d70b: 53 push %ebx <== NOT EXECUTED
10d70c: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
10d70f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
10d712: 50 push %eax <== NOT EXECUTED
10d713: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
10d716: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
10d719: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
10d71c: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED
10d71f: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED
10d722: e8 59 20 00 00 call 10f780 <pipe_lseek> <== NOT EXECUTED
10d727: 89 c3 mov %eax,%ebx <== NOT EXECUTED
10d729: 99 cltd <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
10d72a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10d72d: 85 d2 test %edx,%edx <== NOT EXECUTED
10d72f: 79 0e jns 10d73f <IMFS_fifo_lseek+0x37> <== NOT EXECUTED
10d731: e8 ce 3c 00 00 call 111404 <__errno> <== NOT EXECUTED
10d736: f7 db neg %ebx <== NOT EXECUTED
10d738: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
10d73a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10d73d: 89 c2 mov %eax,%edx <== NOT EXECUTED
}
10d73f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10d742: c9 leave <== NOT EXECUTED
10d743: c3 ret <== NOT EXECUTED
0010d8b8 <IMFS_fifo_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
10d8b8: 55 push %ebp
10d8b9: 89 e5 mov %esp,%ebp
10d8bb: 53 push %ebx
10d8bc: 83 ec 0c sub $0xc,%esp
10d8bf: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
10d8c2: 50 push %eax
10d8c3: 8b 40 38 mov 0x38(%eax),%eax
10d8c6: 83 c0 50 add $0x50,%eax
10d8c9: 50 push %eax
10d8ca: e8 74 23 00 00 call 10fc43 <fifo_open>
10d8cf: 89 c3 mov %eax,%ebx
IMFS_FIFO_RETURN(err);
10d8d1: 83 c4 10 add $0x10,%esp
10d8d4: 85 c0 test %eax,%eax
10d8d6: 79 0c jns 10d8e4 <IMFS_fifo_open+0x2c> <== NEVER TAKEN
10d8d8: e8 27 3b 00 00 call 111404 <__errno>
10d8dd: f7 db neg %ebx
10d8df: 89 18 mov %ebx,(%eax)
10d8e1: 83 cb ff or $0xffffffff,%ebx
}
10d8e4: 89 d8 mov %ebx,%eax
10d8e6: 8b 5d fc mov -0x4(%ebp),%ebx
10d8e9: c9 leave
10d8ea: c3 ret
0010d7fb <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
10d7fb: 55 push %ebp <== NOT EXECUTED
10d7fc: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10d7fe: 56 push %esi <== NOT EXECUTED
10d7ff: 53 push %ebx <== NOT EXECUTED
10d800: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
10d803: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
10d806: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
10d809: 50 push %eax <== NOT EXECUTED
10d80a: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
10d80d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
10d810: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED
10d813: e8 15 20 00 00 call 10f82d <pipe_read> <== NOT EXECUTED
10d818: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (err > 0)
10d81a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d81d: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED
10d820: 7e 18 jle 10d83a <IMFS_fifo_read+0x3f> <== NOT EXECUTED
IMFS_update_atime(jnode);
10d822: 52 push %edx <== NOT EXECUTED
10d823: 52 push %edx <== NOT EXECUTED
10d824: 6a 00 push $0x0 <== NOT EXECUTED
10d826: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
10d829: 50 push %eax <== NOT EXECUTED
10d82a: e8 51 06 00 00 call 10de80 <gettimeofday> <== NOT EXECUTED
10d82f: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
10d832: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED
10d835: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d838: eb 0e jmp 10d848 <IMFS_fifo_read+0x4d> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
10d83a: 74 0c je 10d848 <IMFS_fifo_read+0x4d> <== NOT EXECUTED
10d83c: e8 c3 3b 00 00 call 111404 <__errno> <== NOT EXECUTED
10d841: f7 db neg %ebx <== NOT EXECUTED
10d843: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
10d845: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
}
10d848: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10d84a: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10d84d: 5b pop %ebx <== NOT EXECUTED
10d84e: 5e pop %esi <== NOT EXECUTED
10d84f: c9 leave <== NOT EXECUTED
10d850: c3 ret <== NOT EXECUTED
0010d7a2 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
10d7a2: 55 push %ebp <== NOT EXECUTED
10d7a3: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10d7a5: 56 push %esi <== NOT EXECUTED
10d7a6: 53 push %ebx <== NOT EXECUTED
10d7a7: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
10d7aa: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
10d7ad: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
10d7b0: 50 push %eax <== NOT EXECUTED
10d7b1: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
10d7b4: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
10d7b7: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED
10d7ba: e8 d0 21 00 00 call 10f98f <pipe_write> <== NOT EXECUTED
10d7bf: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (err > 0) {
10d7c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d7c4: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED
10d7c7: 7e 1b jle 10d7e4 <IMFS_fifo_write+0x42> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
10d7c9: 50 push %eax <== NOT EXECUTED
10d7ca: 50 push %eax <== NOT EXECUTED
10d7cb: 6a 00 push $0x0 <== NOT EXECUTED
10d7cd: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
10d7d0: 50 push %eax <== NOT EXECUTED
10d7d1: e8 aa 06 00 00 call 10de80 <gettimeofday> <== NOT EXECUTED
10d7d6: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
10d7d9: 89 46 44 mov %eax,0x44(%esi) <== NOT EXECUTED
10d7dc: 89 46 48 mov %eax,0x48(%esi) <== NOT EXECUTED
10d7df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d7e2: eb 0e jmp 10d7f2 <IMFS_fifo_write+0x50> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
10d7e4: 74 0c je 10d7f2 <IMFS_fifo_write+0x50> <== NOT EXECUTED
10d7e6: e8 19 3c 00 00 call 111404 <__errno> <== NOT EXECUTED
10d7eb: f7 db neg %ebx <== NOT EXECUTED
10d7ed: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
10d7ef: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
}
10d7f2: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10d7f4: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10d7f7: 5b pop %ebx <== NOT EXECUTED
10d7f8: 5e pop %esi <== NOT EXECUTED
10d7f9: c9 leave <== NOT EXECUTED
10d7fa: c3 ret <== NOT EXECUTED
0010d8ec <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
10d8ec: 55 push %ebp
10d8ed: 89 e5 mov %esp,%ebp
10d8ef: 57 push %edi
10d8f0: 56 push %esi
10d8f1: 53 push %ebx
10d8f2: 83 ec 0c sub $0xc,%esp
10d8f5: 8b 5d 08 mov 0x8(%ebp),%ebx
10d8f8: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
10d8fb: 85 db test %ebx,%ebx
10d8fd: 75 16 jne 10d915 <IMFS_find_match_in_dir+0x29><== ALWAYS TAKEN
10d8ff: 68 b0 ea 11 00 push $0x11eab0 <== NOT EXECUTED
10d904: 68 10 eb 11 00 push $0x11eb10 <== NOT EXECUTED
10d909: 6a 2a push $0x2a <== NOT EXECUTED
10d90b: 68 ba ea 11 00 push $0x11eaba <== NOT EXECUTED
10d910: e8 eb 95 ff ff call 106f00 <__assert_func> <== NOT EXECUTED
if ( !name )
10d915: 85 ff test %edi,%edi
10d917: 74 52 je 10d96b <IMFS_find_match_in_dir+0x7f><== NEVER TAKEN
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
10d919: 56 push %esi
10d91a: 56 push %esi
10d91b: 68 08 eb 11 00 push $0x11eb08
10d920: 57 push %edi
10d921: e8 fa 45 00 00 call 111f20 <strcmp>
10d926: 83 c4 10 add $0x10,%esp
10d929: 85 c0 test %eax,%eax
10d92b: 74 40 je 10d96d <IMFS_find_match_in_dir+0x81><== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
10d92d: 51 push %ecx
10d92e: 51 push %ecx
10d92f: 68 0a eb 11 00 push $0x11eb0a
10d934: 57 push %edi
10d935: e8 e6 45 00 00 call 111f20 <strcmp>
10d93a: 83 c4 10 add $0x10,%esp
10d93d: 85 c0 test %eax,%eax
10d93f: 75 05 jne 10d946 <IMFS_find_match_in_dir+0x5a><== ALWAYS TAKEN
return directory->Parent;
10d941: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED
10d944: eb 27 jmp 10d96d <IMFS_find_match_in_dir+0x81><== NOT EXECUTED
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
10d946: 8b 73 50 mov 0x50(%ebx),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10d949: 83 c3 54 add $0x54,%ebx
10d94c: eb 19 jmp 10d967 <IMFS_find_match_in_dir+0x7b>
!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 ) )
10d94e: 8d 46 0c lea 0xc(%esi),%eax
10d951: 52 push %edx
10d952: 52 push %edx
10d953: 50 push %eax
10d954: 57 push %edi
10d955: e8 c6 45 00 00 call 111f20 <strcmp>
10d95a: 83 c4 10 add $0x10,%esp
10d95d: 85 c0 test %eax,%eax
10d95f: 75 04 jne 10d965 <IMFS_find_match_in_dir+0x79>
10d961: 89 f3 mov %esi,%ebx
10d963: eb 08 jmp 10d96d <IMFS_find_match_in_dir+0x81>
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 ) {
10d965: 8b 36 mov (%esi),%esi
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
10d967: 39 de cmp %ebx,%esi
10d969: 75 e3 jne 10d94e <IMFS_find_match_in_dir+0x62>
10d96b: 31 db xor %ebx,%ebx
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
10d96d: 89 d8 mov %ebx,%eax
10d96f: 8d 65 f4 lea -0xc(%ebp),%esp
10d972: 5b pop %ebx
10d973: 5e pop %esi
10d974: 5f pop %edi
10d975: c9 leave
10d976: c3 ret
00111dfc <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
)
{
111dfc: 55 push %ebp
111dfd: 89 e5 mov %esp,%ebp
111dff: 57 push %edi
111e00: 56 push %esi
111e01: 53 push %ebx
111e02: 83 ec 2c sub $0x2c,%esp
111e05: 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;
111e08: 8b 58 1c mov 0x1c(%eax),%ebx
loc = temp_mt_entry->mt_fs_root;
111e0b: 8d 7d d4 lea -0x2c(%ebp),%edi
111e0e: 8d 70 1c lea 0x1c(%eax),%esi
111e11: b9 05 00 00 00 mov $0x5,%ecx
111e16: 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;
111e18: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
111e1f: 8d 75 d4 lea -0x2c(%ebp),%esi
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
111e22: 8b 7b 08 mov 0x8(%ebx),%edi
loc.node_access = (void *)jnode;
111e25: 89 5d d4 mov %ebx,-0x2c(%ebp)
IMFS_Set_handlers( &loc );
111e28: 83 ec 0c sub $0xc,%esp
111e2b: 56 push %esi
111e2c: e8 d7 f7 ff ff call 111608 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
111e31: 83 c4 10 add $0x10,%esp
111e34: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
111e38: 75 08 jne 111e42 <IMFS_fsunmount+0x46>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
111e3a: 8d 43 54 lea 0x54(%ebx),%eax
111e3d: 39 43 50 cmp %eax,0x50(%ebx)
111e40: 75 13 jne 111e55 <IMFS_fsunmount+0x59>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
111e42: 50 push %eax
111e43: 50 push %eax
111e44: 56 push %esi
111e45: 6a 00 push $0x0
111e47: e8 30 60 ff ff call 107e7c <IMFS_unlink>
if (result != 0)
111e4c: 83 c4 10 add $0x10,%esp
111e4f: 85 c0 test %eax,%eax
111e51: 75 1d jne 111e70 <IMFS_fsunmount+0x74> <== NEVER TAKEN
111e53: 89 fb mov %edi,%ebx
return -1;
jnode = next;
}
if ( jnode != NULL ) {
111e55: 85 db test %ebx,%ebx
111e57: 74 1c je 111e75 <IMFS_fsunmount+0x79>
if ( jnode->type == IMFS_DIRECTORY ) {
111e59: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
111e5d: 75 c3 jne 111e22 <IMFS_fsunmount+0x26> <== NEVER TAKEN
111e5f: 8d 43 54 lea 0x54(%ebx),%eax
111e62: 39 43 50 cmp %eax,0x50(%ebx)
111e65: 74 bb je 111e22 <IMFS_fsunmount+0x26>
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
111e67: 8b 5b 50 mov 0x50(%ebx),%ebx
}
}
} while (jnode != NULL);
111e6a: 85 db test %ebx,%ebx
111e6c: 75 b4 jne 111e22 <IMFS_fsunmount+0x26> <== ALWAYS TAKEN
111e6e: eb 05 jmp 111e75 <IMFS_fsunmount+0x79> <== NOT EXECUTED
111e70: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
111e73: eb 02 jmp 111e77 <IMFS_fsunmount+0x7b> <== NOT EXECUTED
111e75: 31 c0 xor %eax,%eax
return 0;
}
111e77: 8d 65 f4 lea -0xc(%ebp),%esp
111e7a: 5b pop %ebx
111e7b: 5e pop %esi
111e7c: 5f pop %edi
111e7d: c9 leave
111e7e: c3 ret
0010d978 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
10d978: 55 push %ebp
10d979: 89 e5 mov %esp,%ebp
10d97b: 56 push %esi
10d97c: 53 push %ebx
10d97d: 8b 5d 08 mov 0x8(%ebp),%ebx
10d980: 8b 4d 0c mov 0xc(%ebp),%ecx
10d983: 8b 75 10 mov 0x10(%ebp),%esi
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
10d986: 8a 13 mov (%ebx),%dl
10d988: 31 c0 xor %eax,%eax
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
10d98a: eb 13 jmp 10d99f <IMFS_get_token+0x27>
token[i] = c;
10d98c: 88 14 06 mov %dl,(%esi,%eax,1)
if ( i == IMFS_NAME_MAX )
10d98f: 83 f8 20 cmp $0x20,%eax
10d992: 75 07 jne 10d99b <IMFS_get_token+0x23>
10d994: bb 04 00 00 00 mov $0x4,%ebx
10d999: eb 7c jmp 10da17 <IMFS_get_token+0x9f>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
10d99b: 40 inc %eax
10d99c: 8a 14 03 mov (%ebx,%eax,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) ) {
10d99f: 80 fa 5c cmp $0x5c,%dl
10d9a2: 74 0d je 10d9b1 <IMFS_get_token+0x39>
10d9a4: 80 fa 2f cmp $0x2f,%dl
10d9a7: 74 08 je 10d9b1 <IMFS_get_token+0x39>
10d9a9: 39 c8 cmp %ecx,%eax
10d9ab: 7d 04 jge 10d9b1 <IMFS_get_token+0x39>
10d9ad: 84 d2 test %dl,%dl
10d9af: 75 db jne 10d98c <IMFS_get_token+0x14> <== ALWAYS TAKEN
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
10d9b1: 85 c0 test %eax,%eax
10d9b3: 75 17 jne 10d9cc <IMFS_get_token+0x54>
token[i] = c;
10d9b5: 88 16 mov %dl,(%esi)
if ( (token[i] != '\0') && pathlen ) {
10d9b7: 84 d2 test %dl,%dl
10d9b9: 74 0d je 10d9c8 <IMFS_get_token+0x50>
10d9bb: 85 c9 test %ecx,%ecx
10d9bd: 74 09 je 10d9c8 <IMFS_get_token+0x50>
10d9bf: bb 01 00 00 00 mov $0x1,%ebx
10d9c4: b0 01 mov $0x1,%al
10d9c6: eb 14 jmp 10d9dc <IMFS_get_token+0x64>
10d9c8: 31 db xor %ebx,%ebx
10d9ca: eb 10 jmp 10d9dc <IMFS_get_token+0x64>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
10d9cc: bb 03 00 00 00 mov $0x3,%ebx
10d9d1: 80 7c 06 ff 00 cmpb $0x0,-0x1(%esi,%eax,1)
10d9d6: 74 04 je 10d9dc <IMFS_get_token+0x64> <== NEVER TAKEN
token[i] = '\0';
10d9d8: c6 04 06 00 movb $0x0,(%esi,%eax,1)
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
10d9dc: 8b 55 14 mov 0x14(%ebp),%edx
10d9df: 89 02 mov %eax,(%edx)
/*
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
10d9e1: 83 fb 03 cmp $0x3,%ebx
10d9e4: 75 31 jne 10da17 <IMFS_get_token+0x9f>
if ( strcmp( token, "..") == 0 )
10d9e6: 52 push %edx
10d9e7: 52 push %edx
10d9e8: 68 27 eb 11 00 push $0x11eb27
10d9ed: 56 push %esi
10d9ee: e8 2d 45 00 00 call 111f20 <strcmp>
10d9f3: 83 c4 10 add $0x10,%esp
10d9f6: 85 c0 test %eax,%eax
10d9f8: 75 04 jne 10d9fe <IMFS_get_token+0x86>
10d9fa: b3 02 mov $0x2,%bl
10d9fc: eb 19 jmp 10da17 <IMFS_get_token+0x9f>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
10d9fe: 50 push %eax
10d9ff: 50 push %eax
10da00: 68 28 eb 11 00 push $0x11eb28
10da05: 56 push %esi
10da06: e8 15 45 00 00 call 111f20 <strcmp>
10da0b: 83 c4 10 add $0x10,%esp
10da0e: 85 c0 test %eax,%eax
10da10: 75 05 jne 10da17 <IMFS_get_token+0x9f>
10da12: bb 01 00 00 00 mov $0x1,%ebx
type = IMFS_CURRENT_DIR;
}
return type;
}
10da17: 89 d8 mov %ebx,%eax
10da19: 8d 65 f8 lea -0x8(%ebp),%esp
10da1c: 5b pop %ebx
10da1d: 5e pop %esi
10da1e: c9 leave
10da1f: c3 ret
0010da20 <IMFS_initialize_support>:
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
10da20: 55 push %ebp
10da21: 89 e5 mov %esp,%ebp
10da23: 57 push %edi
10da24: 56 push %esi
10da25: 53 push %ebx
10da26: 83 ec 0c sub $0xc,%esp
10da29: 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,
10da2c: 8b 0d 48 01 12 00 mov 0x120148,%ecx
10da32: 31 d2 xor %edx,%edx
10da34: b8 10 00 00 00 mov $0x10,%eax
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
10da39: 39 c8 cmp %ecx,%eax
10da3b: 74 0d je 10da4a <IMFS_initialize_support+0x2a>
10da3d: d1 e0 shl %eax
10da3f: 42 inc %edx
10da40: 83 fa 06 cmp $0x6,%edx
10da43: 75 f4 jne 10da39 <IMFS_initialize_support+0x19><== ALWAYS TAKEN
10da45: b8 80 00 00 00 mov $0x80,%eax <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
10da4a: a3 90 3e 12 00 mov %eax,0x123e90
/*
* 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();
10da4f: e8 cb 25 00 00 call 11001f <IMFS_create_root_node>
10da54: 89 43 1c mov %eax,0x1c(%ebx)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
10da57: 8b 45 14 mov 0x14(%ebp),%eax
10da5a: 89 43 24 mov %eax,0x24(%ebx)
temp_mt_entry->mt_fs_root.ops = op_table;
10da5d: 8b 45 0c mov 0xc(%ebp),%eax
10da60: 89 43 28 mov %eax,0x28(%ebx)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
10da63: 8d 7b 38 lea 0x38(%ebx),%edi
10da66: be 40 ee 11 00 mov $0x11ee40,%esi
10da6b: b9 0c 00 00 00 mov $0xc,%ecx
10da70: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
10da72: 50 push %eax
10da73: 50 push %eax
10da74: 6a 10 push $0x10
10da76: 6a 01 push $0x1
10da78: e8 6b 02 00 00 call 10dce8 <calloc>
if ( !fs_info ) {
10da7d: 83 c4 10 add $0x10,%esp
10da80: 85 c0 test %eax,%eax
10da82: 75 1e jne 10daa2 <IMFS_initialize_support+0x82><== ALWAYS TAKEN
free(temp_mt_entry->mt_fs_root.node_access);
10da84: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10da87: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED
10da8a: e8 61 97 ff ff call 1071f0 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
10da8f: e8 70 39 00 00 call 111404 <__errno> <== NOT EXECUTED
10da94: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10da9a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10da9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10daa0: eb 36 jmp 10dad8 <IMFS_initialize_support+0xb8><== NOT EXECUTED
}
temp_mt_entry->fs_info = fs_info;
10daa2: 89 43 34 mov %eax,0x34(%ebx)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
10daa5: 8b 15 94 3e 12 00 mov 0x123e94,%edx
10daab: 89 10 mov %edx,(%eax)
10daad: 42 inc %edx
10daae: 89 15 94 3e 12 00 mov %edx,0x123e94
fs_info->ino_count = 1;
10dab4: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
fs_info->memfile_handlers = memfile_handlers;
10dabb: 8b 55 10 mov 0x10(%ebp),%edx
10dabe: 89 50 08 mov %edx,0x8(%eax)
fs_info->directory_handlers = directory_handlers;
10dac1: 8b 55 14 mov 0x14(%ebp),%edx
10dac4: 89 50 0c mov %edx,0xc(%eax)
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
10dac7: 8b 43 1c mov 0x1c(%ebx),%eax
10daca: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax)
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
10dad1: e8 b4 1c 00 00 call 10f78a <rtems_pipe_initialize>
10dad6: 31 c0 xor %eax,%eax
return 0;
}
10dad8: 8d 65 f4 lea -0xc(%ebp),%esp
10dadb: 5b pop %ebx
10dadc: 5e pop %esi
10dadd: 5f pop %edi
10dade: c9 leave
10dadf: c3 ret
00107bbc <IMFS_link>:
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
107bbc: 55 push %ebp
107bbd: 89 e5 mov %esp,%ebp
107bbf: 57 push %edi
107bc0: 53 push %ebx
107bc1: 83 ec 50 sub $0x50,%esp
107bc4: 8b 55 10 mov 0x10(%ebp),%edx
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
107bc7: 8b 45 08 mov 0x8(%ebp),%eax
107bca: 8b 00 mov (%eax),%eax
107bcc: 89 45 d8 mov %eax,-0x28(%ebp)
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
107bcf: 66 83 78 34 07 cmpw $0x7,0x34(%eax)
107bd4: 76 0d jbe 107be3 <IMFS_link+0x27>
rtems_set_errno_and_return_minus_one( EMLINK );
107bd6: e8 8d e0 00 00 call 115c68 <__errno>
107bdb: c7 00 1f 00 00 00 movl $0x1f,(%eax)
107be1: eb 43 jmp 107c26 <IMFS_link+0x6a>
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
107be3: 31 c0 xor %eax,%eax
107be5: 83 c9 ff or $0xffffffff,%ecx
107be8: 89 d7 mov %edx,%edi
107bea: f2 ae repnz scas %es:(%edi),%al
107bec: f7 d1 not %ecx
107bee: 49 dec %ecx
107bef: 8d 45 f4 lea -0xc(%ebp),%eax
107bf2: 50 push %eax
107bf3: 8d 5d b7 lea -0x49(%ebp),%ebx
107bf6: 53 push %ebx
107bf7: 51 push %ecx
107bf8: 52 push %edx
107bf9: e8 0e a3 00 00 call 111f0c <IMFS_get_token>
* 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.
*/
new_node = IMFS_create_node(
107bfe: 8d 45 d8 lea -0x28(%ebp),%eax
107c01: 89 04 24 mov %eax,(%esp)
107c04: 68 ff a1 00 00 push $0xa1ff
107c09: 53 push %ebx
107c0a: 6a 03 push $0x3
107c0c: ff 75 0c pushl 0xc(%ebp)
107c0f: e8 f2 98 00 00 call 111506 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
107c14: 83 c4 20 add $0x20,%esp
107c17: 85 c0 test %eax,%eax
107c19: 75 10 jne 107c2b <IMFS_link+0x6f> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
107c1b: e8 48 e0 00 00 call 115c68 <__errno> <== NOT EXECUTED
107c20: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107c26: 83 c8 ff or $0xffffffff,%eax
107c29: eb 22 jmp 107c4d <IMFS_link+0x91>
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
107c2b: 8b 45 d8 mov -0x28(%ebp),%eax
107c2e: 66 ff 40 34 incw 0x34(%eax)
IMFS_update_ctime( info.hard_link.link_node );
107c32: 50 push %eax
107c33: 50 push %eax
107c34: 6a 00 push $0x0
107c36: 8d 45 ec lea -0x14(%ebp),%eax
107c39: 50 push %eax
107c3a: e8 f1 07 00 00 call 108430 <gettimeofday>
107c3f: 8b 55 ec mov -0x14(%ebp),%edx
107c42: 8b 45 d8 mov -0x28(%ebp),%eax
107c45: 89 50 48 mov %edx,0x48(%eax)
107c48: 31 c0 xor %eax,%eax
return 0;
107c4a: 83 c4 10 add $0x10,%esp
}
107c4d: 8d 65 f8 lea -0x8(%ebp),%esp
107c50: 5b pop %ebx
107c51: 5f pop %edi
107c52: c9 leave
107c53: c3 ret
001143a4 <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
1143a4: 55 push %ebp
1143a5: 89 e5 mov %esp,%ebp
1143a7: 53 push %ebx
1143a8: 83 ec 04 sub $0x4,%esp
1143ab: 8b 45 08 mov 0x8(%ebp),%eax
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
1143ae: 85 c0 test %eax,%eax
1143b0: 75 11 jne 1143c3 <IMFS_memfile_addblock+0x1f><== ALWAYS TAKEN
1143b2: 68 2c 39 12 00 push $0x12392c <== NOT EXECUTED
1143b7: 68 d0 3a 12 00 push $0x123ad0 <== NOT EXECUTED
1143bc: 68 69 01 00 00 push $0x169 <== NOT EXECUTED
1143c1: eb 15 jmp 1143d8 <IMFS_memfile_addblock+0x34><== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
1143c3: 83 78 4c 05 cmpl $0x5,0x4c(%eax)
1143c7: 74 19 je 1143e2 <IMFS_memfile_addblock+0x3e><== ALWAYS TAKEN
1143c9: 68 7c 39 12 00 push $0x12397c <== NOT EXECUTED
1143ce: 68 d0 3a 12 00 push $0x123ad0 <== NOT EXECUTED
1143d3: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED
1143d8: 68 36 39 12 00 push $0x123936 <== NOT EXECUTED
1143dd: e8 aa 3c ff ff call 10808c <__assert_func> <== NOT EXECUTED
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
1143e2: 52 push %edx
1143e3: 6a 01 push $0x1
1143e5: ff 75 0c pushl 0xc(%ebp)
1143e8: 50 push %eax
1143e9: e8 84 fb ff ff call 113f72 <IMFS_memfile_get_block_pointer>
1143ee: 89 c3 mov %eax,%ebx
if ( *block_entry_ptr )
1143f0: 83 c4 10 add $0x10,%esp
1143f3: 31 c0 xor %eax,%eax
1143f5: 83 3b 00 cmpl $0x0,(%ebx)
1143f8: 75 14 jne 11440e <IMFS_memfile_addblock+0x6a>
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
1143fa: e8 51 fb ff ff call 113f50 <memfile_alloc_block>
1143ff: 89 c2 mov %eax,%edx
if ( !memory )
114401: b8 01 00 00 00 mov $0x1,%eax
114406: 85 d2 test %edx,%edx
114408: 74 04 je 11440e <IMFS_memfile_addblock+0x6a><== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
11440a: 89 13 mov %edx,(%ebx)
11440c: 30 c0 xor %al,%al
return 0;
}
11440e: 8b 5d fc mov -0x4(%ebp),%ebx
114411: c9 leave
114412: c3 ret
00114413 <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
114413: 55 push %ebp
114414: 89 e5 mov %esp,%ebp
114416: 57 push %edi
114417: 56 push %esi
114418: 53 push %ebx
114419: 83 ec 2c sub $0x2c,%esp
11441c: 8b 5d 08 mov 0x8(%ebp),%ebx
11441f: 8b 75 0c mov 0xc(%ebp),%esi
114422: 8b 7d 10 mov 0x10(%ebp),%edi
/*
* Perform internal consistency checks
*/
assert( the_jnode );
114425: 85 db test %ebx,%ebx
114427: 75 11 jne 11443a <IMFS_memfile_extend+0x27><== ALWAYS TAKEN
114429: 68 2c 39 12 00 push $0x12392c <== NOT EXECUTED
11442e: 68 e8 3a 12 00 push $0x123ae8 <== NOT EXECUTED
114433: 68 31 01 00 00 push $0x131 <== NOT EXECUTED
114438: eb 15 jmp 11444f <IMFS_memfile_extend+0x3c><== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
11443a: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx)
11443e: 74 19 je 114459 <IMFS_memfile_extend+0x46><== ALWAYS TAKEN
114440: 68 7c 39 12 00 push $0x12397c <== NOT EXECUTED
114445: 68 e8 3a 12 00 push $0x123ae8 <== NOT EXECUTED
11444a: 68 35 01 00 00 push $0x135 <== NOT EXECUTED
11444f: 68 36 39 12 00 push $0x123936 <== NOT EXECUTED
114454: e8 33 3c ff ff call 10808c <__assert_func> <== NOT EXECUTED
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
114459: a1 b8 8d 12 00 mov 0x128db8,%eax
11445e: 89 c1 mov %eax,%ecx
114460: c1 e9 02 shr $0x2,%ecx
114463: 8d 51 01 lea 0x1(%ecx),%edx
114466: 0f af d1 imul %ecx,%edx
114469: 42 inc %edx
11446a: 0f af d1 imul %ecx,%edx
11446d: 4a dec %edx
11446e: 0f af d0 imul %eax,%edx
114471: 83 ff 00 cmp $0x0,%edi
114474: 7c 16 jl 11448c <IMFS_memfile_extend+0x79><== NEVER TAKEN
114476: 7f 04 jg 11447c <IMFS_memfile_extend+0x69><== NEVER TAKEN
114478: 39 d6 cmp %edx,%esi
11447a: 72 10 jb 11448c <IMFS_memfile_extend+0x79><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
11447c: e8 e7 17 00 00 call 115c68 <__errno> <== NOT EXECUTED
114481: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
114487: e9 92 00 00 00 jmp 11451e <IMFS_memfile_extend+0x10b><== NOT EXECUTED
if ( new_length <= the_jnode->info.file.size )
11448c: 8b 53 50 mov 0x50(%ebx),%edx
11448f: 8b 4b 54 mov 0x54(%ebx),%ecx
114492: 89 55 e0 mov %edx,-0x20(%ebp)
114495: 89 4d e4 mov %ecx,-0x1c(%ebp)
114498: 39 cf cmp %ecx,%edi
11449a: 7f 0e jg 1144aa <IMFS_memfile_extend+0x97><== NEVER TAKEN
11449c: 0f 8c 8d 00 00 00 jl 11452f <IMFS_memfile_extend+0x11c><== NEVER TAKEN
1144a2: 39 d6 cmp %edx,%esi
1144a4: 0f 86 85 00 00 00 jbe 11452f <IMFS_memfile_extend+0x11c>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
1144aa: 89 45 d8 mov %eax,-0x28(%ebp)
1144ad: 89 c1 mov %eax,%ecx
1144af: c1 f9 1f sar $0x1f,%ecx
1144b2: 89 4d dc mov %ecx,-0x24(%ebp)
1144b5: ff 75 dc pushl -0x24(%ebp)
1144b8: ff 75 d8 pushl -0x28(%ebp)
1144bb: 57 push %edi
1144bc: 56 push %esi
1144bd: e8 da c7 00 00 call 120c9c <__divdi3>
1144c2: 83 c4 10 add $0x10,%esp
1144c5: 89 45 d4 mov %eax,-0x2c(%ebp)
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
1144c8: ff 75 dc pushl -0x24(%ebp)
1144cb: ff 75 d8 pushl -0x28(%ebp)
1144ce: ff 75 e4 pushl -0x1c(%ebp)
1144d1: ff 75 e0 pushl -0x20(%ebp)
1144d4: e8 c3 c7 00 00 call 120c9c <__divdi3>
1144d9: 83 c4 10 add $0x10,%esp
1144dc: 89 45 e0 mov %eax,-0x20(%ebp)
1144df: 89 c2 mov %eax,%edx
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
1144e1: eb 41 jmp 114524 <IMFS_memfile_extend+0x111>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
1144e3: 50 push %eax
1144e4: 50 push %eax
1144e5: 52 push %edx
1144e6: 53 push %ebx
1144e7: 89 55 d0 mov %edx,-0x30(%ebp)
1144ea: e8 b5 fe ff ff call 1143a4 <IMFS_memfile_addblock>
1144ef: 83 c4 10 add $0x10,%esp
1144f2: 85 c0 test %eax,%eax
1144f4: 8b 55 d0 mov -0x30(%ebp),%edx
1144f7: 74 2a je 114523 <IMFS_memfile_extend+0x110><== ALWAYS TAKEN
1144f9: eb 13 jmp 11450e <IMFS_memfile_extend+0xfb><== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
1144fb: 51 push %ecx <== NOT EXECUTED
1144fc: 51 push %ecx <== NOT EXECUTED
1144fd: 52 push %edx <== NOT EXECUTED
1144fe: 53 push %ebx <== NOT EXECUTED
1144ff: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
114502: e8 5c fc ff ff call 114163 <IMFS_memfile_remove_block><== NOT EXECUTED
* 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-- ) {
114507: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
11450a: 4a dec %edx <== NOT EXECUTED
11450b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11450e: 3b 55 e0 cmp -0x20(%ebp),%edx <== NOT EXECUTED
114511: 73 e8 jae 1144fb <IMFS_memfile_extend+0xe8><== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
114513: e8 50 17 00 00 call 115c68 <__errno> <== NOT EXECUTED
114518: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
11451e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
114521: eb 0e jmp 114531 <IMFS_memfile_extend+0x11e><== NOT EXECUTED
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
114523: 42 inc %edx
114524: 3b 55 d4 cmp -0x2c(%ebp),%edx
114527: 76 ba jbe 1144e3 <IMFS_memfile_extend+0xd0>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
114529: 89 73 50 mov %esi,0x50(%ebx)
11452c: 89 7b 54 mov %edi,0x54(%ebx)
11452f: 31 c0 xor %eax,%eax
return 0;
}
114531: 8d 65 f4 lea -0xc(%ebp),%esp
114534: 5b pop %ebx
114535: 5e pop %esi
114536: 5f pop %edi
114537: c9 leave
114538: c3 ret
00113f72 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
113f72: 55 push %ebp
113f73: 89 e5 mov %esp,%ebp
113f75: 57 push %edi
113f76: 56 push %esi
113f77: 53 push %ebx
113f78: 83 ec 1c sub $0x1c,%esp
113f7b: 8b 5d 08 mov 0x8(%ebp),%ebx
113f7e: 8b 7d 0c mov 0xc(%ebp),%edi
113f81: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Perform internal consistency checks
*/
assert( the_jnode );
113f84: 85 db test %ebx,%ebx
113f86: 75 11 jne 113f99 <IMFS_memfile_get_block_pointer+0x27><== ALWAYS TAKEN
113f88: 68 2c 39 12 00 push $0x12392c <== NOT EXECUTED
113f8d: 68 38 3a 12 00 push $0x123a38 <== NOT EXECUTED
113f92: 68 88 03 00 00 push $0x388 <== NOT EXECUTED
113f97: eb 15 jmp 113fae <IMFS_memfile_get_block_pointer+0x3c><== NOT EXECUTED
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
113f99: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx)
113f9d: 74 19 je 113fb8 <IMFS_memfile_get_block_pointer+0x46><== ALWAYS TAKEN
113f9f: 68 7c 39 12 00 push $0x12397c <== NOT EXECUTED
113fa4: 68 38 3a 12 00 push $0x123a38 <== NOT EXECUTED
113fa9: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED
113fae: 68 36 39 12 00 push $0x123936 <== NOT EXECUTED
113fb3: e8 d4 40 ff ff call 10808c <__assert_func> <== NOT EXECUTED
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
113fb8: 8b 0d b8 8d 12 00 mov 0x128db8,%ecx
113fbe: c1 e9 02 shr $0x2,%ecx
113fc1: 8d 41 ff lea -0x1(%ecx),%eax
113fc4: 39 c7 cmp %eax,%edi
113fc6: 77 2f ja 113ff7 <IMFS_memfile_get_block_pointer+0x85><== NEVER TAKEN
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
113fc8: 8b 53 58 mov 0x58(%ebx),%edx
if ( malloc_it ) {
113fcb: 85 f6 test %esi,%esi
113fcd: 74 23 je 113ff2 <IMFS_memfile_get_block_pointer+0x80>
if ( !p ) {
113fcf: 85 d2 test %edx,%edx
113fd1: 75 10 jne 113fe3 <IMFS_memfile_get_block_pointer+0x71>
p = memfile_alloc_block();
113fd3: e8 78 ff ff ff call 113f50 <memfile_alloc_block>
if ( !p )
113fd8: 85 c0 test %eax,%eax
113fda: 0f 84 0f 01 00 00 je 1140ef <IMFS_memfile_get_block_pointer+0x17d><== NEVER TAKEN
return 0;
info->indirect = p;
113fe0: 89 43 58 mov %eax,0x58(%ebx)
}
return &info->indirect[ my_block ];
113fe3: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax
113fea: 03 43 58 add 0x58(%ebx),%eax
113fed: e9 ff 00 00 00 jmp 1140f1 <IMFS_memfile_get_block_pointer+0x17f>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
113ff2: 8d 04 ba lea (%edx,%edi,4),%eax
113ff5: eb 69 jmp 114060 <IMFS_memfile_get_block_pointer+0xee>
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
113ff7: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED
113ffa: 0f af c1 imul %ecx,%eax <== NOT EXECUTED
113ffd: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED
114000: 39 d7 cmp %edx,%edi <== NOT EXECUTED
114002: 77 69 ja 11406d <IMFS_memfile_get_block_pointer+0xfb><== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
114004: 29 cf sub %ecx,%edi <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
114006: 89 f8 mov %edi,%eax <== NOT EXECUTED
114008: 31 d2 xor %edx,%edx <== NOT EXECUTED
11400a: f7 f1 div %ecx <== NOT EXECUTED
11400c: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
11400f: 89 c7 mov %eax,%edi <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
114011: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED
if ( malloc_it ) {
114014: 85 f6 test %esi,%esi <== NOT EXECUTED
114016: 74 37 je 11404f <IMFS_memfile_get_block_pointer+0xdd><== NOT EXECUTED
if ( !p ) {
114018: 85 c0 test %eax,%eax <== NOT EXECUTED
11401a: 75 10 jne 11402c <IMFS_memfile_get_block_pointer+0xba><== NOT EXECUTED
p = memfile_alloc_block();
11401c: e8 2f ff ff ff call 113f50 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
114021: 85 c0 test %eax,%eax <== NOT EXECUTED
114023: 0f 84 c6 00 00 00 je 1140ef <IMFS_memfile_get_block_pointer+0x17d><== NOT EXECUTED
return 0;
info->doubly_indirect = p;
114029: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED
}
p1 = (block_p *)p[ doubly ];
11402c: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED
11402f: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
if ( !p1 ) {
114031: 85 c0 test %eax,%eax <== NOT EXECUTED
114033: 75 0f jne 114044 <IMFS_memfile_get_block_pointer+0xd2><== NOT EXECUTED
p1 = memfile_alloc_block();
114035: e8 16 ff ff ff call 113f50 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
11403a: 85 c0 test %eax,%eax <== NOT EXECUTED
11403c: 0f 84 ad 00 00 00 je 1140ef <IMFS_memfile_get_block_pointer+0x17d><== NOT EXECUTED
return 0;
p[ doubly ] = (block_p) p1;
114042: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
114044: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
114047: 8d 04 88 lea (%eax,%ecx,4),%eax <== NOT EXECUTED
11404a: e9 a2 00 00 00 jmp 1140f1 <IMFS_memfile_get_block_pointer+0x17f><== NOT EXECUTED
}
if ( !p )
11404f: 85 c0 test %eax,%eax <== NOT EXECUTED
114051: 0f 84 98 00 00 00 je 1140ef <IMFS_memfile_get_block_pointer+0x17d><== NOT EXECUTED
return 0;
p = (block_p *)p[ doubly ];
114057: 8b 14 b8 mov (%eax,%edi,4),%edx <== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly,
singly, p, &p[singly] );
fflush(stdout);
#endif
return (block_p *)&p[ singly ];
11405a: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
11405d: 8d 04 8a lea (%edx,%ecx,4),%eax <== NOT EXECUTED
if ( !p )
return 0;
p = (block_p *)p[ doubly ];
if ( !p )
114060: 85 d2 test %edx,%edx
114062: 0f 85 89 00 00 00 jne 1140f1 <IMFS_memfile_get_block_pointer+0x17f><== ALWAYS TAKEN
114068: e9 82 00 00 00 jmp 1140ef <IMFS_memfile_get_block_pointer+0x17d><== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
11406d: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
114070: 0f af d1 imul %ecx,%edx <== NOT EXECUTED
114073: 4a dec %edx <== NOT EXECUTED
114074: 39 d7 cmp %edx,%edi <== NOT EXECUTED
114076: 77 77 ja 1140ef <IMFS_memfile_get_block_pointer+0x17d><== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
114078: 29 c7 sub %eax,%edi <== NOT EXECUTED
11407a: 89 f8 mov %edi,%eax <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
11407c: 31 d2 xor %edx,%edx <== NOT EXECUTED
11407e: f7 f1 div %ecx <== NOT EXECUTED
114080: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
114083: 31 d2 xor %edx,%edx <== NOT EXECUTED
114085: f7 f1 div %ecx <== NOT EXECUTED
114087: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
11408a: 89 c7 mov %eax,%edi <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
11408c: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
if ( malloc_it ) {
11408f: 85 f6 test %esi,%esi <== NOT EXECUTED
114091: 74 43 je 1140d6 <IMFS_memfile_get_block_pointer+0x164><== NOT EXECUTED
if ( !p ) {
114093: 85 c0 test %eax,%eax <== NOT EXECUTED
114095: 75 0c jne 1140a3 <IMFS_memfile_get_block_pointer+0x131><== NOT EXECUTED
p = memfile_alloc_block();
114097: e8 b4 fe ff ff call 113f50 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
11409c: 85 c0 test %eax,%eax <== NOT EXECUTED
11409e: 74 4f je 1140ef <IMFS_memfile_get_block_pointer+0x17d><== NOT EXECUTED
return 0;
info->triply_indirect = p;
1140a0: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED
}
p1 = (block_p *) p[ triply ];
1140a3: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED
1140a6: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
if ( !p1 ) {
1140a8: 85 c0 test %eax,%eax <== NOT EXECUTED
1140aa: 75 0b jne 1140b7 <IMFS_memfile_get_block_pointer+0x145><== NOT EXECUTED
p1 = memfile_alloc_block();
1140ac: e8 9f fe ff ff call 113f50 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
1140b1: 85 c0 test %eax,%eax <== NOT EXECUTED
1140b3: 74 3a je 1140ef <IMFS_memfile_get_block_pointer+0x17d><== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
1140b5: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
1140b7: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
1140ba: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED
1140bd: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
if ( !p2 ) {
1140bf: 85 c0 test %eax,%eax <== NOT EXECUTED
1140c1: 75 0b jne 1140ce <IMFS_memfile_get_block_pointer+0x15c><== NOT EXECUTED
p2 = memfile_alloc_block();
1140c3: e8 88 fe ff ff call 113f50 <memfile_alloc_block> <== NOT EXECUTED
if ( !p2 )
1140c8: 85 c0 test %eax,%eax <== NOT EXECUTED
1140ca: 74 23 je 1140ef <IMFS_memfile_get_block_pointer+0x17d><== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
1140cc: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
}
return (block_p *)&p2[ singly ];
1140ce: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1140d1: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED
1140d4: eb 1b jmp 1140f1 <IMFS_memfile_get_block_pointer+0x17f><== NOT EXECUTED
}
if ( !p )
1140d6: 85 c0 test %eax,%eax <== NOT EXECUTED
1140d8: 74 15 je 1140ef <IMFS_memfile_get_block_pointer+0x17d><== NOT EXECUTED
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
1140da: 8b 14 b8 mov (%eax,%edi,4),%edx <== NOT EXECUTED
if ( !p1 )
1140dd: 85 d2 test %edx,%edx <== NOT EXECUTED
1140df: 74 0e je 1140ef <IMFS_memfile_get_block_pointer+0x17d><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
1140e1: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
1140e4: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
1140e7: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
1140ea: 03 04 8a add (%edx,%ecx,4),%eax <== NOT EXECUTED
1140ed: eb 02 jmp 1140f1 <IMFS_memfile_get_block_pointer+0x17f><== NOT EXECUTED
1140ef: 31 c0 xor %eax,%eax <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
1140f1: 8d 65 f4 lea -0xc(%ebp),%esp
1140f4: 5b pop %ebx
1140f5: 5e pop %esi
1140f6: 5f pop %edi
1140f7: c9 leave
1140f8: c3 ret
001148aa <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
1148aa: 55 push %ebp
1148ab: 89 e5 mov %esp,%ebp
1148ad: 57 push %edi
1148ae: 56 push %esi
1148af: 53 push %ebx
1148b0: 83 ec 3c sub $0x3c,%esp
1148b3: 8b 75 0c mov 0xc(%ebp),%esi
1148b6: 8b 7d 10 mov 0x10(%ebp),%edi
/*
* Perform internal consistency checks
*/
assert( the_jnode );
1148b9: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
1148bd: 75 11 jne 1148d0 <IMFS_memfile_read+0x26><== ALWAYS TAKEN
1148bf: 68 2c 39 12 00 push $0x12392c <== NOT EXECUTED
1148c4: 68 6c 3a 12 00 push $0x123a6c <== NOT EXECUTED
1148c9: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED
1148ce: eb 1d jmp 1148ed <IMFS_memfile_read+0x43><== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
1148d0: 8b 55 08 mov 0x8(%ebp),%edx
1148d3: 8b 42 4c mov 0x4c(%edx),%eax
1148d6: 8d 48 fb lea -0x5(%eax),%ecx
1148d9: 83 f9 01 cmp $0x1,%ecx
1148dc: 76 19 jbe 1148f7 <IMFS_memfile_read+0x4d><== ALWAYS TAKEN
1148de: 68 e6 39 12 00 push $0x1239e6 <== NOT EXECUTED
1148e3: 68 6c 3a 12 00 push $0x123a6c <== NOT EXECUTED
1148e8: 68 51 02 00 00 push $0x251 <== NOT EXECUTED
1148ed: 68 36 39 12 00 push $0x123936 <== NOT EXECUTED
1148f2: e8 95 37 ff ff call 10808c <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
1148f7: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
1148fb: 75 11 jne 11490e <IMFS_memfile_read+0x64><== ALWAYS TAKEN
1148fd: 68 31 3a 12 00 push $0x123a31 <== NOT EXECUTED
114902: 68 6c 3a 12 00 push $0x123a6c <== NOT EXECUTED
114907: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED
11490c: eb df jmp 1148ed <IMFS_memfile_read+0x43><== NOT EXECUTED
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
11490e: 83 7d 18 00 cmpl $0x0,0x18(%ebp)
114912: 75 13 jne 114927 <IMFS_memfile_read+0x7d><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
114914: e8 4f 13 00 00 call 115c68 <__errno> <== NOT EXECUTED
114919: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11491f: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
114922: e9 d0 01 00 00 jmp 114af7 <IMFS_memfile_read+0x24d><== NOT EXECUTED
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
114927: 83 f8 06 cmp $0x6,%eax
11492a: 75 64 jne 114990 <IMFS_memfile_read+0xe6><== ALWAYS TAKEN
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
11492c: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
11492f: 8b 49 58 mov 0x58(%ecx),%ecx <== NOT EXECUTED
114932: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
114935: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
114938: 8b 48 50 mov 0x50(%eax),%ecx <== NOT EXECUTED
11493b: 8b 58 54 mov 0x54(%eax),%ebx <== NOT EXECUTED
11493e: 89 c8 mov %ecx,%eax <== NOT EXECUTED
114940: 89 da mov %ebx,%edx <== NOT EXECUTED
114942: 29 f0 sub %esi,%eax <== NOT EXECUTED
114944: 19 fa sbb %edi,%edx <== NOT EXECUTED
114946: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
114949: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
11494c: 31 c0 xor %eax,%eax <== NOT EXECUTED
11494e: 39 d0 cmp %edx,%eax <== NOT EXECUTED
114950: 7f 0f jg 114961 <IMFS_memfile_read+0xb7><== NOT EXECUTED
114952: 7c 08 jl 11495c <IMFS_memfile_read+0xb2><== NOT EXECUTED
114954: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
114957: 39 55 18 cmp %edx,0x18(%ebp) <== NOT EXECUTED
11495a: 77 05 ja 114961 <IMFS_memfile_read+0xb7><== NOT EXECUTED
11495c: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED
11495f: eb 04 jmp 114965 <IMFS_memfile_read+0xbb><== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
114961: 89 ca mov %ecx,%edx <== NOT EXECUTED
114963: 29 f2 sub %esi,%edx <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
114965: 03 75 c8 add -0x38(%ebp),%esi <== NOT EXECUTED
114968: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
11496b: 89 d1 mov %edx,%ecx <== NOT EXECUTED
11496d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
IMFS_update_atime( the_jnode );
11496f: 51 push %ecx <== NOT EXECUTED
114970: 51 push %ecx <== NOT EXECUTED
114971: 6a 00 push $0x0 <== NOT EXECUTED
114973: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
114976: 50 push %eax <== NOT EXECUTED
114977: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED
11497a: e8 b1 3a ff ff call 108430 <gettimeofday> <== NOT EXECUTED
11497f: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
114982: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
114985: 89 41 40 mov %eax,0x40(%ecx) <== NOT EXECUTED
return my_length;
114988: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
11498b: e9 64 01 00 00 jmp 114af4 <IMFS_memfile_read+0x24a><== NOT EXECUTED
/*
* 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;
114990: 89 f0 mov %esi,%eax
if ( last_byte > the_jnode->info.file.size )
114992: 8b 55 08 mov 0x8(%ebp),%edx
114995: 8b 5a 50 mov 0x50(%edx),%ebx
114998: 8b 4d 18 mov 0x18(%ebp),%ecx
11499b: 01 f1 add %esi,%ecx
11499d: 89 4d d0 mov %ecx,-0x30(%ebp)
1149a0: 31 c9 xor %ecx,%ecx
1149a2: 3b 4a 54 cmp 0x54(%edx),%ecx
1149a5: 7f 0f jg 1149b6 <IMFS_memfile_read+0x10c><== NEVER TAKEN
1149a7: 7c 05 jl 1149ae <IMFS_memfile_read+0x104><== NEVER TAKEN
1149a9: 39 5d d0 cmp %ebx,-0x30(%ebp)
1149ac: 77 08 ja 1149b6 <IMFS_memfile_read+0x10c>
1149ae: 8b 45 18 mov 0x18(%ebp),%eax
1149b1: 89 45 d0 mov %eax,-0x30(%ebp)
1149b4: eb 05 jmp 1149bb <IMFS_memfile_read+0x111>
my_length = the_jnode->info.file.size - start;
1149b6: 29 c3 sub %eax,%ebx
1149b8: 89 5d d0 mov %ebx,-0x30(%ebp)
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
1149bb: 8b 15 b8 8d 12 00 mov 0x128db8,%edx
1149c1: 89 55 c4 mov %edx,-0x3c(%ebp)
1149c4: 89 d0 mov %edx,%eax
1149c6: 99 cltd
1149c7: 89 d3 mov %edx,%ebx
1149c9: 52 push %edx
1149ca: 50 push %eax
1149cb: 57 push %edi
1149cc: 56 push %esi
1149cd: 89 45 c0 mov %eax,-0x40(%ebp)
1149d0: e8 17 c4 00 00 call 120dec <__moddi3>
1149d5: 83 c4 10 add $0x10,%esp
1149d8: 89 45 c8 mov %eax,-0x38(%ebp)
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
1149db: 8b 4d c0 mov -0x40(%ebp),%ecx
1149de: 53 push %ebx
1149df: 51 push %ecx
1149e0: 57 push %edi
1149e1: 56 push %esi
1149e2: e8 b5 c2 00 00 call 120c9c <__divdi3>
1149e7: 83 c4 10 add $0x10,%esp
1149ea: 89 c3 mov %eax,%ebx
if ( start_offset ) {
1149ec: 83 7d c8 00 cmpl $0x0,-0x38(%ebp)
1149f0: 75 0f jne 114a01 <IMFS_memfile_read+0x157>
1149f2: 8b 55 14 mov 0x14(%ebp),%edx
1149f5: 89 55 c8 mov %edx,-0x38(%ebp)
1149f8: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
1149ff: eb 4c jmp 114a4d <IMFS_memfile_read+0x1a3>
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 );
114a01: 50 push %eax
114a02: 6a 00 push $0x0
114a04: 53 push %ebx
114a05: ff 75 08 pushl 0x8(%ebp)
114a08: e8 65 f5 ff ff call 113f72 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
114a0d: 83 c4 10 add $0x10,%esp
114a10: 85 c0 test %eax,%eax
114a12: 75 14 jne 114a28 <IMFS_memfile_read+0x17e><== ALWAYS TAKEN
114a14: 68 ac 39 12 00 push $0x1239ac <== NOT EXECUTED
114a19: 68 6c 3a 12 00 push $0x123a6c <== NOT EXECUTED
114a1e: 68 96 02 00 00 push $0x296 <== NOT EXECUTED
114a23: e9 c5 fe ff ff jmp 1148ed <IMFS_memfile_read+0x43><== NOT EXECUTED
*/
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;
114a28: 8b 4d c4 mov -0x3c(%ebp),%ecx
114a2b: 2b 4d c8 sub -0x38(%ebp),%ecx
114a2e: 8b 55 d0 mov -0x30(%ebp),%edx
114a31: 39 ca cmp %ecx,%edx
114a33: 76 02 jbe 114a37 <IMFS_memfile_read+0x18d>
114a35: 89 ca mov %ecx,%edx
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
114a37: 8b 75 c8 mov -0x38(%ebp),%esi
114a3a: 03 30 add (%eax),%esi
dest += to_copy;
114a3c: 8b 7d 14 mov 0x14(%ebp),%edi
114a3f: 89 d1 mov %edx,%ecx
114a41: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
114a43: 89 7d c8 mov %edi,-0x38(%ebp)
block++;
114a46: 43 inc %ebx
my_length -= to_copy;
114a47: 29 55 d0 sub %edx,-0x30(%ebp)
114a4a: 89 55 cc mov %edx,-0x34(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
114a4d: 8b 15 b8 8d 12 00 mov 0x128db8,%edx
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
114a53: eb 40 jmp 114a95 <IMFS_memfile_read+0x1eb>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
114a55: 57 push %edi
114a56: 6a 00 push $0x0
114a58: 53 push %ebx
114a59: ff 75 08 pushl 0x8(%ebp)
114a5c: 89 55 c0 mov %edx,-0x40(%ebp)
114a5f: e8 0e f5 ff ff call 113f72 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
114a64: 83 c4 10 add $0x10,%esp
114a67: 85 c0 test %eax,%eax
114a69: 8b 55 c0 mov -0x40(%ebp),%edx
114a6c: 75 14 jne 114a82 <IMFS_memfile_read+0x1d8><== ALWAYS TAKEN
114a6e: 68 ac 39 12 00 push $0x1239ac <== NOT EXECUTED
114a73: 68 6c 3a 12 00 push $0x123a6c <== NOT EXECUTED
114a78: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED
114a7d: e9 6b fe ff ff jmp 1148ed <IMFS_memfile_read+0x43><== NOT EXECUTED
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
114a82: 8b 30 mov (%eax),%esi
114a84: 8b 7d c8 mov -0x38(%ebp),%edi
114a87: 89 d1 mov %edx,%ecx
114a89: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
dest += to_copy;
114a8b: 89 7d c8 mov %edi,-0x38(%ebp)
block++;
114a8e: 43 inc %ebx
my_length -= to_copy;
114a8f: 29 55 d0 sub %edx,-0x30(%ebp)
copied += to_copy;
114a92: 01 55 cc add %edx,-0x34(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
114a95: 8b 45 d0 mov -0x30(%ebp),%eax
114a98: 3b 05 b8 8d 12 00 cmp 0x128db8,%eax
114a9e: 73 b5 jae 114a55 <IMFS_memfile_read+0x1ab>
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
114aa0: 85 c0 test %eax,%eax
114aa2: 74 37 je 114adb <IMFS_memfile_read+0x231>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
114aa4: 56 push %esi
114aa5: 6a 00 push $0x0
114aa7: 53 push %ebx
114aa8: ff 75 08 pushl 0x8(%ebp)
114aab: e8 c2 f4 ff ff call 113f72 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
114ab0: 83 c4 10 add $0x10,%esp
114ab3: 85 c0 test %eax,%eax
114ab5: 75 14 jne 114acb <IMFS_memfile_read+0x221><== ALWAYS TAKEN
114ab7: 68 ac 39 12 00 push $0x1239ac <== NOT EXECUTED
114abc: 68 6c 3a 12 00 push $0x123a6c <== NOT EXECUTED
114ac1: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED
114ac6: e9 22 fe ff ff jmp 1148ed <IMFS_memfile_read+0x43><== NOT EXECUTED
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
114acb: 8b 30 mov (%eax),%esi
114acd: 8b 7d c8 mov -0x38(%ebp),%edi
114ad0: 8b 4d d0 mov -0x30(%ebp),%ecx
114ad3: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
copied += my_length;
114ad5: 8b 55 d0 mov -0x30(%ebp),%edx
114ad8: 01 55 cc add %edx,-0x34(%ebp)
}
IMFS_update_atime( the_jnode );
114adb: 53 push %ebx
114adc: 53 push %ebx
114add: 6a 00 push $0x0
114adf: 8d 45 e0 lea -0x20(%ebp),%eax
114ae2: 50 push %eax
114ae3: e8 48 39 ff ff call 108430 <gettimeofday>
114ae8: 8b 45 e0 mov -0x20(%ebp),%eax
114aeb: 8b 4d 08 mov 0x8(%ebp),%ecx
114aee: 89 41 40 mov %eax,0x40(%ecx)
return copied;
114af1: 8b 55 cc mov -0x34(%ebp),%edx
114af4: 83 c4 10 add $0x10,%esp
}
114af7: 89 d0 mov %edx,%eax
114af9: 8d 65 f4 lea -0xc(%ebp),%esp
114afc: 5b pop %ebx
114afd: 5e pop %esi
114afe: 5f pop %edi
114aff: c9 leave
114b00: c3 ret
001141ae <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
1141ae: 55 push %ebp
1141af: 89 e5 mov %esp,%ebp
1141b1: 57 push %edi
1141b2: 56 push %esi
1141b3: 53 push %ebx
1141b4: 83 ec 1c sub $0x1c,%esp
1141b7: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Perform internal consistency checks
*/
assert( the_jnode );
1141ba: 85 db test %ebx,%ebx
1141bc: 75 11 jne 1141cf <IMFS_memfile_remove+0x21><== ALWAYS TAKEN
1141be: 68 2c 39 12 00 push $0x12392c <== NOT EXECUTED
1141c3: 68 80 3a 12 00 push $0x123a80 <== NOT EXECUTED
1141c8: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED
1141cd: eb 15 jmp 1141e4 <IMFS_memfile_remove+0x36><== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
1141cf: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx)
1141d3: 74 19 je 1141ee <IMFS_memfile_remove+0x40><== ALWAYS TAKEN
1141d5: 68 7c 39 12 00 push $0x12397c <== NOT EXECUTED
1141da: 68 80 3a 12 00 push $0x123a80 <== NOT EXECUTED
1141df: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED
1141e4: 68 36 39 12 00 push $0x123936 <== NOT EXECUTED
1141e9: e8 9e 3e ff ff call 10808c <__assert_func> <== NOT EXECUTED
/*
* 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;
1141ee: 8b 35 b8 8d 12 00 mov 0x128db8,%esi
1141f4: c1 ee 02 shr $0x2,%esi
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
1141f7: 83 7b 58 00 cmpl $0x0,0x58(%ebx)
1141fb: 74 0f je 11420c <IMFS_memfile_remove+0x5e>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
1141fd: 57 push %edi
1141fe: 57 push %edi
1141ff: 56 push %esi
114200: 8d 43 58 lea 0x58(%ebx),%eax
114203: 50 push %eax
114204: e8 f0 fe ff ff call 1140f9 <memfile_free_blocks_in_table>
114209: 83 c4 10 add $0x10,%esp
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
11420c: 31 ff xor %edi,%edi
11420e: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx)
114212: 75 21 jne 114235 <IMFS_memfile_remove+0x87><== NEVER TAKEN
114214: eb 3a jmp 114250 <IMFS_memfile_remove+0xa2>
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
114216: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED
114219: 8d 14 bd 00 00 00 00 lea 0x0(,%edi,4),%edx <== NOT EXECUTED
114220: 83 3c b8 00 cmpl $0x0,(%eax,%edi,4) <== NOT EXECUTED
114224: 74 0e je 114234 <IMFS_memfile_remove+0x86><== NOT EXECUTED
memfile_free_blocks_in_table(
114226: 51 push %ecx <== NOT EXECUTED
114227: 51 push %ecx <== NOT EXECUTED
114228: 56 push %esi <== NOT EXECUTED
114229: 01 d0 add %edx,%eax <== NOT EXECUTED
11422b: 50 push %eax <== NOT EXECUTED
11422c: e8 c8 fe ff ff call 1140f9 <memfile_free_blocks_in_table><== NOT EXECUTED
114231: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
114234: 47 inc %edi <== NOT EXECUTED
114235: a1 b8 8d 12 00 mov 0x128db8,%eax <== NOT EXECUTED
11423a: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED
11423d: 39 c7 cmp %eax,%edi <== NOT EXECUTED
11423f: 72 d5 jb 114216 <IMFS_memfile_remove+0x68><== NOT EXECUTED
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 );
114241: 57 push %edi <== NOT EXECUTED
114242: 57 push %edi <== NOT EXECUTED
114243: 56 push %esi <== NOT EXECUTED
114244: 8d 43 5c lea 0x5c(%ebx),%eax <== NOT EXECUTED
114247: 50 push %eax <== NOT EXECUTED
114248: e8 ac fe ff ff call 1140f9 <memfile_free_blocks_in_table><== NOT EXECUTED
11424d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
114250: 31 ff xor %edi,%edi
114252: 83 7b 60 00 cmpl $0x0,0x60(%ebx)
114256: 75 5b jne 1142b3 <IMFS_memfile_remove+0x105><== NEVER TAKEN
114258: eb 74 jmp 1142ce <IMFS_memfile_remove+0x120>
11425a: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED
114261: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
114264: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
114267: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
11426a: 85 c0 test %eax,%eax <== NOT EXECUTED
11426c: 74 51 je 1142bf <IMFS_memfile_remove+0x111><== NOT EXECUTED
11426e: 31 d2 xor %edx,%edx <== NOT EXECUTED
114270: eb 21 jmp 114293 <IMFS_memfile_remove+0xe5><== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
114272: 83 38 00 cmpl $0x0,(%eax) <== NOT EXECUTED
114275: 74 18 je 11428f <IMFS_memfile_remove+0xe1><== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
114277: 51 push %ecx <== NOT EXECUTED
114278: 51 push %ecx <== NOT EXECUTED
114279: 56 push %esi <== NOT EXECUTED
11427a: 50 push %eax <== NOT EXECUTED
11427b: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
11427e: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
114281: e8 73 fe ff ff call 1140f9 <memfile_free_blocks_in_table><== NOT EXECUTED
114286: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
114289: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
11428c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
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++ ) {
11428f: 42 inc %edx <== NOT EXECUTED
114290: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
114293: 8b 0d b8 8d 12 00 mov 0x128db8,%ecx <== NOT EXECUTED
114299: c1 e9 02 shr $0x2,%ecx <== NOT EXECUTED
11429c: 39 ca cmp %ecx,%edx <== NOT EXECUTED
11429e: 72 d2 jb 114272 <IMFS_memfile_remove+0xc4><== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
1142a0: 52 push %edx <== NOT EXECUTED
1142a1: 52 push %edx <== NOT EXECUTED
1142a2: 56 push %esi <== NOT EXECUTED
1142a3: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
1142a6: 03 43 60 add 0x60(%ebx),%eax <== NOT EXECUTED
1142a9: 50 push %eax <== NOT EXECUTED
1142aa: e8 4a fe ff ff call 1140f9 <memfile_free_blocks_in_table><== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
1142af: 47 inc %edi <== NOT EXECUTED
1142b0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1142b3: a1 b8 8d 12 00 mov 0x128db8,%eax <== NOT EXECUTED
1142b8: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED
1142bb: 39 c7 cmp %eax,%edi <== NOT EXECUTED
1142bd: 72 9b jb 11425a <IMFS_memfile_remove+0xac><== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
1142bf: 50 push %eax <== NOT EXECUTED
1142c0: 50 push %eax <== NOT EXECUTED
1142c1: 56 push %esi <== NOT EXECUTED
1142c2: 83 c3 60 add $0x60,%ebx <== NOT EXECUTED
1142c5: 53 push %ebx <== NOT EXECUTED
1142c6: e8 2e fe ff ff call 1140f9 <memfile_free_blocks_in_table><== NOT EXECUTED
1142cb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
1142ce: 31 c0 xor %eax,%eax
1142d0: 8d 65 f4 lea -0xc(%ebp),%esp
1142d3: 5b pop %ebx
1142d4: 5e pop %esi
1142d5: 5f pop %edi
1142d6: c9 leave
1142d7: c3 ret
00114163 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
114163: 55 push %ebp <== NOT EXECUTED
114164: 89 e5 mov %esp,%ebp <== NOT EXECUTED
114166: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
114169: 6a 00 push $0x0 <== NOT EXECUTED
11416b: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
11416e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
114171: e8 fc fd ff ff call 113f72 <IMFS_memfile_get_block_pointer><== NOT EXECUTED
assert( block_ptr );
114176: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
114179: 85 c0 test %eax,%eax <== NOT EXECUTED
11417b: 75 19 jne 114196 <IMFS_memfile_remove_block+0x33><== NOT EXECUTED
11417d: 68 ac 39 12 00 push $0x1239ac <== NOT EXECUTED
114182: 68 b4 3a 12 00 push $0x123ab4 <== NOT EXECUTED
114187: 68 96 01 00 00 push $0x196 <== NOT EXECUTED
11418c: 68 36 39 12 00 push $0x123936 <== NOT EXECUTED
114191: e8 f6 3e ff ff call 10808c <__assert_func> <== NOT EXECUTED
if ( block_ptr ) {
ptr = *block_ptr;
114196: 8b 10 mov (%eax),%edx <== NOT EXECUTED
*block_ptr = 0;
114198: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
memfile_free_block( ptr );
11419e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1141a1: 52 push %edx <== NOT EXECUTED
1141a2: e8 90 fd ff ff call 113f37 <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
1141a7: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
1141ac: c9 leave <== NOT EXECUTED
1141ad: c3 ret <== NOT EXECUTED
001145f6 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
1145f6: 55 push %ebp
1145f7: 89 e5 mov %esp,%ebp
1145f9: 57 push %edi
1145fa: 56 push %esi
1145fb: 53 push %ebx
1145fc: 83 ec 3c sub $0x3c,%esp
1145ff: 8b 75 0c mov 0xc(%ebp),%esi
114602: 8b 7d 10 mov 0x10(%ebp),%edi
/*
* Perform internal consistency checks
*/
assert( the_jnode );
114605: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
114609: 75 11 jne 11461c <IMFS_memfile_write+0x26><== ALWAYS TAKEN
11460b: 68 2c 39 12 00 push $0x12392c <== NOT EXECUTED
114610: 68 58 3a 12 00 push $0x123a58 <== NOT EXECUTED
114615: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED
11461a: eb 18 jmp 114634 <IMFS_memfile_write+0x3e><== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
11461c: 8b 45 08 mov 0x8(%ebp),%eax
11461f: 83 78 4c 05 cmpl $0x5,0x4c(%eax)
114623: 74 19 je 11463e <IMFS_memfile_write+0x48><== ALWAYS TAKEN
114625: 68 7c 39 12 00 push $0x12397c <== NOT EXECUTED
11462a: 68 58 3a 12 00 push $0x123a58 <== NOT EXECUTED
11462f: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED
114634: 68 36 39 12 00 push $0x123936 <== NOT EXECUTED
114639: e8 4e 3a ff ff call 10808c <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
11463e: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
114642: 75 11 jne 114655 <IMFS_memfile_write+0x5f><== ALWAYS TAKEN
114644: 68 b6 39 12 00 push $0x1239b6 <== NOT EXECUTED
114649: 68 58 3a 12 00 push $0x123a58 <== NOT EXECUTED
11464e: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED
114653: eb df jmp 114634 <IMFS_memfile_write+0x3e><== NOT EXECUTED
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
114655: 83 7d 18 00 cmpl $0x0,0x18(%ebp)
114659: 75 0d jne 114668 <IMFS_memfile_write+0x72><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
11465b: e8 08 16 00 00 call 115c68 <__errno> <== NOT EXECUTED
114660: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
114666: eb 33 jmp 11469b <IMFS_memfile_write+0xa5><== NOT EXECUTED
* 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 + length;
if ( last_byte > the_jnode->info.file.size ) {
114668: 8b 45 18 mov 0x18(%ebp),%eax
11466b: 01 f0 add %esi,%eax
11466d: 31 d2 xor %edx,%edx
11466f: 8b 4d 08 mov 0x8(%ebp),%ecx
114672: 3b 51 54 cmp 0x54(%ecx),%edx
114675: 7c 2c jl 1146a3 <IMFS_memfile_write+0xad><== NEVER TAKEN
114677: 7f 05 jg 11467e <IMFS_memfile_write+0x88><== NEVER TAKEN
114679: 3b 41 50 cmp 0x50(%ecx),%eax
11467c: 76 25 jbe 1146a3 <IMFS_memfile_write+0xad><== NEVER TAKEN
status = IMFS_memfile_extend( the_jnode, last_byte );
11467e: 51 push %ecx
11467f: 52 push %edx
114680: 50 push %eax
114681: ff 75 08 pushl 0x8(%ebp)
114684: e8 8a fd ff ff call 114413 <IMFS_memfile_extend>
if ( status )
114689: 83 c4 10 add $0x10,%esp
11468c: 85 c0 test %eax,%eax
11468e: 74 13 je 1146a3 <IMFS_memfile_write+0xad><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
114690: e8 d3 15 00 00 call 115c68 <__errno> <== NOT EXECUTED
114695: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
11469b: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
11469e: e9 3b 01 00 00 jmp 1147de <IMFS_memfile_write+0x1e8><== NOT EXECUTED
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
1146a3: a1 b8 8d 12 00 mov 0x128db8,%eax
1146a8: 89 45 c8 mov %eax,-0x38(%ebp)
1146ab: 99 cltd
1146ac: 89 d3 mov %edx,%ebx
1146ae: 52 push %edx
1146af: 50 push %eax
1146b0: 57 push %edi
1146b1: 56 push %esi
1146b2: 89 45 c4 mov %eax,-0x3c(%ebp)
1146b5: e8 32 c7 00 00 call 120dec <__moddi3>
1146ba: 83 c4 10 add $0x10,%esp
1146bd: 89 45 cc mov %eax,-0x34(%ebp)
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
1146c0: 8b 4d c4 mov -0x3c(%ebp),%ecx
1146c3: 53 push %ebx
1146c4: 51 push %ecx
1146c5: 57 push %edi
1146c6: 56 push %esi
1146c7: e8 d0 c5 00 00 call 120c9c <__divdi3>
1146cc: 83 c4 10 add $0x10,%esp
1146cf: 89 45 d0 mov %eax,-0x30(%ebp)
if ( start_offset ) {
1146d2: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
1146d6: 75 0d jne 1146e5 <IMFS_memfile_write+0xef>
1146d8: 8b 75 14 mov 0x14(%ebp),%esi
1146db: 8b 55 18 mov 0x18(%ebp),%edx
1146de: 89 55 d4 mov %edx,-0x2c(%ebp)
1146e1: 31 db xor %ebx,%ebx
1146e3: eb 52 jmp 114737 <IMFS_memfile_write+0x141>
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 );
1146e5: 50 push %eax
1146e6: 6a 00 push $0x0
1146e8: ff 75 d0 pushl -0x30(%ebp)
1146eb: ff 75 08 pushl 0x8(%ebp)
1146ee: e8 7f f8 ff ff call 113f72 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
1146f3: 83 c4 10 add $0x10,%esp
1146f6: 85 c0 test %eax,%eax
1146f8: 75 14 jne 11470e <IMFS_memfile_write+0x118><== ALWAYS TAKEN
1146fa: 68 ac 39 12 00 push $0x1239ac <== NOT EXECUTED
1146ff: 68 58 3a 12 00 push $0x123a58 <== NOT EXECUTED
114704: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED
114709: e9 26 ff ff ff jmp 114634 <IMFS_memfile_write+0x3e><== NOT EXECUTED
*/
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;
11470e: 8b 55 c8 mov -0x38(%ebp),%edx
114711: 2b 55 cc sub -0x34(%ebp),%edx
114714: 3b 55 18 cmp 0x18(%ebp),%edx
114717: 76 03 jbe 11471c <IMFS_memfile_write+0x126>
114719: 8b 55 18 mov 0x18(%ebp),%edx
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
11471c: 8b 00 mov (%eax),%eax
11471e: 03 45 cc add -0x34(%ebp),%eax
src += to_copy;
114721: 89 c7 mov %eax,%edi
114723: 8b 75 14 mov 0x14(%ebp),%esi
114726: 89 d1 mov %edx,%ecx
114728: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
11472a: ff 45 d0 incl -0x30(%ebp)
my_length -= to_copy;
11472d: 8b 4d 18 mov 0x18(%ebp),%ecx
114730: 29 d1 sub %edx,%ecx
114732: 89 4d d4 mov %ecx,-0x2c(%ebp)
copied += to_copy;
114735: 89 d3 mov %edx,%ebx
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
114737: 8b 15 b8 8d 12 00 mov 0x128db8,%edx
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
11473d: eb 3f jmp 11477e <IMFS_memfile_write+0x188>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
11473f: 57 push %edi
114740: 6a 00 push $0x0
114742: ff 75 d0 pushl -0x30(%ebp)
114745: ff 75 08 pushl 0x8(%ebp)
114748: 89 55 c4 mov %edx,-0x3c(%ebp)
11474b: e8 22 f8 ff ff call 113f72 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
114750: 83 c4 10 add $0x10,%esp
114753: 85 c0 test %eax,%eax
114755: 8b 55 c4 mov -0x3c(%ebp),%edx
114758: 75 14 jne 11476e <IMFS_memfile_write+0x178><== ALWAYS TAKEN
11475a: 68 ac 39 12 00 push $0x1239ac <== NOT EXECUTED
11475f: 68 58 3a 12 00 push $0x123a58 <== NOT EXECUTED
114764: 68 30 03 00 00 push $0x330 <== NOT EXECUTED
114769: e9 c6 fe ff ff jmp 114634 <IMFS_memfile_write+0x3e><== NOT EXECUTED
if ( !block_ptr )
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 );
11476e: 8b 00 mov (%eax),%eax
src += to_copy;
114770: 89 c7 mov %eax,%edi
114772: 89 d1 mov %edx,%ecx
114774: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
114776: ff 45 d0 incl -0x30(%ebp)
my_length -= to_copy;
114779: 29 55 d4 sub %edx,-0x2c(%ebp)
*
* 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(
11477c: 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 ) {
11477e: 8b 45 d4 mov -0x2c(%ebp),%eax
114781: 3b 05 b8 8d 12 00 cmp 0x128db8,%eax
114787: 73 b6 jae 11473f <IMFS_memfile_write+0x149>
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
114789: 85 c0 test %eax,%eax
11478b: 74 35 je 1147c2 <IMFS_memfile_write+0x1cc>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
11478d: 51 push %ecx
11478e: 6a 00 push $0x0
114790: ff 75 d0 pushl -0x30(%ebp)
114793: ff 75 08 pushl 0x8(%ebp)
114796: e8 d7 f7 ff ff call 113f72 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
11479b: 83 c4 10 add $0x10,%esp
11479e: 85 c0 test %eax,%eax
1147a0: 75 14 jne 1147b6 <IMFS_memfile_write+0x1c0><== ALWAYS TAKEN
1147a2: 68 ac 39 12 00 push $0x1239ac <== NOT EXECUTED
1147a7: 68 58 3a 12 00 push $0x123a58 <== NOT EXECUTED
1147ac: 68 46 03 00 00 push $0x346 <== NOT EXECUTED
1147b1: e9 7e fe ff ff jmp 114634 <IMFS_memfile_write+0x3e><== NOT EXECUTED
if ( !block_ptr )
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 );
1147b6: 8b 00 mov (%eax),%eax
1147b8: 89 c7 mov %eax,%edi
1147ba: 8b 4d d4 mov -0x2c(%ebp),%ecx
1147bd: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
my_length = 0;
copied += to_copy;
1147bf: 03 5d d4 add -0x2c(%ebp),%ebx
}
IMFS_mtime_ctime_update( the_jnode );
1147c2: 52 push %edx
1147c3: 52 push %edx
1147c4: 6a 00 push $0x0
1147c6: 8d 45 e0 lea -0x20(%ebp),%eax
1147c9: 50 push %eax
1147ca: e8 61 3c ff ff call 108430 <gettimeofday>
1147cf: 8b 45 e0 mov -0x20(%ebp),%eax
1147d2: 8b 55 08 mov 0x8(%ebp),%edx
1147d5: 89 42 44 mov %eax,0x44(%edx)
1147d8: 89 42 48 mov %eax,0x48(%edx)
return copied;
1147db: 83 c4 10 add $0x10,%esp
}
1147de: 89 d8 mov %ebx,%eax
1147e0: 8d 65 f4 lea -0xc(%ebp),%esp
1147e3: 5b pop %ebx
1147e4: 5e pop %esi
1147e5: 5f pop %edi
1147e6: c9 leave
1147e7: c3 ret
0010dae0 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
10dae0: 55 push %ebp
10dae1: 89 e5 mov %esp,%ebp
10dae3: 57 push %edi
10dae4: 56 push %esi
10dae5: 53 push %ebx
10dae6: 83 ec 4c sub $0x4c,%esp
10dae9: 8b 55 08 mov 0x8(%ebp),%edx
10daec: 8b 5d 10 mov 0x10(%ebp),%ebx
10daef: 8b 75 14 mov 0x14(%ebp),%esi
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
10daf2: 31 c0 xor %eax,%eax
10daf4: 83 c9 ff or $0xffffffff,%ecx
10daf7: 89 d7 mov %edx,%edi
10daf9: f2 ae repnz scas %es:(%edi),%al
10dafb: f7 d1 not %ecx
10dafd: 49 dec %ecx
10dafe: 8d 45 e4 lea -0x1c(%ebp),%eax
10db01: 50 push %eax
10db02: 8d 45 af lea -0x51(%ebp),%eax
10db05: 50 push %eax
10db06: 51 push %ecx
10db07: 52 push %edx
10db08: e8 6b fe ff ff call 10d978 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
10db0d: 8b 45 0c mov 0xc(%ebp),%eax
10db10: 25 00 f0 00 00 and $0xf000,%eax
10db15: 83 c4 10 add $0x10,%esp
10db18: 3d 00 40 00 00 cmp $0x4000,%eax
10db1d: 74 40 je 10db5f <IMFS_mknod+0x7f>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
10db1f: ba 05 00 00 00 mov $0x5,%edx
10db24: 3d 00 80 00 00 cmp $0x8000,%eax
10db29: 74 39 je 10db64 <IMFS_mknod+0x84>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
10db2b: 3d 00 20 00 00 cmp $0x2000,%eax
10db30: 74 07 je 10db39 <IMFS_mknod+0x59>
10db32: 3d 00 60 00 00 cmp $0x6000,%eax
10db37: 75 0d jne 10db46 <IMFS_mknod+0x66>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
10db39: 89 5d d0 mov %ebx,-0x30(%ebp)
10db3c: 89 75 d4 mov %esi,-0x2c(%ebp)
10db3f: ba 02 00 00 00 mov $0x2,%edx
10db44: eb 1e jmp 10db64 <IMFS_mknod+0x84>
}
else if (S_ISFIFO(mode))
10db46: ba 07 00 00 00 mov $0x7,%edx
10db4b: 3d 00 10 00 00 cmp $0x1000,%eax
10db50: 74 12 je 10db64 <IMFS_mknod+0x84> <== ALWAYS TAKEN
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
10db52: e8 ad 38 00 00 call 111404 <__errno> <== NOT EXECUTED
10db57: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
10db5d: eb 32 jmp 10db91 <IMFS_mknod+0xb1> <== NOT EXECUTED
10db5f: ba 01 00 00 00 mov $0x1,%edx
* 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.
*/
new_node = IMFS_create_node(
10db64: 83 ec 0c sub $0xc,%esp
10db67: 8d 45 d0 lea -0x30(%ebp),%eax
10db6a: 50 push %eax
10db6b: ff 75 0c pushl 0xc(%ebp)
10db6e: 8d 45 af lea -0x51(%ebp),%eax
10db71: 50 push %eax
10db72: 52 push %edx
10db73: ff 75 18 pushl 0x18(%ebp)
10db76: e8 d7 24 00 00 call 110052 <IMFS_create_node>
10db7b: 89 c2 mov %eax,%edx
new_name,
mode,
&info
);
if ( !new_node )
10db7d: 83 c4 20 add $0x20,%esp
10db80: 31 c0 xor %eax,%eax
10db82: 85 d2 test %edx,%edx
10db84: 75 0e jne 10db94 <IMFS_mknod+0xb4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
10db86: e8 79 38 00 00 call 111404 <__errno> <== NOT EXECUTED
10db8b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10db91: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
return 0;
}
10db94: 8d 65 f4 lea -0xc(%ebp),%esp
10db97: 5b pop %ebx
10db98: 5e pop %esi
10db99: 5f pop %edi
10db9a: c9 leave
10db9b: c3 ret
00107d10 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
107d10: 55 push %ebp
107d11: 89 e5 mov %esp,%ebp
107d13: 83 ec 08 sub $0x8,%esp
107d16: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
107d19: 8b 42 08 mov 0x8(%edx),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
107d1c: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
107d20: 74 10 je 107d32 <IMFS_mount+0x22> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
107d22: e8 41 df 00 00 call 115c68 <__errno> <== NOT EXECUTED
107d27: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
107d2d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
107d30: eb 05 jmp 107d37 <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;
107d32: 89 50 5c mov %edx,0x5c(%eax)
107d35: 31 c0 xor %eax,%eax
return 0;
}
107d37: c9 leave
107d38: c3 ret
00108d1e <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
108d1e: 55 push %ebp
108d1f: 89 e5 mov %esp,%ebp
108d21: 53 push %ebx
108d22: 83 ec 04 sub $0x4,%esp
108d25: 8b 5d 08 mov 0x8(%ebp),%ebx
assert( the_jnode );
108d28: 85 db test %ebx,%ebx
108d2a: 75 11 jne 108d3d <IMFS_print_jnode+0x1f> <== ALWAYS TAKEN
108d2c: 68 78 4c 12 00 push $0x124c78 <== NOT EXECUTED
108d31: 68 2c 4e 12 00 push $0x124e2c <== NOT EXECUTED
108d36: 6a 38 push $0x38 <== NOT EXECUTED
108d38: e9 98 00 00 00 jmp 108dd5 <IMFS_print_jnode+0xb7> <== NOT EXECUTED
fprintf(stdout, "%s", the_jnode->name );
108d3d: 50 push %eax
108d3e: 50 push %eax
108d3f: a1 40 90 12 00 mov 0x129040,%eax
108d44: ff 70 08 pushl 0x8(%eax)
108d47: 8d 43 0c lea 0xc(%ebx),%eax
108d4a: 50 push %eax
108d4b: e8 28 d2 00 00 call 115f78 <fputs>
switch( the_jnode->type ) {
108d50: 8b 43 4c mov 0x4c(%ebx),%eax
108d53: 83 c4 10 add $0x10,%esp
108d56: 8d 50 ff lea -0x1(%eax),%edx
108d59: 83 fa 06 cmp $0x6,%edx
108d5c: 0f 87 b7 00 00 00 ja 108e19 <IMFS_print_jnode+0xfb> <== NEVER TAKEN
108d62: a1 40 90 12 00 mov 0x129040,%eax
108d67: ff 24 95 fc 4d 12 00 jmp *0x124dfc(,%edx,4)
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
108d6e: 53 push %ebx
108d6f: 53 push %ebx
108d70: ff 70 08 pushl 0x8(%eax)
108d73: 6a 2f push $0x2f
108d75: e8 12 d1 00 00 call 115e8c <fputc>
108d7a: eb 2b jmp 108da7 <IMFS_print_jnode+0x89>
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
108d7c: ff 73 54 pushl 0x54(%ebx)
108d7f: ff 73 50 pushl 0x50(%ebx)
108d82: 68 cb 4c 12 00 push $0x124ccb
108d87: eb 16 jmp 108d9f <IMFS_print_jnode+0x81>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
108d89: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED
108d8c: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED
108d8f: 68 de 4c 12 00 push $0x124cde <== NOT EXECUTED
108d94: eb 09 jmp 108d9f <IMFS_print_jnode+0x81> <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
108d96: 51 push %ecx
108d97: ff 73 50 pushl 0x50(%ebx)
108d9a: 68 ed 4c 12 00 push $0x124ced
108d9f: ff 70 08 pushl 0x8(%eax)
108da2: e8 a9 d0 00 00 call 115e50 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
108da7: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
108daa: c7 45 08 11 50 12 00 movl $0x125011,0x8(%ebp)
}
108db1: 8b 5d fc mov -0x4(%ebp),%ebx
108db4: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
108db5: e9 f6 e9 00 00 jmp 1177b0 <puts>
(uint32_t)the_jnode->info.file.size );
#endif
break;
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
108dba: 52 push %edx <== NOT EXECUTED
108dbb: 52 push %edx <== NOT EXECUTED
108dbc: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
108dbf: 68 f9 4c 12 00 push $0x124cf9 <== NOT EXECUTED
108dc4: e8 af d1 00 00 call 115f78 <fputs> <== NOT EXECUTED
assert(0);
108dc9: 68 c8 44 12 00 push $0x1244c8 <== NOT EXECUTED
108dce: 68 2c 4e 12 00 push $0x124e2c <== NOT EXECUTED
108dd3: 6a 5d push $0x5d <== NOT EXECUTED
108dd5: 68 82 4c 12 00 push $0x124c82 <== NOT EXECUTED
108dda: e8 c1 07 00 00 call 1095a0 <__assert_func> <== NOT EXECUTED
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
108ddf: 53 push %ebx <== NOT EXECUTED
108de0: 53 push %ebx <== NOT EXECUTED
108de1: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
108de4: 68 f9 4c 12 00 push $0x124cf9 <== NOT EXECUTED
108de9: e8 8a d1 00 00 call 115f78 <fputs> <== NOT EXECUTED
assert(0);
108dee: 68 c8 44 12 00 push $0x1244c8 <== NOT EXECUTED
108df3: 68 2c 4e 12 00 push $0x124e2c <== NOT EXECUTED
108df8: 6a 62 push $0x62 <== NOT EXECUTED
108dfa: eb d9 jmp 108dd5 <IMFS_print_jnode+0xb7> <== NOT EXECUTED
break;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
108dfc: 51 push %ecx <== NOT EXECUTED
108dfd: 51 push %ecx <== NOT EXECUTED
108dfe: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
108e01: 68 0d 4d 12 00 push $0x124d0d <== NOT EXECUTED
108e06: e8 6d d1 00 00 call 115f78 <fputs> <== NOT EXECUTED
assert(0);
108e0b: 68 c8 44 12 00 push $0x1244c8 <== NOT EXECUTED
108e10: 68 2c 4e 12 00 push $0x124e2c <== NOT EXECUTED
108e15: 6a 67 push $0x67 <== NOT EXECUTED
108e17: eb bc jmp 108dd5 <IMFS_print_jnode+0xb7> <== NOT EXECUTED
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
108e19: 52 push %edx <== NOT EXECUTED
108e1a: 50 push %eax <== NOT EXECUTED
108e1b: 68 20 4d 12 00 push $0x124d20 <== NOT EXECUTED
108e20: a1 40 90 12 00 mov 0x129040,%eax <== NOT EXECUTED
108e25: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
108e28: e8 23 d0 00 00 call 115e50 <fprintf> <== NOT EXECUTED
assert(0);
108e2d: 68 c8 44 12 00 push $0x1244c8 <== NOT EXECUTED
108e32: 68 2c 4e 12 00 push $0x124e2c <== NOT EXECUTED
108e37: 6a 6c push $0x6c <== NOT EXECUTED
108e39: eb 9a jmp 108dd5 <IMFS_print_jnode+0xb7> <== NOT EXECUTED
00107d4c <IMFS_readlink>:
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
107d4c: 55 push %ebp
107d4d: 89 e5 mov %esp,%ebp
107d4f: 56 push %esi
107d50: 53 push %ebx
107d51: 8b 75 0c mov 0xc(%ebp),%esi
107d54: 8b 5d 10 mov 0x10(%ebp),%ebx
IMFS_jnode_t *node;
int i;
node = loc->node_access;
107d57: 8b 45 08 mov 0x8(%ebp),%eax
107d5a: 8b 10 mov (%eax),%edx
if ( node->type != IMFS_SYM_LINK )
107d5c: 31 c0 xor %eax,%eax
107d5e: 83 7a 4c 04 cmpl $0x4,0x4c(%edx)
107d62: 74 14 je 107d78 <IMFS_readlink+0x2c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
107d64: e8 ff de 00 00 call 115c68 <__errno> <== NOT EXECUTED
107d69: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107d6f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
107d72: eb 12 jmp 107d86 <IMFS_readlink+0x3a> <== NOT EXECUTED
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
buf[i] = node->info.sym_link.name[i];
107d74: 88 0c 06 mov %cl,(%esi,%eax,1)
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
107d77: 40 inc %eax
107d78: 39 d8 cmp %ebx,%eax
107d7a: 73 0a jae 107d86 <IMFS_readlink+0x3a>
107d7c: 8b 4a 50 mov 0x50(%edx),%ecx
107d7f: 8a 0c 01 mov (%ecx,%eax,1),%cl
107d82: 84 c9 test %cl,%cl
107d84: 75 ee jne 107d74 <IMFS_readlink+0x28>
buf[i] = node->info.sym_link.name[i];
return i;
}
107d86: 5b pop %ebx
107d87: 5e pop %esi
107d88: c9 leave
107d89: c3 ret
00107d8c <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 */
)
{
107d8c: 55 push %ebp
107d8d: 89 e5 mov %esp,%ebp
107d8f: 53 push %ebx
107d90: 83 ec 18 sub $0x18,%esp
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
107d93: 8b 45 0c mov 0xc(%ebp),%eax
107d96: 8b 18 mov (%eax),%ebx
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
107d98: 6a 20 push $0x20
107d9a: ff 75 14 pushl 0x14(%ebp)
107d9d: 8d 43 0c lea 0xc(%ebx),%eax
107da0: 50 push %eax
107da1: e8 42 eb 00 00 call 1168e8 <strncpy>
if ( the_jnode->Parent != NULL )
107da6: 83 c4 10 add $0x10,%esp
107da9: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
107dad: 74 0c je 107dbb <IMFS_rename+0x2f> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
107daf: 83 ec 0c sub $0xc,%esp
107db2: 53 push %ebx
107db3: e8 04 41 00 00 call 10bebc <_Chain_Extract>
107db8: 83 c4 10 add $0x10,%esp
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
107dbb: 8b 45 10 mov 0x10(%ebp),%eax
107dbe: 8b 00 mov (%eax),%eax
the_jnode->Parent = new_parent;
107dc0: 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 );
107dc3: 51 push %ecx
107dc4: 51 push %ecx
107dc5: 53 push %ebx
107dc6: 83 c0 50 add $0x50,%eax
107dc9: 50 push %eax
107dca: e8 c9 40 00 00 call 10be98 <_Chain_Append>
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
107dcf: 58 pop %eax
107dd0: 5a pop %edx
107dd1: 6a 00 push $0x0
107dd3: 8d 45 f0 lea -0x10(%ebp),%eax
107dd6: 50 push %eax
107dd7: e8 54 06 00 00 call 108430 <gettimeofday>
107ddc: 8b 45 f0 mov -0x10(%ebp),%eax
107ddf: 89 43 48 mov %eax,0x48(%ebx)
return 0;
}
107de2: 31 c0 xor %eax,%eax
107de4: 8b 5d fc mov -0x4(%ebp),%ebx
107de7: c9 leave
107de8: c3 ret
0010dbac <IMFS_rmnod>:
int IMFS_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
10dbac: 55 push %ebp
10dbad: 89 e5 mov %esp,%ebp
10dbaf: 56 push %esi
10dbb0: 53 push %ebx
10dbb1: 83 ec 10 sub $0x10,%esp
10dbb4: 8b 75 0c mov 0xc(%ebp),%esi
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
10dbb7: 8b 1e mov (%esi),%ebx
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
10dbb9: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10dbbd: 74 13 je 10dbd2 <IMFS_rmnod+0x26> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10dbbf: 83 ec 0c sub $0xc,%esp
10dbc2: 53 push %ebx
10dbc3: e8 04 10 00 00 call 10ebcc <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
10dbc8: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10dbcf: 83 c4 10 add $0x10,%esp
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
10dbd2: 66 ff 4b 34 decw 0x34(%ebx)
IMFS_update_ctime( the_jnode );
10dbd6: 50 push %eax
10dbd7: 50 push %eax
10dbd8: 6a 00 push $0x0
10dbda: 8d 45 f0 lea -0x10(%ebp),%eax
10dbdd: 50 push %eax
10dbde: e8 9d 02 00 00 call 10de80 <gettimeofday>
10dbe3: 8b 45 f0 mov -0x10(%ebp),%eax
10dbe6: 89 43 48 mov %eax,0x48(%ebx)
/*
* The file cannot be open and the link must be less than 1 to free.
*/
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
10dbe9: 89 1c 24 mov %ebx,(%esp)
10dbec: e8 41 03 00 00 call 10df32 <rtems_libio_is_file_open>
10dbf1: 83 c4 10 add $0x10,%esp
10dbf4: 85 c0 test %eax,%eax
10dbf6: 75 3f jne 10dc37 <IMFS_rmnod+0x8b> <== NEVER TAKEN
10dbf8: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx)
10dbfd: 75 38 jne 10dc37 <IMFS_rmnod+0x8b> <== NEVER TAKEN
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
10dbff: a1 48 1f 12 00 mov 0x121f48,%eax
10dc04: 8b 50 04 mov 0x4(%eax),%edx
10dc07: 3b 16 cmp (%esi),%edx
10dc09: 75 07 jne 10dc12 <IMFS_rmnod+0x66> <== ALWAYS TAKEN
rtems_filesystem_current.node_access = NULL;
10dc0b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
10dc12: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx)
10dc16: 75 13 jne 10dc2b <IMFS_rmnod+0x7f>
if ( the_jnode->info.sym_link.name )
10dc18: 8b 43 50 mov 0x50(%ebx),%eax
10dc1b: 85 c0 test %eax,%eax
10dc1d: 74 0c je 10dc2b <IMFS_rmnod+0x7f> <== NEVER TAKEN
free( (void*) the_jnode->info.sym_link.name );
10dc1f: 83 ec 0c sub $0xc,%esp
10dc22: 50 push %eax
10dc23: e8 c8 95 ff ff call 1071f0 <free>
10dc28: 83 c4 10 add $0x10,%esp
}
free( the_jnode );
10dc2b: 83 ec 0c sub $0xc,%esp
10dc2e: 53 push %ebx
10dc2f: e8 bc 95 ff ff call 1071f0 <free>
10dc34: 83 c4 10 add $0x10,%esp
}
return 0;
}
10dc37: 31 c0 xor %eax,%eax
10dc39: 8d 65 f8 lea -0x8(%ebp),%esp
10dc3c: 5b pop %ebx
10dc3d: 5e pop %esi
10dc3e: c9 leave
10dc3f: c3 ret
0010dc40 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
10dc40: 55 push %ebp
10dc41: 89 e5 mov %esp,%ebp
10dc43: 56 push %esi
10dc44: 53 push %ebx
10dc45: 8b 4d 08 mov 0x8(%ebp),%ecx
10dc48: 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;
10dc4b: 8b 11 mov (%ecx),%edx
switch ( the_jnode->type ) {
10dc4d: 8b 5a 4c mov 0x4c(%edx),%ebx
10dc50: 83 eb 02 sub $0x2,%ebx
10dc53: 83 fb 05 cmp $0x5,%ebx
10dc56: 77 33 ja 10dc8b <IMFS_stat+0x4b> <== NEVER TAKEN
10dc58: ff 24 9d 9c eb 11 00 jmp *0x11eb9c(,%ebx,4)
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
10dc5f: 8b 5a 54 mov 0x54(%edx),%ebx
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
10dc62: 8b 72 50 mov 0x50(%edx),%esi
10dc65: 89 70 18 mov %esi,0x18(%eax)
10dc68: 89 58 1c mov %ebx,0x1c(%eax)
break;
10dc6b: eb 2e jmp 10dc9b <IMFS_stat+0x5b>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
10dc6d: 8b 5a 50 mov 0x50(%edx),%ebx
10dc70: 8b 72 54 mov 0x54(%edx),%esi
10dc73: 89 58 20 mov %ebx,0x20(%eax)
10dc76: 89 70 24 mov %esi,0x24(%eax)
break;
10dc79: eb 20 jmp 10dc9b <IMFS_stat+0x5b>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
10dc7b: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED
10dc82: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) <== NOT EXECUTED
break;
10dc89: eb 10 jmp 10dc9b <IMFS_stat+0x5b> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
10dc8b: e8 74 37 00 00 call 111404 <__errno> <== NOT EXECUTED
10dc90: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10dc96: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10dc99: eb 47 jmp 10dce2 <IMFS_stat+0xa2> <== NOT EXECUTED
* 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 =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
10dc9b: 8b 49 10 mov 0x10(%ecx),%ecx
10dc9e: 8b 49 34 mov 0x34(%ecx),%ecx
10dca1: 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 =
10dca3: c7 00 fe ff 00 00 movl $0xfffe,(%eax)
10dca9: 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;
10dcac: 8b 4a 30 mov 0x30(%edx),%ecx
10dcaf: 89 48 0c mov %ecx,0xc(%eax)
buf->st_nlink = the_jnode->st_nlink;
10dcb2: 8b 4a 34 mov 0x34(%edx),%ecx
10dcb5: 66 89 48 10 mov %cx,0x10(%eax)
buf->st_ino = the_jnode->st_ino;
10dcb9: 8b 4a 38 mov 0x38(%edx),%ecx
10dcbc: 89 48 08 mov %ecx,0x8(%eax)
buf->st_uid = the_jnode->st_uid;
10dcbf: 8b 4a 3c mov 0x3c(%edx),%ecx
10dcc2: 66 89 48 12 mov %cx,0x12(%eax)
buf->st_gid = the_jnode->st_gid;
10dcc6: 66 8b 4a 3e mov 0x3e(%edx),%cx
10dcca: 66 89 48 14 mov %cx,0x14(%eax)
buf->st_atime = the_jnode->stat_atime;
10dcce: 8b 4a 40 mov 0x40(%edx),%ecx
10dcd1: 89 48 28 mov %ecx,0x28(%eax)
buf->st_mtime = the_jnode->stat_mtime;
10dcd4: 8b 4a 44 mov 0x44(%edx),%ecx
10dcd7: 89 48 30 mov %ecx,0x30(%eax)
buf->st_ctime = the_jnode->stat_ctime;
10dcda: 8b 52 48 mov 0x48(%edx),%edx
10dcdd: 89 50 38 mov %edx,0x38(%eax)
10dce0: 31 c0 xor %eax,%eax
return 0;
}
10dce2: 5b pop %ebx
10dce3: 5e pop %esi
10dce4: c9 leave
10dce5: c3 ret
00107dec <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
107dec: 55 push %ebp
107ded: 89 e5 mov %esp,%ebp
107def: 57 push %edi
107df0: 53 push %ebx
107df1: 83 ec 40 sub $0x40,%esp
107df4: 8b 55 10 mov 0x10(%ebp),%edx
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
107df7: 31 c0 xor %eax,%eax
107df9: 83 c9 ff or $0xffffffff,%ecx
107dfc: 89 d7 mov %edx,%edi
107dfe: f2 ae repnz scas %es:(%edi),%al
107e00: f7 d1 not %ecx
107e02: 49 dec %ecx
107e03: 8d 45 f4 lea -0xc(%ebp),%eax
107e06: 50 push %eax
107e07: 8d 5d bf lea -0x41(%ebp),%ebx
107e0a: 53 push %ebx
107e0b: 51 push %ecx
107e0c: 52 push %edx
107e0d: e8 fa a0 00 00 call 111f0c <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
107e12: 58 pop %eax
107e13: ff 75 0c pushl 0xc(%ebp)
107e16: e8 79 e9 00 00 call 116794 <strdup>
107e1b: 89 45 e0 mov %eax,-0x20(%ebp)
if (info.sym_link.name == NULL) {
107e1e: 83 c4 10 add $0x10,%esp
107e21: 85 c0 test %eax,%eax
107e23: 75 10 jne 107e35 <IMFS_symlink+0x49> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENOMEM);
107e25: e8 3e de 00 00 call 115c68 <__errno> <== NOT EXECUTED
107e2a: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107e30: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
107e33: eb 3e jmp 107e73 <IMFS_symlink+0x87> <== NOT EXECUTED
* 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.
*/
new_node = IMFS_create_node(
107e35: 83 ec 0c sub $0xc,%esp
107e38: 8d 45 e0 lea -0x20(%ebp),%eax
107e3b: 50 push %eax
107e3c: 68 ff a1 00 00 push $0xa1ff
107e41: 53 push %ebx
107e42: 6a 04 push $0x4
107e44: ff 75 08 pushl 0x8(%ebp)
107e47: e8 ba 96 00 00 call 111506 <IMFS_create_node>
107e4c: 89 c2 mov %eax,%edx
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
107e4e: 83 c4 20 add $0x20,%esp
107e51: 31 c0 xor %eax,%eax
107e53: 85 d2 test %edx,%edx
107e55: 75 1c jne 107e73 <IMFS_symlink+0x87> <== ALWAYS TAKEN
free(info.sym_link.name);
107e57: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107e5a: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
107e5d: e8 56 05 00 00 call 1083b8 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
107e62: e8 01 de 00 00 call 115c68 <__errno> <== NOT EXECUTED
107e67: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107e6d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
107e70: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
107e73: 8d 65 f8 lea -0x8(%ebp),%esp
107e76: 5b pop %ebx
107e77: 5f pop %edi
107e78: c9 leave
107e79: c3 ret
00107e7c <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
107e7c: 55 push %ebp
107e7d: 89 e5 mov %esp,%ebp
107e7f: 57 push %edi
107e80: 56 push %esi
107e81: 53 push %ebx
107e82: 83 ec 2c sub $0x2c,%esp
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
107e85: 8b 45 0c mov 0xc(%ebp),%eax
107e88: 8b 18 mov (%eax),%ebx
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
107e8a: 83 7b 4c 03 cmpl $0x3,0x4c(%ebx)
107e8e: 75 7a jne 107f0a <IMFS_unlink+0x8e>
if ( !node->info.hard_link.link_node )
107e90: 8b 43 50 mov 0x50(%ebx),%eax
107e93: 85 c0 test %eax,%eax
107e95: 75 10 jne 107ea7 <IMFS_unlink+0x2b> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
107e97: e8 cc dd 00 00 call 115c68 <__errno> <== NOT EXECUTED
107e9c: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107ea2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
107ea5: eb 75 jmp 107f1c <IMFS_unlink+0xa0> <== NOT EXECUTED
the_link = *loc;
107ea7: 8d 7d cc lea -0x34(%ebp),%edi
107eaa: b9 05 00 00 00 mov $0x5,%ecx
107eaf: 8b 75 0c mov 0xc(%ebp),%esi
107eb2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_link.node_access = node->info.hard_link.link_node;
107eb4: 89 45 cc mov %eax,-0x34(%ebp)
IMFS_Set_handlers( &the_link );
107eb7: 83 ec 0c sub $0xc,%esp
107eba: 8d 75 cc lea -0x34(%ebp),%esi
107ebd: 56 push %esi
107ebe: e8 45 97 00 00 call 111608 <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)
107ec3: 8b 43 50 mov 0x50(%ebx),%eax
107ec6: 8b 50 34 mov 0x34(%eax),%edx
107ec9: 83 c4 10 add $0x10,%esp
107ecc: 66 83 fa 01 cmp $0x1,%dx
107ed0: 75 1a jne 107eec <IMFS_unlink+0x70>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
107ed2: 51 push %ecx
107ed3: 51 push %ecx
107ed4: 56 push %esi
107ed5: ff 75 08 pushl 0x8(%ebp)
107ed8: 8b 45 d4 mov -0x2c(%ebp),%eax
107edb: ff 50 34 call *0x34(%eax)
107ede: 89 c2 mov %eax,%edx
if ( result != 0 )
107ee0: 83 c4 10 add $0x10,%esp
107ee3: 83 c8 ff or $0xffffffff,%eax
107ee6: 85 d2 test %edx,%edx
107ee8: 74 20 je 107f0a <IMFS_unlink+0x8e>
107eea: eb 30 jmp 107f1c <IMFS_unlink+0xa0>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
107eec: 4a dec %edx
107eed: 66 89 50 34 mov %dx,0x34(%eax)
IMFS_update_ctime( node->info.hard_link.link_node );
107ef1: 52 push %edx
107ef2: 52 push %edx
107ef3: 6a 00 push $0x0
107ef5: 8d 45 e0 lea -0x20(%ebp),%eax
107ef8: 50 push %eax
107ef9: e8 32 05 00 00 call 108430 <gettimeofday>
107efe: 8b 43 50 mov 0x50(%ebx),%eax
107f01: 8b 55 e0 mov -0x20(%ebp),%edx
107f04: 89 50 48 mov %edx,0x48(%eax)
107f07: 83 c4 10 add $0x10,%esp
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
107f0a: 50 push %eax
107f0b: 50 push %eax
107f0c: 8b 55 0c mov 0xc(%ebp),%edx
107f0f: 8b 42 08 mov 0x8(%edx),%eax
107f12: 52 push %edx
107f13: ff 75 08 pushl 0x8(%ebp)
107f16: ff 50 34 call *0x34(%eax)
return result;
107f19: 83 c4 10 add $0x10,%esp
}
107f1c: 8d 65 f4 lea -0xc(%ebp),%esp
107f1f: 5b pop %ebx
107f20: 5e pop %esi
107f21: 5f pop %edi
107f22: c9 leave
107f23: c3 ret
00107f24 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
107f24: 55 push %ebp
107f25: 89 e5 mov %esp,%ebp
107f27: 83 ec 08 sub $0x8,%esp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
107f2a: 8b 45 08 mov 0x8(%ebp),%eax
107f2d: 8b 40 08 mov 0x8(%eax),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
107f30: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
107f34: 74 0d je 107f43 <IMFS_unmount+0x1f> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
107f36: e8 2d dd 00 00 call 115c68 <__errno> <== NOT EXECUTED
107f3b: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
107f41: eb 11 jmp 107f54 <IMFS_unmount+0x30> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
107f43: 83 78 5c 00 cmpl $0x0,0x5c(%eax)
107f47: 75 10 jne 107f59 <IMFS_unmount+0x35> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
107f49: e8 1a dd 00 00 call 115c68 <__errno> <== NOT EXECUTED
107f4e: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107f54: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
107f57: eb 09 jmp 107f62 <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;
107f59: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
107f60: 31 c0 xor %eax,%eax
return 0;
}
107f62: c9 leave
107f63: c3 ret
00107374 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
107374: 55 push %ebp
107375: 89 e5 mov %esp,%ebp
107377: 57 push %edi
107378: 56 push %esi
107379: 53 push %ebx
10737a: 83 ec 0c sub $0xc,%esp
10737d: 8b 5d 08 mov 0x8(%ebp),%ebx
107380: 8b 75 0c mov 0xc(%ebp),%esi
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
107383: a1 10 25 12 00 mov 0x122510,%eax
107388: 85 c0 test %eax,%eax
10738a: 74 02 je 10738e <RTEMS_Malloc_Initialize+0x1a><== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->initialize)();
10738c: ff 10 call *(%eax) <== NOT EXECUTED
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
10738e: e8 7c ff ff ff call 10730f <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
107393: a1 14 25 12 00 mov 0x122514,%eax
107398: 85 c0 test %eax,%eax
10739a: 74 12 je 1073ae <RTEMS_Malloc_Initialize+0x3a><== ALWAYS TAKEN
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
10739c: 52 push %edx <== NOT EXECUTED
10739d: 52 push %edx <== NOT EXECUTED
10739e: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
1073a1: 53 push %ebx <== NOT EXECUTED
1073a2: ff 10 call *(%eax) <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
1073a4: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED
1073a7: 29 c6 sub %eax,%esi <== NOT EXECUTED
1073a9: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1073ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
* of the time under UNIX because zero'ing memory when it is first
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if (
1073ae: 80 3d 0d 25 12 00 00 cmpb $0x0,0x12250d
1073b5: 75 11 jne 1073c8 <RTEMS_Malloc_Initialize+0x54>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
1073b7: 80 3d 20 02 12 00 00 cmpb $0x0,0x120220
1073be: 74 08 je 1073c8 <RTEMS_Malloc_Initialize+0x54>
) {
memset( heap_begin, 0, heap_size );
1073c0: 31 c0 xor %eax,%eax
1073c2: 89 df mov %ebx,%edi
1073c4: 89 f1 mov %esi,%ecx
1073c6: f3 aa rep stos %al,%es:(%edi)
* Unfortunately we cannot use assert if this fails because if this
* has failed we do not have a heap and if we do not have a heap
* STDIO cannot work because there will be no buffers.
*/
if ( !rtems_unified_work_area ) {
1073c8: 80 3d 0d 25 12 00 00 cmpb $0x0,0x12250d
1073cf: 75 20 jne 1073f1 <RTEMS_Malloc_Initialize+0x7d>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
1073d1: 6a 04 push $0x4
1073d3: 56 push %esi
1073d4: 53 push %ebx
1073d5: ff 35 50 01 12 00 pushl 0x120150
1073db: e8 44 39 00 00 call 10ad24 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
1073e0: 83 c4 10 add $0x10,%esp
1073e3: 85 c0 test %eax,%eax
1073e5: 75 0a jne 1073f1 <RTEMS_Malloc_Initialize+0x7d><== ALWAYS TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
1073e7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1073ea: 6a 1a push $0x1a <== NOT EXECUTED
1073ec: e8 bb 31 00 00 call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
1073f1: 8b 1d b0 40 12 00 mov 0x1240b0,%ebx
1073f7: 83 ec 0c sub $0xc,%esp
1073fa: ff 35 50 01 12 00 pushl 0x120150
107400: e8 b7 43 00 00 call 10b7bc <_Protected_heap_Get_size>
107405: 8d 1c 18 lea (%eax,%ebx,1),%ebx
107408: 89 1d b0 40 12 00 mov %ebx,0x1240b0
10740e: 83 c4 10 add $0x10,%esp
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
107411: 8d 65 f4 lea -0xc(%ebp),%esp
107414: 5b pop %ebx
107415: 5e pop %esi
107416: 5f pop %edi
107417: c9 leave
107418: c3 ret
00106e0e <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
106e0e: 55 push %ebp <== NOT EXECUTED
106e0f: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106e11: 57 push %edi <== NOT EXECUTED
106e12: 56 push %esi <== NOT EXECUTED
106e13: 53 push %ebx <== NOT EXECUTED
106e14: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
106e17: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
106e1a: 85 db test %ebx,%ebx <== NOT EXECUTED
106e1c: 0f 84 fa 00 00 00 je 106f1c <Stack_check_Dump_threads_usage+0x10e><== NOT EXECUTED
return;
if ( !print_handler )
106e22: a1 90 4e 12 00 mov 0x124e90,%eax <== NOT EXECUTED
106e27: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
106e2a: 85 c0 test %eax,%eax <== NOT EXECUTED
106e2c: 0f 84 ea 00 00 00 je 106f1c <Stack_check_Dump_threads_usage+0x10e><== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
106e32: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED
106e35: 75 1d jne 106e54 <Stack_check_Dump_threads_usage+0x46><== NOT EXECUTED
if (Stack_check_Interrupt_stack.area) {
106e37: 83 3d b4 51 12 00 00 cmpl $0x0,0x1251b4 <== NOT EXECUTED
106e3e: 0f 84 d8 00 00 00 je 106f1c <Stack_check_Dump_threads_usage+0x10e><== NOT EXECUTED
106e44: be b0 51 12 00 mov $0x1251b0,%esi <== NOT EXECUTED
106e49: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED
106e50: 31 db xor %ebx,%ebx <== NOT EXECUTED
106e52: eb 0f jmp 106e63 <Stack_check_Dump_threads_usage+0x55><== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
106e54: 8d b3 c4 00 00 00 lea 0xc4(%ebx),%esi <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
106e5a: 8b 8b d8 00 00 00 mov 0xd8(%ebx),%ecx <== NOT EXECUTED
106e60: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
106e63: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED
106e66: 83 c2 10 add $0x10,%edx <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
106e69: 8b 06 mov (%esi),%eax <== NOT EXECUTED
106e6b: 83 e8 10 sub $0x10,%eax <== NOT EXECUTED
106e6e: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
106e71: 50 push %eax <== NOT EXECUTED
106e72: 52 push %edx <== NOT EXECUTED
106e73: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED
106e76: e8 6c ff ff ff call 106de7 <Stack_check_find_high_water_mark><== NOT EXECUTED
if ( high_water_mark )
106e7b: 59 pop %ecx <== NOT EXECUTED
106e7c: 5f pop %edi <== NOT EXECUTED
106e7d: 31 ff xor %edi,%edi <== NOT EXECUTED
106e7f: 85 c0 test %eax,%eax <== NOT EXECUTED
106e81: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
106e84: 74 08 je 106e8e <Stack_check_Dump_threads_usage+0x80><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
106e86: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
106e89: 8d 3c 0a lea (%edx,%ecx,1),%edi <== NOT EXECUTED
106e8c: 29 c7 sub %eax,%edi <== NOT EXECUTED
else
used = 0;
if ( the_thread ) {
106e8e: 85 db test %ebx,%ebx <== NOT EXECUTED
106e90: 74 26 je 106eb8 <Stack_check_Dump_threads_usage+0xaa><== NOT EXECUTED
(*print_handler)(
106e92: 52 push %edx <== NOT EXECUTED
106e93: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED
106e96: 50 push %eax <== NOT EXECUTED
106e97: 6a 05 push $0x5 <== NOT EXECUTED
106e99: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
106e9c: e8 ef 32 00 00 call 10a190 <rtems_object_get_name> <== NOT EXECUTED
106ea1: 50 push %eax <== NOT EXECUTED
106ea2: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
106ea5: 68 b5 ea 11 00 push $0x11eab5 <== NOT EXECUTED
106eaa: ff 35 8c 4e 12 00 pushl 0x124e8c <== NOT EXECUTED
106eb0: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED
106eb3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
106eb6: eb 14 jmp 106ecc <Stack_check_Dump_threads_usage+0xbe><== NOT EXECUTED
"0x%08" PRIx32 " %4s",
the_thread->Object.id,
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
106eb8: 50 push %eax <== NOT EXECUTED
106eb9: 6a ff push $0xffffffff <== NOT EXECUTED
106ebb: 68 c2 ea 11 00 push $0x11eac2 <== NOT EXECUTED
106ec0: ff 35 8c 4e 12 00 pushl 0x124e8c <== NOT EXECUTED
106ec6: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED
106ec9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
(*print_handler)(
106ecc: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
106ecf: 53 push %ebx <== NOT EXECUTED
106ed0: 53 push %ebx <== NOT EXECUTED
106ed1: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
106ed4: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
106ed7: 8b 16 mov (%esi),%edx <== NOT EXECUTED
106ed9: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED
106edd: 52 push %edx <== NOT EXECUTED
106ede: 50 push %eax <== NOT EXECUTED
106edf: 68 d0 ea 11 00 push $0x11ead0 <== NOT EXECUTED
106ee4: ff 35 8c 4e 12 00 pushl 0x124e8c <== NOT EXECUTED
106eea: ff 15 90 4e 12 00 call *0x124e90 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
106ef0: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
106ef3: 83 3d 88 4e 12 00 00 cmpl $0x0,0x124e88 <== NOT EXECUTED
106efa: a1 90 4e 12 00 mov 0x124e90,%eax <== NOT EXECUTED
106eff: 75 09 jne 106f0a <Stack_check_Dump_threads_usage+0xfc><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
106f01: 51 push %ecx <== NOT EXECUTED
106f02: 51 push %ecx <== NOT EXECUTED
106f03: 68 ee ea 11 00 push $0x11eaee <== NOT EXECUTED
106f08: eb 07 jmp 106f11 <Stack_check_Dump_threads_usage+0x103><== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
106f0a: 52 push %edx <== NOT EXECUTED
106f0b: 57 push %edi <== NOT EXECUTED
106f0c: 68 fb ea 11 00 push $0x11eafb <== NOT EXECUTED
106f11: ff 35 8c 4e 12 00 pushl 0x124e8c <== NOT EXECUTED
106f17: ff d0 call *%eax <== NOT EXECUTED
106f19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
106f1c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
106f1f: 5b pop %ebx <== NOT EXECUTED
106f20: 5e pop %esi <== NOT EXECUTED
106f21: 5f pop %edi <== NOT EXECUTED
106f22: c9 leave <== NOT EXECUTED
106f23: c3 ret <== NOT EXECUTED
00107121 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
107121: 55 push %ebp
107122: 89 e5 mov %esp,%ebp
107124: 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)
107125: 83 3d 88 4e 12 00 00 cmpl $0x0,0x124e88
10712c: 75 4d jne 10717b <Stack_check_Initialize+0x5a>
10712e: 31 c0 xor %eax,%eax
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
107130: 89 c2 mov %eax,%edx
107132: 83 e2 03 and $0x3,%edx
107135: 8b 14 95 34 ec 11 00 mov 0x11ec34(,%edx,4),%edx
10713c: 89 14 85 a0 51 12 00 mov %edx,0x1251a0(,%eax,4)
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
107143: 40 inc %eax
107144: 83 f8 04 cmp $0x4,%eax
107147: 75 e7 jne 107130 <Stack_check_Initialize+0xf>
/*
* 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) {
107149: 8b 15 24 53 12 00 mov 0x125324,%edx
10714f: 85 d2 test %edx,%edx
107151: 74 1e je 107171 <Stack_check_Initialize+0x50><== NEVER TAKEN
107153: 8b 0d e4 52 12 00 mov 0x1252e4,%ecx
107159: 85 c9 test %ecx,%ecx
10715b: 74 14 je 107171 <Stack_check_Initialize+0x50><== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
10715d: 89 15 b4 51 12 00 mov %edx,0x1251b4
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
107163: 29 d1 sub %edx,%ecx
107165: 89 0d b0 51 12 00 mov %ecx,0x1251b0
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
10716b: b0 a5 mov $0xa5,%al
10716d: 89 d7 mov %edx,%edi
10716f: f3 aa rep stos %al,%es:(%edi)
}
#endif
Stack_check_Initialized = 1;
107171: c7 05 88 4e 12 00 01 movl $0x1,0x124e88
107178: 00 00 00
}
10717b: 5f pop %edi
10717c: c9 leave
10717d: c3 ret
00106de7 <Stack_check_find_high_water_mark>:
*/
void *Stack_check_find_high_water_mark(
const void *s,
size_t n
)
{
106de7: 55 push %ebp <== NOT EXECUTED
106de8: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106dea: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
106ded: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
106df0: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
106df3: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED
106df6: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED
106df9: eb 0b jmp 106e06 <Stack_check_find_high_water_mark+0x1f><== NOT EXECUTED
if (*base != U32_PATTERN)
106dfb: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED
106e01: 75 09 jne 106e0c <Stack_check_find_high_water_mark+0x25><== 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++)
106e03: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
106e06: 39 d0 cmp %edx,%eax <== NOT EXECUTED
106e08: 72 f1 jb 106dfb <Stack_check_find_high_water_mark+0x14><== NOT EXECUTED
106e0a: 31 c0 xor %eax,%eax <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
106e0c: c9 leave <== NOT EXECUTED
106e0d: c3 ret <== NOT EXECUTED
00106f9c <Stack_check_report_blown_task>:
*
* NOTE: The system is in a questionable state... we may not get
* the following message out.
*/
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
106f9c: 55 push %ebp <== NOT EXECUTED
106f9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106f9f: 56 push %esi <== NOT EXECUTED
106fa0: 53 push %ebx <== NOT EXECUTED
106fa1: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
106fa4: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
106fa7: 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);
106faa: 8b b3 c8 00 00 00 mov 0xc8(%ebx),%esi <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
106fb0: 68 62 eb 11 00 push $0x11eb62 <== NOT EXECUTED
106fb5: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED
106fb8: e8 ef 11 00 00 call 1081ac <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
106fbd: 5a pop %edx <== NOT EXECUTED
106fbe: 59 pop %ecx <== NOT EXECUTED
106fbf: 53 push %ebx <== NOT EXECUTED
106fc0: 68 72 eb 11 00 push $0x11eb72 <== NOT EXECUTED
106fc5: e8 e2 11 00 00 call 1081ac <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
106fca: 59 pop %ecx <== NOT EXECUTED
106fcb: 58 pop %eax <== NOT EXECUTED
106fcc: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
106fcf: 68 8f eb 11 00 push $0x11eb8f <== NOT EXECUTED
106fd4: e8 d3 11 00 00 call 1081ac <printk> <== NOT EXECUTED
printk(
106fd9: 58 pop %eax <== NOT EXECUTED
106fda: 5a pop %edx <== NOT EXECUTED
106fdb: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
106fde: 68 a1 eb 11 00 push $0x11eba1 <== NOT EXECUTED
106fe3: e8 c4 11 00 00 call 1081ac <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
106fe8: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
106feb: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
106fee: 50 push %eax <== NOT EXECUTED
106fef: 6a 20 push $0x20 <== NOT EXECUTED
106ff1: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
106ff4: e8 97 31 00 00 call 10a190 <rtems_object_get_name> <== NOT EXECUTED
106ff9: 5a pop %edx <== NOT EXECUTED
106ffa: 59 pop %ecx <== NOT EXECUTED
106ffb: 50 push %eax <== NOT EXECUTED
106ffc: 68 b5 eb 11 00 push $0x11ebb5 <== NOT EXECUTED
107001: e8 a6 11 00 00 call 1081ac <printk> <== NOT EXECUTED
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
107006: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED
10700c: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax <== NOT EXECUTED
107012: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED
107015: 53 push %ebx <== NOT EXECUTED
107016: 51 push %ecx <== NOT EXECUTED
107017: 50 push %eax <== NOT EXECUTED
107018: 68 cb eb 11 00 push $0x11ebcb <== NOT EXECUTED
10701d: e8 8a 11 00 00 call 1081ac <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) {
107022: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
107025: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED
107028: 84 d2 test %dl,%dl <== NOT EXECUTED
10702a: 75 17 jne 107043 <Stack_check_report_blown_task+0xa7><== NOT EXECUTED
* the following message out.
*/
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);
10702c: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
10702f: 83 c6 18 add $0x18,%esi <== NOT EXECUTED
107032: 56 push %esi <== NOT EXECUTED
107033: 50 push %eax <== NOT EXECUTED
107034: 6a 10 push $0x10 <== NOT EXECUTED
107036: 68 fc eb 11 00 push $0x11ebfc <== NOT EXECUTED
10703b: e8 6c 11 00 00 call 1081ac <printk> <== NOT EXECUTED
107040: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
107043: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107046: 68 81 00 00 00 push $0x81 <== NOT EXECUTED
10704b: e8 f4 38 00 00 call 10a944 <rtems_fatal_error_occurred><== NOT EXECUTED
0010c890 <_CORE_RWLock_Obtain_for_reading>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10c890: 55 push %ebp
10c891: 89 e5 mov %esp,%ebp
10c893: 57 push %edi
10c894: 56 push %esi
10c895: 53 push %ebx
10c896: 83 ec 1c sub $0x1c,%esp
10c899: 8b 5d 08 mov 0x8(%ebp),%ebx
10c89c: 8b 4d 0c mov 0xc(%ebp),%ecx
10c89f: 8b 45 14 mov 0x14(%ebp),%eax
10c8a2: 89 45 e4 mov %eax,-0x1c(%ebp)
10c8a5: 8a 55 10 mov 0x10(%ebp),%dl
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10c8a8: 8b 35 c0 72 12 00 mov 0x1272c0,%esi
* If unlocked, then OK to read.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
10c8ae: 9c pushf
10c8af: fa cli
10c8b0: 5f pop %edi
switch ( the_rwlock->current_state ) {
10c8b1: 8b 43 44 mov 0x44(%ebx),%eax
10c8b4: 85 c0 test %eax,%eax
10c8b6: 74 05 je 10c8bd <_CORE_RWLock_Obtain_for_reading+0x2d>
10c8b8: 48 dec %eax
10c8b9: 75 3a jne 10c8f5 <_CORE_RWLock_Obtain_for_reading+0x65>
10c8bb: eb 0e jmp 10c8cb <_CORE_RWLock_Obtain_for_reading+0x3b>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10c8bd: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
the_rwlock->number_of_readers += 1;
10c8c4: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10c8c7: 57 push %edi
10c8c8: 9d popf
10c8c9: eb 21 jmp 10c8ec <_CORE_RWLock_Obtain_for_reading+0x5c>
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
return;
case CORE_RWLOCK_LOCKED_FOR_READING: {
Thread_Control *waiter;
waiter = _Thread_queue_First( &the_rwlock->Wait_queue );
10c8cb: 83 ec 0c sub $0xc,%esp
10c8ce: 53 push %ebx
10c8cf: 88 55 dc mov %dl,-0x24(%ebp)
10c8d2: 89 4d e0 mov %ecx,-0x20(%ebp)
10c8d5: e8 8a 1a 00 00 call 10e364 <_Thread_queue_First>
if ( !waiter ) {
10c8da: 83 c4 10 add $0x10,%esp
10c8dd: 85 c0 test %eax,%eax
10c8df: 8a 55 dc mov -0x24(%ebp),%dl
10c8e2: 8b 4d e0 mov -0x20(%ebp),%ecx
10c8e5: 75 0e jne 10c8f5 <_CORE_RWLock_Obtain_for_reading+0x65><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
10c8e7: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10c8ea: 57 push %edi
10c8eb: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10c8ec: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
return;
10c8f3: eb 48 jmp 10c93d <_CORE_RWLock_Obtain_for_reading+0xad>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10c8f5: 84 d2 test %dl,%dl
10c8f7: 75 0b jne 10c904 <_CORE_RWLock_Obtain_for_reading+0x74>
_ISR_Enable( level );
10c8f9: 57 push %edi
10c8fa: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10c8fb: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi)
10c902: eb 39 jmp 10c93d <_CORE_RWLock_Obtain_for_reading+0xad>
10c904: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
10c90b: 89 5e 44 mov %ebx,0x44(%esi)
executing->Wait.id = id;
10c90e: 89 4e 20 mov %ecx,0x20(%esi)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
10c911: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10c918: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
_ISR_Enable( level );
10c91f: 57 push %edi
10c920: 9d popf
_Thread_queue_Enqueue_with_handler(
10c921: c7 45 10 6c ca 10 00 movl $0x10ca6c,0x10(%ebp)
10c928: 8b 45 e4 mov -0x1c(%ebp),%eax
10c92b: 89 45 0c mov %eax,0xc(%ebp)
10c92e: 89 5d 08 mov %ebx,0x8(%ebp)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10c931: 8d 65 f4 lea -0xc(%ebp),%esp
10c934: 5b pop %ebx
10c935: 5e pop %esi
10c936: 5f pop %edi
10c937: c9 leave
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
10c938: e9 4f 17 00 00 jmp 10e08c <_Thread_queue_Enqueue_with_handler>
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10c93d: 8d 65 f4 lea -0xc(%ebp),%esp
10c940: 5b pop %ebx
10c941: 5e pop %esi
10c942: 5f pop %edi
10c943: c9 leave
10c944: c3 ret
0010c9cc <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
10c9cc: 55 push %ebp
10c9cd: 89 e5 mov %esp,%ebp
10c9cf: 53 push %ebx
10c9d0: 83 ec 04 sub $0x4,%esp
10c9d3: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10c9d6: 8b 15 c0 72 12 00 mov 0x1272c0,%edx
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
10c9dc: 9c pushf
10c9dd: fa cli
10c9de: 58 pop %eax
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
10c9df: 8b 4b 44 mov 0x44(%ebx),%ecx
10c9e2: 85 c9 test %ecx,%ecx
10c9e4: 75 0b jne 10c9f1 <_CORE_RWLock_Release+0x25>
_ISR_Enable( level );
10c9e6: 50 push %eax
10c9e7: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10c9e8: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
return CORE_RWLOCK_SUCCESSFUL;
10c9ef: eb 72 jmp 10ca63 <_CORE_RWLock_Release+0x97>
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
10c9f1: 49 dec %ecx
10c9f2: 75 0f jne 10ca03 <_CORE_RWLock_Release+0x37>
the_rwlock->number_of_readers -= 1;
10c9f4: 8b 4b 48 mov 0x48(%ebx),%ecx
10c9f7: 49 dec %ecx
10c9f8: 89 4b 48 mov %ecx,0x48(%ebx)
if ( the_rwlock->number_of_readers != 0 ) {
10c9fb: 85 c9 test %ecx,%ecx
10c9fd: 74 04 je 10ca03 <_CORE_RWLock_Release+0x37>
/* must be unlocked again */
_ISR_Enable( level );
10c9ff: 50 push %eax
10ca00: 9d popf
return CORE_RWLOCK_SUCCESSFUL;
10ca01: eb 60 jmp 10ca63 <_CORE_RWLock_Release+0x97>
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10ca03: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
10ca0a: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
_ISR_Enable( level );
10ca11: 50 push %eax
10ca12: 9d popf
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
10ca13: 83 ec 0c sub $0xc,%esp
10ca16: 53 push %ebx
10ca17: e8 6c 15 00 00 call 10df88 <_Thread_queue_Dequeue>
if ( next ) {
10ca1c: 83 c4 10 add $0x10,%esp
10ca1f: 85 c0 test %eax,%eax
10ca21: 74 40 je 10ca63 <_CORE_RWLock_Release+0x97>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
10ca23: 83 78 30 01 cmpl $0x1,0x30(%eax)
10ca27: 75 09 jne 10ca32 <_CORE_RWLock_Release+0x66>
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10ca29: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx)
return CORE_RWLOCK_SUCCESSFUL;
10ca30: eb 31 jmp 10ca63 <_CORE_RWLock_Release+0x97>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
10ca32: ff 43 48 incl 0x48(%ebx)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10ca35: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
10ca3c: 83 ec 0c sub $0xc,%esp
10ca3f: 53 push %ebx
10ca40: e8 1f 19 00 00 call 10e364 <_Thread_queue_First>
if ( !next ||
10ca45: 83 c4 10 add $0x10,%esp
10ca48: 85 c0 test %eax,%eax
10ca4a: 74 17 je 10ca63 <_CORE_RWLock_Release+0x97>
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
10ca4c: 83 78 30 01 cmpl $0x1,0x30(%eax)
10ca50: 74 11 je 10ca63 <_CORE_RWLock_Release+0x97><== NEVER TAKEN
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
10ca52: ff 43 48 incl 0x48(%ebx)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
10ca55: 52 push %edx
10ca56: 52 push %edx
10ca57: 50 push %eax
10ca58: 53 push %ebx
10ca59: e8 f6 17 00 00 call 10e254 <_Thread_queue_Extract>
}
10ca5e: 83 c4 10 add $0x10,%esp
10ca61: eb d9 jmp 10ca3c <_CORE_RWLock_Release+0x70>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10ca63: 31 c0 xor %eax,%eax
10ca65: 8b 5d fc mov -0x4(%ebp),%ebx
10ca68: c9 leave
10ca69: c3 ret
0010ca6c <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
10ca6c: 55 push %ebp
10ca6d: 89 e5 mov %esp,%ebp
10ca6f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10ca72: 8d 45 f4 lea -0xc(%ebp),%eax
10ca75: 50 push %eax
10ca76: ff 75 08 pushl 0x8(%ebp)
10ca79: e8 7a 11 00 00 call 10dbf8 <_Thread_Get>
switch ( location ) {
10ca7e: 83 c4 10 add $0x10,%esp
10ca81: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10ca85: 75 17 jne 10ca9e <_CORE_RWLock_Timeout+0x32><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10ca87: 83 ec 0c sub $0xc,%esp
10ca8a: 50 push %eax
10ca8b: e8 94 19 00 00 call 10e424 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10ca90: a1 04 72 12 00 mov 0x127204,%eax
10ca95: 48 dec %eax
10ca96: a3 04 72 12 00 mov %eax,0x127204
10ca9b: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10ca9e: c9 leave
10ca9f: c3 ret
001174a0 <_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
)
{
1174a0: 55 push %ebp
1174a1: 89 e5 mov %esp,%ebp
1174a3: 57 push %edi
1174a4: 56 push %esi
1174a5: 53 push %ebx
1174a6: 83 ec 1c sub $0x1c,%esp
1174a9: 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 ) {
1174ac: b8 01 00 00 00 mov $0x1,%eax
1174b1: 8b 55 10 mov 0x10(%ebp),%edx
1174b4: 3b 53 4c cmp 0x4c(%ebx),%edx
1174b7: 77 4c ja 117505 <_CORE_message_queue_Broadcast+0x65><== NEVER TAKEN
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
1174b9: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
* 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 ) {
1174c0: 83 7b 48 00 cmpl $0x0,0x48(%ebx)
1174c4: 74 23 je 1174e9 <_CORE_message_queue_Broadcast+0x49>
*count = 0;
1174c6: 8b 45 1c mov 0x1c(%ebp),%eax
1174c9: c7 00 00 00 00 00 movl $0x0,(%eax)
1174cf: eb 32 jmp 117503 <_CORE_message_queue_Broadcast+0x63>
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
1174d1: ff 45 e4 incl -0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
1174d4: 8b 42 2c mov 0x2c(%edx),%eax
1174d7: 89 c7 mov %eax,%edi
1174d9: 8b 75 0c mov 0xc(%ebp),%esi
1174dc: 8b 4d 10 mov 0x10(%ebp),%ecx
1174df: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
1174e1: 8b 42 28 mov 0x28(%edx),%eax
1174e4: 8b 55 10 mov 0x10(%ebp),%edx
1174e7: 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 =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
1174e9: 83 ec 0c sub $0xc,%esp
1174ec: 53 push %ebx
1174ed: e8 c2 21 00 00 call 1196b4 <_Thread_queue_Dequeue>
1174f2: 89 c2 mov %eax,%edx
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
1174f4: 83 c4 10 add $0x10,%esp
1174f7: 85 c0 test %eax,%eax
1174f9: 75 d6 jne 1174d1 <_CORE_message_queue_Broadcast+0x31>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
1174fb: 8b 55 e4 mov -0x1c(%ebp),%edx
1174fe: 8b 45 1c mov 0x1c(%ebp),%eax
117501: 89 10 mov %edx,(%eax)
117503: 31 c0 xor %eax,%eax
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
117505: 8d 65 f4 lea -0xc(%ebp),%esp
117508: 5b pop %ebx
117509: 5e pop %esi
11750a: 5f pop %edi
11750b: c9 leave
11750c: c3 ret
00112384 <_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
)
{
112384: 55 push %ebp
112385: 89 e5 mov %esp,%ebp
112387: 57 push %edi
112388: 56 push %esi
112389: 53 push %ebx
11238a: 83 ec 0c sub $0xc,%esp
11238d: 8b 5d 08 mov 0x8(%ebp),%ebx
112390: 8b 75 10 mov 0x10(%ebp),%esi
112393: 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;
112396: 89 73 44 mov %esi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
112399: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
1123a0: 89 53 4c mov %edx,0x4c(%ebx)
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
1123a3: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
the_message_queue->notify_argument = the_argument;
1123aa: c7 43 64 00 00 00 00 movl $0x0,0x64(%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)) {
1123b1: 89 d0 mov %edx,%eax
1123b3: f6 c2 03 test $0x3,%dl
1123b6: 74 0a je 1123c2 <_CORE_message_queue_Initialize+0x3e>
allocated_message_size += sizeof(uint32_t);
1123b8: 8d 42 04 lea 0x4(%edx),%eax
allocated_message_size &= ~(sizeof(uint32_t) - 1);
1123bb: 83 e0 fc and $0xfffffffc,%eax
}
if (allocated_message_size < maximum_message_size)
1123be: 39 d0 cmp %edx,%eax
1123c0: 72 5f jb 112421 <_CORE_message_queue_Initialize+0x9d><== 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));
1123c2: 8d 78 14 lea 0x14(%eax),%edi
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
1123c5: 89 fa mov %edi,%edx
1123c7: 0f af d6 imul %esi,%edx
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
1123ca: 39 c2 cmp %eax,%edx
1123cc: 72 53 jb 112421 <_CORE_message_queue_Initialize+0x9d><== NEVER TAKEN
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
1123ce: 83 ec 0c sub $0xc,%esp
1123d1: 52 push %edx
1123d2: e8 35 26 00 00 call 114a0c <_Workspace_Allocate>
1123d7: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
1123da: 83 c4 10 add $0x10,%esp
1123dd: 85 c0 test %eax,%eax
1123df: 74 40 je 112421 <_CORE_message_queue_Initialize+0x9d>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
1123e1: 57 push %edi
1123e2: 56 push %esi
1123e3: 50 push %eax
1123e4: 8d 43 68 lea 0x68(%ebx),%eax
1123e7: 50 push %eax
1123e8: e8 27 45 00 00 call 116914 <_Chain_Initialize>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
1123ed: 8d 43 54 lea 0x54(%ebx),%eax
1123f0: 89 43 50 mov %eax,0x50(%ebx)
the_chain->permanent_null = NULL;
1123f3: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
the_chain->last = _Chain_Head(the_chain);
1123fa: 8d 43 50 lea 0x50(%ebx),%eax
1123fd: 89 43 58 mov %eax,0x58(%ebx)
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
112400: 6a 06 push $0x6
112402: 68 80 00 00 00 push $0x80
112407: 8b 45 0c mov 0xc(%ebp),%eax
11240a: 83 38 01 cmpl $0x1,(%eax)
11240d: 0f 94 c0 sete %al
112410: 0f b6 c0 movzbl %al,%eax
112413: 50 push %eax
112414: 53 push %ebx
112415: e8 ca 1c 00 00 call 1140e4 <_Thread_queue_Initialize>
11241a: b0 01 mov $0x1,%al
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
11241c: 83 c4 20 add $0x20,%esp
11241f: eb 02 jmp 112423 <_CORE_message_queue_Initialize+0x9f>
112421: 31 c0 xor %eax,%eax
}
112423: 8d 65 f4 lea -0xc(%ebp),%esp
112426: 5b pop %ebx
112427: 5e pop %esi
112428: 5f pop %edi
112429: c9 leave
11242a: c3 ret
0011242c <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
11242c: 55 push %ebp
11242d: 89 e5 mov %esp,%ebp
11242f: 57 push %edi
112430: 56 push %esi
112431: 53 push %ebx
112432: 83 ec 2c sub $0x2c,%esp
112435: 8b 55 08 mov 0x8(%ebp),%edx
112438: 8b 45 0c mov 0xc(%ebp),%eax
11243b: 89 45 dc mov %eax,-0x24(%ebp)
11243e: 8b 5d 10 mov 0x10(%ebp),%ebx
112441: 89 5d e0 mov %ebx,-0x20(%ebp)
112444: 8b 4d 14 mov 0x14(%ebp),%ecx
112447: 8b 75 1c mov 0x1c(%ebp),%esi
11244a: 89 75 d4 mov %esi,-0x2c(%ebp)
11244d: 8a 45 18 mov 0x18(%ebp),%al
112450: 88 45 db mov %al,-0x25(%ebp)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
112453: a1 18 d4 12 00 mov 0x12d418,%eax
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
112458: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_ISR_Disable( level );
11245f: 9c pushf
112460: fa cli
112461: 8f 45 e4 popl -0x1c(%ebp)
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
112464: 8b 5a 50 mov 0x50(%edx),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
112467: 8d 72 54 lea 0x54(%edx),%esi
11246a: 39 f3 cmp %esi,%ebx
11246c: 0f 84 8a 00 00 00 je 1124fc <_CORE_message_queue_Seize+0xd0>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
112472: 8b 33 mov (%ebx),%esi
the_chain->first = new_first;
112474: 89 72 50 mov %esi,0x50(%edx)
new_first->previous = _Chain_Head(the_chain);
112477: 8d 7a 50 lea 0x50(%edx),%edi
11247a: 89 7e 04 mov %edi,0x4(%esi)
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
11247d: 85 db test %ebx,%ebx
11247f: 74 7b je 1124fc <_CORE_message_queue_Seize+0xd0><== NEVER TAKEN
the_message_queue->number_of_pending_messages -= 1;
112481: ff 4a 48 decl 0x48(%edx)
_ISR_Enable( level );
112484: ff 75 e4 pushl -0x1c(%ebp)
112487: 9d popf
*size_p = the_message->Contents.size;
112488: 8b 43 0c mov 0xc(%ebx),%eax
11248b: 89 01 mov %eax,(%ecx)
_Thread_Executing->Wait.count =
11248d: 8b 73 08 mov 0x8(%ebx),%esi
112490: a1 18 d4 12 00 mov 0x12d418,%eax
112495: 89 70 24 mov %esi,0x24(%eax)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
112498: 8d 73 10 lea 0x10(%ebx),%esi
11249b: 89 75 e4 mov %esi,-0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
11249e: 8b 09 mov (%ecx),%ecx
1124a0: 8b 7d e0 mov -0x20(%ebp),%edi
1124a3: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
* is not, then we can go ahead and free the buffer.
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
1124a5: 83 ec 0c sub $0xc,%esp
1124a8: 52 push %edx
1124a9: 89 55 d0 mov %edx,-0x30(%ebp)
1124ac: e8 17 19 00 00 call 113dc8 <_Thread_queue_Dequeue>
if ( !the_thread ) {
1124b1: 83 c4 10 add $0x10,%esp
1124b4: 85 c0 test %eax,%eax
1124b6: 8b 55 d0 mov -0x30(%ebp),%edx
1124b9: 75 15 jne 1124d0 <_CORE_message_queue_Seize+0xa4>
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 );
1124bb: 89 5d 0c mov %ebx,0xc(%ebp)
1124be: 83 c2 68 add $0x68,%edx
1124c1: 89 55 08 mov %edx,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 );
}
1124c4: 8d 65 f4 lea -0xc(%ebp),%esp
1124c7: 5b pop %ebx
1124c8: 5e pop %esi
1124c9: 5f pop %edi
1124ca: c9 leave
1124cb: e9 34 fe ff ff jmp 112304 <_Chain_Append>
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
1124d0: 8b 48 24 mov 0x24(%eax),%ecx
1124d3: 89 4b 08 mov %ecx,0x8(%ebx)
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
1124d6: 8b 48 30 mov 0x30(%eax),%ecx
1124d9: 89 4b 0c mov %ecx,0xc(%ebx)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
1124dc: 8b 70 2c mov 0x2c(%eax),%esi
1124df: 8b 7d e4 mov -0x1c(%ebp),%edi
1124e2: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
1124e4: 8b 43 08 mov 0x8(%ebx),%eax
1124e7: 89 45 10 mov %eax,0x10(%ebp)
1124ea: 89 5d 0c mov %ebx,0xc(%ebp)
1124ed: 89 55 08 mov %edx,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 );
}
1124f0: 8d 65 f4 lea -0xc(%ebp),%esp
1124f3: 5b pop %ebx
1124f4: 5e pop %esi
1124f5: 5f pop %edi
1124f6: c9 leave
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
1124f7: e9 50 44 00 00 jmp 11694c <_CORE_message_queue_Insert_message>
return;
}
#endif
}
if ( !wait ) {
1124fc: 80 7d db 00 cmpb $0x0,-0x25(%ebp)
112500: 75 13 jne 112515 <_CORE_message_queue_Seize+0xe9>
_ISR_Enable( level );
112502: ff 75 e4 pushl -0x1c(%ebp)
112505: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
112506: c7 40 34 04 00 00 00 movl $0x4,0x34(%eax)
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 );
}
11250d: 8d 65 f4 lea -0xc(%ebp),%esp
112510: 5b pop %ebx
112511: 5e pop %esi
112512: 5f pop %edi
112513: c9 leave
112514: 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;
112515: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
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;
11251c: 89 50 44 mov %edx,0x44(%eax)
executing->Wait.id = id;
11251f: 8b 5d dc mov -0x24(%ebp),%ebx
112522: 89 58 20 mov %ebx,0x20(%eax)
executing->Wait.return_argument_second.mutable_object = buffer;
112525: 8b 75 e0 mov -0x20(%ebp),%esi
112528: 89 70 2c mov %esi,0x2c(%eax)
executing->Wait.return_argument = size_p;
11252b: 89 48 28 mov %ecx,0x28(%eax)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
11252e: ff 75 e4 pushl -0x1c(%ebp)
112531: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
112532: c7 45 10 88 41 11 00 movl $0x114188,0x10(%ebp)
112539: 8b 45 d4 mov -0x2c(%ebp),%eax
11253c: 89 45 0c mov %eax,0xc(%ebp)
11253f: 89 55 08 mov %edx,0x8(%ebp)
}
112542: 8d 65 f4 lea -0xc(%ebp),%esp
112545: 5b pop %ebx
112546: 5e pop %esi
112547: 5f pop %edi
112548: 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 );
112549: e9 7e 19 00 00 jmp 113ecc <_Thread_queue_Enqueue_with_handler>
0010aa85 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10aa85: 55 push %ebp
10aa86: 89 e5 mov %esp,%ebp
10aa88: 53 push %ebx
10aa89: 83 ec 14 sub $0x14,%esp
10aa8c: 8b 5d 08 mov 0x8(%ebp),%ebx
10aa8f: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10aa92: a1 f4 41 12 00 mov 0x1241f4,%eax
10aa97: 85 c0 test %eax,%eax
10aa99: 74 19 je 10aab4 <_CORE_mutex_Seize+0x2f>
10aa9b: 84 d2 test %dl,%dl
10aa9d: 74 15 je 10aab4 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN
10aa9f: 83 3d 8c 43 12 00 01 cmpl $0x1,0x12438c
10aaa6: 76 0c jbe 10aab4 <_CORE_mutex_Seize+0x2f>
10aaa8: 53 push %ebx
10aaa9: 6a 13 push $0x13
10aaab: 6a 00 push $0x0
10aaad: 6a 00 push $0x0
10aaaf: e8 60 05 00 00 call 10b014 <_Internal_error_Occurred>
10aab4: 51 push %ecx
10aab5: 51 push %ecx
10aab6: 8d 45 18 lea 0x18(%ebp),%eax
10aab9: 50 push %eax
10aaba: 53 push %ebx
10aabb: 88 55 f4 mov %dl,-0xc(%ebp)
10aabe: e8 f1 41 00 00 call 10ecb4 <_CORE_mutex_Seize_interrupt_trylock>
10aac3: 83 c4 10 add $0x10,%esp
10aac6: 85 c0 test %eax,%eax
10aac8: 8a 55 f4 mov -0xc(%ebp),%dl
10aacb: 74 48 je 10ab15 <_CORE_mutex_Seize+0x90>
10aacd: 84 d2 test %dl,%dl
10aacf: 75 12 jne 10aae3 <_CORE_mutex_Seize+0x5e>
10aad1: ff 75 18 pushl 0x18(%ebp)
10aad4: 9d popf
10aad5: a1 b0 42 12 00 mov 0x1242b0,%eax
10aada: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
10aae1: eb 32 jmp 10ab15 <_CORE_mutex_Seize+0x90>
10aae3: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
10aaea: a1 b0 42 12 00 mov 0x1242b0,%eax
10aaef: 89 58 44 mov %ebx,0x44(%eax)
10aaf2: 8b 55 0c mov 0xc(%ebp),%edx
10aaf5: 89 50 20 mov %edx,0x20(%eax)
10aaf8: a1 f4 41 12 00 mov 0x1241f4,%eax
10aafd: 40 inc %eax
10aafe: a3 f4 41 12 00 mov %eax,0x1241f4
10ab03: ff 75 18 pushl 0x18(%ebp)
10ab06: 9d popf
10ab07: 50 push %eax
10ab08: 50 push %eax
10ab09: ff 75 14 pushl 0x14(%ebp)
10ab0c: 53 push %ebx
10ab0d: e8 26 ff ff ff call 10aa38 <_CORE_mutex_Seize_interrupt_blocking>
10ab12: 83 c4 10 add $0x10,%esp
}
10ab15: 8b 5d fc mov -0x4(%ebp),%ebx
10ab18: c9 leave
10ab19: c3 ret
0010ac48 <_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
)
{
10ac48: 55 push %ebp
10ac49: 89 e5 mov %esp,%ebp
10ac4b: 53 push %ebx
10ac4c: 83 ec 10 sub $0x10,%esp
10ac4f: 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)) ) {
10ac52: 53 push %ebx
10ac53: e8 0c 14 00 00 call 10c064 <_Thread_queue_Dequeue>
10ac58: 89 c2 mov %eax,%edx
10ac5a: 83 c4 10 add $0x10,%esp
10ac5d: 31 c0 xor %eax,%eax
10ac5f: 85 d2 test %edx,%edx
10ac61: 75 15 jne 10ac78 <_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 );
10ac63: 9c pushf
10ac64: fa cli
10ac65: 59 pop %ecx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10ac66: 8b 53 48 mov 0x48(%ebx),%edx
10ac69: b0 04 mov $0x4,%al
10ac6b: 3b 53 40 cmp 0x40(%ebx),%edx
10ac6e: 73 06 jae 10ac76 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN
the_semaphore->count += 1;
10ac70: 42 inc %edx
10ac71: 89 53 48 mov %edx,0x48(%ebx)
10ac74: 30 c0 xor %al,%al
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
10ac76: 51 push %ecx
10ac77: 9d popf
}
return status;
}
10ac78: 8b 5d fc mov -0x4(%ebp),%ebx
10ac7b: c9 leave
10ac7c: c3 ret
00109a78 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
109a78: 55 push %ebp
109a79: 89 e5 mov %esp,%ebp
109a7b: 57 push %edi
109a7c: 56 push %esi
109a7d: 53 push %ebx
109a7e: 83 ec 1c sub $0x1c,%esp
109a81: 8b 45 08 mov 0x8(%ebp),%eax
109a84: 8b 75 0c mov 0xc(%ebp),%esi
109a87: 8b 55 10 mov 0x10(%ebp),%edx
109a8a: 89 55 dc mov %edx,-0x24(%ebp)
109a8d: 8b 4d 14 mov 0x14(%ebp),%ecx
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
109a90: 8b 1d b0 42 12 00 mov 0x1242b0,%ebx
executing->Wait.return_code = RTEMS_SUCCESSFUL;
109a96: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
109a9d: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi
_ISR_Disable( level );
109aa3: 9c pushf
109aa4: fa cli
109aa5: 8f 45 e4 popl -0x1c(%ebp)
pending_events = api->pending_events;
109aa8: 8b 17 mov (%edi),%edx
109aaa: 89 55 e0 mov %edx,-0x20(%ebp)
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
109aad: 21 c2 and %eax,%edx
109aaf: 74 1b je 109acc <_Event_Seize+0x54>
109ab1: 39 c2 cmp %eax,%edx
109ab3: 74 08 je 109abd <_Event_Seize+0x45>
109ab5: f7 c6 02 00 00 00 test $0x2,%esi
109abb: 74 0f je 109acc <_Event_Seize+0x54> <== NEVER TAKEN
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
109abd: 89 d0 mov %edx,%eax
109abf: f7 d0 not %eax
109ac1: 23 45 e0 and -0x20(%ebp),%eax
109ac4: 89 07 mov %eax,(%edi)
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
109ac6: ff 75 e4 pushl -0x1c(%ebp)
109ac9: 9d popf
109aca: eb 13 jmp 109adf <_Event_Seize+0x67>
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
109acc: f7 c6 01 00 00 00 test $0x1,%esi
109ad2: 74 12 je 109ae6 <_Event_Seize+0x6e>
_ISR_Enable( level );
109ad4: ff 75 e4 pushl -0x1c(%ebp)
109ad7: 9d popf
executing->Wait.return_code = RTEMS_UNSATISFIED;
109ad8: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx)
*event_out = seized_events;
109adf: 89 11 mov %edx,(%ecx)
return;
109ae1: e9 91 00 00 00 jmp 109b77 <_Event_Seize+0xff>
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
109ae6: 89 73 30 mov %esi,0x30(%ebx)
executing->Wait.count = (uint32_t) event_in;
109ae9: 89 43 24 mov %eax,0x24(%ebx)
executing->Wait.return_argument = event_out;
109aec: 89 4b 28 mov %ecx,0x28(%ebx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
109aef: c7 05 f4 4a 12 00 01 movl $0x1,0x124af4
109af6: 00 00 00
_ISR_Enable( level );
109af9: ff 75 e4 pushl -0x1c(%ebp)
109afc: 9d popf
if ( ticks ) {
109afd: 83 7d dc 00 cmpl $0x0,-0x24(%ebp)
109b01: 74 34 je 109b37 <_Event_Seize+0xbf>
_Watchdog_Initialize(
109b03: 8b 43 08 mov 0x8(%ebx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
109b06: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
109b0d: c7 43 64 b4 9c 10 00 movl $0x109cb4,0x64(%ebx)
the_watchdog->id = id;
109b14: 89 43 68 mov %eax,0x68(%ebx)
the_watchdog->user_data = user_data;
109b17: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
109b1e: 8b 45 dc mov -0x24(%ebp),%eax
109b21: 89 43 54 mov %eax,0x54(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
109b24: 52 push %edx
109b25: 52 push %edx
109b26: 8d 43 48 lea 0x48(%ebx),%eax
109b29: 50 push %eax
109b2a: 68 d0 42 12 00 push $0x1242d0
109b2f: e8 60 2f 00 00 call 10ca94 <_Watchdog_Insert>
109b34: 83 c4 10 add $0x10,%esp
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
109b37: 50 push %eax
109b38: 50 push %eax
109b39: 68 00 01 00 00 push $0x100
109b3e: 53 push %ebx
109b3f: e8 7c 29 00 00 call 10c4c0 <_Thread_Set_state>
_ISR_Disable( level );
109b44: 9c pushf
109b45: fa cli
109b46: 5a pop %edx
sync_state = _Event_Sync_state;
109b47: a1 f4 4a 12 00 mov 0x124af4,%eax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
109b4c: c7 05 f4 4a 12 00 00 movl $0x0,0x124af4
109b53: 00 00 00
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
109b56: 83 c4 10 add $0x10,%esp
109b59: 83 f8 01 cmp $0x1,%eax
109b5c: 75 04 jne 109b62 <_Event_Seize+0xea>
_ISR_Enable( level );
109b5e: 52 push %edx
109b5f: 9d popf
109b60: eb 15 jmp 109b77 <_Event_Seize+0xff>
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
109b62: 89 55 10 mov %edx,0x10(%ebp)
109b65: 89 5d 0c mov %ebx,0xc(%ebp)
109b68: 89 45 08 mov %eax,0x8(%ebp)
}
109b6b: 8d 65 f4 lea -0xc(%ebp),%esp
109b6e: 5b pop %ebx
109b6f: 5e pop %esi
109b70: 5f pop %edi
109b71: c9 leave
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
109b72: e9 51 1c 00 00 jmp 10b7c8 <_Thread_blocking_operation_Cancel>
}
109b77: 8d 65 f4 lea -0xc(%ebp),%esp
109b7a: 5b pop %ebx
109b7b: 5e pop %esi
109b7c: 5f pop %edi
109b7d: c9 leave
109b7e: c3 ret
00109bcc <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
109bcc: 55 push %ebp
109bcd: 89 e5 mov %esp,%ebp
109bcf: 57 push %edi
109bd0: 56 push %esi
109bd1: 53 push %ebx
109bd2: 83 ec 2c sub $0x2c,%esp
109bd5: 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 ];
109bd8: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi
option_set = (rtems_option) the_thread->Wait.option;
109bde: 8b 43 30 mov 0x30(%ebx),%eax
109be1: 89 45 e0 mov %eax,-0x20(%ebp)
_ISR_Disable( level );
109be4: 9c pushf
109be5: fa cli
109be6: 58 pop %eax
pending_events = api->pending_events;
109be7: 8b 17 mov (%edi),%edx
109be9: 89 55 d4 mov %edx,-0x2c(%ebp)
event_condition = (rtems_event_set) the_thread->Wait.count;
109bec: 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 ) ) {
109bef: 21 f2 and %esi,%edx
109bf1: 75 07 jne 109bfa <_Event_Surrender+0x2e>
_ISR_Enable( level );
109bf3: 50 push %eax
109bf4: 9d popf
return;
109bf5: e9 b0 00 00 00 jmp 109caa <_Event_Surrender+0xde>
/*
* 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() &&
109bfa: 8b 0d 8c 42 12 00 mov 0x12428c,%ecx
109c00: 85 c9 test %ecx,%ecx
109c02: 74 49 je 109c4d <_Event_Surrender+0x81>
109c04: 3b 1d b0 42 12 00 cmp 0x1242b0,%ebx
109c0a: 75 41 jne 109c4d <_Event_Surrender+0x81>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
109c0c: 8b 0d f4 4a 12 00 mov 0x124af4,%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() &&
109c12: 83 f9 02 cmp $0x2,%ecx
109c15: 74 09 je 109c20 <_Event_Surrender+0x54> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
109c17: 8b 0d f4 4a 12 00 mov 0x124af4,%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() &&
109c1d: 49 dec %ecx
109c1e: 75 2d jne 109c4d <_Event_Surrender+0x81>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
109c20: 39 f2 cmp %esi,%edx
109c22: 74 06 je 109c2a <_Event_Surrender+0x5e>
109c24: f6 45 e0 02 testb $0x2,-0x20(%ebp)
109c28: 74 1f je 109c49 <_Event_Surrender+0x7d> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
109c2a: 89 d6 mov %edx,%esi
109c2c: f7 d6 not %esi
109c2e: 23 75 d4 and -0x2c(%ebp),%esi
109c31: 89 37 mov %esi,(%edi)
the_thread->Wait.count = 0;
109c33: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109c3a: 8b 4b 28 mov 0x28(%ebx),%ecx
109c3d: 89 11 mov %edx,(%ecx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
109c3f: c7 05 f4 4a 12 00 03 movl $0x3,0x124af4
109c46: 00 00 00
}
_ISR_Enable( level );
109c49: 50 push %eax
109c4a: 9d popf
return;
109c4b: eb 5d jmp 109caa <_Event_Surrender+0xde>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
109c4d: f6 43 11 01 testb $0x1,0x11(%ebx)
109c51: 74 55 je 109ca8 <_Event_Surrender+0xdc>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
109c53: 39 f2 cmp %esi,%edx
109c55: 74 06 je 109c5d <_Event_Surrender+0x91>
109c57: f6 45 e0 02 testb $0x2,-0x20(%ebp)
109c5b: 74 4b je 109ca8 <_Event_Surrender+0xdc> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
109c5d: 89 d6 mov %edx,%esi
109c5f: f7 d6 not %esi
109c61: 23 75 d4 and -0x2c(%ebp),%esi
109c64: 89 37 mov %esi,(%edi)
the_thread->Wait.count = 0;
109c66: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109c6d: 8b 4b 28 mov 0x28(%ebx),%ecx
109c70: 89 11 mov %edx,(%ecx)
_ISR_Flash( level );
109c72: 50 push %eax
109c73: 9d popf
109c74: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
109c75: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
109c79: 74 06 je 109c81 <_Event_Surrender+0xb5>
_ISR_Enable( level );
109c7b: 50 push %eax
109c7c: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
109c7d: 51 push %ecx
109c7e: 51 push %ecx
109c7f: eb 17 jmp 109c98 <_Event_Surrender+0xcc>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
109c81: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
109c88: 50 push %eax
109c89: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
109c8a: 83 ec 0c sub $0xc,%esp
109c8d: 8d 43 48 lea 0x48(%ebx),%eax
109c90: 50 push %eax
109c91: e8 16 2f 00 00 call 10cbac <_Watchdog_Remove>
109c96: 58 pop %eax
109c97: 5a pop %edx
109c98: 68 f8 ff 03 10 push $0x1003fff8
109c9d: 53 push %ebx
109c9e: e8 91 1c 00 00 call 10b934 <_Thread_Clear_state>
109ca3: 83 c4 10 add $0x10,%esp
109ca6: eb 02 jmp 109caa <_Event_Surrender+0xde>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
109ca8: 50 push %eax
109ca9: 9d popf
}
109caa: 8d 65 f4 lea -0xc(%ebp),%esp
109cad: 5b pop %ebx
109cae: 5e pop %esi
109caf: 5f pop %edi
109cb0: c9 leave
109cb1: c3 ret
00109cb4 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
109cb4: 55 push %ebp
109cb5: 89 e5 mov %esp,%ebp
109cb7: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
109cba: 8d 45 f4 lea -0xc(%ebp),%eax
109cbd: 50 push %eax
109cbe: ff 75 08 pushl 0x8(%ebp)
109cc1: e8 0e 20 00 00 call 10bcd4 <_Thread_Get>
switch ( location ) {
109cc6: 83 c4 10 add $0x10,%esp
109cc9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
109ccd: 75 49 jne 109d18 <_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 );
109ccf: 9c pushf
109cd0: fa cli
109cd1: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
109cd2: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
109cd9: 3b 05 b0 42 12 00 cmp 0x1242b0,%eax
109cdf: 75 13 jne 109cf4 <_Event_Timeout+0x40>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
109ce1: 8b 0d f4 4a 12 00 mov 0x124af4,%ecx
109ce7: 49 dec %ecx
109ce8: 75 0a jne 109cf4 <_Event_Timeout+0x40>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
109cea: c7 05 f4 4a 12 00 02 movl $0x2,0x124af4
109cf1: 00 00 00
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
109cf4: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
109cfb: 52 push %edx
109cfc: 9d popf
109cfd: 52 push %edx
109cfe: 52 push %edx
109cff: 68 f8 ff 03 10 push $0x1003fff8
109d04: 50 push %eax
109d05: e8 2a 1c 00 00 call 10b934 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
109d0a: a1 f4 41 12 00 mov 0x1241f4,%eax
109d0f: 48 dec %eax
109d10: a3 f4 41 12 00 mov %eax,0x1241f4
109d15: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
109d18: c9 leave
109d19: c3 ret
0010ee4c <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
10ee4c: 55 push %ebp
10ee4d: 89 e5 mov %esp,%ebp
10ee4f: 57 push %edi
10ee50: 56 push %esi
10ee51: 53 push %ebx
10ee52: 83 ec 2c sub $0x2c,%esp
10ee55: 8b 75 08 mov 0x8(%ebp),%esi
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10ee58: 8b 4e 08 mov 0x8(%esi),%ecx
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
10ee5b: 8b 46 10 mov 0x10(%esi),%eax
10ee5e: 89 45 e0 mov %eax,-0x20(%ebp)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
10ee61: 8b 45 0c mov 0xc(%ebp),%eax
10ee64: 83 c0 04 add $0x4,%eax
10ee67: 89 45 cc mov %eax,-0x34(%ebp)
10ee6a: 0f 82 2f 01 00 00 jb 10ef9f <_Heap_Allocate_aligned_with_boundary+0x153>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
10ee70: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10ee74: 74 18 je 10ee8e <_Heap_Allocate_aligned_with_boundary+0x42>
if ( boundary < alloc_size ) {
10ee76: 8b 45 0c mov 0xc(%ebp),%eax
10ee79: 39 45 14 cmp %eax,0x14(%ebp)
10ee7c: 0f 82 1d 01 00 00 jb 10ef9f <_Heap_Allocate_aligned_with_boundary+0x153>
return NULL;
}
if ( alignment == 0 ) {
10ee82: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10ee86: 75 06 jne 10ee8e <_Heap_Allocate_aligned_with_boundary+0x42>
10ee88: 8b 45 e0 mov -0x20(%ebp),%eax
10ee8b: 89 45 10 mov %eax,0x10(%ebp)
10ee8e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
10ee95: 8b 45 e0 mov -0x20(%ebp),%eax
10ee98: 83 c0 07 add $0x7,%eax
10ee9b: 89 45 c8 mov %eax,-0x38(%ebp)
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
10ee9e: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp)
10eea5: 8b 45 0c mov 0xc(%ebp),%eax
10eea8: 29 45 d8 sub %eax,-0x28(%ebp)
10eeab: 89 f7 mov %esi,%edi
10eead: e9 ba 00 00 00 jmp 10ef6c <_Heap_Allocate_aligned_with_boundary+0x120>
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
10eeb2: ff 45 e4 incl -0x1c(%ebp)
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
10eeb5: 8b 59 04 mov 0x4(%ecx),%ebx
10eeb8: 3b 5d cc cmp -0x34(%ebp),%ebx
10eebb: 0f 86 a8 00 00 00 jbe 10ef69 <_Heap_Allocate_aligned_with_boundary+0x11d>
if ( alignment == 0 ) {
10eec1: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10eec5: 8d 41 08 lea 0x8(%ecx),%eax
10eec8: 89 45 dc mov %eax,-0x24(%ebp)
10eecb: 75 07 jne 10eed4 <_Heap_Allocate_aligned_with_boundary+0x88>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10eecd: 89 c3 mov %eax,%ebx
10eecf: e9 91 00 00 00 jmp 10ef65 <_Heap_Allocate_aligned_with_boundary+0x119>
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
10eed4: 8b 47 14 mov 0x14(%edi),%eax
10eed7: 89 45 d4 mov %eax,-0x2c(%ebp)
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
10eeda: 83 e3 fe and $0xfffffffe,%ebx
10eedd: 8d 1c 19 lea (%ecx,%ebx,1),%ebx
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
10eee0: 8b 75 c8 mov -0x38(%ebp),%esi
10eee3: 29 c6 sub %eax,%esi
10eee5: 01 de add %ebx,%esi
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
10eee7: 03 5d d8 add -0x28(%ebp),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10eeea: 89 d8 mov %ebx,%eax
10eeec: 31 d2 xor %edx,%edx
10eeee: f7 75 10 divl 0x10(%ebp)
10eef1: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
10eef3: 39 f3 cmp %esi,%ebx
10eef5: 76 0b jbe 10ef02 <_Heap_Allocate_aligned_with_boundary+0xb6>
10eef7: 89 f0 mov %esi,%eax
10eef9: 31 d2 xor %edx,%edx
10eefb: f7 75 10 divl 0x10(%ebp)
10eefe: 89 f3 mov %esi,%ebx
10ef00: 29 d3 sub %edx,%ebx
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
10ef02: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10ef06: 74 3f je 10ef47 <_Heap_Allocate_aligned_with_boundary+0xfb>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
10ef08: 8b 45 0c mov 0xc(%ebp),%eax
10ef0b: 8d 34 03 lea (%ebx,%eax,1),%esi
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
10ef0e: 8b 45 dc mov -0x24(%ebp),%eax
10ef11: 03 45 0c add 0xc(%ebp),%eax
10ef14: 89 45 d0 mov %eax,-0x30(%ebp)
10ef17: eb 19 jmp 10ef32 <_Heap_Allocate_aligned_with_boundary+0xe6>
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
10ef19: 3b 55 d0 cmp -0x30(%ebp),%edx
10ef1c: 72 4b jb 10ef69 <_Heap_Allocate_aligned_with_boundary+0x11d>
return 0;
}
alloc_begin = boundary_line - alloc_size;
10ef1e: 89 d3 mov %edx,%ebx
10ef20: 2b 5d 0c sub 0xc(%ebp),%ebx
10ef23: 89 d8 mov %ebx,%eax
10ef25: 31 d2 xor %edx,%edx
10ef27: f7 75 10 divl 0x10(%ebp)
10ef2a: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
10ef2c: 8b 45 0c mov 0xc(%ebp),%eax
10ef2f: 8d 34 03 lea (%ebx,%eax,1),%esi
10ef32: 89 f0 mov %esi,%eax
10ef34: 31 d2 xor %edx,%edx
10ef36: f7 75 14 divl 0x14(%ebp)
10ef39: 89 f0 mov %esi,%eax
10ef3b: 29 d0 sub %edx,%eax
10ef3d: 89 c2 mov %eax,%edx
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
10ef3f: 39 f0 cmp %esi,%eax
10ef41: 73 04 jae 10ef47 <_Heap_Allocate_aligned_with_boundary+0xfb>
10ef43: 39 c3 cmp %eax,%ebx
10ef45: 72 d2 jb 10ef19 <_Heap_Allocate_aligned_with_boundary+0xcd>
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
10ef47: 3b 5d dc cmp -0x24(%ebp),%ebx
10ef4a: 72 1d jb 10ef69 <_Heap_Allocate_aligned_with_boundary+0x11d>
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
10ef4c: be f8 ff ff ff mov $0xfffffff8,%esi
10ef51: 29 ce sub %ecx,%esi
10ef53: 01 de add %ebx,%esi
10ef55: 89 d8 mov %ebx,%eax
10ef57: 31 d2 xor %edx,%edx
10ef59: f7 75 e0 divl -0x20(%ebp)
if ( free_size >= min_block_size || free_size == 0 ) {
10ef5c: 29 d6 sub %edx,%esi
10ef5e: 74 05 je 10ef65 <_Heap_Allocate_aligned_with_boundary+0x119>
10ef60: 3b 75 d4 cmp -0x2c(%ebp),%esi
10ef63: 72 04 jb 10ef69 <_Heap_Allocate_aligned_with_boundary+0x11d>
boundary
);
}
}
if ( alloc_begin != 0 ) {
10ef65: 85 db test %ebx,%ebx
10ef67: 75 11 jne 10ef7a <_Heap_Allocate_aligned_with_boundary+0x12e><== ALWAYS TAKEN
break;
}
block = block->next;
10ef69: 8b 49 08 mov 0x8(%ecx),%ecx
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
10ef6c: 39 f9 cmp %edi,%ecx
10ef6e: 0f 85 3e ff ff ff jne 10eeb2 <_Heap_Allocate_aligned_with_boundary+0x66>
10ef74: 89 fe mov %edi,%esi
10ef76: 31 db xor %ebx,%ebx
10ef78: eb 16 jmp 10ef90 <_Heap_Allocate_aligned_with_boundary+0x144>
10ef7a: 89 fe mov %edi,%esi
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
10ef7c: 8b 45 e4 mov -0x1c(%ebp),%eax
10ef7f: 01 47 4c add %eax,0x4c(%edi)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
10ef82: ff 75 0c pushl 0xc(%ebp)
10ef85: 53 push %ebx
10ef86: 51 push %ecx
10ef87: 57 push %edi
10ef88: e8 ab bf ff ff call 10af38 <_Heap_Block_allocate>
10ef8d: 83 c4 10 add $0x10,%esp
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
10ef90: 8b 45 e4 mov -0x1c(%ebp),%eax
10ef93: 39 46 44 cmp %eax,0x44(%esi)
10ef96: 73 03 jae 10ef9b <_Heap_Allocate_aligned_with_boundary+0x14f>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
10ef98: 89 46 44 mov %eax,0x44(%esi)
}
return (void *) alloc_begin;
10ef9b: 89 d8 mov %ebx,%eax
10ef9d: eb 02 jmp 10efa1 <_Heap_Allocate_aligned_with_boundary+0x155>
10ef9f: 31 c0 xor %eax,%eax
}
10efa1: 8d 65 f4 lea -0xc(%ebp),%esp
10efa4: 5b pop %ebx
10efa5: 5e pop %esi
10efa6: 5f pop %edi
10efa7: c9 leave
10efa8: c3 ret
00112298 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
112298: 55 push %ebp
112299: 89 e5 mov %esp,%ebp
11229b: 56 push %esi
11229c: 53 push %ebx
11229d: 8b 4d 08 mov 0x8(%ebp),%ecx
1122a0: 8b 55 0c mov 0xc(%ebp),%edx
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
1122a3: 8b 71 1c mov 0x1c(%ecx),%esi
uintptr_t const new_heap_area_end = heap_area_end + area_size;
uintptr_t extend_size = 0;
Heap_Block *const last_block = heap->last_block;
1122a6: 8b 59 24 mov 0x24(%ecx),%ebx
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
1122a9: 39 f2 cmp %esi,%edx
1122ab: 73 0a jae 1122b7 <_Heap_Extend+0x1f>
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
1122ad: b8 01 00 00 00 mov $0x1,%eax
1122b2: 3b 51 18 cmp 0x18(%ecx),%edx
1122b5: 73 5f jae 112316 <_Heap_Extend+0x7e>
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
1122b7: b8 02 00 00 00 mov $0x2,%eax
1122bc: 39 f2 cmp %esi,%edx
1122be: 75 56 jne 112316 <_Heap_Extend+0x7e>
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
1122c0: 03 55 10 add 0x10(%ebp),%edx
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
1122c3: 89 51 1c mov %edx,0x1c(%ecx)
extend_size = new_heap_area_end
1122c6: 29 da sub %ebx,%edx
1122c8: 8d 72 f8 lea -0x8(%edx),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
1122cb: 89 f0 mov %esi,%eax
1122cd: 31 d2 xor %edx,%edx
1122cf: f7 71 10 divl 0x10(%ecx)
1122d2: 29 d6 sub %edx,%esi
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
1122d4: 8b 45 14 mov 0x14(%ebp),%eax
1122d7: 89 30 mov %esi,(%eax)
if( extend_size >= heap->min_block_size ) {
1122d9: 31 c0 xor %eax,%eax
1122db: 3b 71 14 cmp 0x14(%ecx),%esi
1122de: 72 36 jb 112316 <_Heap_Extend+0x7e> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
1122e0: 8d 14 1e lea (%esi,%ebx,1),%edx
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
1122e3: 8b 43 04 mov 0x4(%ebx),%eax
1122e6: 83 e0 01 and $0x1,%eax
1122e9: 09 f0 or %esi,%eax
1122eb: 89 43 04 mov %eax,0x4(%ebx)
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
1122ee: 8b 41 20 mov 0x20(%ecx),%eax
1122f1: 29 d0 sub %edx,%eax
1122f3: 83 c8 01 or $0x1,%eax
1122f6: 89 42 04 mov %eax,0x4(%edx)
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
1122f9: 89 51 24 mov %edx,0x24(%ecx)
/* Statistics */
stats->size += extend_size;
1122fc: 01 71 2c add %esi,0x2c(%ecx)
++stats->used_blocks;
1122ff: ff 41 40 incl 0x40(%ecx)
--stats->frees; /* Do not count subsequent call as actual free() */
112302: ff 49 50 decl 0x50(%ecx)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
112305: 50 push %eax
112306: 50 push %eax
112307: 83 c3 08 add $0x8,%ebx
11230a: 53 push %ebx
11230b: 51 push %ecx
11230c: e8 73 b6 ff ff call 10d984 <_Heap_Free>
112311: 31 c0 xor %eax,%eax
112313: 83 c4 10 add $0x10,%esp
}
return HEAP_EXTEND_SUCCESSFUL;
}
112316: 8d 65 f8 lea -0x8(%ebp),%esp
112319: 5b pop %ebx
11231a: 5e pop %esi
11231b: c9 leave
11231c: c3 ret
0010efac <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
10efac: 55 push %ebp
10efad: 89 e5 mov %esp,%ebp
10efaf: 57 push %edi
10efb0: 56 push %esi
10efb1: 53 push %ebx
10efb2: 83 ec 14 sub $0x14,%esp
10efb5: 8b 4d 08 mov 0x8(%ebp),%ecx
10efb8: 8b 45 0c mov 0xc(%ebp),%eax
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 )
10efbb: 8d 58 f8 lea -0x8(%eax),%ebx
10efbe: 31 d2 xor %edx,%edx
10efc0: f7 71 10 divl 0x10(%ecx)
10efc3: 29 d3 sub %edx,%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;
10efc5: 8b 41 20 mov 0x20(%ecx),%eax
10efc8: 89 45 f0 mov %eax,-0x10(%ebp)
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
10efcb: 31 c0 xor %eax,%eax
10efcd: 3b 5d f0 cmp -0x10(%ebp),%ebx
10efd0: 72 08 jb 10efda <_Heap_Free+0x2e>
10efd2: 31 c0 xor %eax,%eax
10efd4: 39 59 24 cmp %ebx,0x24(%ecx)
10efd7: 0f 93 c0 setae %al
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
uintptr_t next_block_size = 0;
bool next_is_free = false;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
10efda: 85 c0 test %eax,%eax
10efdc: 0f 84 2d 01 00 00 je 10f10f <_Heap_Free+0x163>
- 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;
10efe2: 8b 7b 04 mov 0x4(%ebx),%edi
10efe5: 89 fa mov %edi,%edx
10efe7: 83 e2 fe and $0xfffffffe,%edx
10efea: 89 55 e0 mov %edx,-0x20(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10efed: 8d 04 13 lea (%ebx,%edx,1),%eax
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
10eff0: 31 f6 xor %esi,%esi
10eff2: 3b 45 f0 cmp -0x10(%ebp),%eax
10eff5: 72 0e jb 10f005 <_Heap_Free+0x59> <== NEVER TAKEN
10eff7: 39 41 24 cmp %eax,0x24(%ecx)
10effa: 0f 93 c2 setae %dl
10effd: 89 d6 mov %edx,%esi
10efff: 81 e6 ff 00 00 00 and $0xff,%esi
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10f005: 85 f6 test %esi,%esi
10f007: 0f 84 02 01 00 00 je 10f10f <_Heap_Free+0x163> <== NEVER TAKEN
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;
10f00d: 8b 70 04 mov 0x4(%eax),%esi
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10f010: f7 c6 01 00 00 00 test $0x1,%esi
10f016: 0f 84 f3 00 00 00 je 10f10f <_Heap_Free+0x163> <== 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;
10f01c: 83 e6 fe and $0xfffffffe,%esi
10f01f: 89 75 e8 mov %esi,-0x18(%ebp)
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
10f022: 8b 51 24 mov 0x24(%ecx),%edx
10f025: 89 55 e4 mov %edx,-0x1c(%ebp)
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10f028: 31 f6 xor %esi,%esi
10f02a: 39 d0 cmp %edx,%eax
10f02c: 74 0d je 10f03b <_Heap_Free+0x8f>
10f02e: 8b 55 e8 mov -0x18(%ebp),%edx
10f031: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi
10f035: 83 e6 01 and $0x1,%esi
10f038: 83 f6 01 xor $0x1,%esi
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
10f03b: 83 e7 01 and $0x1,%edi
10f03e: 75 64 jne 10f0a4 <_Heap_Free+0xf8>
uintptr_t const prev_size = block->prev_size;
10f040: 8b 13 mov (%ebx),%edx
10f042: 89 55 ec mov %edx,-0x14(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10f045: 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
10f047: 31 ff xor %edi,%edi
10f049: 3b 5d f0 cmp -0x10(%ebp),%ebx
10f04c: 72 0e jb 10f05c <_Heap_Free+0xb0> <== NEVER TAKEN
10f04e: 39 5d e4 cmp %ebx,-0x1c(%ebp)
10f051: 0f 93 c2 setae %dl
10f054: 89 d7 mov %edx,%edi
10f056: 81 e7 ff 00 00 00 and $0xff,%edi
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
10f05c: 85 ff test %edi,%edi
10f05e: 0f 84 ab 00 00 00 je 10f10f <_Heap_Free+0x163> <== 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) ) {
10f064: f6 43 04 01 testb $0x1,0x4(%ebx)
10f068: 0f 84 a1 00 00 00 je 10f10f <_Heap_Free+0x163> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
10f06e: 89 f2 mov %esi,%edx
10f070: 84 d2 test %dl,%dl
10f072: 74 1a je 10f08e <_Heap_Free+0xe2>
uintptr_t const size = block_size + prev_size + next_block_size;
10f074: 8b 75 e0 mov -0x20(%ebp),%esi
10f077: 03 75 e8 add -0x18(%ebp),%esi
10f07a: 03 75 ec add -0x14(%ebp),%esi
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
10f07d: 8b 78 08 mov 0x8(%eax),%edi
Heap_Block *prev = block->prev;
10f080: 8b 40 0c mov 0xc(%eax),%eax
prev->next = next;
10f083: 89 78 08 mov %edi,0x8(%eax)
next->prev = prev;
10f086: 89 47 0c mov %eax,0xc(%edi)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
10f089: ff 49 38 decl 0x38(%ecx)
10f08c: eb 34 jmp 10f0c2 <_Heap_Free+0x116>
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;
10f08e: 8b 75 e0 mov -0x20(%ebp),%esi
10f091: 03 75 ec add -0x14(%ebp),%esi
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10f094: 89 f7 mov %esi,%edi
10f096: 83 cf 01 or $0x1,%edi
10f099: 89 7b 04 mov %edi,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10f09c: 83 60 04 fe andl $0xfffffffe,0x4(%eax)
next_block->prev_size = size;
10f0a0: 89 30 mov %esi,(%eax)
10f0a2: eb 5b jmp 10f0ff <_Heap_Free+0x153>
}
} else if ( next_is_free ) { /* coalesce next */
10f0a4: 89 f2 mov %esi,%edx
10f0a6: 84 d2 test %dl,%dl
10f0a8: 74 25 je 10f0cf <_Heap_Free+0x123>
uintptr_t const size = block_size + next_block_size;
10f0aa: 8b 75 e8 mov -0x18(%ebp),%esi
10f0ad: 03 75 e0 add -0x20(%ebp),%esi
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
10f0b0: 8b 78 08 mov 0x8(%eax),%edi
Heap_Block *prev = old_block->prev;
10f0b3: 8b 40 0c mov 0xc(%eax),%eax
new_block->next = next;
10f0b6: 89 7b 08 mov %edi,0x8(%ebx)
new_block->prev = prev;
10f0b9: 89 43 0c mov %eax,0xc(%ebx)
next->prev = new_block;
10f0bc: 89 5f 0c mov %ebx,0xc(%edi)
prev->next = new_block;
10f0bf: 89 58 08 mov %ebx,0x8(%eax)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10f0c2: 89 f0 mov %esi,%eax
10f0c4: 83 c8 01 or $0x1,%eax
10f0c7: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
10f0ca: 89 34 33 mov %esi,(%ebx,%esi,1)
10f0cd: eb 30 jmp 10f0ff <_Heap_Free+0x153>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10f0cf: 8b 71 08 mov 0x8(%ecx),%esi
new_block->next = next;
10f0d2: 89 73 08 mov %esi,0x8(%ebx)
new_block->prev = block_before;
10f0d5: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
10f0d8: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
10f0db: 89 5e 0c mov %ebx,0xc(%esi)
} 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;
10f0de: 8b 75 e0 mov -0x20(%ebp),%esi
10f0e1: 83 ce 01 or $0x1,%esi
10f0e4: 89 73 04 mov %esi,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10f0e7: 83 60 04 fe andl $0xfffffffe,0x4(%eax)
next_block->prev_size = block_size;
10f0eb: 8b 55 e0 mov -0x20(%ebp),%edx
10f0ee: 89 10 mov %edx,(%eax)
/* Statistics */
++stats->free_blocks;
10f0f0: 8b 41 38 mov 0x38(%ecx),%eax
10f0f3: 40 inc %eax
10f0f4: 89 41 38 mov %eax,0x38(%ecx)
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
10f0f7: 39 41 3c cmp %eax,0x3c(%ecx)
10f0fa: 73 03 jae 10f0ff <_Heap_Free+0x153>
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
10f0fc: 89 41 3c mov %eax,0x3c(%ecx)
}
}
/* Statistics */
--stats->used_blocks;
10f0ff: ff 49 40 decl 0x40(%ecx)
++stats->frees;
10f102: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
10f105: 8b 45 e0 mov -0x20(%ebp),%eax
10f108: 01 41 30 add %eax,0x30(%ecx)
10f10b: b0 01 mov $0x1,%al
return( true );
10f10d: eb 02 jmp 10f111 <_Heap_Free+0x165>
10f10f: 31 c0 xor %eax,%eax
}
10f111: 83 c4 14 add $0x14,%esp
10f114: 5b pop %ebx
10f115: 5e pop %esi
10f116: 5f pop %edi
10f117: c9 leave
10f118: c3 ret
0011cce0 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
11cce0: 55 push %ebp
11cce1: 89 e5 mov %esp,%ebp
11cce3: 56 push %esi
11cce4: 53 push %ebx
11cce5: 8b 5d 08 mov 0x8(%ebp),%ebx
11cce8: 8b 75 0c mov 0xc(%ebp),%esi
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 )
11cceb: 8d 4e f8 lea -0x8(%esi),%ecx
11ccee: 89 f0 mov %esi,%eax
11ccf0: 31 d2 xor %edx,%edx
11ccf2: f7 73 10 divl 0x10(%ebx)
11ccf5: 29 d1 sub %edx,%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;
11ccf7: 8b 53 20 mov 0x20(%ebx),%edx
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
11ccfa: 31 c0 xor %eax,%eax
11ccfc: 39 d1 cmp %edx,%ecx
11ccfe: 72 08 jb 11cd08 <_Heap_Size_of_alloc_area+0x28>
11cd00: 31 c0 xor %eax,%eax
11cd02: 39 4b 24 cmp %ecx,0x24(%ebx)
11cd05: 0f 93 c0 setae %al
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 ) ) {
11cd08: 85 c0 test %eax,%eax
11cd0a: 74 2e je 11cd3a <_Heap_Size_of_alloc_area+0x5a>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11cd0c: 8b 41 04 mov 0x4(%ecx),%eax
11cd0f: 83 e0 fe and $0xfffffffe,%eax
11cd12: 01 c1 add %eax,%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
11cd14: 31 c0 xor %eax,%eax
11cd16: 39 d1 cmp %edx,%ecx
11cd18: 72 08 jb 11cd22 <_Heap_Size_of_alloc_area+0x42><== NEVER TAKEN
11cd1a: 31 c0 xor %eax,%eax
11cd1c: 39 4b 24 cmp %ecx,0x24(%ebx)
11cd1f: 0f 93 c0 setae %al
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
11cd22: 85 c0 test %eax,%eax
11cd24: 74 14 je 11cd3a <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN
11cd26: f6 41 04 01 testb $0x1,0x4(%ecx)
11cd2a: 74 0e je 11cd3a <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
11cd2c: 29 f1 sub %esi,%ecx
11cd2e: 8d 51 04 lea 0x4(%ecx),%edx
11cd31: 8b 45 10 mov 0x10(%ebp),%eax
11cd34: 89 10 mov %edx,(%eax)
11cd36: b0 01 mov $0x1,%al
return true;
11cd38: eb 02 jmp 11cd3c <_Heap_Size_of_alloc_area+0x5c>
11cd3a: 31 c0 xor %eax,%eax
}
11cd3c: 5b pop %ebx
11cd3d: 5e pop %esi
11cd3e: c9 leave
11cd3f: c3 ret
0010ba25 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10ba25: 55 push %ebp
10ba26: 89 e5 mov %esp,%ebp
10ba28: 57 push %edi
10ba29: 56 push %esi
10ba2a: 53 push %ebx
10ba2b: 83 ec 4c sub $0x4c,%esp
10ba2e: 8b 7d 08 mov 0x8(%ebp),%edi
10ba31: 8b 75 0c mov 0xc(%ebp),%esi
uintptr_t const page_size = heap->page_size;
10ba34: 8b 4f 10 mov 0x10(%edi),%ecx
uintptr_t const min_block_size = heap->min_block_size;
10ba37: 8b 47 14 mov 0x14(%edi),%eax
10ba3a: 89 45 dc mov %eax,-0x24(%ebp)
Heap_Block *const last_block = heap->last_block;
10ba3d: 8b 57 24 mov 0x24(%edi),%edx
10ba40: 89 55 d0 mov %edx,-0x30(%ebp)
Heap_Block *block = heap->first_block;
10ba43: 8b 5f 20 mov 0x20(%edi),%ebx
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10ba46: c7 45 e4 37 bd 10 00 movl $0x10bd37,-0x1c(%ebp)
10ba4d: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10ba51: 75 07 jne 10ba5a <_Heap_Walk+0x35>
10ba53: c7 45 e4 20 ba 10 00 movl $0x10ba20,-0x1c(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10ba5a: 83 3d 14 64 12 00 03 cmpl $0x3,0x126414
10ba61: 0f 85 c6 02 00 00 jne 10bd2d <_Heap_Walk+0x308>
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)(
10ba67: 50 push %eax
10ba68: ff 77 0c pushl 0xc(%edi)
10ba6b: ff 77 08 pushl 0x8(%edi)
10ba6e: ff 75 d0 pushl -0x30(%ebp)
10ba71: 53 push %ebx
10ba72: ff 77 1c pushl 0x1c(%edi)
10ba75: ff 77 18 pushl 0x18(%edi)
10ba78: ff 75 dc pushl -0x24(%ebp)
10ba7b: 51 push %ecx
10ba7c: 68 68 f7 11 00 push $0x11f768
10ba81: 6a 00 push $0x0
10ba83: 56 push %esi
10ba84: 89 4d bc mov %ecx,-0x44(%ebp)
10ba87: 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 ) {
10ba8a: 83 c4 30 add $0x30,%esp
10ba8d: 8b 4d bc mov -0x44(%ebp),%ecx
10ba90: 85 c9 test %ecx,%ecx
10ba92: 75 0b jne 10ba9f <_Heap_Walk+0x7a>
(*printer)( source, true, "page size is zero\n" );
10ba94: 53 push %ebx
10ba95: 68 f9 f7 11 00 push $0x11f7f9
10ba9a: e9 5b 02 00 00 jmp 10bcfa <_Heap_Walk+0x2d5>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10ba9f: f6 c1 03 test $0x3,%cl
10baa2: 74 0b je 10baaf <_Heap_Walk+0x8a>
(*printer)(
10baa4: 51 push %ecx
10baa5: 68 0c f8 11 00 push $0x11f80c
10baaa: e9 4b 02 00 00 jmp 10bcfa <_Heap_Walk+0x2d5>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10baaf: 8b 45 dc mov -0x24(%ebp),%eax
10bab2: 31 d2 xor %edx,%edx
10bab4: f7 f1 div %ecx
10bab6: 85 d2 test %edx,%edx
10bab8: 74 0d je 10bac7 <_Heap_Walk+0xa2>
(*printer)(
10baba: ff 75 dc pushl -0x24(%ebp)
10babd: 68 2a f8 11 00 push $0x11f82a
10bac2: e9 33 02 00 00 jmp 10bcfa <_Heap_Walk+0x2d5>
);
return false;
}
if (
10bac7: 8d 43 08 lea 0x8(%ebx),%eax
10baca: 31 d2 xor %edx,%edx
10bacc: f7 f1 div %ecx
10bace: 85 d2 test %edx,%edx
10bad0: 74 0b je 10badd <_Heap_Walk+0xb8>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10bad2: 53 push %ebx
10bad3: 68 4e f8 11 00 push $0x11f84e
10bad8: e9 1d 02 00 00 jmp 10bcfa <_Heap_Walk+0x2d5>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10badd: f6 43 04 01 testb $0x1,0x4(%ebx)
10bae1: 75 0b jne 10baee <_Heap_Walk+0xc9>
(*printer)(
10bae3: 51 push %ecx
10bae4: 68 7f f8 11 00 push $0x11f87f
10bae9: e9 0c 02 00 00 jmp 10bcfa <_Heap_Walk+0x2d5>
);
return false;
}
if ( first_block->prev_size != page_size ) {
10baee: 8b 03 mov (%ebx),%eax
10baf0: 89 45 d4 mov %eax,-0x2c(%ebp)
10baf3: 39 c8 cmp %ecx,%eax
10baf5: 74 0f je 10bb06 <_Heap_Walk+0xe1>
(*printer)(
10baf7: 83 ec 0c sub $0xc,%esp
10bafa: 51 push %ecx
10bafb: 50 push %eax
10bafc: 68 ad f8 11 00 push $0x11f8ad
10bb01: e9 3d 01 00 00 jmp 10bc43 <_Heap_Walk+0x21e>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10bb06: 8b 55 d0 mov -0x30(%ebp),%edx
10bb09: 8b 42 04 mov 0x4(%edx),%eax
10bb0c: 83 e0 fe and $0xfffffffe,%eax
10bb0f: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1)
10bb14: 75 0b jne 10bb21 <_Heap_Walk+0xfc>
(*printer)(
10bb16: 52 push %edx
10bb17: 68 d8 f8 11 00 push $0x11f8d8
10bb1c: e9 d9 01 00 00 jmp 10bcfa <_Heap_Walk+0x2d5>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10bb21: 8b 4f 10 mov 0x10(%edi),%ecx
10bb24: 89 4d d8 mov %ecx,-0x28(%ebp)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10bb27: 8b 4f 08 mov 0x8(%edi),%ecx
10bb2a: 89 7d e0 mov %edi,-0x20(%ebp)
10bb2d: eb 6a jmp 10bb99 <_Heap_Walk+0x174>
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
10bb2f: 31 c0 xor %eax,%eax
10bb31: 39 4f 20 cmp %ecx,0x20(%edi)
10bb34: 77 08 ja 10bb3e <_Heap_Walk+0x119>
10bb36: 31 c0 xor %eax,%eax
10bb38: 39 4f 24 cmp %ecx,0x24(%edi)
10bb3b: 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 ) ) {
10bb3e: 85 c0 test %eax,%eax
10bb40: 75 0b jne 10bb4d <_Heap_Walk+0x128>
(*printer)(
10bb42: 51 push %ecx
10bb43: 68 ed f8 11 00 push $0x11f8ed
10bb48: e9 ad 01 00 00 jmp 10bcfa <_Heap_Walk+0x2d5>
);
return false;
}
if (
10bb4d: 8d 41 08 lea 0x8(%ecx),%eax
10bb50: 31 d2 xor %edx,%edx
10bb52: f7 75 d8 divl -0x28(%ebp)
10bb55: 85 d2 test %edx,%edx
10bb57: 74 0b je 10bb64 <_Heap_Walk+0x13f>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10bb59: 51 push %ecx
10bb5a: 68 0d f9 11 00 push $0x11f90d
10bb5f: e9 96 01 00 00 jmp 10bcfa <_Heap_Walk+0x2d5>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10bb64: 8b 41 04 mov 0x4(%ecx),%eax
10bb67: 83 e0 fe and $0xfffffffe,%eax
10bb6a: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10bb6f: 74 0b je 10bb7c <_Heap_Walk+0x157>
(*printer)(
10bb71: 51 push %ecx
10bb72: 68 3d f9 11 00 push $0x11f93d
10bb77: e9 7e 01 00 00 jmp 10bcfa <_Heap_Walk+0x2d5>
);
return false;
}
if ( free_block->prev != prev_block ) {
10bb7c: 8b 41 0c mov 0xc(%ecx),%eax
10bb7f: 3b 45 e0 cmp -0x20(%ebp),%eax
10bb82: 74 0f je 10bb93 <_Heap_Walk+0x16e>
(*printer)(
10bb84: 83 ec 0c sub $0xc,%esp
10bb87: 50 push %eax
10bb88: 51 push %ecx
10bb89: 68 59 f9 11 00 push $0x11f959
10bb8e: e9 b0 00 00 00 jmp 10bc43 <_Heap_Walk+0x21e>
return false;
}
prev_block = free_block;
free_block = free_block->next;
10bb93: 89 4d e0 mov %ecx,-0x20(%ebp)
10bb96: 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 ) {
10bb99: 39 f9 cmp %edi,%ecx
10bb9b: 75 92 jne 10bb2f <_Heap_Walk+0x10a>
10bb9d: 89 75 e0 mov %esi,-0x20(%ebp)
10bba0: e9 7f 01 00 00 jmp 10bd24 <_Heap_Walk+0x2ff>
- 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;
10bba5: 8b 43 04 mov 0x4(%ebx),%eax
10bba8: 89 c1 mov %eax,%ecx
10bbaa: 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);
10bbad: 8d 34 0b lea (%ebx,%ecx,1),%esi
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;
if ( prev_used ) {
10bbb0: a8 01 test $0x1,%al
10bbb2: 74 0c je 10bbc0 <_Heap_Walk+0x19b>
(*printer)(
10bbb4: 83 ec 0c sub $0xc,%esp
10bbb7: 51 push %ecx
10bbb8: 53 push %ebx
10bbb9: 68 8b f9 11 00 push $0x11f98b
10bbbe: eb 0b jmp 10bbcb <_Heap_Walk+0x1a6>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10bbc0: 50 push %eax
10bbc1: 50 push %eax
10bbc2: ff 33 pushl (%ebx)
10bbc4: 51 push %ecx
10bbc5: 53 push %ebx
10bbc6: 68 a2 f9 11 00 push $0x11f9a2
10bbcb: 6a 00 push $0x0
10bbcd: ff 75 e0 pushl -0x20(%ebp)
10bbd0: 89 4d bc mov %ecx,-0x44(%ebp)
10bbd3: ff 55 e4 call *-0x1c(%ebp)
10bbd6: 83 c4 20 add $0x20,%esp
10bbd9: 8b 4d bc mov -0x44(%ebp),%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
10bbdc: 31 c0 xor %eax,%eax
10bbde: 39 77 20 cmp %esi,0x20(%edi)
10bbe1: 77 08 ja 10bbeb <_Heap_Walk+0x1c6> <== NEVER TAKEN
10bbe3: 31 c0 xor %eax,%eax
10bbe5: 39 77 24 cmp %esi,0x24(%edi)
10bbe8: 0f 93 c0 setae %al
block_size,
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10bbeb: 85 c0 test %eax,%eax
10bbed: 75 11 jne 10bc00 <_Heap_Walk+0x1db>
10bbef: 89 f1 mov %esi,%ecx
10bbf1: 8b 75 e0 mov -0x20(%ebp),%esi
(*printer)(
10bbf4: 83 ec 0c sub $0xc,%esp
10bbf7: 51 push %ecx
10bbf8: 53 push %ebx
10bbf9: 68 c7 f9 11 00 push $0x11f9c7
10bbfe: eb 43 jmp 10bc43 <_Heap_Walk+0x21e>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
10bc00: 89 c8 mov %ecx,%eax
10bc02: 31 d2 xor %edx,%edx
10bc04: f7 75 d4 divl -0x2c(%ebp)
10bc07: 85 d2 test %edx,%edx
10bc09: 74 0f je 10bc1a <_Heap_Walk+0x1f5>
10bc0b: 8b 75 e0 mov -0x20(%ebp),%esi
(*printer)(
10bc0e: 83 ec 0c sub $0xc,%esp
10bc11: 51 push %ecx
10bc12: 53 push %ebx
10bc13: 68 f4 f9 11 00 push $0x11f9f4
10bc18: eb 29 jmp 10bc43 <_Heap_Walk+0x21e>
);
return false;
}
if ( block_size < min_block_size ) {
10bc1a: 3b 4d dc cmp -0x24(%ebp),%ecx
10bc1d: 73 11 jae 10bc30 <_Heap_Walk+0x20b>
10bc1f: 8b 75 e0 mov -0x20(%ebp),%esi
(*printer)(
10bc22: 57 push %edi
10bc23: 57 push %edi
10bc24: ff 75 dc pushl -0x24(%ebp)
10bc27: 51 push %ecx
10bc28: 53 push %ebx
10bc29: 68 22 fa 11 00 push $0x11fa22
10bc2e: eb 13 jmp 10bc43 <_Heap_Walk+0x21e>
);
return false;
}
if ( next_block_begin <= block_begin ) {
10bc30: 39 de cmp %ebx,%esi
10bc32: 77 1f ja 10bc53 <_Heap_Walk+0x22e>
10bc34: 89 f1 mov %esi,%ecx
10bc36: 8b 75 e0 mov -0x20(%ebp),%esi
(*printer)(
10bc39: 83 ec 0c sub $0xc,%esp
10bc3c: 51 push %ecx
10bc3d: 53 push %ebx
10bc3e: 68 4d fa 11 00 push $0x11fa4d
10bc43: 6a 01 push $0x1
10bc45: 56 push %esi
10bc46: ff 55 e4 call *-0x1c(%ebp)
10bc49: 31 c0 xor %eax,%eax
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
10bc4b: 83 c4 20 add $0x20,%esp
10bc4e: e9 dc 00 00 00 jmp 10bd2f <_Heap_Walk+0x30a>
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10bc53: f6 46 04 01 testb $0x1,0x4(%esi)
10bc57: 0f 85 c5 00 00 00 jne 10bd22 <_Heap_Walk+0x2fd>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10bc5d: 8b 47 08 mov 0x8(%edi),%eax
10bc60: 89 45 c0 mov %eax,-0x40(%ebp)
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
10bc63: 8b 53 04 mov 0x4(%ebx),%edx
10bc66: 89 55 c4 mov %edx,-0x3c(%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;
10bc69: 83 e2 fe and $0xfffffffe,%edx
10bc6c: 89 55 cc mov %edx,-0x34(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10bc6f: 01 da add %ebx,%edx
10bc71: 89 55 c8 mov %edx,-0x38(%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)(
10bc74: 8b 4b 08 mov 0x8(%ebx),%ecx
10bc77: 89 4d b4 mov %ecx,-0x4c(%ebp)
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
10bc7a: ba 81 fa 11 00 mov $0x11fa81,%edx
10bc7f: 3b 4f 0c cmp 0xc(%edi),%ecx
10bc82: 74 0e je 10bc92 <_Heap_Walk+0x26d>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
10bc84: ba 8b fa 11 00 mov $0x11fa8b,%edx
10bc89: 39 f9 cmp %edi,%ecx
10bc8b: 74 05 je 10bc92 <_Heap_Walk+0x26d>
10bc8d: ba b6 f6 11 00 mov $0x11f6b6,%edx
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10bc92: 8b 43 0c mov 0xc(%ebx),%eax
10bc95: 89 45 d8 mov %eax,-0x28(%ebp)
10bc98: b8 95 fa 11 00 mov $0x11fa95,%eax
10bc9d: 8b 4d c0 mov -0x40(%ebp),%ecx
10bca0: 39 4d d8 cmp %ecx,-0x28(%ebp)
10bca3: 74 0f je 10bcb4 <_Heap_Walk+0x28f>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
10bca5: b8 a0 fa 11 00 mov $0x11faa0,%eax
10bcaa: 39 7d d8 cmp %edi,-0x28(%ebp)
10bcad: 74 05 je 10bcb4 <_Heap_Walk+0x28f>
10bcaf: b8 b6 f6 11 00 mov $0x11f6b6,%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)(
10bcb4: 52 push %edx
10bcb5: ff 75 b4 pushl -0x4c(%ebp)
10bcb8: 50 push %eax
10bcb9: ff 75 d8 pushl -0x28(%ebp)
10bcbc: 53 push %ebx
10bcbd: 68 aa fa 11 00 push $0x11faaa
10bcc2: 6a 00 push $0x0
10bcc4: ff 75 e0 pushl -0x20(%ebp)
10bcc7: ff 55 e4 call *-0x1c(%ebp)
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10bcca: 8b 55 c8 mov -0x38(%ebp),%edx
10bccd: 8b 02 mov (%edx),%eax
10bccf: 83 c4 20 add $0x20,%esp
10bcd2: 39 45 cc cmp %eax,-0x34(%ebp)
10bcd5: 74 14 je 10bceb <_Heap_Walk+0x2c6>
10bcd7: 8b 75 e0 mov -0x20(%ebp),%esi
(*printer)(
10bcda: 51 push %ecx
10bcdb: 52 push %edx
10bcdc: 50 push %eax
10bcdd: ff 75 cc pushl -0x34(%ebp)
10bce0: 53 push %ebx
10bce1: 68 d6 fa 11 00 push $0x11fad6
10bce6: e9 58 ff ff ff jmp 10bc43 <_Heap_Walk+0x21e>
);
return false;
}
if ( !prev_used ) {
10bceb: f6 45 c4 01 testb $0x1,-0x3c(%ebp)
10bcef: 75 16 jne 10bd07 <_Heap_Walk+0x2e2>
10bcf1: 8b 75 e0 mov -0x20(%ebp),%esi
(*printer)(
10bcf4: 53 push %ebx
10bcf5: 68 0f fb 11 00 push $0x11fb0f
10bcfa: 6a 01 push $0x1
10bcfc: 56 push %esi
10bcfd: ff 55 e4 call *-0x1c(%ebp)
10bd00: 31 c0 xor %eax,%eax
10bd02: 83 c4 10 add $0x10,%esp
10bd05: eb 28 jmp 10bd2f <_Heap_Walk+0x30a>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10bd07: 8b 47 08 mov 0x8(%edi),%eax
10bd0a: eb 07 jmp 10bd13 <_Heap_Walk+0x2ee>
{
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 ) {
10bd0c: 39 d8 cmp %ebx,%eax
10bd0e: 74 12 je 10bd22 <_Heap_Walk+0x2fd>
return true;
}
free_block = free_block->next;
10bd10: 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 ) {
10bd13: 39 f8 cmp %edi,%eax
10bd15: 75 f5 jne 10bd0c <_Heap_Walk+0x2e7>
10bd17: 8b 75 e0 mov -0x20(%ebp),%esi
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10bd1a: 53 push %ebx
10bd1b: 68 3e fb 11 00 push $0x11fb3e
10bd20: eb d8 jmp 10bcfa <_Heap_Walk+0x2d5>
)
{
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 ) {
10bd22: 89 f3 mov %esi,%ebx
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
10bd24: 3b 5d d0 cmp -0x30(%ebp),%ebx
10bd27: 0f 85 78 fe ff ff jne 10bba5 <_Heap_Walk+0x180>
10bd2d: b0 01 mov $0x1,%al
block = next_block;
}
return true;
}
10bd2f: 8d 65 f4 lea -0xc(%ebp),%esp
10bd32: 5b pop %ebx
10bd33: 5e pop %esi
10bd34: 5f pop %edi
10bd35: c9 leave
10bd36: c3 ret
0010b014 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10b014: 55 push %ebp
10b015: 89 e5 mov %esp,%ebp
10b017: 53 push %ebx
10b018: 83 ec 08 sub $0x8,%esp
10b01b: 8b 45 08 mov 0x8(%ebp),%eax
10b01e: 8b 55 0c mov 0xc(%ebp),%edx
10b021: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10b024: a3 98 42 12 00 mov %eax,0x124298
_Internal_errors_What_happened.is_internal = is_internal;
10b029: 88 15 9c 42 12 00 mov %dl,0x12429c
_Internal_errors_What_happened.the_error = the_error;
10b02f: 89 1d a0 42 12 00 mov %ebx,0x1242a0
_User_extensions_Fatal( the_source, is_internal, the_error );
10b035: 53 push %ebx
10b036: 0f b6 d2 movzbl %dl,%edx
10b039: 52 push %edx
10b03a: 50 push %eax
10b03b: e8 37 19 00 00 call 10c977 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10b040: c7 05 8c 43 12 00 05 movl $0x5,0x12438c <== NOT EXECUTED
10b047: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10b04a: fa cli <== NOT EXECUTED
10b04b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10b04d: f4 hlt <== NOT EXECUTED
10b04e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b051: eb fe jmp 10b051 <_Internal_error_Occurred+0x3d><== NOT EXECUTED
0010b0ac <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10b0ac: 55 push %ebp
10b0ad: 89 e5 mov %esp,%ebp
10b0af: 56 push %esi
10b0b0: 53 push %ebx
10b0b1: 8b 5d 08 mov 0x8(%ebp),%ebx
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
10b0b4: 31 c9 xor %ecx,%ecx
10b0b6: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10b0ba: 74 53 je 10b10f <_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 );
10b0bc: 8d 73 20 lea 0x20(%ebx),%esi
10b0bf: 83 ec 0c sub $0xc,%esp
10b0c2: 56 push %esi
10b0c3: e8 ac f7 ff ff call 10a874 <_Chain_Get>
10b0c8: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10b0ca: 83 c4 10 add $0x10,%esp
10b0cd: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10b0d1: 74 3c je 10b10f <_Objects_Allocate+0x63>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10b0d3: 85 c0 test %eax,%eax
10b0d5: 75 1a jne 10b0f1 <_Objects_Allocate+0x45>
_Objects_Extend_information( information );
10b0d7: 83 ec 0c sub $0xc,%esp
10b0da: 53 push %ebx
10b0db: e8 60 00 00 00 call 10b140 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10b0e0: 89 34 24 mov %esi,(%esp)
10b0e3: e8 8c f7 ff ff call 10a874 <_Chain_Get>
10b0e8: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10b0ea: 83 c4 10 add $0x10,%esp
10b0ed: 85 c0 test %eax,%eax
10b0ef: 74 1e je 10b10f <_Objects_Allocate+0x63>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10b0f1: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10b0f5: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10b0f9: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
10b0fb: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10b0ff: 31 d2 xor %edx,%edx
10b101: f7 f6 div %esi
10b103: c1 e0 02 shl $0x2,%eax
10b106: 03 43 30 add 0x30(%ebx),%eax
10b109: ff 08 decl (%eax)
information->inactive--;
10b10b: 66 ff 4b 2c decw 0x2c(%ebx)
}
}
return the_object;
}
10b10f: 89 c8 mov %ecx,%eax
10b111: 8d 65 f8 lea -0x8(%ebp),%esp
10b114: 5b pop %ebx
10b115: 5e pop %esi
10b116: c9 leave
10b117: c3 ret
0010b140 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10b140: 55 push %ebp
10b141: 89 e5 mov %esp,%ebp
10b143: 57 push %edi
10b144: 56 push %esi
10b145: 53 push %ebx
10b146: 83 ec 4c sub $0x4c,%esp
10b149: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
10b14c: 0f b7 43 08 movzwl 0x8(%ebx),%eax
10b150: 89 45 c8 mov %eax,-0x38(%ebp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10b153: 8b 4b 34 mov 0x34(%ebx),%ecx
10b156: 85 c9 test %ecx,%ecx
10b158: 75 0e jne 10b168 <_Objects_Extend_information+0x28>
10b15a: 89 45 d4 mov %eax,-0x2c(%ebp)
10b15d: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
10b164: 31 d2 xor %edx,%edx
10b166: eb 31 jmp 10b199 <_Objects_Extend_information+0x59>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10b168: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10b16c: 8b 43 10 mov 0x10(%ebx),%eax
10b16f: 31 d2 xor %edx,%edx
10b171: 66 f7 f6 div %si
10b174: 0f b7 d0 movzwl %ax,%edx
10b177: 8b 7d c8 mov -0x38(%ebp),%edi
10b17a: 89 7d d4 mov %edi,-0x2c(%ebp)
10b17d: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
10b184: 31 c0 xor %eax,%eax
for ( ; block < block_count; block++ ) {
10b186: eb 0a jmp 10b192 <_Objects_Extend_information+0x52>
if ( information->object_blocks[ block ] == NULL )
10b188: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4)
10b18c: 74 08 je 10b196 <_Objects_Extend_information+0x56>
10b18e: 01 75 d4 add %esi,-0x2c(%ebp)
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10b191: 40 inc %eax
10b192: 39 d0 cmp %edx,%eax
10b194: 72 f2 jb 10b188 <_Objects_Extend_information+0x48>
10b196: 89 45 cc mov %eax,-0x34(%ebp)
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10b199: 0f b7 43 14 movzwl 0x14(%ebx),%eax
10b19d: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10b1a1: 8d 0c 08 lea (%eax,%ecx,1),%ecx
10b1a4: 89 4d b8 mov %ecx,-0x48(%ebp)
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
10b1a7: 81 f9 ff ff 00 00 cmp $0xffff,%ecx
10b1ad: 0f 87 db 01 00 00 ja 10b38e <_Objects_Extend_information+0x24e><== NEVER TAKEN
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
10b1b3: 0f af 43 18 imul 0x18(%ebx),%eax
if ( information->auto_extend ) {
10b1b7: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10b1bb: 74 1e je 10b1db <_Objects_Extend_information+0x9b>
new_object_block = _Workspace_Allocate( block_size );
10b1bd: 83 ec 0c sub $0xc,%esp
10b1c0: 50 push %eax
10b1c1: 89 55 b4 mov %edx,-0x4c(%ebp)
10b1c4: e8 df 1a 00 00 call 10cca8 <_Workspace_Allocate>
10b1c9: 89 45 bc mov %eax,-0x44(%ebp)
if ( !new_object_block )
10b1cc: 83 c4 10 add $0x10,%esp
10b1cf: 85 c0 test %eax,%eax
10b1d1: 8b 55 b4 mov -0x4c(%ebp),%edx
10b1d4: 75 1a jne 10b1f0 <_Objects_Extend_information+0xb0>
10b1d6: e9 b3 01 00 00 jmp 10b38e <_Objects_Extend_information+0x24e>
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
10b1db: 83 ec 0c sub $0xc,%esp
10b1de: 50 push %eax
10b1df: 89 55 b4 mov %edx,-0x4c(%ebp)
10b1e2: e8 95 1a 00 00 call 10cc7c <_Workspace_Allocate_or_fatal_error>
10b1e7: 89 45 bc mov %eax,-0x44(%ebp)
10b1ea: 83 c4 10 add $0x10,%esp
10b1ed: 8b 55 b4 mov -0x4c(%ebp),%edx
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
10b1f0: 0f b7 43 10 movzwl 0x10(%ebx),%eax
10b1f4: 39 45 d4 cmp %eax,-0x2c(%ebp)
10b1f7: 0f 82 14 01 00 00 jb 10b311 <_Objects_Extend_information+0x1d1>
*/
/*
* Up the block count and maximum
*/
block_count++;
10b1fd: 8d 72 01 lea 0x1(%edx),%esi
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10b200: 83 ec 0c sub $0xc,%esp
10b203: 8b 4d b8 mov -0x48(%ebp),%ecx
10b206: 03 4d c8 add -0x38(%ebp),%ecx
10b209: 8d 04 76 lea (%esi,%esi,2),%eax
10b20c: 8d 04 01 lea (%ecx,%eax,1),%eax
10b20f: c1 e0 02 shl $0x2,%eax
10b212: 50 push %eax
10b213: 89 55 b4 mov %edx,-0x4c(%ebp)
10b216: e8 8d 1a 00 00 call 10cca8 <_Workspace_Allocate>
if ( !object_blocks ) {
10b21b: 83 c4 10 add $0x10,%esp
10b21e: 85 c0 test %eax,%eax
10b220: 8b 55 b4 mov -0x4c(%ebp),%edx
10b223: 75 13 jne 10b238 <_Objects_Extend_information+0xf8>
_Workspace_Free( new_object_block );
10b225: 83 ec 0c sub $0xc,%esp
10b228: ff 75 bc pushl -0x44(%ebp)
10b22b: e8 91 1a 00 00 call 10ccc1 <_Workspace_Free>
return;
10b230: 83 c4 10 add $0x10,%esp
10b233: e9 56 01 00 00 jmp 10b38e <_Objects_Extend_information+0x24e>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
10b238: 8d 0c b0 lea (%eax,%esi,4),%ecx
10b23b: 89 4d c0 mov %ecx,-0x40(%ebp)
10b23e: 8d 34 f0 lea (%eax,%esi,8),%esi
10b241: 89 75 c4 mov %esi,-0x3c(%ebp)
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10b244: 0f b7 73 10 movzwl 0x10(%ebx),%esi
10b248: 31 c9 xor %ecx,%ecx
10b24a: 3b 75 c8 cmp -0x38(%ebp),%esi
10b24d: 76 3e jbe 10b28d <_Objects_Extend_information+0x14d>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
10b24f: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi
10b256: 89 75 d0 mov %esi,-0x30(%ebp)
10b259: 8b 73 34 mov 0x34(%ebx),%esi
10b25c: 89 c7 mov %eax,%edi
10b25e: 8b 4d d0 mov -0x30(%ebp),%ecx
10b261: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10b263: 8b 73 30 mov 0x30(%ebx),%esi
10b266: 8b 7d c0 mov -0x40(%ebp),%edi
10b269: 8b 4d d0 mov -0x30(%ebp),%ecx
10b26c: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10b26e: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10b272: 03 4d c8 add -0x38(%ebp),%ecx
10b275: c1 e1 02 shl $0x2,%ecx
10b278: 8b 73 1c mov 0x1c(%ebx),%esi
10b27b: 8b 7d c4 mov -0x3c(%ebp),%edi
10b27e: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10b280: eb 10 jmp 10b292 <_Objects_Extend_information+0x152>
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
10b282: 8b 7d c4 mov -0x3c(%ebp),%edi
10b285: c7 04 8f 00 00 00 00 movl $0x0,(%edi,%ecx,4)
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10b28c: 41 inc %ecx
10b28d: 3b 4d c8 cmp -0x38(%ebp),%ecx
10b290: 72 f0 jb 10b282 <_Objects_Extend_information+0x142>
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10b292: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
inactive_per_block[block_count] = 0;
10b299: 8b 4d c0 mov -0x40(%ebp),%ecx
10b29c: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10b2a3: 0f b7 53 14 movzwl 0x14(%ebx),%edx
10b2a7: 8b 75 d4 mov -0x2c(%ebp),%esi
10b2aa: 01 d6 add %edx,%esi
10b2ac: 8b 7d d4 mov -0x2c(%ebp),%edi
10b2af: 8b 55 c4 mov -0x3c(%ebp),%edx
10b2b2: 8d 0c ba lea (%edx,%edi,4),%ecx
10b2b5: 89 fa mov %edi,%edx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10b2b7: eb 0a jmp 10b2c3 <_Objects_Extend_information+0x183>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10b2b9: c7 01 00 00 00 00 movl $0x0,(%ecx)
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
10b2bf: 42 inc %edx
10b2c0: 83 c1 04 add $0x4,%ecx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10b2c3: 39 f2 cmp %esi,%edx
10b2c5: 72 f2 jb 10b2b9 <_Objects_Extend_information+0x179>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10b2c7: 9c pushf
10b2c8: fa cli
10b2c9: 5e pop %esi
old_tables = information->object_blocks;
10b2ca: 8b 53 34 mov 0x34(%ebx),%edx
information->object_blocks = object_blocks;
10b2cd: 89 43 34 mov %eax,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10b2d0: 8b 4d c0 mov -0x40(%ebp),%ecx
10b2d3: 89 4b 30 mov %ecx,0x30(%ebx)
information->local_table = local_table;
10b2d6: 8b 7d c4 mov -0x3c(%ebp),%edi
10b2d9: 89 7b 1c mov %edi,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10b2dc: 8b 45 b8 mov -0x48(%ebp),%eax
10b2df: 66 89 43 10 mov %ax,0x10(%ebx)
information->maximum_id = _Objects_Build_id(
10b2e3: 8b 03 mov (%ebx),%eax
10b2e5: c1 e0 18 shl $0x18,%eax
10b2e8: 0d 00 00 01 00 or $0x10000,%eax
10b2ed: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
10b2f1: c1 e1 1b shl $0x1b,%ecx
10b2f4: 09 c8 or %ecx,%eax
10b2f6: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx
10b2fa: 09 c8 or %ecx,%eax
10b2fc: 89 43 0c mov %eax,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10b2ff: 56 push %esi
10b300: 9d popf
if ( old_tables )
10b301: 85 d2 test %edx,%edx
10b303: 74 0c je 10b311 <_Objects_Extend_information+0x1d1>
_Workspace_Free( old_tables );
10b305: 83 ec 0c sub $0xc,%esp
10b308: 52 push %edx
10b309: e8 b3 19 00 00 call 10ccc1 <_Workspace_Free>
10b30e: 83 c4 10 add $0x10,%esp
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10b311: 8b 55 cc mov -0x34(%ebp),%edx
10b314: c1 e2 02 shl $0x2,%edx
10b317: 89 55 d0 mov %edx,-0x30(%ebp)
10b31a: 8b 43 34 mov 0x34(%ebx),%eax
10b31d: 8b 75 bc mov -0x44(%ebp),%esi
10b320: 8b 4d cc mov -0x34(%ebp),%ecx
10b323: 89 34 88 mov %esi,(%eax,%ecx,4)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10b326: ff 73 18 pushl 0x18(%ebx)
10b329: 0f b7 53 14 movzwl 0x14(%ebx),%edx
10b32d: 52 push %edx
10b32e: ff 34 88 pushl (%eax,%ecx,4)
10b331: 8d 45 dc lea -0x24(%ebp),%eax
10b334: 50 push %eax
10b335: 89 45 b4 mov %eax,-0x4c(%ebp)
10b338: e8 a7 38 00 00 call 10ebe4 <_Chain_Initialize>
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10b33d: 8d 7b 20 lea 0x20(%ebx),%edi
10b340: 8b 75 d4 mov -0x2c(%ebp),%esi
10b343: eb 23 jmp 10b368 <_Objects_Extend_information+0x228>
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
10b345: 8b 13 mov (%ebx),%edx
10b347: c1 e2 18 shl $0x18,%edx
10b34a: 81 ca 00 00 01 00 or $0x10000,%edx
10b350: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
10b354: c1 e1 1b shl $0x1b,%ecx
10b357: 09 ca or %ecx,%edx
10b359: 09 f2 or %esi,%edx
10b35b: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10b35e: 52 push %edx
10b35f: 52 push %edx
10b360: 50 push %eax
10b361: 57 push %edi
10b362: e8 e9 f4 ff ff call 10a850 <_Chain_Append>
index++;
10b367: 46 inc %esi
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10b368: 8d 45 dc lea -0x24(%ebp),%eax
10b36b: 89 04 24 mov %eax,(%esp)
10b36e: e8 01 f5 ff ff call 10a874 <_Chain_Get>
10b373: 83 c4 10 add $0x10,%esp
10b376: 85 c0 test %eax,%eax
10b378: 75 cb jne 10b345 <_Objects_Extend_information+0x205>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10b37a: 8b 43 30 mov 0x30(%ebx),%eax
10b37d: 0f b7 53 14 movzwl 0x14(%ebx),%edx
10b381: 8b 4d d0 mov -0x30(%ebp),%ecx
10b384: 89 14 08 mov %edx,(%eax,%ecx,1)
information->inactive =
10b387: 8b 43 14 mov 0x14(%ebx),%eax
10b38a: 66 01 43 2c add %ax,0x2c(%ebx)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
10b38e: 8d 65 f4 lea -0xc(%ebp),%esp
10b391: 5b pop %ebx
10b392: 5e pop %esi
10b393: 5f pop %edi
10b394: c9 leave
10b395: c3 ret
0010b428 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
10b428: 55 push %ebp
10b429: 89 e5 mov %esp,%ebp
10b42b: 56 push %esi
10b42c: 53 push %ebx
10b42d: 8b 75 08 mov 0x8(%ebp),%esi
10b430: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10b433: 85 db test %ebx,%ebx
10b435: 74 2d je 10b464 <_Objects_Get_information+0x3c><== NEVER TAKEN
/*
* 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 );
10b437: 83 ec 0c sub $0xc,%esp
10b43a: 56 push %esi
10b43b: e8 dc 3c 00 00 call 10f11c <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10b440: 83 c4 10 add $0x10,%esp
10b443: 85 c0 test %eax,%eax
10b445: 74 1d je 10b464 <_Objects_Get_information+0x3c><== NEVER TAKEN
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10b447: 39 c3 cmp %eax,%ebx
10b449: 77 19 ja 10b464 <_Objects_Get_information+0x3c><== NEVER TAKEN
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10b44b: 8b 04 b5 c8 41 12 00 mov 0x1241c8(,%esi,4),%eax
10b452: 85 c0 test %eax,%eax
10b454: 74 0e je 10b464 <_Objects_Get_information+0x3c><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10b456: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !info )
10b459: 85 c0 test %eax,%eax
10b45b: 74 09 je 10b466 <_Objects_Get_information+0x3e><== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
10b45d: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10b462: 75 02 jne 10b466 <_Objects_Get_information+0x3e>
10b464: 31 c0 xor %eax,%eax
return NULL;
#endif
return info;
}
10b466: 8d 65 f8 lea -0x8(%ebp),%esp
10b469: 5b pop %ebx
10b46a: 5e pop %esi
10b46b: c9 leave
10b46c: c3 ret
00118a34 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
118a34: 55 push %ebp
118a35: 89 e5 mov %esp,%ebp
118a37: 53 push %ebx
118a38: 8b 55 08 mov 0x8(%ebp),%edx
118a3b: 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;
118a3e: b8 01 00 00 00 mov $0x1,%eax
118a43: 2b 42 08 sub 0x8(%edx),%eax
118a46: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
118a49: 0f b7 5a 10 movzwl 0x10(%edx),%ebx
118a4d: 39 c3 cmp %eax,%ebx
118a4f: 72 12 jb 118a63 <_Objects_Get_no_protection+0x2f>
if ( (the_object = information->local_table[ index ]) != NULL ) {
118a51: 8b 52 1c mov 0x1c(%edx),%edx
118a54: 8b 04 82 mov (%edx,%eax,4),%eax
118a57: 85 c0 test %eax,%eax
118a59: 74 08 je 118a63 <_Objects_Get_no_protection+0x2f><== NEVER TAKEN
*location = OBJECTS_LOCAL;
118a5b: c7 01 00 00 00 00 movl $0x0,(%ecx)
return the_object;
118a61: eb 08 jmp 118a6b <_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;
118a63: c7 01 01 00 00 00 movl $0x1,(%ecx)
118a69: 31 c0 xor %eax,%eax
return NULL;
}
118a6b: 5b pop %ebx
118a6c: c9 leave
118a6d: c3 ret
0010c614 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10c614: 55 push %ebp
10c615: 89 e5 mov %esp,%ebp
10c617: 83 ec 18 sub $0x18,%esp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10c61a: 8b 45 08 mov 0x8(%ebp),%eax
10c61d: 85 c0 test %eax,%eax
10c61f: 75 08 jne 10c629 <_Objects_Id_to_name+0x15>
10c621: a1 9c 73 12 00 mov 0x12739c,%eax
10c626: 8b 40 08 mov 0x8(%eax),%eax
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
10c629: 89 c2 mov %eax,%edx
10c62b: c1 ea 18 shr $0x18,%edx
10c62e: 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 )
10c631: 8d 4a ff lea -0x1(%edx),%ecx
10c634: 83 f9 03 cmp $0x3,%ecx
10c637: 77 38 ja 10c671 <_Objects_Id_to_name+0x5d>
10c639: eb 3d jmp 10c678 <_Objects_Id_to_name+0x64>
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10c63b: 89 c1 mov %eax,%ecx
10c63d: c1 e9 1b shr $0x1b,%ecx
10c640: 8b 14 8a mov (%edx,%ecx,4),%edx
if ( !information )
10c643: 85 d2 test %edx,%edx
10c645: 74 2a je 10c671 <_Objects_Id_to_name+0x5d><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
10c647: 80 7a 38 00 cmpb $0x0,0x38(%edx)
10c64b: 75 24 jne 10c671 <_Objects_Id_to_name+0x5d><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
10c64d: 51 push %ecx
10c64e: 8d 4d f4 lea -0xc(%ebp),%ecx
10c651: 51 push %ecx
10c652: 50 push %eax
10c653: 52 push %edx
10c654: e8 63 ff ff ff call 10c5bc <_Objects_Get>
if ( !the_object )
10c659: 83 c4 10 add $0x10,%esp
10c65c: 85 c0 test %eax,%eax
10c65e: 74 11 je 10c671 <_Objects_Id_to_name+0x5d>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10c660: 8b 50 0c mov 0xc(%eax),%edx
10c663: 8b 45 0c mov 0xc(%ebp),%eax
10c666: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10c668: e8 b4 07 00 00 call 10ce21 <_Thread_Enable_dispatch>
10c66d: 31 c0 xor %eax,%eax
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10c66f: eb 05 jmp 10c676 <_Objects_Id_to_name+0x62>
10c671: b8 03 00 00 00 mov $0x3,%eax
}
10c676: c9 leave
10c677: 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 ] )
10c678: 8b 14 95 b4 72 12 00 mov 0x1272b4(,%edx,4),%edx
10c67f: 85 d2 test %edx,%edx
10c681: 75 b8 jne 10c63b <_Objects_Id_to_name+0x27>
10c683: eb ec jmp 10c671 <_Objects_Id_to_name+0x5d>
0010bc98 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
10bc98: 55 push %ebp
10bc99: 89 e5 mov %esp,%ebp
10bc9b: 57 push %edi
10bc9c: 56 push %esi
10bc9d: 53 push %ebx
10bc9e: 83 ec 34 sub $0x34,%esp
10bca1: 8b 55 08 mov 0x8(%ebp),%edx
10bca4: 8b 7d 0c mov 0xc(%ebp),%edi
10bca7: 8b 5d 10 mov 0x10(%ebp),%ebx
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
10bcaa: 0f b7 42 3a movzwl 0x3a(%edx),%eax
10bcae: 50 push %eax
10bcaf: 53 push %ebx
10bcb0: 89 55 d4 mov %edx,-0x2c(%ebp)
10bcb3: e8 04 72 00 00 call 112ebc <strnlen>
10bcb8: 89 c6 mov %eax,%esi
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
10bcba: 83 c4 10 add $0x10,%esp
10bcbd: 8b 55 d4 mov -0x2c(%ebp),%edx
10bcc0: 80 7a 38 00 cmpb $0x0,0x38(%edx)
10bcc4: 74 54 je 10bd1a <_Objects_Set_name+0x82>
char *d;
d = _Workspace_Allocate( length + 1 );
10bcc6: 83 ec 0c sub $0xc,%esp
10bcc9: 8d 40 01 lea 0x1(%eax),%eax
10bccc: 50 push %eax
10bccd: e8 a2 16 00 00 call 10d374 <_Workspace_Allocate>
10bcd2: 89 c2 mov %eax,%edx
if ( !d )
10bcd4: 83 c4 10 add $0x10,%esp
10bcd7: 31 c0 xor %eax,%eax
10bcd9: 85 d2 test %edx,%edx
10bcdb: 74 79 je 10bd56 <_Objects_Set_name+0xbe><== NEVER TAKEN
return false;
if ( the_object->name.name_p ) {
10bcdd: 8b 47 0c mov 0xc(%edi),%eax
10bce0: 85 c0 test %eax,%eax
10bce2: 74 19 je 10bcfd <_Objects_Set_name+0x65>
_Workspace_Free( (void *)the_object->name.name_p );
10bce4: 83 ec 0c sub $0xc,%esp
10bce7: 50 push %eax
10bce8: 89 55 d4 mov %edx,-0x2c(%ebp)
10bceb: e8 9d 16 00 00 call 10d38d <_Workspace_Free>
the_object->name.name_p = NULL;
10bcf0: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
10bcf7: 83 c4 10 add $0x10,%esp
10bcfa: 8b 55 d4 mov -0x2c(%ebp),%edx
}
strncpy( d, name, length );
10bcfd: 50 push %eax
10bcfe: 56 push %esi
10bcff: 53 push %ebx
10bd00: 52 push %edx
10bd01: 89 55 d4 mov %edx,-0x2c(%ebp)
10bd04: e8 37 71 00 00 call 112e40 <strncpy>
d[length] = '\0';
10bd09: 8b 55 d4 mov -0x2c(%ebp),%edx
10bd0c: c6 04 32 00 movb $0x0,(%edx,%esi,1)
the_object->name.name_p = d;
10bd10: 89 57 0c mov %edx,0xc(%edi)
10bd13: b0 01 mov $0x1,%al
10bd15: 83 c4 10 add $0x10,%esp
10bd18: eb 3c jmp 10bd56 <_Objects_Set_name+0xbe>
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10bd1a: 8a 03 mov (%ebx),%al
10bd1c: 88 45 d8 mov %al,-0x28(%ebp)
10bd1f: 83 fe 01 cmp $0x1,%esi
10bd22: 76 3a jbe 10bd5e <_Objects_Set_name+0xc6>
10bd24: 0f be 53 01 movsbl 0x1(%ebx),%edx
10bd28: c1 e2 10 shl $0x10,%edx
10bd2b: 83 fe 02 cmp $0x2,%esi
10bd2e: 76 33 jbe 10bd63 <_Objects_Set_name+0xcb>
10bd30: 0f be 43 02 movsbl 0x2(%ebx),%eax
10bd34: c1 e0 08 shl $0x8,%eax
10bd37: b9 20 00 00 00 mov $0x20,%ecx
10bd3c: 83 fe 03 cmp $0x3,%esi
10bd3f: 76 04 jbe 10bd45 <_Objects_Set_name+0xad>
10bd41: 0f be 4b 03 movsbl 0x3(%ebx),%ecx
10bd45: 8a 5d d8 mov -0x28(%ebp),%bl
10bd48: c1 e3 18 shl $0x18,%ebx
10bd4b: 09 d3 or %edx,%ebx
10bd4d: 09 c3 or %eax,%ebx
10bd4f: 09 cb or %ecx,%ebx
10bd51: 89 5f 0c mov %ebx,0xc(%edi)
10bd54: b0 01 mov $0x1,%al
);
}
return true;
}
10bd56: 8d 65 f4 lea -0xc(%ebp),%esp
10bd59: 5b pop %ebx
10bd5a: 5e pop %esi
10bd5b: 5f pop %edi
10bd5c: c9 leave
10bd5d: c3 ret
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10bd5e: ba 00 00 20 00 mov $0x200000,%edx
10bd63: b8 00 20 00 00 mov $0x2000,%eax
10bd68: b9 20 00 00 00 mov $0x20,%ecx
10bd6d: eb d6 jmp 10bd45 <_Objects_Set_name+0xad>
0010ac14 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
10ac14: 55 push %ebp
10ac15: 89 e5 mov %esp,%ebp
10ac17: 57 push %edi
10ac18: 56 push %esi
10ac19: 53 push %ebx
10ac1a: 83 ec 34 sub $0x34,%esp
10ac1d: 8b 7d 08 mov 0x8(%ebp),%edi
10ac20: 8b 75 0c mov 0xc(%ebp),%esi
10ac23: 8a 45 14 mov 0x14(%ebp),%al
10ac26: 88 45 d7 mov %al,-0x29(%ebp)
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
10ac29: 8d 5d e4 lea -0x1c(%ebp),%ebx
10ac2c: 53 push %ebx
10ac2d: 56 push %esi
10ac2e: e8 82 01 00 00 call 10adb5 <_POSIX_Mutex_Get>
10ac33: 83 c4 10 add $0x10,%esp
10ac36: 85 c0 test %eax,%eax
10ac38: 0f 84 ae 00 00 00 je 10acec <_POSIX_Condition_variables_Wait_support+0xd8>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10ac3e: a1 54 72 12 00 mov 0x127254,%eax
10ac43: 48 dec %eax
10ac44: a3 54 72 12 00 mov %eax,0x127254
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10ac49: 52 push %edx
10ac4a: 52 push %edx
10ac4b: 53 push %ebx
10ac4c: 57 push %edi
10ac4d: e8 16 fe ff ff call 10aa68 <_POSIX_Condition_variables_Get>
10ac52: 89 c3 mov %eax,%ebx
switch ( location ) {
10ac54: 83 c4 10 add $0x10,%esp
10ac57: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10ac5b: 0f 85 8b 00 00 00 jne 10acec <_POSIX_Condition_variables_Wait_support+0xd8>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
10ac61: 8b 40 14 mov 0x14(%eax),%eax
10ac64: 85 c0 test %eax,%eax
10ac66: 74 0b je 10ac73 <_POSIX_Condition_variables_Wait_support+0x5f>
10ac68: 3b 06 cmp (%esi),%eax
10ac6a: 74 07 je 10ac73 <_POSIX_Condition_variables_Wait_support+0x5f>
_Thread_Enable_dispatch();
10ac6c: e8 24 2d 00 00 call 10d995 <_Thread_Enable_dispatch>
10ac71: eb 79 jmp 10acec <_POSIX_Condition_variables_Wait_support+0xd8>
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
10ac73: 83 ec 0c sub $0xc,%esp
10ac76: 56 push %esi
10ac77: e8 20 03 00 00 call 10af9c <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
10ac7c: 83 c4 10 add $0x10,%esp
10ac7f: 80 7d d7 00 cmpb $0x0,-0x29(%ebp)
10ac83: 75 4d jne 10acd2 <_POSIX_Condition_variables_Wait_support+0xbe>
the_cond->Mutex = *mutex;
10ac85: 8b 06 mov (%esi),%eax
10ac87: 89 43 14 mov %eax,0x14(%ebx)
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;
10ac8a: c7 43 48 01 00 00 00 movl $0x1,0x48(%ebx)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
10ac91: a1 10 73 12 00 mov 0x127310,%eax
10ac96: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
10ac9d: 83 c3 18 add $0x18,%ebx
10aca0: 89 58 44 mov %ebx,0x44(%eax)
_Thread_Executing->Wait.id = *cond;
10aca3: 8b 17 mov (%edi),%edx
10aca5: 89 50 20 mov %edx,0x20(%eax)
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
10aca8: 50 push %eax
10aca9: 68 50 e1 10 00 push $0x10e150
10acae: ff 75 10 pushl 0x10(%ebp)
10acb1: 53 push %ebx
10acb2: e8 95 31 00 00 call 10de4c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10acb7: e8 d9 2c 00 00 call 10d995 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
10acbc: a1 10 73 12 00 mov 0x127310,%eax
10acc1: 8b 58 34 mov 0x34(%eax),%ebx
if ( status && status != ETIMEDOUT )
10acc4: 83 c4 10 add $0x10,%esp
10acc7: 83 fb 74 cmp $0x74,%ebx
10acca: 74 10 je 10acdc <_POSIX_Condition_variables_Wait_support+0xc8>
10accc: 85 db test %ebx,%ebx
10acce: 74 0c je 10acdc <_POSIX_Condition_variables_Wait_support+0xc8><== ALWAYS TAKEN
10acd0: eb 1f jmp 10acf1 <_POSIX_Condition_variables_Wait_support+0xdd><== NOT EXECUTED
return status;
} else {
_Thread_Enable_dispatch();
10acd2: e8 be 2c 00 00 call 10d995 <_Thread_Enable_dispatch>
10acd7: bb 74 00 00 00 mov $0x74,%ebx
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
10acdc: 83 ec 0c sub $0xc,%esp
10acdf: 56 push %esi
10ace0: e8 37 02 00 00 call 10af1c <pthread_mutex_lock>
if ( mutex_status )
10ace5: 83 c4 10 add $0x10,%esp
10ace8: 85 c0 test %eax,%eax
10acea: 74 05 je 10acf1 <_POSIX_Condition_variables_Wait_support+0xdd>
10acec: bb 16 00 00 00 mov $0x16,%ebx
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10acf1: 89 d8 mov %ebx,%eax
10acf3: 8d 65 f4 lea -0xc(%ebp),%esp
10acf6: 5b pop %ebx
10acf7: 5e pop %esi
10acf8: 5f pop %edi
10acf9: c9 leave
10acfa: c3 ret
0010e184 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
10e184: 55 push %ebp
10e185: 89 e5 mov %esp,%ebp
10e187: 57 push %edi
10e188: 56 push %esi
10e189: 53 push %ebx
10e18a: 83 ec 30 sub $0x30,%esp
10e18d: 8b 75 08 mov 0x8(%ebp),%esi
10e190: 8b 5d 14 mov 0x14(%ebp),%ebx
10e193: 8a 55 18 mov 0x18(%ebp),%dl
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
10e196: 8d 45 e4 lea -0x1c(%ebp),%eax
10e199: 50 push %eax
10e19a: 56 push %esi
10e19b: 68 08 d5 12 00 push $0x12d508
10e1a0: 88 55 d4 mov %dl,-0x2c(%ebp)
10e1a3: e8 84 2a 00 00 call 110c2c <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
10e1a8: 83 c4 10 add $0x10,%esp
10e1ab: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10e1af: 8a 55 d4 mov -0x2c(%ebp),%dl
10e1b2: 0f 85 af 00 00 00 jne 10e267 <_POSIX_Message_queue_Receive_support+0xe3>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
10e1b8: 8b 78 14 mov 0x14(%eax),%edi
10e1bb: 89 f9 mov %edi,%ecx
10e1bd: 83 e1 03 and $0x3,%ecx
10e1c0: 49 dec %ecx
10e1c1: 75 0a jne 10e1cd <_POSIX_Message_queue_Receive_support+0x49>
_Thread_Enable_dispatch();
10e1c3: e8 9d 32 00 00 call 111465 <_Thread_Enable_dispatch>
10e1c8: e9 9a 00 00 00 jmp 10e267 <_POSIX_Message_queue_Receive_support+0xe3>
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
10e1cd: 8b 48 10 mov 0x10(%eax),%ecx
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
10e1d0: 8b 45 10 mov 0x10(%ebp),%eax
10e1d3: 3b 41 68 cmp 0x68(%ecx),%eax
10e1d6: 73 15 jae 10e1ed <_POSIX_Message_queue_Receive_support+0x69>
_Thread_Enable_dispatch();
10e1d8: e8 88 32 00 00 call 111465 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
10e1dd: e8 9a 8a 00 00 call 116c7c <__errno>
10e1e2: c7 00 7a 00 00 00 movl $0x7a,(%eax)
10e1e8: e9 85 00 00 00 jmp 10e272 <_POSIX_Message_queue_Receive_support+0xee>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10e1ed: 31 c0 xor %eax,%eax
10e1ef: 84 d2 test %dl,%dl
10e1f1: 74 0b je 10e1fe <_POSIX_Message_queue_Receive_support+0x7a><== NEVER TAKEN
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
10e1f3: 89 f8 mov %edi,%eax
10e1f5: c1 e8 0e shr $0xe,%eax
10e1f8: 83 f0 01 xor $0x1,%eax
10e1fb: 83 e0 01 and $0x1,%eax
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
10e1fe: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
10e205: 52 push %edx
10e206: 52 push %edx
10e207: ff 75 1c pushl 0x1c(%ebp)
10e20a: 0f b6 c0 movzbl %al,%eax
10e20d: 50 push %eax
10e20e: 8d 45 e0 lea -0x20(%ebp),%eax
10e211: 50 push %eax
10e212: ff 75 0c pushl 0xc(%ebp)
10e215: 56 push %esi
10e216: 83 c1 1c add $0x1c,%ecx
10e219: 51 push %ecx
10e21a: e8 41 1c 00 00 call 10fe60 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
10e21f: 83 c4 20 add $0x20,%esp
10e222: e8 3e 32 00 00 call 111465 <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
10e227: a1 d0 d0 12 00 mov 0x12d0d0,%eax
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
10e22c: 8b 50 24 mov 0x24(%eax),%edx
10e22f: c1 fa 1f sar $0x1f,%edx
10e232: 8b 48 24 mov 0x24(%eax),%ecx
10e235: 31 d1 xor %edx,%ecx
10e237: 89 0b mov %ecx,(%ebx)
10e239: 29 13 sub %edx,(%ebx)
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
10e23b: 83 78 34 00 cmpl $0x0,0x34(%eax)
10e23f: 75 05 jne 10e246 <_POSIX_Message_queue_Receive_support+0xc2>
return length_out;
10e241: 8b 45 e0 mov -0x20(%ebp),%eax
10e244: eb 2f jmp 10e275 <_POSIX_Message_queue_Receive_support+0xf1>
rtems_set_errno_and_return_minus_one(
10e246: e8 31 8a 00 00 call 116c7c <__errno>
10e24b: 89 c3 mov %eax,%ebx
10e24d: 83 ec 0c sub $0xc,%esp
10e250: a1 d0 d0 12 00 mov 0x12d0d0,%eax
10e255: ff 70 34 pushl 0x34(%eax)
10e258: e8 ff 01 00 00 call 10e45c <_POSIX_Message_queue_Translate_core_message_queue_return_code>
10e25d: 89 03 mov %eax,(%ebx)
10e25f: 83 c8 ff or $0xffffffff,%eax
10e262: 83 c4 10 add $0x10,%esp
10e265: eb 0e jmp 10e275 <_POSIX_Message_queue_Receive_support+0xf1>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10e267: e8 10 8a 00 00 call 116c7c <__errno>
10e26c: c7 00 09 00 00 00 movl $0x9,(%eax)
10e272: 83 c8 ff or $0xffffffff,%eax
}
10e275: 8d 65 f4 lea -0xc(%ebp),%esp
10e278: 5b pop %ebx
10e279: 5e pop %esi
10e27a: 5f pop %edi
10e27b: c9 leave
10e27c: c3 ret
0010e4b0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
10e4b0: 55 push %ebp
10e4b1: 89 e5 mov %esp,%ebp
10e4b3: 83 ec 08 sub $0x8,%esp
10e4b6: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e4b9: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10e4bf: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax)
10e4c6: 75 2c jne 10e4f4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44><== NEVER TAKEN
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
10e4c8: 83 b8 d8 00 00 00 01 cmpl $0x1,0xd8(%eax)
10e4cf: 75 23 jne 10e4f4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44>
thread_support->cancelation_requested ) {
10e4d1: 83 b8 dc 00 00 00 00 cmpl $0x0,0xdc(%eax)
10e4d8: 74 1a je 10e4f4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10e4da: a1 e4 51 12 00 mov 0x1251e4,%eax
10e4df: 48 dec %eax
10e4e0: a3 e4 51 12 00 mov %eax,0x1251e4
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
10e4e5: 50 push %eax
10e4e6: 50 push %eax
10e4e7: 6a ff push $0xffffffff
10e4e9: 52 push %edx
10e4ea: e8 c9 05 00 00 call 10eab8 <_POSIX_Thread_Exit>
{
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10e4ef: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
10e4f2: c9 leave
10e4f3: c3 ret
10e4f4: c9 leave
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
10e4f5: e9 63 db ff ff jmp 10c05d <_Thread_Enable_dispatch>
0010f4e0 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
10f4e0: 55 push %ebp
10f4e1: 89 e5 mov %esp,%ebp
10f4e3: 57 push %edi
10f4e4: 56 push %esi
10f4e5: 53 push %ebx
10f4e6: 83 ec 18 sub $0x18,%esp
10f4e9: 8b 7d 08 mov 0x8(%ebp),%edi
10f4ec: 8b 5d 0c mov 0xc(%ebp),%ebx
10f4ef: 8b 75 10 mov 0x10(%ebp),%esi
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
10f4f2: ff 33 pushl (%ebx)
10f4f4: e8 c7 ff ff ff call 10f4c0 <_POSIX_Priority_Is_valid>
10f4f9: 83 c4 10 add $0x10,%esp
10f4fc: 84 c0 test %al,%al
10f4fe: 0f 84 97 00 00 00 je 10f59b <_POSIX_Thread_Translate_sched_param+0xbb><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
10f504: c7 06 00 00 00 00 movl $0x0,(%esi)
*budget_callout = NULL;
10f50a: 8b 45 14 mov 0x14(%ebp),%eax
10f50d: c7 00 00 00 00 00 movl $0x0,(%eax)
if ( policy == SCHED_OTHER ) {
10f513: 85 ff test %edi,%edi
10f515: 75 08 jne 10f51f <_POSIX_Thread_Translate_sched_param+0x3f>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
10f517: c7 06 01 00 00 00 movl $0x1,(%esi)
10f51d: eb 18 jmp 10f537 <_POSIX_Thread_Translate_sched_param+0x57>
return 0;
}
if ( policy == SCHED_FIFO ) {
10f51f: 83 ff 01 cmp $0x1,%edi
10f522: 75 08 jne 10f52c <_POSIX_Thread_Translate_sched_param+0x4c>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
10f524: c7 06 00 00 00 00 movl $0x0,(%esi)
10f52a: eb 0b jmp 10f537 <_POSIX_Thread_Translate_sched_param+0x57>
return 0;
}
if ( policy == SCHED_RR ) {
10f52c: 83 ff 02 cmp $0x2,%edi
10f52f: 75 0a jne 10f53b <_POSIX_Thread_Translate_sched_param+0x5b>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
10f531: c7 06 02 00 00 00 movl $0x2,(%esi)
10f537: 31 c0 xor %eax,%eax
return 0;
10f539: eb 65 jmp 10f5a0 <_POSIX_Thread_Translate_sched_param+0xc0>
}
if ( policy == SCHED_SPORADIC ) {
10f53b: 83 ff 04 cmp $0x4,%edi
10f53e: 75 5b jne 10f59b <_POSIX_Thread_Translate_sched_param+0xbb>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
10f540: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10f544: 75 06 jne 10f54c <_POSIX_Thread_Translate_sched_param+0x6c>
(param->sched_ss_repl_period.tv_nsec == 0) )
10f546: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
10f54a: 74 4f je 10f59b <_POSIX_Thread_Translate_sched_param+0xbb>
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
10f54c: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10f550: 75 06 jne 10f558 <_POSIX_Thread_Translate_sched_param+0x78>
(param->sched_ss_init_budget.tv_nsec == 0) )
10f552: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f556: 74 43 je 10f59b <_POSIX_Thread_Translate_sched_param+0xbb>
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
10f558: 83 ec 0c sub $0xc,%esp
10f55b: 8d 43 08 lea 0x8(%ebx),%eax
10f55e: 50 push %eax
10f55f: e8 38 e2 ff ff call 10d79c <_Timespec_To_ticks>
10f564: 89 c7 mov %eax,%edi
10f566: 8d 43 10 lea 0x10(%ebx),%eax
10f569: 89 04 24 mov %eax,(%esp)
10f56c: e8 2b e2 ff ff call 10d79c <_Timespec_To_ticks>
10f571: 83 c4 10 add $0x10,%esp
10f574: 39 c7 cmp %eax,%edi
10f576: 72 23 jb 10f59b <_POSIX_Thread_Translate_sched_param+0xbb>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
10f578: 83 ec 0c sub $0xc,%esp
10f57b: ff 73 04 pushl 0x4(%ebx)
10f57e: e8 3d ff ff ff call 10f4c0 <_POSIX_Priority_Is_valid>
10f583: 83 c4 10 add $0x10,%esp
10f586: 84 c0 test %al,%al
10f588: 74 11 je 10f59b <_POSIX_Thread_Translate_sched_param+0xbb>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
10f58a: c7 06 03 00 00 00 movl $0x3,(%esi)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
10f590: 8b 45 14 mov 0x14(%ebp),%eax
10f593: c7 00 13 a6 10 00 movl $0x10a613,(%eax)
10f599: eb 9c jmp 10f537 <_POSIX_Thread_Translate_sched_param+0x57>
return 0;
10f59b: b8 16 00 00 00 mov $0x16,%eax
}
return EINVAL;
}
10f5a0: 8d 65 f4 lea -0xc(%ebp),%esp
10f5a3: 5b pop %ebx
10f5a4: 5e pop %esi
10f5a5: 5f pop %edi
10f5a6: c9 leave
10f5a7: c3 ret
0010a350 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
10a350: 55 push %ebp
10a351: 89 e5 mov %esp,%ebp
10a353: 57 push %edi
10a354: 56 push %esi
10a355: 53 push %ebx
10a356: 83 ec 5c sub $0x5c,%esp
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
10a359: 8b 3d 10 12 12 00 mov 0x121210,%edi
maximum = Configuration_POSIX_API.number_of_initialization_threads;
10a35f: 8b 15 0c 12 12 00 mov 0x12120c,%edx
if ( !user_threads || maximum == 0 )
10a365: 85 d2 test %edx,%edx
10a367: 74 54 je 10a3bd <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN
10a369: 85 ff test %edi,%edi
10a36b: 74 50 je 10a3bd <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN
10a36d: 31 db xor %ebx,%ebx
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
10a36f: 8d 75 a8 lea -0x58(%ebp),%esi
10a372: 83 ec 0c sub $0xc,%esp
10a375: 56 push %esi
10a376: 89 55 a4 mov %edx,-0x5c(%ebp)
10a379: e8 2a 52 00 00 call 10f5a8 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
10a37e: 5a pop %edx
10a37f: 59 pop %ecx
10a380: 6a 02 push $0x2
10a382: 56 push %esi
10a383: e8 48 52 00 00 call 10f5d0 <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
10a388: 59 pop %ecx
10a389: 58 pop %eax
10a38a: ff 74 df 04 pushl 0x4(%edi,%ebx,8)
10a38e: 56 push %esi
10a38f: e8 6c 52 00 00 call 10f600 <pthread_attr_setstacksize>
status = pthread_create(
10a394: 6a 00 push $0x0
10a396: ff 34 df pushl (%edi,%ebx,8)
10a399: 56 push %esi
10a39a: 8d 45 e4 lea -0x1c(%ebp),%eax
10a39d: 50 push %eax
10a39e: e8 e9 fc ff ff call 10a08c <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
10a3a3: 83 c4 20 add $0x20,%esp
10a3a6: 85 c0 test %eax,%eax
10a3a8: 8b 55 a4 mov -0x5c(%ebp),%edx
10a3ab: 74 0b je 10a3b8 <_POSIX_Threads_Initialize_user_threads_body+0x68>
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
10a3ad: 52 push %edx
10a3ae: 50 push %eax
10a3af: 6a 01 push $0x1
10a3b1: 6a 02 push $0x2
10a3b3: e8 40 1b 00 00 call 10bef8 <_Internal_error_Occurred>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
10a3b8: 43 inc %ebx
10a3b9: 39 d3 cmp %edx,%ebx
10a3bb: 72 b5 jb 10a372 <_POSIX_Threads_Initialize_user_threads_body+0x22><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
10a3bd: 8d 65 f4 lea -0xc(%ebp),%esp
10a3c0: 5b pop %ebx
10a3c1: 5e pop %esi
10a3c2: 5f pop %edi
10a3c3: c9 leave
10a3c4: c3 ret
0010e68b <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
10e68b: 55 push %ebp
10e68c: 89 e5 mov %esp,%ebp
10e68e: 56 push %esi
10e68f: 53 push %ebx
10e690: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e693: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
10e699: 83 ec 0c sub $0xc,%esp
10e69c: 8d 86 94 00 00 00 lea 0x94(%esi),%eax
10e6a2: 50 push %eax
10e6a3: e8 bc 0e 00 00 call 10f564 <_Timespec_To_ticks>
the_thread->cpu_time_budget = ticks;
10e6a8: 89 43 78 mov %eax,0x78(%ebx)
10e6ab: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax
10e6b2: 2b 86 84 00 00 00 sub 0x84(%esi),%eax
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
10e6b8: 89 43 18 mov %eax,0x18(%ebx)
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
10e6bb: 83 c4 10 add $0x10,%esp
10e6be: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx)
10e6c2: 75 12 jne 10e6d6 <_POSIX_Threads_Sporadic_budget_TSR+0x4b><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
10e6c4: 39 43 14 cmp %eax,0x14(%ebx)
10e6c7: 76 0d jbe 10e6d6 <_POSIX_Threads_Sporadic_budget_TSR+0x4b>
_Thread_Change_priority( the_thread, new_priority, true );
10e6c9: 52 push %edx
10e6ca: 6a 01 push $0x1
10e6cc: 50 push %eax
10e6cd: 53 push %ebx
10e6ce: e8 41 d1 ff ff call 10b814 <_Thread_Change_priority>
10e6d3: 83 c4 10 add $0x10,%esp
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
10e6d6: 83 ec 0c sub $0xc,%esp
10e6d9: 8d 86 8c 00 00 00 lea 0x8c(%esi),%eax
10e6df: 50 push %eax
10e6e0: e8 7f 0e 00 00 call 10f564 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10e6e5: 89 86 b0 00 00 00 mov %eax,0xb0(%esi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10e6eb: 83 c4 10 add $0x10,%esp
10e6ee: 81 c6 a4 00 00 00 add $0xa4,%esi
10e6f4: 89 75 0c mov %esi,0xc(%ebp)
10e6f7: c7 45 08 d0 42 12 00 movl $0x1242d0,0x8(%ebp)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
10e6fe: 8d 65 f8 lea -0x8(%ebp),%esp
10e701: 5b pop %ebx
10e702: 5e pop %esi
10e703: c9 leave
10e704: e9 8b e3 ff ff jmp 10ca94 <_Watchdog_Insert>
0010e64b <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
10e64b: 55 push %ebp
10e64c: 89 e5 mov %esp,%ebp
10e64e: 83 ec 08 sub $0x8,%esp
10e651: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e654: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
10e65a: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10e661: 0f b6 15 f4 01 12 00 movzbl 0x1201f4,%edx
10e668: 2b 91 88 00 00 00 sub 0x88(%ecx),%edx
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
10e66e: 89 50 18 mov %edx,0x18(%eax)
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
10e671: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10e675: 75 12 jne 10e689 <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
10e677: 39 50 14 cmp %edx,0x14(%eax)
10e67a: 73 0d jae 10e689 <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN
_Thread_Change_priority( the_thread, new_priority, true );
10e67c: 51 push %ecx
10e67d: 6a 01 push $0x1
10e67f: 52 push %edx
10e680: 50 push %eax
10e681: e8 8e d1 ff ff call 10b814 <_Thread_Change_priority>
10e686: 83 c4 10 add $0x10,%esp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
10e689: c9 leave
10e68a: c3 ret
0010a0fc <_POSIX_Timer_TSR>:
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
10a0fc: 55 push %ebp
10a0fd: 89 e5 mov %esp,%ebp
10a0ff: 53 push %ebx
10a100: 83 ec 04 sub $0x4,%esp
10a103: 8b 5d 0c mov 0xc(%ebp),%ebx
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
10a106: ff 43 68 incl 0x68(%ebx)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
10a109: 83 7b 54 00 cmpl $0x0,0x54(%ebx)
10a10d: 75 06 jne 10a115 <_POSIX_Timer_TSR+0x19>
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
10a10f: 83 7b 58 00 cmpl $0x0,0x58(%ebx)
10a113: 74 34 je 10a149 <_POSIX_Timer_TSR+0x4d> <== NEVER TAKEN
activated = _POSIX_Timer_Insert_helper(
10a115: 83 ec 0c sub $0xc,%esp
10a118: 53 push %ebx
10a119: 68 fc a0 10 00 push $0x10a0fc
10a11e: ff 73 08 pushl 0x8(%ebx)
10a121: ff 73 64 pushl 0x64(%ebx)
10a124: 8d 43 10 lea 0x10(%ebx),%eax
10a127: 50 push %eax
10a128: e8 3b 51 00 00 call 10f268 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
10a12d: 83 c4 20 add $0x20,%esp
10a130: 84 c0 test %al,%al
10a132: 74 30 je 10a164 <_POSIX_Timer_TSR+0x68> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
10a134: 83 ec 0c sub $0xc,%esp
10a137: 8d 43 6c lea 0x6c(%ebx),%eax
10a13a: 50 push %eax
10a13b: e8 34 14 00 00 call 10b574 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10a140: c6 43 3c 03 movb $0x3,0x3c(%ebx)
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
10a144: 83 c4 10 add $0x10,%esp
10a147: eb 04 jmp 10a14d <_POSIX_Timer_TSR+0x51>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10a149: c6 43 3c 04 movb $0x4,0x3c(%ebx) <== NOT EXECUTED
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
10a14d: 50 push %eax
10a14e: 50 push %eax
10a14f: ff 73 44 pushl 0x44(%ebx)
10a152: ff 73 38 pushl 0x38(%ebx)
10a155: e8 de 4c 00 00 call 10ee38 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
10a15a: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
10a161: 83 c4 10 add $0x10,%esp
}
10a164: 8b 5d fc mov -0x4(%ebp),%ebx
10a167: c9 leave
10a168: c3 ret
00110390 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
110390: 55 push %ebp
110391: 89 e5 mov %esp,%ebp
110393: 57 push %edi
110394: 56 push %esi
110395: 53 push %ebx
110396: 83 ec 38 sub $0x38,%esp
110399: 8b 5d 08 mov 0x8(%ebp),%ebx
11039c: 8b 75 0c mov 0xc(%ebp),%esi
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
11039f: 6a 01 push $0x1
1103a1: 0f b6 45 10 movzbl 0x10(%ebp),%eax
1103a5: 50 push %eax
1103a6: 8d 7d dc lea -0x24(%ebp),%edi
1103a9: 57 push %edi
1103aa: 56 push %esi
1103ab: 53 push %ebx
1103ac: e8 5b 00 00 00 call 11040c <_POSIX_signals_Clear_signals>
1103b1: 83 c4 20 add $0x20,%esp
1103b4: 84 c0 test %al,%al
1103b6: 74 48 je 110400 <_POSIX_signals_Check_signal+0x70>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
1103b8: 6b d6 0c imul $0xc,%esi,%edx
1103bb: 8b 82 5c 47 12 00 mov 0x12475c(%edx),%eax
1103c1: 83 f8 01 cmp $0x1,%eax
1103c4: 74 3a je 110400 <_POSIX_signals_Check_signal+0x70><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
1103c6: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx
1103cc: 89 4d d4 mov %ecx,-0x2c(%ebp)
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
1103cf: 0b 8a 58 47 12 00 or 0x124758(%edx),%ecx
1103d5: 89 8b cc 00 00 00 mov %ecx,0xcc(%ebx)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
1103db: 83 ba 54 47 12 00 02 cmpl $0x2,0x124754(%edx)
1103e2: 75 06 jne 1103ea <_POSIX_signals_Check_signal+0x5a>
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
1103e4: 52 push %edx
1103e5: 6a 00 push $0x0
1103e7: 57 push %edi
1103e8: eb 03 jmp 1103ed <_POSIX_signals_Check_signal+0x5d>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
1103ea: 83 ec 0c sub $0xc,%esp
1103ed: 56 push %esi
1103ee: ff d0 call *%eax
1103f0: 83 c4 10 add $0x10,%esp
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
1103f3: 8b 45 d4 mov -0x2c(%ebp),%eax
1103f6: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
1103fc: b0 01 mov $0x1,%al
return true;
1103fe: eb 02 jmp 110402 <_POSIX_signals_Check_signal+0x72>
110400: 31 c0 xor %eax,%eax
}
110402: 8d 65 f4 lea -0xc(%ebp),%esp
110405: 5b pop %ebx
110406: 5e pop %esi
110407: 5f pop %edi
110408: c9 leave
110409: c3 ret
00111174 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
111174: 55 push %ebp
111175: 89 e5 mov %esp,%ebp
111177: 53 push %ebx
111178: 8b 4d 08 mov 0x8(%ebp),%ecx
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
11117b: 9c pushf
11117c: fa cli
11117d: 5a pop %edx
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
11117e: 6b c1 0c imul $0xc,%ecx,%eax
111181: 83 b8 54 47 12 00 02 cmpl $0x2,0x124754(%eax)
111188: 75 0e jne 111198 <_POSIX_signals_Clear_process_signals+0x24>
11118a: 8d 98 50 49 12 00 lea 0x124950(%eax),%ebx
111190: 39 98 4c 49 12 00 cmp %ebx,0x12494c(%eax)
111196: 75 1d jne 1111b5 <_POSIX_signals_Clear_process_signals+0x41><== NEVER TAKEN
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
111198: 49 dec %ecx
111199: b8 fe ff ff ff mov $0xfffffffe,%eax
11119e: d3 c0 rol %cl,%eax
1111a0: 23 05 48 49 12 00 and 0x124948,%eax
1111a6: a3 48 49 12 00 mov %eax,0x124948
if ( !_POSIX_signals_Pending )
1111ab: 85 c0 test %eax,%eax
1111ad: 75 06 jne 1111b5 <_POSIX_signals_Clear_process_signals+0x41><== NEVER TAKEN
_Thread_Do_post_task_switch_extension--;
1111af: ff 0d 94 42 12 00 decl 0x124294
}
_ISR_Enable( level );
1111b5: 52 push %edx
1111b6: 9d popf
}
1111b7: 5b pop %ebx
1111b8: c9 leave
1111b9: c3 ret
0010a9d4 <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
10a9d4: 55 push %ebp
10a9d5: 89 e5 mov %esp,%ebp
10a9d7: 56 push %esi
10a9d8: 53 push %ebx
10a9d9: 8b 55 08 mov 0x8(%ebp),%edx
10a9dc: b8 1b 00 00 00 mov $0x1b,%eax
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10a9e1: bb 01 00 00 00 mov $0x1,%ebx
10a9e6: 8d 48 ff lea -0x1(%eax),%ecx
10a9e9: 89 de mov %ebx,%esi
10a9eb: d3 e6 shl %cl,%esi
10a9ed: 85 d6 test %edx,%esi
10a9ef: 75 1e jne 10aa0f <_POSIX_signals_Get_highest+0x3b><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10a9f1: 40 inc %eax
10a9f2: 83 f8 20 cmp $0x20,%eax
10a9f5: 75 ef jne 10a9e6 <_POSIX_signals_Get_highest+0x12>
10a9f7: b0 01 mov $0x1,%al
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10a9f9: bb 01 00 00 00 mov $0x1,%ebx
10a9fe: 8d 48 ff lea -0x1(%eax),%ecx
10aa01: 89 de mov %ebx,%esi
10aa03: d3 e6 shl %cl,%esi
10aa05: 85 d6 test %edx,%esi
10aa07: 75 06 jne 10aa0f <_POSIX_signals_Get_highest+0x3b>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10aa09: 40 inc %eax
10aa0a: 83 f8 1b cmp $0x1b,%eax
10aa0d: 75 ef jne 10a9fe <_POSIX_signals_Get_highest+0x2a><== ALWAYS TAKEN
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
10aa0f: 5b pop %ebx
10aa10: 5e pop %esi
10aa11: c9 leave
10aa12: c3 ret
001111e0 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
1111e0: 55 push %ebp
1111e1: 89 e5 mov %esp,%ebp
1111e3: 57 push %edi
1111e4: 56 push %esi
1111e5: 53 push %ebx
1111e6: 83 ec 0c sub $0xc,%esp
1111e9: 8b 5d 08 mov 0x8(%ebp),%ebx
1111ec: 8b 55 0c mov 0xc(%ebp),%edx
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1111ef: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi
1111f5: 8d 4a ff lea -0x1(%edx),%ecx
1111f8: b8 01 00 00 00 mov $0x1,%eax
1111fd: d3 e0 shl %cl,%eax
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
1111ff: 8b 4b 10 mov 0x10(%ebx),%ecx
111202: 89 cf mov %ecx,%edi
111204: 81 e7 00 80 00 10 and $0x10008000,%edi
11120a: 81 ff 00 80 00 10 cmp $0x10008000,%edi
111210: 75 50 jne 111262 <_POSIX_signals_Unblock_thread+0x82>
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
111212: 85 43 30 test %eax,0x30(%ebx)
111215: 75 10 jne 111227 <_POSIX_signals_Unblock_thread+0x47>
111217: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx
11121d: f7 d1 not %ecx
11121f: 85 c8 test %ecx,%eax
111221: 0f 84 a4 00 00 00 je 1112cb <_POSIX_signals_Unblock_thread+0xeb>
the_thread->Wait.return_code = EINTR;
111227: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
11122e: 8b 43 28 mov 0x28(%ebx),%eax
if ( !info ) {
111231: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
111235: 75 12 jne 111249 <_POSIX_signals_Unblock_thread+0x69>
the_info->si_signo = signo;
111237: 89 10 mov %edx,(%eax)
the_info->si_code = SI_USER;
111239: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_info->si_value.sival_int = 0;
111240: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
111247: eb 0c jmp 111255 <_POSIX_signals_Unblock_thread+0x75>
} else {
*the_info = *info;
111249: b9 03 00 00 00 mov $0x3,%ecx
11124e: 89 c7 mov %eax,%edi
111250: 8b 75 10 mov 0x10(%ebp),%esi
111253: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_Thread_queue_Extract_with_proxy( the_thread );
111255: 83 ec 0c sub $0xc,%esp
111258: 53 push %ebx
111259: e8 d2 b0 ff ff call 10c330 <_Thread_queue_Extract_with_proxy>
11125e: b0 01 mov $0x1,%al
111260: eb 48 jmp 1112aa <_POSIX_signals_Unblock_thread+0xca>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
111262: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx
111268: f7 d2 not %edx
11126a: 85 d0 test %edx,%eax
11126c: 74 5d je 1112cb <_POSIX_signals_Unblock_thread+0xeb>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
the_thread->do_post_task_switch_extension = true;
11126e: c6 43 74 01 movb $0x1,0x74(%ebx)
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
111272: f7 c1 00 00 00 10 test $0x10000000,%ecx
111278: 74 35 je 1112af <_POSIX_signals_Unblock_thread+0xcf>
the_thread->Wait.return_code = EINTR;
11127a: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
#if 0
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else
#endif
if ( _States_Is_delaying(the_thread->current_state) ){
111281: 80 e1 08 and $0x8,%cl
111284: 74 45 je 1112cb <_POSIX_signals_Unblock_thread+0xeb><== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
111286: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
11128a: 75 0f jne 11129b <_POSIX_signals_Unblock_thread+0xbb><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
11128c: 83 ec 0c sub $0xc,%esp
11128f: 8d 43 48 lea 0x48(%ebx),%eax
111292: 50 push %eax
111293: e8 14 b9 ff ff call 10cbac <_Watchdog_Remove>
111298: 83 c4 10 add $0x10,%esp
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
11129b: 50 push %eax
11129c: 50 push %eax
11129d: 68 f8 ff 03 10 push $0x1003fff8
1112a2: 53 push %ebx
1112a3: e8 8c a6 ff ff call 10b934 <_Thread_Clear_state>
1112a8: 31 c0 xor %eax,%eax
1112aa: 83 c4 10 add $0x10,%esp
1112ad: eb 1e jmp 1112cd <_POSIX_signals_Unblock_thread+0xed>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
1112af: 85 c9 test %ecx,%ecx
1112b1: 75 18 jne 1112cb <_POSIX_signals_Unblock_thread+0xeb><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
1112b3: a1 8c 42 12 00 mov 0x12428c,%eax
1112b8: 85 c0 test %eax,%eax
1112ba: 74 0f je 1112cb <_POSIX_signals_Unblock_thread+0xeb>
1112bc: 3b 1d b0 42 12 00 cmp 0x1242b0,%ebx
1112c2: 75 07 jne 1112cb <_POSIX_signals_Unblock_thread+0xeb><== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
1112c4: c6 05 44 43 12 00 01 movb $0x1,0x124344
1112cb: 31 c0 xor %eax,%eax
}
}
return false;
}
1112cd: 8d 65 f4 lea -0xc(%ebp),%esp
1112d0: 5b pop %ebx
1112d1: 5e pop %esi
1112d2: 5f pop %edi
1112d3: c9 leave
1112d4: c3 ret
0010ea41 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
10ea41: 55 push %ebp
10ea42: 89 e5 mov %esp,%ebp
10ea44: 53 push %ebx
10ea45: 83 ec 10 sub $0x10,%esp
10ea48: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
10ea4b: 80 3d c4 01 12 00 01 cmpb $0x1,0x1201c4
10ea52: 19 c0 sbb %eax,%eax
10ea54: 83 e0 c0 and $0xffffffc0,%eax
10ea57: 83 c0 60 add $0x60,%eax
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
10ea5a: 50 push %eax
10ea5b: e8 48 e2 ff ff call 10cca8 <_Workspace_Allocate>
if ( !api )
10ea60: 83 c4 10 add $0x10,%esp
10ea63: 31 d2 xor %edx,%edx
10ea65: 85 c0 test %eax,%eax
10ea67: 74 5f je 10eac8 <_RTEMS_tasks_Create_extension+0x87><== NEVER TAKEN
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
10ea69: 89 83 f4 00 00 00 mov %eax,0xf4(%ebx)
api->pending_events = EVENT_SETS_NONE_PENDING;
10ea6f: c7 00 00 00 00 00 movl $0x0,(%eax)
api->event_condition = 0;
10ea75: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
10ea7c: c6 40 08 00 movb $0x0,0x8(%eax)
information->handler = NULL;
10ea80: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
information->mode_set = RTEMS_DEFAULT_MODES;
10ea87: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
information->signals_posted = 0;
10ea8e: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
information->signals_pending = 0;
10ea95: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
information->nest_level = 0;
10ea9c: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
10eaa3: c7 83 04 01 00 00 00 movl $0x0,0x104(%ebx)
10eaaa: 00 00 00
if ( rtems_configuration_get_notepads_enabled() ) {
10eaad: 80 3d c4 01 12 00 00 cmpb $0x0,0x1201c4
10eab4: 74 10 je 10eac6 <_RTEMS_tasks_Create_extension+0x85>
10eab6: 31 d2 xor %edx,%edx
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
10eab8: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4)
10eabf: 00
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
10eac0: 42 inc %edx
10eac1: 83 fa 10 cmp $0x10,%edx
10eac4: 75 f2 jne 10eab8 <_RTEMS_tasks_Create_extension+0x77>
10eac6: b2 01 mov $0x1,%dl
api->Notepads[i] = 0;
}
return true;
}
10eac8: 88 d0 mov %dl,%al
10eaca: 8b 5d fc mov -0x4(%ebp),%ebx
10eacd: c9 leave
10eace: c3 ret
0010e98e <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
10e98e: 55 push %ebp
10e98f: 89 e5 mov %esp,%ebp
10e991: 57 push %edi
10e992: 56 push %esi
10e993: 53 push %ebx
10e994: 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 ];
10e997: 8b 45 08 mov 0x8(%ebp),%eax
10e99a: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx
if ( !api )
10e9a0: 85 db test %ebx,%ebx
10e9a2: 74 45 je 10e9e9 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
10e9a4: 9c pushf
10e9a5: fa cli
10e9a6: 58 pop %eax
signal_set = asr->signals_posted;
10e9a7: 8b 7b 14 mov 0x14(%ebx),%edi
asr->signals_posted = 0;
10e9aa: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_ISR_Enable( level );
10e9b1: 50 push %eax
10e9b2: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
10e9b3: 85 ff test %edi,%edi
10e9b5: 74 32 je 10e9e9 <_RTEMS_tasks_Post_switch_extension+0x5b>
return;
asr->nest_level += 1;
10e9b7: ff 43 1c incl 0x1c(%ebx)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
10e9ba: 50 push %eax
10e9bb: 8d 75 e4 lea -0x1c(%ebp),%esi
10e9be: 56 push %esi
10e9bf: 68 ff ff 00 00 push $0xffff
10e9c4: ff 73 10 pushl 0x10(%ebx)
10e9c7: e8 7c 1d 00 00 call 110748 <rtems_task_mode>
(*asr->handler)( signal_set );
10e9cc: 89 3c 24 mov %edi,(%esp)
10e9cf: ff 53 0c call *0xc(%ebx)
asr->nest_level -= 1;
10e9d2: ff 4b 1c decl 0x1c(%ebx)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
10e9d5: 83 c4 0c add $0xc,%esp
10e9d8: 56 push %esi
10e9d9: 68 ff ff 00 00 push $0xffff
10e9de: ff 75 e4 pushl -0x1c(%ebp)
10e9e1: e8 62 1d 00 00 call 110748 <rtems_task_mode>
10e9e6: 83 c4 10 add $0x10,%esp
}
10e9e9: 8d 65 f4 lea -0xc(%ebp),%esp
10e9ec: 5b pop %ebx
10e9ed: 5e pop %esi
10e9ee: 5f pop %edi
10e9ef: c9 leave
10e9f0: c3 ret
0010b1e8 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10b1e8: 55 push %ebp
10b1e9: 89 e5 mov %esp,%ebp
10b1eb: 53 push %ebx
10b1ec: 83 ec 18 sub $0x18,%esp
10b1ef: 8d 45 f4 lea -0xc(%ebp),%eax
10b1f2: 50 push %eax
10b1f3: ff 75 08 pushl 0x8(%ebp)
10b1f6: 68 20 72 12 00 push $0x127220
10b1fb: e8 04 1a 00 00 call 10cc04 <_Objects_Get>
10b200: 89 c3 mov %eax,%ebx
/*
* 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 );
switch ( location ) {
10b202: 83 c4 10 add $0x10,%esp
10b205: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10b209: 75 64 jne 10b26f <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10b20b: 8b 40 40 mov 0x40(%eax),%eax
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10b20e: f6 40 11 40 testb $0x40,0x11(%eax)
10b212: 74 18 je 10b22c <_Rate_monotonic_Timeout+0x44>
the_thread->Wait.id == the_period->Object.id ) {
10b214: 8b 50 20 mov 0x20(%eax),%edx
10b217: 3b 53 08 cmp 0x8(%ebx),%edx
10b21a: 75 10 jne 10b22c <_Rate_monotonic_Timeout+0x44>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b21c: 52 push %edx
10b21d: 52 push %edx
10b21e: 68 f8 ff 03 10 push $0x1003fff8
10b223: 50 push %eax
10b224: e8 4f 1e 00 00 call 10d078 <_Thread_Clear_state>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
10b229: 59 pop %ecx
10b22a: eb 10 jmp 10b23c <_Rate_monotonic_Timeout+0x54>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
10b22c: 83 7b 38 01 cmpl $0x1,0x38(%ebx)
10b230: 75 2b jne 10b25d <_Rate_monotonic_Timeout+0x75>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
10b232: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
_Rate_monotonic_Initiate_statistics( the_period );
10b239: 83 ec 0c sub $0xc,%esp
10b23c: 53 push %ebx
10b23d: e8 56 fa ff ff call 10ac98 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b242: 8b 43 3c mov 0x3c(%ebx),%eax
10b245: 89 43 1c mov %eax,0x1c(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b248: 58 pop %eax
10b249: 5a pop %edx
10b24a: 83 c3 10 add $0x10,%ebx
10b24d: 53 push %ebx
10b24e: 68 f4 73 12 00 push $0x1273f4
10b253: e8 44 31 00 00 call 10e39c <_Watchdog_Insert>
10b258: 83 c4 10 add $0x10,%esp
10b25b: eb 07 jmp 10b264 <_Rate_monotonic_Timeout+0x7c>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10b25d: 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;
10b264: a1 18 73 12 00 mov 0x127318,%eax
10b269: 48 dec %eax
10b26a: a3 18 73 12 00 mov %eax,0x127318
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b26f: 8b 5d fc mov -0x4(%ebp),%ebx
10b272: c9 leave
10b273: c3 ret
0010ab10 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10ab10: 55 push %ebp
10ab11: 89 e5 mov %esp,%ebp
10ab13: 53 push %ebx
10ab14: 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();
10ab17: 8b 1d 04 32 12 00 mov 0x123204,%ebx
if ((!the_tod) ||
10ab1d: 85 c9 test %ecx,%ecx
10ab1f: 74 59 je 10ab7a <_TOD_Validate+0x6a> <== NEVER TAKEN
(the_tod->ticks >= ticks_per_second) ||
10ab21: b8 40 42 0f 00 mov $0xf4240,%eax
10ab26: 31 d2 xor %edx,%edx
10ab28: f7 f3 div %ebx
10ab2a: 39 41 18 cmp %eax,0x18(%ecx)
10ab2d: 73 4b jae 10ab7a <_TOD_Validate+0x6a>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10ab2f: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10ab33: 77 45 ja 10ab7a <_TOD_Validate+0x6a>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10ab35: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10ab39: 77 3f ja 10ab7a <_TOD_Validate+0x6a>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
10ab3b: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10ab3f: 77 39 ja 10ab7a <_TOD_Validate+0x6a>
(the_tod->month == 0) ||
10ab41: 8b 41 04 mov 0x4(%ecx),%eax
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) ||
10ab44: 85 c0 test %eax,%eax
10ab46: 74 32 je 10ab7a <_TOD_Validate+0x6a> <== NEVER TAKEN
10ab48: 83 f8 0c cmp $0xc,%eax
10ab4b: 77 2d ja 10ab7a <_TOD_Validate+0x6a>
(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) ||
10ab4d: 8b 19 mov (%ecx),%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) ||
10ab4f: 81 fb c3 07 00 00 cmp $0x7c3,%ebx
10ab55: 76 23 jbe 10ab7a <_TOD_Validate+0x6a>
(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) ||
(the_tod->day == 0) )
10ab57: 8b 51 08 mov 0x8(%ecx),%edx
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) ||
10ab5a: 85 d2 test %edx,%edx
10ab5c: 74 1c je 10ab7a <_TOD_Validate+0x6a> <== NEVER TAKEN
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10ab5e: 80 e3 03 and $0x3,%bl
10ab61: 75 09 jne 10ab6c <_TOD_Validate+0x5c>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10ab63: 8b 04 85 40 10 12 00 mov 0x121040(,%eax,4),%eax
10ab6a: eb 07 jmp 10ab73 <_TOD_Validate+0x63>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10ab6c: 8b 04 85 0c 10 12 00 mov 0x12100c(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10ab73: 39 c2 cmp %eax,%edx
10ab75: 0f 96 c0 setbe %al
10ab78: eb 02 jmp 10ab7c <_TOD_Validate+0x6c>
10ab7a: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10ab7c: 5b pop %ebx
10ab7d: c9 leave
10ab7e: c3 ret
0010b814 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10b814: 55 push %ebp
10b815: 89 e5 mov %esp,%ebp
10b817: 57 push %edi
10b818: 56 push %esi
10b819: 53 push %ebx
10b81a: 83 ec 28 sub $0x28,%esp
10b81d: 8b 5d 08 mov 0x8(%ebp),%ebx
10b820: 8b 7d 0c mov 0xc(%ebp),%edi
10b823: 8a 45 10 mov 0x10(%ebp),%al
10b826: 88 45 e7 mov %al,-0x19(%ebp)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
10b829: 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 );
10b82c: 53 push %ebx
10b82d: e8 5e 0d 00 00 call 10c590 <_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 )
10b832: 83 c4 10 add $0x10,%esp
10b835: 39 7b 14 cmp %edi,0x14(%ebx)
10b838: 74 0c je 10b846 <_Thread_Change_priority+0x32>
_Thread_Set_priority( the_thread, new_priority );
10b83a: 50 push %eax
10b83b: 50 push %eax
10b83c: 57 push %edi
10b83d: 53 push %ebx
10b83e: e8 15 0c 00 00 call 10c458 <_Thread_Set_priority>
10b843: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10b846: 9c pushf
10b847: fa cli
10b848: 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;
10b849: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10b84c: 83 f8 04 cmp $0x4,%eax
10b84f: 74 2f je 10b880 <_Thread_Change_priority+0x6c>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10b851: 83 e6 04 and $0x4,%esi
10b854: 75 08 jne 10b85e <_Thread_Change_priority+0x4a><== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
10b856: 89 c2 mov %eax,%edx
10b858: 83 e2 fb and $0xfffffffb,%edx
10b85b: 89 53 10 mov %edx,0x10(%ebx)
_ISR_Enable( level );
10b85e: 51 push %ecx
10b85f: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10b860: a9 e0 be 03 00 test $0x3bee0,%eax
10b865: 0f 84 c0 00 00 00 je 10b92b <_Thread_Change_priority+0x117>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10b86b: 89 5d 0c mov %ebx,0xc(%ebp)
10b86e: 8b 43 44 mov 0x44(%ebx),%eax
10b871: 89 45 08 mov %eax,0x8(%ebp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
10b874: 8d 65 f4 lea -0xc(%ebp),%esp
10b877: 5b pop %ebx
10b878: 5e pop %esi
10b879: 5f pop %edi
10b87a: 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 );
10b87b: e9 50 0b 00 00 jmp 10c3d0 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10b880: 83 e6 04 and $0x4,%esi
10b883: 75 53 jne 10b8d8 <_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 );
10b885: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10b88c: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax
10b892: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx
10b899: 66 09 10 or %dx,(%eax)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10b89c: 66 a1 a4 42 12 00 mov 0x1242a4,%ax
10b8a2: 0b 83 94 00 00 00 or 0x94(%ebx),%eax
10b8a8: 66 a3 a4 42 12 00 mov %ax,0x1242a4
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
10b8ae: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10b8b2: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
10b8b8: 74 0e je 10b8c8 <_Thread_Change_priority+0xb4>
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10b8ba: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10b8bd: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10b8bf: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10b8c1: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10b8c3: 89 5a 04 mov %ebx,0x4(%edx)
10b8c6: eb 10 jmp 10b8d8 <_Thread_Change_priority+0xc4>
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10b8c8: 8d 50 04 lea 0x4(%eax),%edx
10b8cb: 89 13 mov %edx,(%ebx)
old_last_node = the_chain->last;
10b8cd: 8b 50 08 mov 0x8(%eax),%edx
the_chain->last = the_node;
10b8d0: 89 58 08 mov %ebx,0x8(%eax)
old_last_node->next = the_node;
10b8d3: 89 1a mov %ebx,(%edx)
the_node->previous = old_last_node;
10b8d5: 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 );
10b8d8: 51 push %ecx
10b8d9: 9d popf
10b8da: fa cli
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10b8db: 66 8b 1d a4 42 12 00 mov 0x1242a4,%bx
10b8e2: 31 c0 xor %eax,%eax
10b8e4: 89 c2 mov %eax,%edx
10b8e6: 66 0f bc d3 bsf %bx,%dx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10b8ea: 0f b7 d2 movzwl %dx,%edx
10b8ed: 66 8b 9c 12 1c 43 12 mov 0x12431c(%edx,%edx,1),%bx
10b8f4: 00
10b8f5: 66 0f bc c3 bsf %bx,%ax
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
10b8f9: c1 e2 04 shl $0x4,%edx
10b8fc: 0f b7 c0 movzwl %ax,%eax
10b8ff: 01 c2 add %eax,%edx
10b901: 6b d2 0c imul $0xc,%edx,%edx
10b904: 8b 1d bc 41 12 00 mov 0x1241bc,%ebx
10b90a: 8b 14 1a mov (%edx,%ebx,1),%edx
10b90d: 89 15 80 42 12 00 mov %edx,0x124280
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10b913: a1 b0 42 12 00 mov 0x1242b0,%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() &&
10b918: 39 d0 cmp %edx,%eax
10b91a: 74 0d je 10b929 <_Thread_Change_priority+0x115>
_Thread_Executing->is_preemptible )
10b91c: 80 78 75 00 cmpb $0x0,0x75(%eax)
10b920: 74 07 je 10b929 <_Thread_Change_priority+0x115>
_Context_Switch_necessary = true;
10b922: c6 05 c0 42 12 00 01 movb $0x1,0x1242c0
_ISR_Enable( level );
10b929: 51 push %ecx
10b92a: 9d popf
}
10b92b: 8d 65 f4 lea -0xc(%ebp),%esp
10b92e: 5b pop %ebx
10b92f: 5e pop %esi
10b930: 5f pop %edi
10b931: c9 leave
10b932: c3 ret
0010b934 <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
10b934: 55 push %ebp
10b935: 89 e5 mov %esp,%ebp
10b937: 53 push %ebx
10b938: 8b 45 08 mov 0x8(%ebp),%eax
10b93b: 8b 55 0c mov 0xc(%ebp),%edx
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10b93e: 9c pushf
10b93f: fa cli
10b940: 59 pop %ecx
current_state = the_thread->current_state;
10b941: 8b 58 10 mov 0x10(%eax),%ebx
if ( current_state & state ) {
10b944: 85 da test %ebx,%edx
10b946: 74 71 je 10b9b9 <_Thread_Clear_state+0x85>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10b948: f7 d2 not %edx
10b94a: 21 da and %ebx,%edx
current_state =
10b94c: 89 50 10 mov %edx,0x10(%eax)
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
10b94f: 85 d2 test %edx,%edx
10b951: 75 66 jne 10b9b9 <_Thread_Clear_state+0x85>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10b953: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
10b959: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx
10b960: 66 09 1a or %bx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10b963: 66 8b 15 a4 42 12 00 mov 0x1242a4,%dx
10b96a: 0b 90 94 00 00 00 or 0x94(%eax),%edx
10b970: 66 89 15 a4 42 12 00 mov %dx,0x1242a4
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10b977: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10b97d: 8d 5a 04 lea 0x4(%edx),%ebx
10b980: 89 18 mov %ebx,(%eax)
old_last_node = the_chain->last;
10b982: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
10b985: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10b988: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
10b98a: 89 58 04 mov %ebx,0x4(%eax)
_ISR_Flash( level );
10b98d: 51 push %ecx
10b98e: 9d popf
10b98f: 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 ) {
10b990: 8b 50 14 mov 0x14(%eax),%edx
10b993: 8b 1d 80 42 12 00 mov 0x124280,%ebx
10b999: 3b 53 14 cmp 0x14(%ebx),%edx
10b99c: 73 1b jae 10b9b9 <_Thread_Clear_state+0x85>
_Thread_Heir = the_thread;
10b99e: a3 80 42 12 00 mov %eax,0x124280
if ( _Thread_Executing->is_preemptible ||
10b9a3: a1 b0 42 12 00 mov 0x1242b0,%eax
10b9a8: 80 78 75 00 cmpb $0x0,0x75(%eax)
10b9ac: 75 04 jne 10b9b2 <_Thread_Clear_state+0x7e>
10b9ae: 85 d2 test %edx,%edx
10b9b0: 75 07 jne 10b9b9 <_Thread_Clear_state+0x85><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
10b9b2: c6 05 c0 42 12 00 01 movb $0x1,0x1242c0
}
}
}
_ISR_Enable( level );
10b9b9: 51 push %ecx
10b9ba: 9d popf
}
10b9bb: 5b pop %ebx
10b9bc: c9 leave
10b9bd: c3 ret
0010bb34 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10bb34: 55 push %ebp
10bb35: 89 e5 mov %esp,%ebp
10bb37: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10bb3a: 8d 45 f4 lea -0xc(%ebp),%eax
10bb3d: 50 push %eax
10bb3e: ff 75 08 pushl 0x8(%ebp)
10bb41: e8 8e 01 00 00 call 10bcd4 <_Thread_Get>
switch ( location ) {
10bb46: 83 c4 10 add $0x10,%esp
10bb49: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10bb4d: 75 1b jne 10bb6a <_Thread_Delay_ended+0x36><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10bb4f: 52 push %edx
10bb50: 52 push %edx
10bb51: 68 18 00 00 10 push $0x10000018
10bb56: 50 push %eax
10bb57: e8 d8 fd ff ff call 10b934 <_Thread_Clear_state>
10bb5c: a1 f4 41 12 00 mov 0x1241f4,%eax
10bb61: 48 dec %eax
10bb62: a3 f4 41 12 00 mov %eax,0x1241f4
10bb67: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10bb6a: c9 leave
10bb6b: c3 ret
0010bb6c <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10bb6c: 55 push %ebp
10bb6d: 89 e5 mov %esp,%ebp
10bb6f: 57 push %edi
10bb70: 56 push %esi
10bb71: 53 push %ebx
10bb72: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10bb75: 8b 1d b0 42 12 00 mov 0x1242b0,%ebx
_ISR_Disable( level );
10bb7b: 9c pushf
10bb7c: fa cli
10bb7d: 58 pop %eax
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
10bb7e: 8d 7d d8 lea -0x28(%ebp),%edi
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
10bb81: e9 f1 00 00 00 jmp 10bc77 <_Thread_Dispatch+0x10b>
heir = _Thread_Heir;
10bb86: 8b 35 80 42 12 00 mov 0x124280,%esi
_Thread_Dispatch_disable_level = 1;
10bb8c: c7 05 f4 41 12 00 01 movl $0x1,0x1241f4
10bb93: 00 00 00
_Context_Switch_necessary = false;
10bb96: c6 05 c0 42 12 00 00 movb $0x0,0x1242c0
_Thread_Executing = heir;
10bb9d: 89 35 b0 42 12 00 mov %esi,0x1242b0
#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 )
10bba3: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10bba7: 75 09 jne 10bbb2 <_Thread_Dispatch+0x46>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10bba9: 8b 15 c0 41 12 00 mov 0x1241c0,%edx
10bbaf: 89 56 78 mov %edx,0x78(%esi)
_ISR_Enable( level );
10bbb2: 50 push %eax
10bbb3: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10bbb4: 83 ec 0c sub $0xc,%esp
10bbb7: 8d 45 e0 lea -0x20(%ebp),%eax
10bbba: 50 push %eax
10bbbb: e8 30 32 00 00 call 10edf0 <_TOD_Get_uptime>
_Timestamp_Subtract(
10bbc0: 83 c4 0c add $0xc,%esp
10bbc3: 57 push %edi
10bbc4: 8d 45 e0 lea -0x20(%ebp),%eax
10bbc7: 50 push %eax
10bbc8: 68 b8 42 12 00 push $0x1242b8
10bbcd: e8 5e 0c 00 00 call 10c830 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10bbd2: 58 pop %eax
10bbd3: 5a pop %edx
10bbd4: 57 push %edi
10bbd5: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10bbdb: 50 push %eax
10bbdc: e8 1f 0c 00 00 call 10c800 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10bbe1: 8b 45 e0 mov -0x20(%ebp),%eax
10bbe4: 8b 55 e4 mov -0x1c(%ebp),%edx
10bbe7: a3 b8 42 12 00 mov %eax,0x1242b8
10bbec: 89 15 bc 42 12 00 mov %edx,0x1242bc
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10bbf2: a1 7c 42 12 00 mov 0x12427c,%eax
10bbf7: 83 c4 10 add $0x10,%esp
10bbfa: 85 c0 test %eax,%eax
10bbfc: 74 10 je 10bc0e <_Thread_Dispatch+0xa2> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10bbfe: 8b 10 mov (%eax),%edx
10bc00: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10bc06: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx
10bc0c: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10bc0e: 51 push %ecx
10bc0f: 51 push %ecx
10bc10: 56 push %esi
10bc11: 53 push %ebx
10bc12: e8 49 0e 00 00 call 10ca60 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10bc17: 58 pop %eax
10bc18: 5a pop %edx
10bc19: 81 c6 d4 00 00 00 add $0xd4,%esi
10bc1f: 56 push %esi
10bc20: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax
10bc26: 50 push %eax
10bc27: e8 f4 10 00 00 call 10cd20 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10bc2c: 83 c4 10 add $0x10,%esp
10bc2f: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx)
10bc36: 74 36 je 10bc6e <_Thread_Dispatch+0x102>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
10bc38: a1 78 42 12 00 mov 0x124278,%eax
10bc3d: 39 c3 cmp %eax,%ebx
10bc3f: 74 2d je 10bc6e <_Thread_Dispatch+0x102>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10bc41: 85 c0 test %eax,%eax
10bc43: 74 11 je 10bc56 <_Thread_Dispatch+0xea>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10bc45: 83 ec 0c sub $0xc,%esp
10bc48: 05 ec 00 00 00 add $0xec,%eax
10bc4d: 50 push %eax
10bc4e: e8 01 11 00 00 call 10cd54 <_CPU_Context_save_fp>
10bc53: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10bc56: 83 ec 0c sub $0xc,%esp
10bc59: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax
10bc5f: 50 push %eax
10bc60: e8 f9 10 00 00 call 10cd5e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10bc65: 89 1d 78 42 12 00 mov %ebx,0x124278
10bc6b: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10bc6e: 8b 1d b0 42 12 00 mov 0x1242b0,%ebx
_ISR_Disable( level );
10bc74: 9c pushf
10bc75: fa cli
10bc76: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
10bc77: 8a 15 c0 42 12 00 mov 0x1242c0,%dl
10bc7d: 84 d2 test %dl,%dl
10bc7f: 0f 85 01 ff ff ff jne 10bb86 <_Thread_Dispatch+0x1a>
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
10bc85: c7 05 f4 41 12 00 00 movl $0x0,0x1241f4
10bc8c: 00 00 00
_ISR_Enable( level );
10bc8f: 50 push %eax
10bc90: 9d popf
if ( _Thread_Do_post_task_switch_extension ||
10bc91: 83 3d 94 42 12 00 00 cmpl $0x0,0x124294
10bc98: 75 06 jne 10bca0 <_Thread_Dispatch+0x134>
executing->do_post_task_switch_extension ) {
10bc9a: 80 7b 74 00 cmpb $0x0,0x74(%ebx)
10bc9e: 74 09 je 10bca9 <_Thread_Dispatch+0x13d>
executing->do_post_task_switch_extension = false;
10bca0: c6 43 74 00 movb $0x0,0x74(%ebx)
_API_extensions_Run_postswitch();
10bca4: e8 92 ea ff ff call 10a73b <_API_extensions_Run_postswitch>
}
}
10bca9: 8d 65 f4 lea -0xc(%ebp),%esp
10bcac: 5b pop %ebx
10bcad: 5e pop %esi
10bcae: 5f pop %edi
10bcaf: c9 leave
10bcb0: c3 ret
00110a4c <_Thread_Evaluate_mode>:
*
* XXX
*/
bool _Thread_Evaluate_mode( void )
{
110a4c: 55 push %ebp
110a4d: 89 e5 mov %esp,%ebp
Thread_Control *executing;
executing = _Thread_Executing;
110a4f: a1 b0 42 12 00 mov 0x1242b0,%eax
if ( !_States_Is_ready( executing->current_state ) ||
110a54: 83 78 10 00 cmpl $0x0,0x10(%eax)
110a58: 75 0e jne 110a68 <_Thread_Evaluate_mode+0x1c><== NEVER TAKEN
110a5a: 3b 05 80 42 12 00 cmp 0x124280,%eax
110a60: 74 11 je 110a73 <_Thread_Evaluate_mode+0x27>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
110a62: 80 78 75 00 cmpb $0x0,0x75(%eax)
110a66: 74 0b je 110a73 <_Thread_Evaluate_mode+0x27><== NEVER TAKEN
_Context_Switch_necessary = true;
110a68: c6 05 c0 42 12 00 01 movb $0x1,0x1242c0
110a6f: b0 01 mov $0x1,%al
return true;
110a71: eb 02 jmp 110a75 <_Thread_Evaluate_mode+0x29>
110a73: 31 c0 xor %eax,%eax
}
return false;
}
110a75: c9 leave
110a76: c3 ret
00110a78 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
110a78: 55 push %ebp
110a79: 89 e5 mov %esp,%ebp
110a7b: 53 push %ebx
110a7c: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
110a7f: 8b 1d b0 42 12 00 mov 0x1242b0,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
110a85: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
_ISR_Set_level(level);
110a8b: 85 c0 test %eax,%eax
110a8d: 74 03 je 110a92 <_Thread_Handler+0x1a>
110a8f: fa cli
110a90: eb 01 jmp 110a93 <_Thread_Handler+0x1b>
110a92: fb sti
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
110a93: a0 9c 3e 12 00 mov 0x123e9c,%al
110a98: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
110a9b: c6 05 9c 3e 12 00 01 movb $0x1,0x123e9c
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
110aa2: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx)
110aa9: 74 24 je 110acf <_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 );
110aab: a1 78 42 12 00 mov 0x124278,%eax
110ab0: 39 c3 cmp %eax,%ebx
110ab2: 74 1b je 110acf <_Thread_Handler+0x57>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
110ab4: 85 c0 test %eax,%eax
110ab6: 74 11 je 110ac9 <_Thread_Handler+0x51>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
110ab8: 83 ec 0c sub $0xc,%esp
110abb: 05 ec 00 00 00 add $0xec,%eax
110ac0: 50 push %eax
110ac1: e8 8e c2 ff ff call 10cd54 <_CPU_Context_save_fp>
110ac6: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
110ac9: 89 1d 78 42 12 00 mov %ebx,0x124278
/*
* 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 );
110acf: 83 ec 0c sub $0xc,%esp
110ad2: 53 push %ebx
110ad3: e8 3c be ff ff call 10c914 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
110ad8: e8 d4 b1 ff ff call 10bcb1 <_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) */ {
110add: 83 c4 10 add $0x10,%esp
110ae0: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
110ae4: 75 05 jne 110aeb <_Thread_Handler+0x73>
INIT_NAME ();
110ae6: e8 55 c4 00 00 call 11cf40 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
110aeb: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
110af1: 85 c0 test %eax,%eax
110af3: 75 0b jne 110b00 <_Thread_Handler+0x88>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
110af5: 83 ec 0c sub $0xc,%esp
110af8: ff b3 a8 00 00 00 pushl 0xa8(%ebx)
110afe: eb 0c jmp 110b0c <_Thread_Handler+0x94>
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
110b00: 48 dec %eax
110b01: 75 15 jne 110b18 <_Thread_Handler+0xa0> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
110b03: 83 ec 0c sub $0xc,%esp
110b06: ff b3 a4 00 00 00 pushl 0xa4(%ebx)
110b0c: ff 93 9c 00 00 00 call *0x9c(%ebx)
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
110b12: 89 43 28 mov %eax,0x28(%ebx)
110b15: 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 );
110b18: 83 ec 0c sub $0xc,%esp
110b1b: 53 push %ebx
110b1c: e8 24 be ff ff call 10c945 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
110b21: 83 c4 0c add $0xc,%esp
110b24: 6a 06 push $0x6
110b26: 6a 01 push $0x1
110b28: 6a 00 push $0x0
110b2a: e8 e5 a4 ff ff call 10b014 <_Internal_error_Occurred>
0010bd48 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10bd48: 55 push %ebp
10bd49: 89 e5 mov %esp,%ebp
10bd4b: 57 push %edi
10bd4c: 56 push %esi
10bd4d: 53 push %ebx
10bd4e: 83 ec 1c sub $0x1c,%esp
10bd51: 8b 5d 0c mov 0xc(%ebp),%ebx
10bd54: 8b 4d 10 mov 0x10(%ebp),%ecx
10bd57: 8b 75 14 mov 0x14(%ebp),%esi
10bd5a: 8a 55 18 mov 0x18(%ebp),%dl
10bd5d: 8a 45 20 mov 0x20(%ebp),%al
10bd60: 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;
10bd63: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx)
10bd6a: 00 00 00
10bd6d: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx)
10bd74: 00 00 00
10bd77: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx)
10bd7e: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10bd81: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
10bd88: 00 00 00
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
10bd8b: 85 c9 test %ecx,%ecx
10bd8d: 75 30 jne 10bdbf <_Thread_Initialize+0x77>
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10bd8f: 51 push %ecx
10bd90: 51 push %ecx
10bd91: 56 push %esi
10bd92: 53 push %ebx
10bd93: 88 55 e0 mov %dl,-0x20(%ebp)
10bd96: e8 69 08 00 00 call 10c604 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10bd9b: 83 c4 10 add $0x10,%esp
10bd9e: 39 f0 cmp %esi,%eax
10bda0: 8a 55 e0 mov -0x20(%ebp),%dl
10bda3: 72 04 jb 10bda9 <_Thread_Initialize+0x61>
10bda5: 85 c0 test %eax,%eax
10bda7: 75 07 jne 10bdb0 <_Thread_Initialize+0x68><== ALWAYS TAKEN
10bda9: 31 c0 xor %eax,%eax
10bdab: e9 d9 01 00 00 jmp 10bf89 <_Thread_Initialize+0x241>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
10bdb0: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx
the_thread->Start.core_allocated_stack = true;
10bdb6: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx)
10bdbd: eb 09 jmp 10bdc8 <_Thread_Initialize+0x80>
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
10bdbf: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx)
10bdc6: 89 f0 mov %esi,%eax
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10bdc8: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx)
the_stack->size = size;
10bdce: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10bdd4: 31 ff xor %edi,%edi
10bdd6: 84 d2 test %dl,%dl
10bdd8: 74 19 je 10bdf3 <_Thread_Initialize+0xab>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10bdda: 83 ec 0c sub $0xc,%esp
10bddd: 6a 6c push $0x6c
10bddf: e8 c4 0e 00 00 call 10cca8 <_Workspace_Allocate>
10bde4: 89 c7 mov %eax,%edi
if ( !fp_area )
10bde6: 83 c4 10 add $0x10,%esp
10bde9: 31 f6 xor %esi,%esi
10bdeb: 85 c0 test %eax,%eax
10bded: 0f 84 10 01 00 00 je 10bf03 <_Thread_Initialize+0x1bb>
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10bdf3: 89 bb ec 00 00 00 mov %edi,0xec(%ebx)
the_thread->Start.fp_context = fp_area;
10bdf9: 89 bb cc 00 00 00 mov %edi,0xcc(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10bdff: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10be06: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10be0d: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10be14: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10be1b: a1 90 42 12 00 mov 0x124290,%eax
10be20: 31 f6 xor %esi,%esi
10be22: 85 c0 test %eax,%eax
10be24: 74 1d je 10be43 <_Thread_Initialize+0xfb>
extensions_area = _Workspace_Allocate(
10be26: 83 ec 0c sub $0xc,%esp
10be29: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10be30: 50 push %eax
10be31: e8 72 0e 00 00 call 10cca8 <_Workspace_Allocate>
10be36: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10be38: 83 c4 10 add $0x10,%esp
10be3b: 85 c0 test %eax,%eax
10be3d: 0f 84 c0 00 00 00 je 10bf03 <_Thread_Initialize+0x1bb>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10be43: 89 b3 00 01 00 00 mov %esi,0x100(%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 ) {
10be49: 85 f6 test %esi,%esi
10be4b: 74 1c je 10be69 <_Thread_Initialize+0x121>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10be4d: 8b 0d 90 42 12 00 mov 0x124290,%ecx
10be53: 31 c0 xor %eax,%eax
10be55: eb 0e jmp 10be65 <_Thread_Initialize+0x11d>
the_thread->extensions[i] = NULL;
10be57: 8b 93 00 01 00 00 mov 0x100(%ebx),%edx
10be5d: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10be64: 40 inc %eax
10be65: 39 c8 cmp %ecx,%eax
10be67: 76 ee jbe 10be57 <_Thread_Initialize+0x10f>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10be69: 8a 45 e7 mov -0x19(%ebp),%al
10be6c: 88 83 ac 00 00 00 mov %al,0xac(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10be72: 8b 45 24 mov 0x24(%ebp),%eax
10be75: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10be7b: 8b 45 28 mov 0x28(%ebp),%eax
10be7e: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
switch ( budget_algorithm ) {
10be84: 83 7d 24 02 cmpl $0x2,0x24(%ebp)
10be88: 75 08 jne 10be92 <_Thread_Initialize+0x14a>
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10be8a: a1 c0 41 12 00 mov 0x1241c0,%eax
10be8f: 89 43 78 mov %eax,0x78(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10be92: 8b 45 2c mov 0x2c(%ebp),%eax
10be95: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
the_thread->current_state = STATES_DORMANT;
10be9b: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10bea2: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10bea9: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
10beb0: 8b 45 1c mov 0x1c(%ebp),%eax
10beb3: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10beb6: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
_Thread_Set_priority( the_thread, priority );
10bebc: 52 push %edx
10bebd: 52 push %edx
10bebe: 50 push %eax
10bebf: 53 push %ebx
10bec0: e8 93 05 00 00 call 10c458 <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10bec5: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10becc: 00 00 00
10becf: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10bed6: 00 00 00
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bed9: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10bedd: 8b 45 08 mov 0x8(%ebp),%eax
10bee0: 8b 40 1c mov 0x1c(%eax),%eax
10bee3: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10bee6: 8b 45 30 mov 0x30(%ebp),%eax
10bee9: 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 );
10beec: 89 1c 24 mov %ebx,(%esp)
10beef: e8 c0 0a 00 00 call 10c9b4 <_User_extensions_Thread_create>
10bef4: 88 c2 mov %al,%dl
if ( extension_status )
10bef6: 83 c4 10 add $0x10,%esp
10bef9: b0 01 mov $0x1,%al
10befb: 84 d2 test %dl,%dl
10befd: 0f 85 86 00 00 00 jne 10bf89 <_Thread_Initialize+0x241>
return true;
failed:
if ( the_thread->libc_reent )
10bf03: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax
10bf09: 85 c0 test %eax,%eax
10bf0b: 74 0c je 10bf19 <_Thread_Initialize+0x1d1>
_Workspace_Free( the_thread->libc_reent );
10bf0d: 83 ec 0c sub $0xc,%esp
10bf10: 50 push %eax
10bf11: e8 ab 0d 00 00 call 10ccc1 <_Workspace_Free>
10bf16: 83 c4 10 add $0x10,%esp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10bf19: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax
10bf1f: 85 c0 test %eax,%eax
10bf21: 74 0c je 10bf2f <_Thread_Initialize+0x1e7>
_Workspace_Free( the_thread->API_Extensions[i] );
10bf23: 83 ec 0c sub $0xc,%esp
10bf26: 50 push %eax
10bf27: e8 95 0d 00 00 call 10ccc1 <_Workspace_Free>
10bf2c: 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] )
10bf2f: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax
10bf35: 85 c0 test %eax,%eax
10bf37: 74 0c je 10bf45 <_Thread_Initialize+0x1fd>
_Workspace_Free( the_thread->API_Extensions[i] );
10bf39: 83 ec 0c sub $0xc,%esp
10bf3c: 50 push %eax
10bf3d: e8 7f 0d 00 00 call 10ccc1 <_Workspace_Free>
10bf42: 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] )
10bf45: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax
10bf4b: 85 c0 test %eax,%eax
10bf4d: 74 0c je 10bf5b <_Thread_Initialize+0x213><== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
10bf4f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bf52: 50 push %eax <== NOT EXECUTED
10bf53: e8 69 0d 00 00 call 10ccc1 <_Workspace_Free> <== NOT EXECUTED
10bf58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( extensions_area )
10bf5b: 85 f6 test %esi,%esi
10bf5d: 74 0c je 10bf6b <_Thread_Initialize+0x223>
(void) _Workspace_Free( extensions_area );
10bf5f: 83 ec 0c sub $0xc,%esp
10bf62: 56 push %esi
10bf63: e8 59 0d 00 00 call 10ccc1 <_Workspace_Free>
10bf68: 83 c4 10 add $0x10,%esp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
10bf6b: 85 ff test %edi,%edi
10bf6d: 74 0c je 10bf7b <_Thread_Initialize+0x233>
(void) _Workspace_Free( fp_area );
10bf6f: 83 ec 0c sub $0xc,%esp
10bf72: 57 push %edi
10bf73: e8 49 0d 00 00 call 10ccc1 <_Workspace_Free>
10bf78: 83 c4 10 add $0x10,%esp
#endif
_Thread_Stack_Free( the_thread );
10bf7b: 83 ec 0c sub $0xc,%esp
10bf7e: 53 push %ebx
10bf7f: e8 d0 06 00 00 call 10c654 <_Thread_Stack_Free>
10bf84: 31 c0 xor %eax,%eax
return false;
10bf86: 83 c4 10 add $0x10,%esp
}
10bf89: 8d 65 f4 lea -0xc(%ebp),%esp
10bf8c: 5b pop %ebx
10bf8d: 5e pop %esi
10bf8e: 5f pop %edi
10bf8f: c9 leave
10bf90: c3 ret
0010f84c <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
10f84c: 55 push %ebp
10f84d: 89 e5 mov %esp,%ebp
10f84f: 53 push %ebx
10f850: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10f853: 9c pushf
10f854: fa cli
10f855: 59 pop %ecx
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
10f856: 8b 50 10 mov 0x10(%eax),%edx
if ( current_state & STATES_SUSPENDED ) {
10f859: f6 c2 02 test $0x2,%dl
10f85c: 74 70 je 10f8ce <_Thread_Resume+0x82> <== NEVER TAKEN
10f85e: 83 e2 fd and $0xfffffffd,%edx
current_state =
10f861: 89 50 10 mov %edx,0x10(%eax)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
10f864: 85 d2 test %edx,%edx
10f866: 75 66 jne 10f8ce <_Thread_Resume+0x82>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10f868: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
10f86e: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx
10f875: 66 09 1a or %bx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10f878: 66 8b 15 74 93 12 00 mov 0x129374,%dx
10f87f: 0b 90 94 00 00 00 or 0x94(%eax),%edx
10f885: 66 89 15 74 93 12 00 mov %dx,0x129374
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10f88c: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10f892: 8d 5a 04 lea 0x4(%edx),%ebx
10f895: 89 18 mov %ebx,(%eax)
old_last_node = the_chain->last;
10f897: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
10f89a: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10f89d: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
10f89f: 89 58 04 mov %ebx,0x4(%eax)
_ISR_Flash( level );
10f8a2: 51 push %ecx
10f8a3: 9d popf
10f8a4: fa cli
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
10f8a5: 8b 50 14 mov 0x14(%eax),%edx
10f8a8: 8b 1d 50 93 12 00 mov 0x129350,%ebx
10f8ae: 3b 53 14 cmp 0x14(%ebx),%edx
10f8b1: 73 1b jae 10f8ce <_Thread_Resume+0x82>
_Thread_Heir = the_thread;
10f8b3: a3 50 93 12 00 mov %eax,0x129350
if ( _Thread_Executing->is_preemptible ||
10f8b8: a1 80 93 12 00 mov 0x129380,%eax
10f8bd: 80 78 75 00 cmpb $0x0,0x75(%eax)
10f8c1: 75 04 jne 10f8c7 <_Thread_Resume+0x7b>
10f8c3: 85 d2 test %edx,%edx
10f8c5: 75 07 jne 10f8ce <_Thread_Resume+0x82> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
10f8c7: c6 05 90 93 12 00 01 movb $0x1,0x129390
}
}
}
_ISR_Enable( level );
10f8ce: 51 push %ecx
10f8cf: 9d popf
}
10f8d0: 5b pop %ebx
10f8d1: c9 leave
10f8d2: c3 ret
0010c73c <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
10c73c: 55 push %ebp
10c73d: 89 e5 mov %esp,%ebp
10c73f: 53 push %ebx
10c740: 83 ec 04 sub $0x4,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10c743: 8b 1d b0 42 12 00 mov 0x1242b0,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10c749: 80 7b 75 00 cmpb $0x0,0x75(%ebx)
10c74d: 74 4c je 10c79b <_Thread_Tickle_timeslice+0x5f>
return;
if ( !_States_Is_ready( executing->current_state ) )
10c74f: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10c753: 75 46 jne 10c79b <_Thread_Tickle_timeslice+0x5f>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10c755: 8b 43 7c mov 0x7c(%ebx),%eax
10c758: 83 f8 01 cmp $0x1,%eax
10c75b: 72 3e jb 10c79b <_Thread_Tickle_timeslice+0x5f>
10c75d: 83 f8 02 cmp $0x2,%eax
10c760: 76 07 jbe 10c769 <_Thread_Tickle_timeslice+0x2d>
10c762: 83 f8 03 cmp $0x3,%eax
10c765: 75 34 jne 10c79b <_Thread_Tickle_timeslice+0x5f><== NEVER TAKEN
10c767: eb 1a jmp 10c783 <_Thread_Tickle_timeslice+0x47>
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
10c769: 8b 43 78 mov 0x78(%ebx),%eax
10c76c: 48 dec %eax
10c76d: 89 43 78 mov %eax,0x78(%ebx)
10c770: 85 c0 test %eax,%eax
10c772: 7f 27 jg 10c79b <_Thread_Tickle_timeslice+0x5f>
_Thread_Reset_timeslice();
10c774: e8 c3 2c 00 00 call 10f43c <_Thread_Reset_timeslice>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10c779: a1 c0 41 12 00 mov 0x1241c0,%eax
10c77e: 89 43 78 mov %eax,0x78(%ebx)
10c781: eb 18 jmp 10c79b <_Thread_Tickle_timeslice+0x5f>
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
10c783: 8b 43 78 mov 0x78(%ebx),%eax
10c786: 48 dec %eax
10c787: 89 43 78 mov %eax,0x78(%ebx)
10c78a: 85 c0 test %eax,%eax
10c78c: 75 0d jne 10c79b <_Thread_Tickle_timeslice+0x5f>
(*executing->budget_callout)( executing );
10c78e: 83 ec 0c sub $0xc,%esp
10c791: 53 push %ebx
10c792: ff 93 80 00 00 00 call *0x80(%ebx)
10c798: 83 c4 10 add $0x10,%esp
break;
#endif
}
}
10c79b: 8b 5d fc mov -0x4(%ebp),%ebx
10c79e: c9 leave
10c79f: c3 ret
0010c7a0 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
10c7a0: 55 push %ebp
10c7a1: 89 e5 mov %esp,%ebp
10c7a3: 56 push %esi
10c7a4: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10c7a5: a1 b0 42 12 00 mov 0x1242b0,%eax
ready = executing->ready;
10c7aa: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
10c7b0: 9c pushf
10c7b1: fa cli
10c7b2: 59 pop %ecx
if ( !_Chain_Has_only_one_node( ready ) ) {
10c7b3: 8b 1a mov (%edx),%ebx
10c7b5: 3b 5a 08 cmp 0x8(%edx),%ebx
10c7b8: 74 2e je 10c7e8 <_Thread_Yield_processor+0x48>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10c7ba: 8b 30 mov (%eax),%esi
previous = the_node->previous;
10c7bc: 8b 58 04 mov 0x4(%eax),%ebx
next->previous = previous;
10c7bf: 89 5e 04 mov %ebx,0x4(%esi)
previous->next = next;
10c7c2: 89 33 mov %esi,(%ebx)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10c7c4: 8d 5a 04 lea 0x4(%edx),%ebx
10c7c7: 89 18 mov %ebx,(%eax)
old_last_node = the_chain->last;
10c7c9: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
10c7cc: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10c7cf: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
10c7d1: 89 58 04 mov %ebx,0x4(%eax)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10c7d4: 51 push %ecx
10c7d5: 9d popf
10c7d6: fa cli
if ( _Thread_Is_heir( executing ) )
10c7d7: 3b 05 80 42 12 00 cmp 0x124280,%eax
10c7dd: 75 11 jne 10c7f0 <_Thread_Yield_processor+0x50><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
10c7df: 8b 02 mov (%edx),%eax
10c7e1: a3 80 42 12 00 mov %eax,0x124280
10c7e6: eb 08 jmp 10c7f0 <_Thread_Yield_processor+0x50>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
10c7e8: 3b 05 80 42 12 00 cmp 0x124280,%eax
10c7ee: 74 07 je 10c7f7 <_Thread_Yield_processor+0x57><== ALWAYS TAKEN
_Context_Switch_necessary = true;
10c7f0: c6 05 c0 42 12 00 01 movb $0x1,0x1242c0
_ISR_Enable( level );
10c7f7: 51 push %ecx
10c7f8: 9d popf
}
10c7f9: 5b pop %ebx
10c7fa: 5e pop %esi
10c7fb: c9 leave
10c7fc: c3 ret
0010c1f4 <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
10c1f4: 55 push %ebp
10c1f5: 89 e5 mov %esp,%ebp
10c1f7: 57 push %edi
10c1f8: 56 push %esi
10c1f9: 53 push %ebx
10c1fa: 83 ec 10 sub $0x10,%esp
10c1fd: 8b 4d 08 mov 0x8(%ebp),%ecx
10c200: 8b 45 0c mov 0xc(%ebp),%eax
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10c203: 8d 50 3c lea 0x3c(%eax),%edx
10c206: 89 50 38 mov %edx,0x38(%eax)
the_chain->permanent_null = NULL;
10c209: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax)
the_chain->last = _Chain_Head(the_chain);
10c210: 8d 50 38 lea 0x38(%eax),%edx
10c213: 89 50 40 mov %edx,0x40(%eax)
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
10c216: 8b 58 14 mov 0x14(%eax),%ebx
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
10c219: 89 de mov %ebx,%esi
10c21b: c1 ee 06 shr $0x6,%esi
10c21e: 6b f6 0c imul $0xc,%esi,%esi
10c221: 8d 34 31 lea (%ecx,%esi,1),%esi
block_state = the_thread_queue->state;
10c224: 8b 79 38 mov 0x38(%ecx),%edi
if ( _Thread_queue_Is_reverse_search( priority ) )
10c227: f6 c3 20 test $0x20,%bl
10c22a: 75 70 jne 10c29c <_Thread_queue_Enqueue_priority+0xa8>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10c22c: 8d 56 04 lea 0x4(%esi),%edx
10c22f: 89 55 e8 mov %edx,-0x18(%ebp)
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
10c232: 9c pushf
10c233: fa cli
10c234: 8f 45 f0 popl -0x10(%ebp)
search_thread = (Thread_Control *) header->first;
10c237: 8b 16 mov (%esi),%edx
10c239: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp)
10c240: 89 75 e4 mov %esi,-0x1c(%ebp)
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10c243: eb 1f jmp 10c264 <_Thread_queue_Enqueue_priority+0x70>
search_priority = search_thread->current_priority;
10c245: 8b 72 14 mov 0x14(%edx),%esi
10c248: 89 75 ec mov %esi,-0x14(%ebp)
if ( priority <= search_priority )
10c24b: 39 f3 cmp %esi,%ebx
10c24d: 76 1a jbe 10c269 <_Thread_queue_Enqueue_priority+0x75>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
10c24f: ff 75 f0 pushl -0x10(%ebp)
10c252: 9d popf
10c253: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10c254: 85 7a 10 test %edi,0x10(%edx)
10c257: 75 09 jne 10c262 <_Thread_queue_Enqueue_priority+0x6e><== ALWAYS TAKEN
10c259: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED
_ISR_Enable( level );
10c25c: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED
10c25f: 9d popf <== NOT EXECUTED
goto restart_forward_search;
10c260: eb d0 jmp 10c232 <_Thread_queue_Enqueue_priority+0x3e><== NOT EXECUTED
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
10c262: 8b 12 mov (%edx),%edx
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10c264: 3b 55 e8 cmp -0x18(%ebp),%edx
10c267: 75 dc jne 10c245 <_Thread_queue_Enqueue_priority+0x51>
10c269: 8b 75 f0 mov -0x10(%ebp),%esi
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
10c26c: 83 79 30 01 cmpl $0x1,0x30(%ecx)
10c270: 0f 85 a9 00 00 00 jne 10c31f <_Thread_queue_Enqueue_priority+0x12b>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10c276: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx)
if ( priority == search_priority )
10c27d: 3b 5d ec cmp -0x14(%ebp),%ebx
10c280: 0f 84 82 00 00 00 je 10c308 <_Thread_queue_Enqueue_priority+0x114>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
10c286: 8b 5a 04 mov 0x4(%edx),%ebx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10c289: 89 10 mov %edx,(%eax)
the_node->previous = previous_node;
10c28b: 89 58 04 mov %ebx,0x4(%eax)
previous_node->next = the_node;
10c28e: 89 03 mov %eax,(%ebx)
search_node->previous = the_node;
10c290: 89 42 04 mov %eax,0x4(%edx)
the_thread->Wait.queue = the_thread_queue;
10c293: 89 48 44 mov %ecx,0x44(%eax)
_ISR_Enable( level );
10c296: ff 75 f0 pushl -0x10(%ebp)
10c299: 9d popf
10c29a: eb 65 jmp 10c301 <_Thread_queue_Enqueue_priority+0x10d>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
10c29c: 0f b6 15 f4 01 12 00 movzbl 0x1201f4,%edx
10c2a3: 42 inc %edx
10c2a4: 89 55 ec mov %edx,-0x14(%ebp)
_ISR_Disable( level );
10c2a7: 9c pushf
10c2a8: fa cli
10c2a9: 8f 45 f0 popl -0x10(%ebp)
search_thread = (Thread_Control *) header->last;
10c2ac: 8b 56 08 mov 0x8(%esi),%edx
10c2af: 89 75 e8 mov %esi,-0x18(%ebp)
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10c2b2: eb 20 jmp 10c2d4 <_Thread_queue_Enqueue_priority+0xe0>
search_priority = search_thread->current_priority;
10c2b4: 8b 72 14 mov 0x14(%edx),%esi
10c2b7: 89 75 ec mov %esi,-0x14(%ebp)
if ( priority >= search_priority )
10c2ba: 39 f3 cmp %esi,%ebx
10c2bc: 73 1b jae 10c2d9 <_Thread_queue_Enqueue_priority+0xe5>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
10c2be: ff 75 f0 pushl -0x10(%ebp)
10c2c1: 9d popf
10c2c2: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10c2c3: 85 7a 10 test %edi,0x10(%edx)
10c2c6: 75 09 jne 10c2d1 <_Thread_queue_Enqueue_priority+0xdd>
10c2c8: 8b 75 e8 mov -0x18(%ebp),%esi
_ISR_Enable( level );
10c2cb: ff 75 f0 pushl -0x10(%ebp)
10c2ce: 9d popf
goto restart_reverse_search;
10c2cf: eb cb jmp 10c29c <_Thread_queue_Enqueue_priority+0xa8>
}
search_thread = (Thread_Control *)
10c2d1: 8b 52 04 mov 0x4(%edx),%edx
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10c2d4: 3b 55 e8 cmp -0x18(%ebp),%edx
10c2d7: 75 db jne 10c2b4 <_Thread_queue_Enqueue_priority+0xc0>
10c2d9: 8b 75 f0 mov -0x10(%ebp),%esi
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
10c2dc: 83 79 30 01 cmpl $0x1,0x30(%ecx)
10c2e0: 75 3d jne 10c31f <_Thread_queue_Enqueue_priority+0x12b>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10c2e2: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx)
if ( priority == search_priority )
10c2e9: 3b 5d ec cmp -0x14(%ebp),%ebx
10c2ec: 74 1a je 10c308 <_Thread_queue_Enqueue_priority+0x114>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
10c2ee: 8b 1a mov (%edx),%ebx
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
10c2f0: 89 18 mov %ebx,(%eax)
the_node->previous = search_node;
10c2f2: 89 50 04 mov %edx,0x4(%eax)
search_node->next = the_node;
10c2f5: 89 02 mov %eax,(%edx)
next_node->previous = the_node;
10c2f7: 89 43 04 mov %eax,0x4(%ebx)
the_thread->Wait.queue = the_thread_queue;
10c2fa: 89 48 44 mov %ecx,0x44(%eax)
_ISR_Enable( level );
10c2fd: ff 75 f0 pushl -0x10(%ebp)
10c300: 9d popf
10c301: b8 01 00 00 00 mov $0x1,%eax
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c306: eb 1f jmp 10c327 <_Thread_queue_Enqueue_priority+0x133>
10c308: 83 c2 3c add $0x3c,%edx
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
10c30b: 8b 5a 04 mov 0x4(%edx),%ebx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10c30e: 89 10 mov %edx,(%eax)
the_node->previous = previous_node;
10c310: 89 58 04 mov %ebx,0x4(%eax)
previous_node->next = the_node;
10c313: 89 03 mov %eax,(%ebx)
search_node->previous = the_node;
10c315: 89 42 04 mov %eax,0x4(%edx)
the_thread->Wait.queue = the_thread_queue;
10c318: 89 48 44 mov %ecx,0x44(%eax)
_ISR_Enable( level );
10c31b: 56 push %esi
10c31c: 9d popf
10c31d: eb e2 jmp 10c301 <_Thread_queue_Enqueue_priority+0x10d>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
10c31f: 8b 45 10 mov 0x10(%ebp),%eax
10c322: 89 30 mov %esi,(%eax)
return the_thread_queue->sync_state;
10c324: 8b 41 30 mov 0x30(%ecx),%eax
}
10c327: 83 c4 10 add $0x10,%esp
10c32a: 5b pop %ebx
10c32b: 5e pop %esi
10c32c: 5f pop %edi
10c32d: c9 leave
10c32e: c3 ret
0010c3d0 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10c3d0: 55 push %ebp
10c3d1: 89 e5 mov %esp,%ebp
10c3d3: 57 push %edi
10c3d4: 56 push %esi
10c3d5: 53 push %ebx
10c3d6: 83 ec 1c sub $0x1c,%esp
10c3d9: 8b 75 08 mov 0x8(%ebp),%esi
10c3dc: 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 )
10c3df: 85 f6 test %esi,%esi
10c3e1: 74 36 je 10c419 <_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 ) {
10c3e3: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10c3e7: 75 30 jne 10c419 <_Thread_queue_Requeue+0x49><== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10c3e9: 9c pushf
10c3ea: fa cli
10c3eb: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10c3ec: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10c3f3: 74 22 je 10c417 <_Thread_queue_Requeue+0x47><== NEVER TAKEN
10c3f5: 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 );
10c3fc: 50 push %eax
10c3fd: 6a 01 push $0x1
10c3ff: 57 push %edi
10c400: 56 push %esi
10c401: e8 92 2e 00 00 call 10f298 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10c406: 83 c4 0c add $0xc,%esp
10c409: 8d 45 e4 lea -0x1c(%ebp),%eax
10c40c: 50 push %eax
10c40d: 57 push %edi
10c40e: 56 push %esi
10c40f: e8 e0 fd ff ff call 10c1f4 <_Thread_queue_Enqueue_priority>
10c414: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10c417: 53 push %ebx
10c418: 9d popf
}
}
10c419: 8d 65 f4 lea -0xc(%ebp),%esp
10c41c: 5b pop %ebx
10c41d: 5e pop %esi
10c41e: 5f pop %edi
10c41f: c9 leave
10c420: c3 ret
0010c424 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10c424: 55 push %ebp
10c425: 89 e5 mov %esp,%ebp
10c427: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10c42a: 8d 45 f4 lea -0xc(%ebp),%eax
10c42d: 50 push %eax
10c42e: ff 75 08 pushl 0x8(%ebp)
10c431: e8 9e f8 ff ff call 10bcd4 <_Thread_Get>
switch ( location ) {
10c436: 83 c4 10 add $0x10,%esp
10c439: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10c43d: 75 17 jne 10c456 <_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 );
10c43f: 83 ec 0c sub $0xc,%esp
10c442: 50 push %eax
10c443: e8 08 2f 00 00 call 10f350 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10c448: a1 f4 41 12 00 mov 0x1241f4,%eax
10c44d: 48 dec %eax
10c44e: a3 f4 41 12 00 mov %eax,0x1241f4
10c453: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10c456: c9 leave
10c457: c3 ret
00116c50 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
116c50: 55 push %ebp
116c51: 89 e5 mov %esp,%ebp
116c53: 57 push %edi
116c54: 56 push %esi
116c55: 53 push %ebx
116c56: 83 ec 4c sub $0x4c,%esp
116c59: 8b 5d 08 mov 0x8(%ebp),%ebx
116c5c: 8d 45 dc lea -0x24(%ebp),%eax
116c5f: 8d 55 e0 lea -0x20(%ebp),%edx
116c62: 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);
116c65: 89 55 dc mov %edx,-0x24(%ebp)
the_chain->permanent_null = NULL;
116c68: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_chain->last = _Chain_Head(the_chain);
116c6f: 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;
116c72: 8d 75 d0 lea -0x30(%ebp),%esi
116c75: 8d 55 d4 lea -0x2c(%ebp),%edx
116c78: 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);
116c7b: 89 55 d0 mov %edx,-0x30(%ebp)
the_chain->permanent_null = NULL;
116c7e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
the_chain->last = _Chain_Head(the_chain);
116c85: 89 75 d8 mov %esi,-0x28(%ebp)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
116c88: 8d 53 30 lea 0x30(%ebx),%edx
116c8b: 89 55 c0 mov %edx,-0x40(%ebp)
/*
* 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 );
116c8e: 8d 7b 68 lea 0x68(%ebx),%edi
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
116c91: 8d 4b 08 lea 0x8(%ebx),%ecx
116c94: 89 4d b8 mov %ecx,-0x48(%ebp)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
116c97: 8d 53 40 lea 0x40(%ebx),%edx
116c9a: 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;
116c9d: 8d 4d dc lea -0x24(%ebp),%ecx
116ca0: 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;
116ca3: a1 34 e7 13 00 mov 0x13e734,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
116ca8: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
116cab: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
116cae: 51 push %ecx
116caf: 8d 4d d0 lea -0x30(%ebp),%ecx
116cb2: 51 push %ecx
116cb3: 29 d0 sub %edx,%eax
116cb5: 50 push %eax
116cb6: ff 75 c0 pushl -0x40(%ebp)
116cb9: e8 ee 36 00 00 call 11a3ac <_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();
116cbe: a1 78 e6 13 00 mov 0x13e678,%eax
116cc3: 89 45 c4 mov %eax,-0x3c(%ebp)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
116cc6: 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 ) {
116cc9: 83 c4 10 add $0x10,%esp
116ccc: 39 45 c4 cmp %eax,-0x3c(%ebp)
116ccf: 76 13 jbe 116ce4 <_Timer_server_Body+0x94>
/*
* 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 );
116cd1: 52 push %edx
116cd2: 8d 55 d0 lea -0x30(%ebp),%edx
116cd5: 52 push %edx
116cd6: 8b 4d c4 mov -0x3c(%ebp),%ecx
116cd9: 29 c1 sub %eax,%ecx
116cdb: 51 push %ecx
116cdc: 57 push %edi
116cdd: e8 ca 36 00 00 call 11a3ac <_Watchdog_Adjust_to_chain>
116ce2: eb 0f jmp 116cf3 <_Timer_server_Body+0xa3>
} else if ( snapshot < last_snapshot ) {
116ce4: 73 10 jae 116cf6 <_Timer_server_Body+0xa6>
/*
* 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 );
116ce6: 51 push %ecx
116ce7: 2b 45 c4 sub -0x3c(%ebp),%eax
116cea: 50 push %eax
116ceb: 6a 01 push $0x1
116ced: 57 push %edi
116cee: e8 4d 36 00 00 call 11a340 <_Watchdog_Adjust>
116cf3: 83 c4 10 add $0x10,%esp
}
watchdogs->last_snapshot = snapshot;
116cf6: 8b 45 c4 mov -0x3c(%ebp),%eax
116cf9: 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 );
116cfc: 8b 43 78 mov 0x78(%ebx),%eax
116cff: 83 ec 0c sub $0xc,%esp
116d02: 50 push %eax
116d03: e8 3c 07 00 00 call 117444 <_Chain_Get>
if ( timer == NULL ) {
116d08: 83 c4 10 add $0x10,%esp
116d0b: 85 c0 test %eax,%eax
116d0d: 74 29 je 116d38 <_Timer_server_Body+0xe8><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116d0f: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
116d12: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
116d15: 75 0b jne 116d22 <_Timer_server_Body+0xd2><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116d17: 52 push %edx <== NOT EXECUTED
116d18: 52 push %edx <== NOT EXECUTED
116d19: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
116d1c: 50 push %eax <== NOT EXECUTED
116d1d: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED
116d20: eb 0c jmp 116d2e <_Timer_server_Body+0xde><== NOT EXECUTED
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116d22: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
116d25: 75 d5 jne 116cfc <_Timer_server_Body+0xac><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116d27: 51 push %ecx <== NOT EXECUTED
116d28: 51 push %ecx <== NOT EXECUTED
116d29: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
116d2c: 50 push %eax <== NOT EXECUTED
116d2d: 57 push %edi <== NOT EXECUTED
116d2e: e8 01 37 00 00 call 11a434 <_Watchdog_Insert> <== NOT EXECUTED
116d33: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
116d36: eb c4 jmp 116cfc <_Timer_server_Body+0xac><== 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 );
116d38: 9c pushf
116d39: fa cli
116d3a: 58 pop %eax
if ( _Chain_Is_empty( insert_chain ) ) {
116d3b: 8b 55 b4 mov -0x4c(%ebp),%edx
116d3e: 39 55 dc cmp %edx,-0x24(%ebp)
116d41: 75 13 jne 116d56 <_Timer_server_Body+0x106><== NEVER TAKEN
ts->insert_chain = NULL;
116d43: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
116d4a: 50 push %eax
116d4b: 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 ) ) {
116d4c: 8b 4d b0 mov -0x50(%ebp),%ecx
116d4f: 39 4d d0 cmp %ecx,-0x30(%ebp)
116d52: 75 09 jne 116d5d <_Timer_server_Body+0x10d>
116d54: eb 3e jmp 116d94 <_Timer_server_Body+0x144>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
116d56: 50 push %eax <== NOT EXECUTED
116d57: 9d popf <== NOT EXECUTED
116d58: e9 46 ff ff ff jmp 116ca3 <_Timer_server_Body+0x53><== 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 );
116d5d: 9c pushf
116d5e: fa cli
116d5f: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
116d60: 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))
116d63: 3b 45 b0 cmp -0x50(%ebp),%eax
116d66: 74 25 je 116d8d <_Timer_server_Body+0x13d>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
116d68: 8b 08 mov (%eax),%ecx
the_chain->first = new_first;
116d6a: 89 4d d0 mov %ecx,-0x30(%ebp)
new_first->previous = _Chain_Head(the_chain);
116d6d: 89 71 04 mov %esi,0x4(%ecx)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
116d70: 85 c0 test %eax,%eax
116d72: 74 19 je 116d8d <_Timer_server_Body+0x13d><== NEVER TAKEN
watchdog->state = WATCHDOG_INACTIVE;
116d74: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
116d7b: 52 push %edx
116d7c: 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 );
116d7d: 52 push %edx
116d7e: 52 push %edx
116d7f: ff 70 24 pushl 0x24(%eax)
116d82: ff 70 20 pushl 0x20(%eax)
116d85: ff 50 1c call *0x1c(%eax)
}
116d88: 83 c4 10 add $0x10,%esp
116d8b: eb d0 jmp 116d5d <_Timer_server_Body+0x10d>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
116d8d: 52 push %edx
116d8e: 9d popf
116d8f: e9 09 ff ff ff jmp 116c9d <_Timer_server_Body+0x4d>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
116d94: c6 43 7c 00 movb $0x0,0x7c(%ebx)
116d98: a1 e8 e5 13 00 mov 0x13e5e8,%eax
116d9d: 40 inc %eax
116d9e: a3 e8 e5 13 00 mov %eax,0x13e5e8
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
116da3: 50 push %eax
116da4: 50 push %eax
116da5: 6a 08 push $0x8
116da7: ff 33 pushl (%ebx)
116da9: e8 6e 2e 00 00 call 119c1c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
116dae: 89 d8 mov %ebx,%eax
116db0: e8 0f fe ff ff call 116bc4 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
116db5: 89 d8 mov %ebx,%eax
116db7: e8 4e fe ff ff call 116c0a <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
116dbc: e8 14 25 00 00 call 1192d5 <_Thread_Enable_dispatch>
ts->active = true;
116dc1: 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 );
116dc5: 59 pop %ecx
116dc6: ff 75 b8 pushl -0x48(%ebp)
116dc9: e8 7e 37 00 00 call 11a54c <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
116dce: 5a pop %edx
116dcf: ff 75 bc pushl -0x44(%ebp)
116dd2: e8 75 37 00 00 call 11a54c <_Watchdog_Remove>
116dd7: 83 c4 10 add $0x10,%esp
116dda: e9 be fe ff ff jmp 116c9d <_Timer_server_Body+0x4d>
00116ddf <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
116ddf: 55 push %ebp
116de0: 89 e5 mov %esp,%ebp
116de2: 57 push %edi
116de3: 56 push %esi
116de4: 53 push %ebx
116de5: 83 ec 2c sub $0x2c,%esp
116de8: 8b 5d 08 mov 0x8(%ebp),%ebx
116deb: 8b 45 0c mov 0xc(%ebp),%eax
if ( ts->insert_chain == NULL ) {
116dee: 8b 53 78 mov 0x78(%ebx),%edx
116df1: 85 d2 test %edx,%edx
116df3: 0f 85 e6 00 00 00 jne 116edf <_Timer_server_Schedule_operation_method+0x100><== NEVER TAKEN
116df9: 8b 15 e8 e5 13 00 mov 0x13e5e8,%edx
116dff: 42 inc %edx
116e00: 89 15 e8 e5 13 00 mov %edx,0x13e5e8
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116e06: 8b 50 38 mov 0x38(%eax),%edx
116e09: 83 fa 01 cmp $0x1,%edx
116e0c: 75 5a jne 116e68 <_Timer_server_Schedule_operation_method+0x89>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
116e0e: 9c pushf
116e0f: fa cli
116e10: 8f 45 e0 popl -0x20(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
116e13: 8b 0d 34 e7 13 00 mov 0x13e734,%ecx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
116e19: 8b 73 3c mov 0x3c(%ebx),%esi
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
116e1c: 8b 53 30 mov 0x30(%ebx),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
116e1f: 8d 7b 34 lea 0x34(%ebx),%edi
116e22: 39 fa cmp %edi,%edx
116e24: 74 19 je 116e3f <_Timer_server_Schedule_operation_method+0x60>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
116e26: 89 cf mov %ecx,%edi
116e28: 29 f7 sub %esi,%edi
116e2a: 89 7d e4 mov %edi,-0x1c(%ebp)
delta_interval = first_watchdog->delta_interval;
116e2d: 8b 7a 10 mov 0x10(%edx),%edi
if (delta_interval > delta) {
116e30: 31 f6 xor %esi,%esi
116e32: 3b 7d e4 cmp -0x1c(%ebp),%edi
116e35: 76 05 jbe 116e3c <_Timer_server_Schedule_operation_method+0x5d>
delta_interval -= delta;
116e37: 89 fe mov %edi,%esi
116e39: 2b 75 e4 sub -0x1c(%ebp),%esi
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
116e3c: 89 72 10 mov %esi,0x10(%edx)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
116e3f: 89 4b 3c mov %ecx,0x3c(%ebx)
_ISR_Enable( level );
116e42: ff 75 e0 pushl -0x20(%ebp)
116e45: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116e46: 57 push %edi
116e47: 57 push %edi
116e48: 83 c0 10 add $0x10,%eax
116e4b: 50 push %eax
116e4c: 8d 43 30 lea 0x30(%ebx),%eax
116e4f: 50 push %eax
116e50: e8 df 35 00 00 call 11a434 <_Watchdog_Insert>
if ( !ts->active ) {
116e55: 8a 43 7c mov 0x7c(%ebx),%al
116e58: 83 c4 10 add $0x10,%esp
116e5b: 84 c0 test %al,%al
116e5d: 75 74 jne 116ed3 <_Timer_server_Schedule_operation_method+0xf4>
_Timer_server_Reset_interval_system_watchdog( ts );
116e5f: 89 d8 mov %ebx,%eax
116e61: e8 5e fd ff ff call 116bc4 <_Timer_server_Reset_interval_system_watchdog>
116e66: eb 6b jmp 116ed3 <_Timer_server_Schedule_operation_method+0xf4>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116e68: 83 fa 03 cmp $0x3,%edx
116e6b: 75 66 jne 116ed3 <_Timer_server_Schedule_operation_method+0xf4>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
116e6d: 9c pushf
116e6e: fa cli
116e6f: 8f 45 e0 popl -0x20(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
116e72: 8b 0d 78 e6 13 00 mov 0x13e678,%ecx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
116e78: 8b 53 74 mov 0x74(%ebx),%edx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
116e7b: 8b 73 68 mov 0x68(%ebx),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
116e7e: 8d 7b 6c lea 0x6c(%ebx),%edi
116e81: 39 fe cmp %edi,%esi
116e83: 74 27 je 116eac <_Timer_server_Schedule_operation_method+0xcd>
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
116e85: 8b 7e 10 mov 0x10(%esi),%edi
116e88: 89 7d d4 mov %edi,-0x2c(%ebp)
if ( snapshot > last_snapshot ) {
116e8b: 39 d1 cmp %edx,%ecx
116e8d: 76 15 jbe 116ea4 <_Timer_server_Schedule_operation_method+0xc5>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
116e8f: 89 cf mov %ecx,%edi
116e91: 29 d7 sub %edx,%edi
116e93: 89 7d e4 mov %edi,-0x1c(%ebp)
if (delta_interval > delta) {
116e96: 31 d2 xor %edx,%edx
116e98: 39 7d d4 cmp %edi,-0x2c(%ebp)
116e9b: 76 0c jbe 116ea9 <_Timer_server_Schedule_operation_method+0xca><== NEVER TAKEN
delta_interval -= delta;
116e9d: 8b 55 d4 mov -0x2c(%ebp),%edx
116ea0: 29 fa sub %edi,%edx
116ea2: eb 05 jmp 116ea9 <_Timer_server_Schedule_operation_method+0xca>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
116ea4: 03 55 d4 add -0x2c(%ebp),%edx
delta_interval += delta;
116ea7: 29 ca sub %ecx,%edx
}
first_watchdog->delta_interval = delta_interval;
116ea9: 89 56 10 mov %edx,0x10(%esi)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
116eac: 89 4b 74 mov %ecx,0x74(%ebx)
_ISR_Enable( level );
116eaf: ff 75 e0 pushl -0x20(%ebp)
116eb2: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116eb3: 56 push %esi
116eb4: 56 push %esi
116eb5: 83 c0 10 add $0x10,%eax
116eb8: 50 push %eax
116eb9: 8d 43 68 lea 0x68(%ebx),%eax
116ebc: 50 push %eax
116ebd: e8 72 35 00 00 call 11a434 <_Watchdog_Insert>
if ( !ts->active ) {
116ec2: 8a 43 7c mov 0x7c(%ebx),%al
116ec5: 83 c4 10 add $0x10,%esp
116ec8: 84 c0 test %al,%al
116eca: 75 07 jne 116ed3 <_Timer_server_Schedule_operation_method+0xf4>
_Timer_server_Reset_tod_system_watchdog( ts );
116ecc: 89 d8 mov %ebx,%eax
116ece: e8 37 fd ff ff call 116c0a <_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 );
}
}
116ed3: 8d 65 f4 lea -0xc(%ebp),%esp
116ed6: 5b pop %ebx
116ed7: 5e pop %esi
116ed8: 5f pop %edi
116ed9: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
116eda: e9 f6 23 00 00 jmp 1192d5 <_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 );
116edf: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED
116ee2: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
116ee5: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED
}
}
116ee8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
116eeb: 5b pop %ebx <== NOT EXECUTED
116eec: 5e pop %esi <== NOT EXECUTED
116eed: 5f pop %edi <== NOT EXECUTED
116eee: 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 );
116eef: e9 2c 05 00 00 jmp 117420 <_Chain_Append> <== NOT EXECUTED
0010e2fc <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10e2fc: 55 push %ebp
10e2fd: 89 e5 mov %esp,%ebp
10e2ff: 57 push %edi
10e300: 56 push %esi
10e301: 53 push %ebx
10e302: 83 ec 1c sub $0x1c,%esp
10e305: 8b 75 08 mov 0x8(%ebp),%esi
10e308: 8b 7d 0c mov 0xc(%ebp),%edi
10e30b: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
10e30e: 9c pushf
10e30f: fa cli
10e310: 58 pop %eax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
10e311: 8b 16 mov (%esi),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10e313: 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 ) ) {
10e316: 39 ca cmp %ecx,%edx
10e318: 74 44 je 10e35e <_Watchdog_Adjust+0x62>
switch ( direction ) {
10e31a: 85 ff test %edi,%edi
10e31c: 74 3c je 10e35a <_Watchdog_Adjust+0x5e>
10e31e: 4f dec %edi
10e31f: 75 3d jne 10e35e <_Watchdog_Adjust+0x62> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
10e321: 01 5a 10 add %ebx,0x10(%edx)
break;
10e324: eb 38 jmp 10e35e <_Watchdog_Adjust+0x62>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
10e326: 8b 16 mov (%esi),%edx
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
10e328: 8b 7a 10 mov 0x10(%edx),%edi
10e32b: 39 fb cmp %edi,%ebx
10e32d: 73 07 jae 10e336 <_Watchdog_Adjust+0x3a>
_Watchdog_First( header )->delta_interval -= units;
10e32f: 29 df sub %ebx,%edi
10e331: 89 7a 10 mov %edi,0x10(%edx)
break;
10e334: eb 28 jmp 10e35e <_Watchdog_Adjust+0x62>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
10e336: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
10e33d: 50 push %eax
10e33e: 9d popf
_Watchdog_Tickle( header );
10e33f: 83 ec 0c sub $0xc,%esp
10e342: 56 push %esi
10e343: 89 4d e4 mov %ecx,-0x1c(%ebp)
10e346: e8 9d 01 00 00 call 10e4e8 <_Watchdog_Tickle>
_ISR_Disable( level );
10e34b: 9c pushf
10e34c: fa cli
10e34d: 58 pop %eax
if ( _Chain_Is_empty( header ) )
10e34e: 83 c4 10 add $0x10,%esp
10e351: 8b 4d e4 mov -0x1c(%ebp),%ecx
10e354: 39 0e cmp %ecx,(%esi)
10e356: 74 06 je 10e35e <_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;
10e358: 29 fb sub %edi,%ebx
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10e35a: 85 db test %ebx,%ebx
10e35c: 75 c8 jne 10e326 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
10e35e: 50 push %eax
10e35f: 9d popf
}
10e360: 8d 65 f4 lea -0xc(%ebp),%esp
10e363: 5b pop %ebx
10e364: 5e pop %esi
10e365: 5f pop %edi
10e366: c9 leave
10e367: c3 ret
0010cbac <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10cbac: 55 push %ebp
10cbad: 89 e5 mov %esp,%ebp
10cbaf: 56 push %esi
10cbb0: 53 push %ebx
10cbb1: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10cbb4: 9c pushf
10cbb5: fa cli
10cbb6: 5e pop %esi
previous_state = the_watchdog->state;
10cbb7: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10cbba: 83 f8 01 cmp $0x1,%eax
10cbbd: 74 09 je 10cbc8 <_Watchdog_Remove+0x1c>
10cbbf: 72 44 jb 10cc05 <_Watchdog_Remove+0x59>
10cbc1: 83 f8 03 cmp $0x3,%eax
10cbc4: 77 3f ja 10cc05 <_Watchdog_Remove+0x59> <== NEVER TAKEN
10cbc6: eb 09 jmp 10cbd1 <_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;
10cbc8: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10cbcf: eb 34 jmp 10cc05 <_Watchdog_Remove+0x59>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10cbd1: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
10cbd8: 8b 0a mov (%edx),%ecx
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10cbda: 83 39 00 cmpl $0x0,(%ecx)
10cbdd: 74 06 je 10cbe5 <_Watchdog_Remove+0x39>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10cbdf: 8b 5a 10 mov 0x10(%edx),%ebx
10cbe2: 01 59 10 add %ebx,0x10(%ecx)
if ( _Watchdog_Sync_count )
10cbe5: 8b 0d 3c 43 12 00 mov 0x12433c,%ecx
10cbeb: 85 c9 test %ecx,%ecx
10cbed: 74 0c je 10cbfb <_Watchdog_Remove+0x4f>
_Watchdog_Sync_level = _ISR_Nest_level;
10cbef: 8b 0d 8c 42 12 00 mov 0x12428c,%ecx
10cbf5: 89 0d ac 42 12 00 mov %ecx,0x1242ac
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10cbfb: 8b 1a mov (%edx),%ebx
previous = the_node->previous;
10cbfd: 8b 4a 04 mov 0x4(%edx),%ecx
next->previous = previous;
10cc00: 89 4b 04 mov %ecx,0x4(%ebx)
previous->next = next;
10cc03: 89 19 mov %ebx,(%ecx)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10cc05: 8b 0d 40 43 12 00 mov 0x124340,%ecx
10cc0b: 89 4a 18 mov %ecx,0x18(%edx)
_ISR_Enable( level );
10cc0e: 56 push %esi
10cc0f: 9d popf
return( previous_state );
}
10cc10: 5b pop %ebx
10cc11: 5e pop %esi
10cc12: c9 leave
10cc13: c3 ret
0010de50 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10de50: 55 push %ebp
10de51: 89 e5 mov %esp,%ebp
10de53: 57 push %edi
10de54: 56 push %esi
10de55: 53 push %ebx
10de56: 83 ec 20 sub $0x20,%esp
10de59: 8b 7d 08 mov 0x8(%ebp),%edi
10de5c: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10de5f: 9c pushf
10de60: fa cli
10de61: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
10de64: 56 push %esi
10de65: 57 push %edi
10de66: 68 84 0b 12 00 push $0x120b84
10de6b: e8 a8 aa ff ff call 108918 <printk>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
10de70: 8b 1e mov (%esi),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10de72: 83 c6 04 add $0x4,%esi
if ( !_Chain_Is_empty( header ) ) {
10de75: 83 c4 10 add $0x10,%esp
10de78: 39 f3 cmp %esi,%ebx
10de7a: 74 1d je 10de99 <_Watchdog_Report_chain+0x49>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10de7c: 52 push %edx
10de7d: 52 push %edx
10de7e: 53 push %ebx
10de7f: 6a 00 push $0x0
10de81: e8 32 00 00 00 call 10deb8 <_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 )
10de86: 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 ;
10de88: 83 c4 10 add $0x10,%esp
10de8b: 39 f3 cmp %esi,%ebx
10de8d: 75 ed jne 10de7c <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10de8f: 50 push %eax
10de90: 50 push %eax
10de91: 57 push %edi
10de92: 68 9b 0b 12 00 push $0x120b9b
10de97: eb 08 jmp 10dea1 <_Watchdog_Report_chain+0x51>
} else {
printk( "Chain is empty\n" );
10de99: 83 ec 0c sub $0xc,%esp
10de9c: 68 aa 0b 12 00 push $0x120baa
10dea1: e8 72 aa ff ff call 108918 <printk>
10dea6: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10dea9: ff 75 e4 pushl -0x1c(%ebp)
10deac: 9d popf
}
10dead: 8d 65 f4 lea -0xc(%ebp),%esp
10deb0: 5b pop %ebx
10deb1: 5e pop %esi
10deb2: 5f pop %edi
10deb3: c9 leave
10deb4: c3 ret
0010cc14 <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
10cc14: 55 push %ebp
10cc15: 89 e5 mov %esp,%ebp
10cc17: 57 push %edi
10cc18: 56 push %esi
10cc19: 53 push %ebx
10cc1a: 83 ec 1c sub $0x1c,%esp
10cc1d: 8b 7d 08 mov 0x8(%ebp),%edi
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
10cc20: 9c pushf
10cc21: fa cli
10cc22: 5e pop %esi
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
10cc23: 8b 1f mov (%edi),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10cc25: 8d 47 04 lea 0x4(%edi),%eax
10cc28: 89 45 e4 mov %eax,-0x1c(%ebp)
if ( _Chain_Is_empty( header ) )
10cc2b: 39 c3 cmp %eax,%ebx
10cc2d: 74 40 je 10cc6f <_Watchdog_Tickle+0x5b>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
10cc2f: 8b 43 10 mov 0x10(%ebx),%eax
10cc32: 85 c0 test %eax,%eax
10cc34: 74 08 je 10cc3e <_Watchdog_Tickle+0x2a>
the_watchdog->delta_interval--;
10cc36: 48 dec %eax
10cc37: 89 43 10 mov %eax,0x10(%ebx)
if ( the_watchdog->delta_interval != 0 )
10cc3a: 85 c0 test %eax,%eax
10cc3c: 75 31 jne 10cc6f <_Watchdog_Tickle+0x5b>
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
10cc3e: 83 ec 0c sub $0xc,%esp
10cc41: 53 push %ebx
10cc42: e8 65 ff ff ff call 10cbac <_Watchdog_Remove>
_ISR_Enable( level );
10cc47: 56 push %esi
10cc48: 9d popf
switch( watchdog_state ) {
10cc49: 83 c4 10 add $0x10,%esp
10cc4c: 83 f8 02 cmp $0x2,%eax
10cc4f: 75 0e jne 10cc5f <_Watchdog_Tickle+0x4b> <== NEVER TAKEN
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
10cc51: 50 push %eax
10cc52: 50 push %eax
10cc53: ff 73 24 pushl 0x24(%ebx)
10cc56: ff 73 20 pushl 0x20(%ebx)
10cc59: ff 53 1c call *0x1c(%ebx)
10cc5c: 83 c4 10 add $0x10,%esp
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
10cc5f: 9c pushf
10cc60: fa cli
10cc61: 5e pop %esi
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
10cc62: 8b 1f mov (%edi),%ebx
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
10cc64: 3b 5d e4 cmp -0x1c(%ebp),%ebx
10cc67: 74 06 je 10cc6f <_Watchdog_Tickle+0x5b>
10cc69: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10cc6d: eb cd jmp 10cc3c <_Watchdog_Tickle+0x28>
leave:
_ISR_Enable(level);
10cc6f: 56 push %esi
10cc70: 9d popf
}
10cc71: 8d 65 f4 lea -0xc(%ebp),%esp
10cc74: 5b pop %ebx
10cc75: 5e pop %esi
10cc76: 5f pop %edi
10cc77: c9 leave
10cc78: c3 ret
0011c8d8 <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
11c8d8: 55 push %ebp
11c8d9: 89 e5 mov %esp,%ebp
11c8db: 83 ec 08 sub $0x8,%esp
11c8de: e8 6a 06 00 00 call 11cf4d <_fini>
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
* associated with this task.
*/
libc_wrapup();
11c8e3: e8 8c ff ff ff call 11c874 <libc_wrapup>
rtems_shutdown_executive(status);
11c8e8: 83 ec 0c sub $0xc,%esp
11c8eb: ff 75 08 pushl 0x8(%ebp)
11c8ee: e8 e9 00 00 00 call 11c9dc <rtems_shutdown_executive>
11c8f3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11c8f6: eb fe jmp 11c8f6 <_exit+0x1e> <== NOT EXECUTED
0010806a <_fcntl_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
int cmd,
int arg
)
{
10806a: 55 push %ebp <== NOT EXECUTED
10806b: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10806d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
108070: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
108073: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
return fcntl( fd, cmd, arg );
108076: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
108079: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED
10807c: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
10807f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
108082: c9 leave <== NOT EXECUTED
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
108083: e9 98 fe ff ff jmp 107f20 <fcntl> <== NOT EXECUTED
0011026e <_getpid_r>:
#include <reent.h>
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
11026e: 55 push %ebp <== NOT EXECUTED
11026f: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return getpid();
}
110271: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
110276: c9 leave <== NOT EXECUTED
110277: c3 ret <== NOT EXECUTED
0010decf <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
10decf: 55 push %ebp <== NOT EXECUTED
10ded0: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10ded2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
return gettimeofday( tp, tzp );
}
10ded5: c9 leave <== NOT EXECUTED
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
10ded6: e9 a5 ff ff ff jmp 10de80 <gettimeofday> <== NOT EXECUTED
0010891a <_link_r>:
int _link_r(
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
10891a: 55 push %ebp <== NOT EXECUTED
10891b: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10891d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
108920: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
return link( existing, new );
108923: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
108926: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
108929: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
10892c: c9 leave <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
return link( existing, new );
10892d: e9 26 fe ff ff jmp 108758 <link> <== NOT EXECUTED
0011c9a4 <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
11c9a4: 55 push %ebp <== NOT EXECUTED
11c9a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11c9a7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
11c9aa: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
return realloc( ptr, size );
11c9ad: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
11c9b0: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
11c9b3: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
11c9b6: c9 leave <== NOT EXECUTED
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
11c9b7: e9 48 00 00 00 jmp 11ca04 <realloc> <== NOT EXECUTED
0010aa8c <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
10aa8c: 55 push %ebp
10aa8d: 89 e5 mov %esp,%ebp
10aa8f: 57 push %edi
10aa90: 56 push %esi
10aa91: 53 push %ebx
10aa92: 83 ec 68 sub $0x68,%esp
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
10aa95: ff 75 0c pushl 0xc(%ebp)
10aa98: e8 02 ee ff ff call 10989f <rtems_filesystem_dirname>
10aa9d: 89 c2 mov %eax,%edx
if ( old_parent_pathlen == 0 )
10aa9f: 83 c4 10 add $0x10,%esp
10aaa2: 85 c0 test %eax,%eax
10aaa4: 75 36 jne 10aadc <_rename_r+0x50>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
10aaa6: 8b 4d 0c mov 0xc(%ebp),%ecx
10aaa9: 8a 01 mov (%ecx),%al
10aaab: 3c 5c cmp $0x5c,%al
10aaad: 74 08 je 10aab7 <_rename_r+0x2b> <== NEVER TAKEN
10aaaf: 3c 2f cmp $0x2f,%al
10aab1: 74 04 je 10aab7 <_rename_r+0x2b> <== NEVER TAKEN
10aab3: 84 c0 test %al,%al
10aab5: 75 0e jne 10aac5 <_rename_r+0x39> <== ALWAYS TAKEN
10aab7: 8d 7d bc lea -0x44(%ebp),%edi <== NOT EXECUTED
10aaba: 8b 35 68 8f 12 00 mov 0x128f68,%esi <== NOT EXECUTED
10aac0: 83 c6 18 add $0x18,%esi <== NOT EXECUTED
10aac3: eb 0c jmp 10aad1 <_rename_r+0x45> <== NOT EXECUTED
10aac5: 8d 7d bc lea -0x44(%ebp),%edi
10aac8: 8b 35 68 8f 12 00 mov 0x128f68,%esi
10aace: 83 c6 04 add $0x4,%esi
10aad1: b9 05 00 00 00 mov $0x5,%ecx
10aad6: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10aad8: 31 db xor %ebx,%ebx
10aada: eb 27 jmp 10ab03 <_rename_r+0x77>
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
10aadc: 83 ec 0c sub $0xc,%esp
10aadf: 6a 00 push $0x0
10aae1: 8d 45 bc lea -0x44(%ebp),%eax
10aae4: 50 push %eax
10aae5: 6a 02 push $0x2
10aae7: 52 push %edx
10aae8: ff 75 0c pushl 0xc(%ebp)
10aaeb: 89 55 a4 mov %edx,-0x5c(%ebp)
10aaee: e8 99 ee ff ff call 10998c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
10aaf3: 83 c4 20 add $0x20,%esp
10aaf6: 85 c0 test %eax,%eax
10aaf8: 8b 55 a4 mov -0x5c(%ebp),%edx
10aafb: 0f 85 6b 02 00 00 jne 10ad6c <_rename_r+0x2e0> <== NEVER TAKEN
10ab01: b3 01 mov $0x1,%bl
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
10ab03: 8d 7d d0 lea -0x30(%ebp),%edi
10ab06: 8d 75 bc lea -0x44(%ebp),%esi
10ab09: b9 05 00 00 00 mov $0x5,%ecx
10ab0e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = old + old_parent_pathlen;
10ab10: 8b 75 0c mov 0xc(%ebp),%esi
10ab13: 01 d6 add %edx,%esi
10ab15: 89 75 e4 mov %esi,-0x1c(%ebp)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
10ab18: 83 c9 ff or $0xffffffff,%ecx
10ab1b: 89 f7 mov %esi,%edi
10ab1d: 31 c0 xor %eax,%eax
10ab1f: f2 ae repnz scas %es:(%edi),%al
10ab21: f7 d1 not %ecx
10ab23: 49 dec %ecx
10ab24: 57 push %edi
10ab25: 57 push %edi
10ab26: 51 push %ecx
10ab27: 56 push %esi
10ab28: e8 4b ed ff ff call 109878 <rtems_filesystem_prefix_separators>
10ab2d: 01 c6 add %eax,%esi
10ab2f: 89 75 e4 mov %esi,-0x1c(%ebp)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
10ab32: 83 c9 ff or $0xffffffff,%ecx
10ab35: 89 f7 mov %esi,%edi
10ab37: 31 c0 xor %eax,%eax
10ab39: f2 ae repnz scas %es:(%edi),%al
10ab3b: f7 d1 not %ecx
10ab3d: 49 dec %ecx
10ab3e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10ab45: 8d 45 d0 lea -0x30(%ebp),%eax
10ab48: 50 push %eax
10ab49: 6a 00 push $0x0
10ab4b: 51 push %ecx
10ab4c: 56 push %esi
10ab4d: e8 80 ed ff ff call 1098d2 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
10ab52: 83 c4 20 add $0x20,%esp
10ab55: 85 c0 test %eax,%eax
10ab57: 74 29 je 10ab82 <_rename_r+0xf6>
if ( free_old_parentloc )
10ab59: 84 db test %bl,%bl
10ab5b: 0f 84 0b 02 00 00 je 10ad6c <_rename_r+0x2e0> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
10ab61: 8b 45 c8 mov -0x38(%ebp),%eax
10ab64: 85 c0 test %eax,%eax
10ab66: 0f 84 00 02 00 00 je 10ad6c <_rename_r+0x2e0> <== NEVER TAKEN
10ab6c: 8b 40 1c mov 0x1c(%eax),%eax
10ab6f: 85 c0 test %eax,%eax
10ab71: 0f 84 f5 01 00 00 je 10ad6c <_rename_r+0x2e0> <== NEVER TAKEN
10ab77: 83 ec 0c sub $0xc,%esp
10ab7a: 8d 55 bc lea -0x44(%ebp),%edx
10ab7d: e9 b5 00 00 00 jmp 10ac37 <_rename_r+0x1ab>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
10ab82: 8b 55 10 mov 0x10(%ebp),%edx
10ab85: 8a 02 mov (%edx),%al
10ab87: 3c 5c cmp $0x5c,%al
10ab89: 74 08 je 10ab93 <_rename_r+0x107> <== NEVER TAKEN
10ab8b: 3c 2f cmp $0x2f,%al
10ab8d: 74 04 je 10ab93 <_rename_r+0x107>
10ab8f: 84 c0 test %al,%al
10ab91: 75 1a jne 10abad <_rename_r+0x121> <== ALWAYS TAKEN
10ab93: 8d 7d a8 lea -0x58(%ebp),%edi
10ab96: 8b 35 68 8f 12 00 mov 0x128f68,%esi
10ab9c: 83 c6 18 add $0x18,%esi
10ab9f: b9 05 00 00 00 mov $0x5,%ecx
10aba4: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10aba6: ba 01 00 00 00 mov $0x1,%edx
10abab: eb 15 jmp 10abc2 <_rename_r+0x136>
10abad: 8d 7d a8 lea -0x58(%ebp),%edi
10abb0: 8b 35 68 8f 12 00 mov 0x128f68,%esi
10abb6: 83 c6 04 add $0x4,%esi
10abb9: b9 05 00 00 00 mov $0x5,%ecx
10abbe: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10abc0: 31 d2 xor %edx,%edx
if ( !new_parent_loc.ops->evalformake_h ) {
10abc2: 8b 45 b4 mov -0x4c(%ebp),%eax
10abc5: 8b 40 04 mov 0x4(%eax),%eax
10abc8: 85 c0 test %eax,%eax
10abca: 0f 84 f3 00 00 00 je 10acc3 <_rename_r+0x237>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
10abd0: 51 push %ecx
10abd1: 8d 4d e4 lea -0x1c(%ebp),%ecx
10abd4: 51 push %ecx
10abd5: 8d 7d a8 lea -0x58(%ebp),%edi
10abd8: 57 push %edi
10abd9: 03 55 10 add 0x10(%ebp),%edx
10abdc: 52 push %edx
10abdd: ff d0 call *%eax
if ( result != 0 ) {
10abdf: 83 c4 10 add $0x10,%esp
10abe2: 85 c0 test %eax,%eax
10abe4: 74 5f je 10ac45 <_rename_r+0x1b9>
rtems_filesystem_freenode( &new_parent_loc );
10abe6: 8b 45 b4 mov -0x4c(%ebp),%eax
10abe9: 85 c0 test %eax,%eax
10abeb: 74 10 je 10abfd <_rename_r+0x171> <== NEVER TAKEN
10abed: 8b 40 1c mov 0x1c(%eax),%eax
10abf0: 85 c0 test %eax,%eax
10abf2: 74 09 je 10abfd <_rename_r+0x171> <== NEVER TAKEN
10abf4: 83 ec 0c sub $0xc,%esp
10abf7: 57 push %edi
10abf8: ff d0 call *%eax
10abfa: 83 c4 10 add $0x10,%esp
if ( free_old_parentloc )
10abfd: 84 db test %bl,%bl
10abff: 74 1a je 10ac1b <_rename_r+0x18f> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
10ac01: 8b 45 c8 mov -0x38(%ebp),%eax
10ac04: 85 c0 test %eax,%eax
10ac06: 74 13 je 10ac1b <_rename_r+0x18f> <== NEVER TAKEN
10ac08: 8b 40 1c mov 0x1c(%eax),%eax
10ac0b: 85 c0 test %eax,%eax
10ac0d: 74 0c je 10ac1b <_rename_r+0x18f> <== NEVER TAKEN
10ac0f: 83 ec 0c sub $0xc,%esp
10ac12: 8d 55 bc lea -0x44(%ebp),%edx
10ac15: 52 push %edx
10ac16: ff d0 call *%eax
10ac18: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10ac1b: 8b 45 dc mov -0x24(%ebp),%eax
10ac1e: 85 c0 test %eax,%eax
10ac20: 0f 84 46 01 00 00 je 10ad6c <_rename_r+0x2e0> <== NEVER TAKEN
10ac26: 8b 40 1c mov 0x1c(%eax),%eax
10ac29: 85 c0 test %eax,%eax
10ac2b: 0f 84 3b 01 00 00 je 10ad6c <_rename_r+0x2e0> <== NEVER TAKEN
10ac31: 83 ec 0c sub $0xc,%esp
10ac34: 8d 55 d0 lea -0x30(%ebp),%edx
10ac37: 52 push %edx
10ac38: ff d0 call *%eax
10ac3a: 83 ce ff or $0xffffffff,%esi
10ac3d: 83 c4 10 add $0x10,%esp
10ac40: e9 2a 01 00 00 jmp 10ad6f <_rename_r+0x2e3>
/*
* 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 ) {
10ac45: 8b 45 cc mov -0x34(%ebp),%eax
10ac48: 3b 45 b8 cmp -0x48(%ebp),%eax
10ac4b: 8b 45 b4 mov -0x4c(%ebp),%eax
10ac4e: 74 5c je 10acac <_rename_r+0x220>
rtems_filesystem_freenode( &new_parent_loc );
10ac50: 85 c0 test %eax,%eax
10ac52: 74 10 je 10ac64 <_rename_r+0x1d8> <== NEVER TAKEN
10ac54: 8b 40 1c mov 0x1c(%eax),%eax
10ac57: 85 c0 test %eax,%eax
10ac59: 74 09 je 10ac64 <_rename_r+0x1d8> <== NEVER TAKEN
10ac5b: 83 ec 0c sub $0xc,%esp
10ac5e: 57 push %edi
10ac5f: ff d0 call *%eax
10ac61: 83 c4 10 add $0x10,%esp
if ( free_old_parentloc )
10ac64: 84 db test %bl,%bl
10ac66: 74 1a je 10ac82 <_rename_r+0x1f6>
rtems_filesystem_freenode( &old_parent_loc );
10ac68: 8b 45 c8 mov -0x38(%ebp),%eax
10ac6b: 85 c0 test %eax,%eax
10ac6d: 74 13 je 10ac82 <_rename_r+0x1f6> <== NEVER TAKEN
10ac6f: 8b 40 1c mov 0x1c(%eax),%eax
10ac72: 85 c0 test %eax,%eax
10ac74: 74 0c je 10ac82 <_rename_r+0x1f6> <== NEVER TAKEN
10ac76: 83 ec 0c sub $0xc,%esp
10ac79: 8d 55 bc lea -0x44(%ebp),%edx
10ac7c: 52 push %edx
10ac7d: ff d0 call *%eax
10ac7f: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10ac82: 8b 45 dc mov -0x24(%ebp),%eax
10ac85: 85 c0 test %eax,%eax
10ac87: 74 13 je 10ac9c <_rename_r+0x210> <== NEVER TAKEN
10ac89: 8b 40 1c mov 0x1c(%eax),%eax
10ac8c: 85 c0 test %eax,%eax
10ac8e: 74 0c je 10ac9c <_rename_r+0x210> <== NEVER TAKEN
10ac90: 83 ec 0c sub $0xc,%esp
10ac93: 8d 55 d0 lea -0x30(%ebp),%edx
10ac96: 52 push %edx
10ac97: ff d0 call *%eax
10ac99: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EXDEV );
10ac9c: e8 af a8 00 00 call 115550 <__errno>
10aca1: c7 00 12 00 00 00 movl $0x12,(%eax)
10aca7: e9 c0 00 00 00 jmp 10ad6c <_rename_r+0x2e0>
}
if ( !new_parent_loc.ops->rename_h ) {
10acac: 8b 50 40 mov 0x40(%eax),%edx
10acaf: 85 d2 test %edx,%edx
10acb1: 75 55 jne 10ad08 <_rename_r+0x27c>
rtems_filesystem_freenode( &new_parent_loc );
10acb3: 8b 40 1c mov 0x1c(%eax),%eax
10acb6: 85 c0 test %eax,%eax
10acb8: 74 09 je 10acc3 <_rename_r+0x237> <== NEVER TAKEN
10acba: 83 ec 0c sub $0xc,%esp
10acbd: 57 push %edi
10acbe: ff d0 call *%eax
10acc0: 83 c4 10 add $0x10,%esp
if ( free_old_parentloc )
10acc3: 84 db test %bl,%bl
10acc5: 74 1a je 10ace1 <_rename_r+0x255> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
10acc7: 8b 45 c8 mov -0x38(%ebp),%eax
10acca: 85 c0 test %eax,%eax
10accc: 74 13 je 10ace1 <_rename_r+0x255> <== NEVER TAKEN
10acce: 8b 40 1c mov 0x1c(%eax),%eax
10acd1: 85 c0 test %eax,%eax
10acd3: 74 0c je 10ace1 <_rename_r+0x255> <== NEVER TAKEN
10acd5: 83 ec 0c sub $0xc,%esp
10acd8: 8d 55 bc lea -0x44(%ebp),%edx
10acdb: 52 push %edx
10acdc: ff d0 call *%eax
10acde: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10ace1: 8b 45 dc mov -0x24(%ebp),%eax
10ace4: 85 c0 test %eax,%eax
10ace6: 74 13 je 10acfb <_rename_r+0x26f> <== NEVER TAKEN
10ace8: 8b 40 1c mov 0x1c(%eax),%eax
10aceb: 85 c0 test %eax,%eax
10aced: 74 0c je 10acfb <_rename_r+0x26f> <== NEVER TAKEN
10acef: 83 ec 0c sub $0xc,%esp
10acf2: 8d 55 d0 lea -0x30(%ebp),%edx
10acf5: 52 push %edx
10acf6: ff d0 call *%eax
10acf8: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTSUP );
10acfb: e8 50 a8 00 00 call 115550 <__errno>
10ad00: c7 00 86 00 00 00 movl $0x86,(%eax)
10ad06: eb 64 jmp 10ad6c <_rename_r+0x2e0>
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
10ad08: ff 75 e4 pushl -0x1c(%ebp)
10ad0b: 57 push %edi
10ad0c: 8d 45 d0 lea -0x30(%ebp),%eax
10ad0f: 50 push %eax
10ad10: 8d 45 bc lea -0x44(%ebp),%eax
10ad13: 50 push %eax
10ad14: ff d2 call *%edx
10ad16: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &new_parent_loc );
10ad18: 8b 45 b4 mov -0x4c(%ebp),%eax
10ad1b: 83 c4 10 add $0x10,%esp
10ad1e: 85 c0 test %eax,%eax
10ad20: 74 10 je 10ad32 <_rename_r+0x2a6> <== NEVER TAKEN
10ad22: 8b 40 1c mov 0x1c(%eax),%eax
10ad25: 85 c0 test %eax,%eax
10ad27: 74 09 je 10ad32 <_rename_r+0x2a6> <== NEVER TAKEN
10ad29: 83 ec 0c sub $0xc,%esp
10ad2c: 57 push %edi
10ad2d: ff d0 call *%eax
10ad2f: 83 c4 10 add $0x10,%esp
if ( free_old_parentloc )
10ad32: 84 db test %bl,%bl
10ad34: 74 1a je 10ad50 <_rename_r+0x2c4>
rtems_filesystem_freenode( &old_parent_loc );
10ad36: 8b 45 c8 mov -0x38(%ebp),%eax
10ad39: 85 c0 test %eax,%eax
10ad3b: 74 13 je 10ad50 <_rename_r+0x2c4> <== NEVER TAKEN
10ad3d: 8b 40 1c mov 0x1c(%eax),%eax
10ad40: 85 c0 test %eax,%eax
10ad42: 74 0c je 10ad50 <_rename_r+0x2c4> <== NEVER TAKEN
10ad44: 83 ec 0c sub $0xc,%esp
10ad47: 8d 55 bc lea -0x44(%ebp),%edx
10ad4a: 52 push %edx
10ad4b: ff d0 call *%eax
10ad4d: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10ad50: 8b 45 dc mov -0x24(%ebp),%eax
10ad53: 85 c0 test %eax,%eax
10ad55: 74 18 je 10ad6f <_rename_r+0x2e3> <== NEVER TAKEN
10ad57: 8b 40 1c mov 0x1c(%eax),%eax
10ad5a: 85 c0 test %eax,%eax
10ad5c: 74 11 je 10ad6f <_rename_r+0x2e3> <== NEVER TAKEN
10ad5e: 83 ec 0c sub $0xc,%esp
10ad61: 8d 55 d0 lea -0x30(%ebp),%edx
10ad64: 52 push %edx
10ad65: ff d0 call *%eax
10ad67: e9 d1 fe ff ff jmp 10ac3d <_rename_r+0x1b1>
10ad6c: 83 ce ff or $0xffffffff,%esi
return result;
}
10ad6f: 89 f0 mov %esi,%eax
10ad71: 8d 65 f4 lea -0xc(%ebp),%esp
10ad74: 5b pop %ebx
10ad75: 5e pop %esi
10ad76: 5f pop %edi
10ad77: c9 leave
10ad78: c3 ret
00109326 <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
109326: 55 push %ebp <== NOT EXECUTED
109327: 89 e5 mov %esp,%ebp <== NOT EXECUTED
109329: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10932c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
return _STAT_NAME( path, buf );
10932f: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
109332: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
109335: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
109338: c9 leave <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
109339: e9 3a ff ff ff jmp 109278 <stat> <== NOT EXECUTED
00110f36 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
110f36: 55 push %ebp <== NOT EXECUTED
110f37: 89 e5 mov %esp,%ebp <== NOT EXECUTED
110f39: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
return unlink( path );
110f3c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
110f3f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
110f42: c9 leave <== NOT EXECUTED
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
110f43: e9 04 fe ff ff jmp 110d4c <unlink> <== NOT EXECUTED
00109f0c <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
109f0c: 55 push %ebp
109f0d: 89 e5 mov %esp,%ebp
109f0f: 56 push %esi
109f10: 53 push %ebx
109f11: 83 ec 10 sub $0x10,%esp
109f14: 8b 5d 08 mov 0x8(%ebp),%ebx
109f17: 8b 75 0c mov 0xc(%ebp),%esi
long adjustment;
/*
* Simple validations
*/
if ( !delta )
109f1a: 85 db test %ebx,%ebx
109f1c: 74 09 je 109f27 <adjtime+0x1b>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
109f1e: 81 7b 04 3f 42 0f 00 cmpl $0xf423f,0x4(%ebx)
109f25: 76 13 jbe 109f3a <adjtime+0x2e>
rtems_set_errno_and_return_minus_one( EINVAL );
109f27: e8 8c 7d 00 00 call 111cb8 <__errno>
109f2c: c7 00 16 00 00 00 movl $0x16,(%eax)
109f32: 83 c8 ff or $0xffffffff,%eax
109f35: e9 9a 00 00 00 jmp 109fd4 <adjtime+0xc8>
if ( olddelta ) {
109f3a: 85 f6 test %esi,%esi
109f3c: 74 0d je 109f4b <adjtime+0x3f>
olddelta->tv_sec = 0;
109f3e: c7 06 00 00 00 00 movl $0x0,(%esi)
olddelta->tv_usec = 0;
109f44: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
109f4b: 69 03 40 42 0f 00 imul $0xf4240,(%ebx),%eax
adjustment += delta->tv_usec;
109f51: 03 43 04 add 0x4(%ebx),%eax
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
109f54: 3b 05 04 12 12 00 cmp 0x121204,%eax
109f5a: 72 76 jb 109fd2 <adjtime+0xc6>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
109f5c: a1 1c 53 12 00 mov 0x12531c,%eax
109f61: 40 inc %eax
109f62: a3 1c 53 12 00 mov %eax,0x12531c
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
109f67: 83 ec 0c sub $0xc,%esp
109f6a: 8d 45 f0 lea -0x10(%ebp),%eax
109f6d: 50 push %eax
109f6e: e8 dd 14 00 00 call 10b450 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
109f73: 8b 03 mov (%ebx),%eax
109f75: 01 45 f0 add %eax,-0x10(%ebp)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
109f78: 69 43 04 e8 03 00 00 imul $0x3e8,0x4(%ebx),%eax
109f7f: 8b 4d f0 mov -0x10(%ebp),%ecx
109f82: 03 45 f4 add -0xc(%ebp),%eax
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
109f85: 83 c4 10 add $0x10,%esp
109f88: eb 05 jmp 109f8f <adjtime+0x83>
109f8a: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax
109f8f: 89 ca mov %ecx,%edx
109f91: 41 inc %ecx
109f92: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
109f97: 77 f1 ja 109f8a <adjtime+0x7e>
109f99: eb 05 jmp 109fa0 <adjtime+0x94>
109f9b: 05 00 ca 9a 3b add $0x3b9aca00,%eax
109fa0: 89 d1 mov %edx,%ecx
109fa2: 4a dec %edx
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
109fa3: 3d 00 36 65 c4 cmp $0xc4653600,%eax
109fa8: 76 f1 jbe 109f9b <adjtime+0x8f>
109faa: 89 45 f4 mov %eax,-0xc(%ebp)
109fad: 89 4d f0 mov %ecx,-0x10(%ebp)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
109fb0: 83 ec 0c sub $0xc,%esp
109fb3: 8d 45 f0 lea -0x10(%ebp),%eax
109fb6: 50 push %eax
109fb7: e8 24 15 00 00 call 10b4e0 <_TOD_Set>
_Thread_Enable_dispatch();
109fbc: e8 78 25 00 00 call 10c539 <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
109fc1: 83 c4 10 add $0x10,%esp
109fc4: 85 f6 test %esi,%esi
109fc6: 74 0a je 109fd2 <adjtime+0xc6> <== NEVER TAKEN
*olddelta = *delta;
109fc8: 8b 03 mov (%ebx),%eax
109fca: 8b 53 04 mov 0x4(%ebx),%edx
109fcd: 89 06 mov %eax,(%esi)
109fcf: 89 56 04 mov %edx,0x4(%esi)
109fd2: 31 c0 xor %eax,%eax
return 0;
}
109fd4: 8d 65 f8 lea -0x8(%ebp),%esp
109fd7: 5b pop %ebx
109fd8: 5e pop %esi
109fd9: c9 leave
109fda: c3 ret
0010dce8 <calloc>:
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
10dce8: 55 push %ebp
10dce9: 89 e5 mov %esp,%ebp
10dceb: 57 push %edi
10dcec: 53 push %ebx
10dced: 8b 5d 0c mov 0xc(%ebp),%ebx
10dcf0: ff 05 c4 40 12 00 incl 0x1240c4
length = nelem * elsize;
10dcf6: 0f af 5d 08 imul 0x8(%ebp),%ebx
cptr = malloc( length );
10dcfa: 83 ec 0c sub $0xc,%esp
10dcfd: 53 push %ebx
10dcfe: e8 19 97 ff ff call 10741c <malloc>
10dd03: 89 c2 mov %eax,%edx
if ( cptr )
10dd05: 83 c4 10 add $0x10,%esp
10dd08: 85 c0 test %eax,%eax
10dd0a: 74 08 je 10dd14 <calloc+0x2c> <== NEVER TAKEN
memset( cptr, '\0', length );
10dd0c: 31 c0 xor %eax,%eax
10dd0e: 89 d7 mov %edx,%edi
10dd10: 89 d9 mov %ebx,%ecx
10dd12: f3 aa rep stos %al,%es:(%edi)
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
10dd14: ff 0d b4 40 12 00 decl 0x1240b4
return cptr;
}
10dd1a: 89 d0 mov %edx,%eax
10dd1c: 8d 65 f8 lea -0x8(%ebp),%esp
10dd1f: 5b pop %ebx
10dd20: 5f pop %edi
10dd21: c9 leave
10dd22: c3 ret
0010f630 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
10f630: 55 push %ebp
10f631: 89 e5 mov %esp,%ebp
10f633: 57 push %edi
10f634: 56 push %esi
10f635: 83 ec 20 sub $0x20,%esp
10f638: 8b 55 08 mov 0x8(%ebp),%edx
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
10f63b: 85 d2 test %edx,%edx
10f63d: 75 0d jne 10f64c <chdir+0x1c>
rtems_set_errno_and_return_minus_one( EFAULT );
10f63f: e8 80 38 00 00 call 112ec4 <__errno>
10f644: c7 00 0e 00 00 00 movl $0xe,(%eax)
10f64a: eb 53 jmp 10f69f <chdir+0x6f>
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
10f64c: 31 c0 xor %eax,%eax
10f64e: 83 c9 ff or $0xffffffff,%ecx
10f651: 89 d7 mov %edx,%edi
10f653: f2 ae repnz scas %es:(%edi),%al
10f655: f7 d1 not %ecx
10f657: 49 dec %ecx
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
10f658: 83 ec 0c sub $0xc,%esp
10f65b: 6a 01 push $0x1
10f65d: 8d 75 e4 lea -0x1c(%ebp),%esi
10f660: 56 push %esi
10f661: 6a 01 push $0x1
10f663: 51 push %ecx
10f664: 52 push %edx
10f665: e8 f6 82 ff ff call 107960 <rtems_filesystem_evaluate_path>
10f66a: 89 c2 mov %eax,%edx
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
10f66c: 83 c4 20 add $0x20,%esp
10f66f: 83 c8 ff or $0xffffffff,%eax
10f672: 85 d2 test %edx,%edx
10f674: 0f 85 8f 00 00 00 jne 10f709 <chdir+0xd9>
return -1;
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
10f67a: 8b 55 f0 mov -0x10(%ebp),%edx
10f67d: 8b 42 10 mov 0x10(%edx),%eax
10f680: 85 c0 test %eax,%eax
10f682: 75 20 jne 10f6a4 <chdir+0x74> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
10f684: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
10f687: 85 c0 test %eax,%eax <== NOT EXECUTED
10f689: 74 09 je 10f694 <chdir+0x64> <== NOT EXECUTED
10f68b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f68e: 56 push %esi <== NOT EXECUTED
10f68f: ff d0 call *%eax <== NOT EXECUTED
10f691: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10f694: e8 2b 38 00 00 call 112ec4 <__errno> <== NOT EXECUTED
10f699: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10f69f: 83 c8 ff or $0xffffffff,%eax
10f6a2: eb 65 jmp 10f709 <chdir+0xd9>
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
10f6a4: 83 ec 0c sub $0xc,%esp
10f6a7: 56 push %esi
10f6a8: ff d0 call *%eax
10f6aa: 83 c4 10 add $0x10,%esp
10f6ad: 48 dec %eax
10f6ae: 74 24 je 10f6d4 <chdir+0xa4>
rtems_filesystem_freenode( &loc );
10f6b0: 8b 45 f0 mov -0x10(%ebp),%eax
10f6b3: 85 c0 test %eax,%eax
10f6b5: 74 10 je 10f6c7 <chdir+0x97> <== NEVER TAKEN
10f6b7: 8b 40 1c mov 0x1c(%eax),%eax
10f6ba: 85 c0 test %eax,%eax
10f6bc: 74 09 je 10f6c7 <chdir+0x97> <== NEVER TAKEN
10f6be: 83 ec 0c sub $0xc,%esp
10f6c1: 56 push %esi
10f6c2: ff d0 call *%eax
10f6c4: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTDIR );
10f6c7: e8 f8 37 00 00 call 112ec4 <__errno>
10f6cc: c7 00 14 00 00 00 movl $0x14,(%eax)
10f6d2: eb cb jmp 10f69f <chdir+0x6f>
}
rtems_filesystem_freenode( &rtems_filesystem_current );
10f6d4: 8b 15 34 3f 12 00 mov 0x123f34,%edx
10f6da: 8b 42 10 mov 0x10(%edx),%eax
10f6dd: 85 c0 test %eax,%eax
10f6df: 74 13 je 10f6f4 <chdir+0xc4> <== NEVER TAKEN
10f6e1: 8b 40 1c mov 0x1c(%eax),%eax
10f6e4: 85 c0 test %eax,%eax
10f6e6: 74 0c je 10f6f4 <chdir+0xc4> <== NEVER TAKEN
10f6e8: 83 ec 0c sub $0xc,%esp
10f6eb: 83 c2 04 add $0x4,%edx
10f6ee: 52 push %edx
10f6ef: ff d0 call *%eax
10f6f1: 83 c4 10 add $0x10,%esp
rtems_filesystem_current = loc;
10f6f4: 8b 3d 34 3f 12 00 mov 0x123f34,%edi
10f6fa: 83 c7 04 add $0x4,%edi
10f6fd: 8d 75 e4 lea -0x1c(%ebp),%esi
10f700: b9 05 00 00 00 mov $0x5,%ecx
10f705: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10f707: 31 c0 xor %eax,%eax
return 0;
}
10f709: 8d 65 f8 lea -0x8(%ebp),%esp
10f70c: 5e pop %esi
10f70d: 5f pop %edi
10f70e: c9 leave
10f70f: c3 ret
00108e0c <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
108e0c: 55 push %ebp
108e0d: 89 e5 mov %esp,%ebp
108e0f: 57 push %edi
108e10: 56 push %esi
108e11: 53 push %ebx
108e12: 83 ec 38 sub $0x38,%esp
108e15: 8b 55 08 mov 0x8(%ebp),%edx
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
108e18: 31 c0 xor %eax,%eax
108e1a: 83 c9 ff or $0xffffffff,%ecx
108e1d: 89 d7 mov %edx,%edi
108e1f: f2 ae repnz scas %es:(%edi),%al
108e21: f7 d1 not %ecx
108e23: 49 dec %ecx
108e24: 6a 01 push $0x1
108e26: 8d 5d d4 lea -0x2c(%ebp),%ebx
108e29: 53 push %ebx
108e2a: 6a 00 push $0x0
108e2c: 51 push %ecx
108e2d: 52 push %edx
108e2e: e8 41 02 00 00 call 109074 <rtems_filesystem_evaluate_path>
if ( status != 0 )
108e33: 83 c4 20 add $0x20,%esp
108e36: 83 ce ff or $0xffffffff,%esi
108e39: 85 c0 test %eax,%eax
108e3b: 75 7d jne 108eba <chmod+0xae>
return -1;
if ( !loc.handlers ){
108e3d: 8b 45 dc mov -0x24(%ebp),%eax
108e40: 85 c0 test %eax,%eax
108e42: 75 24 jne 108e68 <chmod+0x5c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
108e44: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
108e47: 85 c0 test %eax,%eax <== NOT EXECUTED
108e49: 74 10 je 108e5b <chmod+0x4f> <== NOT EXECUTED
108e4b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
108e4e: 85 c0 test %eax,%eax <== NOT EXECUTED
108e50: 74 09 je 108e5b <chmod+0x4f> <== NOT EXECUTED
108e52: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108e55: 53 push %ebx <== NOT EXECUTED
108e56: ff d0 call *%eax <== NOT EXECUTED
108e58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
108e5b: e8 d8 bd 00 00 call 114c38 <__errno> <== NOT EXECUTED
108e60: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
108e66: eb 29 jmp 108e91 <chmod+0x85> <== NOT EXECUTED
}
if ( !loc.handlers->fchmod_h ){
108e68: 8b 40 1c mov 0x1c(%eax),%eax
108e6b: 85 c0 test %eax,%eax
108e6d: 75 27 jne 108e96 <chmod+0x8a> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
108e6f: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
108e72: 85 c0 test %eax,%eax <== NOT EXECUTED
108e74: 74 10 je 108e86 <chmod+0x7a> <== NOT EXECUTED
108e76: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
108e79: 85 c0 test %eax,%eax <== NOT EXECUTED
108e7b: 74 09 je 108e86 <chmod+0x7a> <== NOT EXECUTED
108e7d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108e80: 53 push %ebx <== NOT EXECUTED
108e81: ff d0 call *%eax <== NOT EXECUTED
108e83: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
108e86: e8 ad bd 00 00 call 114c38 <__errno> <== NOT EXECUTED
108e8b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
108e91: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
108e94: eb 24 jmp 108eba <chmod+0xae> <== NOT EXECUTED
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
108e96: 52 push %edx
108e97: 52 push %edx
108e98: ff 75 0c pushl 0xc(%ebp)
108e9b: 53 push %ebx
108e9c: ff d0 call *%eax
108e9e: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &loc );
108ea0: 8b 45 e0 mov -0x20(%ebp),%eax
108ea3: 83 c4 10 add $0x10,%esp
108ea6: 85 c0 test %eax,%eax
108ea8: 74 10 je 108eba <chmod+0xae> <== NEVER TAKEN
108eaa: 8b 40 1c mov 0x1c(%eax),%eax
108ead: 85 c0 test %eax,%eax
108eaf: 74 09 je 108eba <chmod+0xae> <== NEVER TAKEN
108eb1: 83 ec 0c sub $0xc,%esp
108eb4: 53 push %ebx
108eb5: ff d0 call *%eax
108eb7: 83 c4 10 add $0x10,%esp
return result;
}
108eba: 89 f0 mov %esi,%eax
108ebc: 8d 65 f4 lea -0xc(%ebp),%esp
108ebf: 5b pop %ebx
108ec0: 5e pop %esi
108ec1: 5f pop %edi
108ec2: c9 leave
108ec3: c3 ret
00108ec4 <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
108ec4: 55 push %ebp
108ec5: 89 e5 mov %esp,%ebp
108ec7: 57 push %edi
108ec8: 56 push %esi
108ec9: 53 push %ebx
108eca: 83 ec 48 sub $0x48,%esp
108ecd: 8b 55 08 mov 0x8(%ebp),%edx
108ed0: 8b 75 0c mov 0xc(%ebp),%esi
108ed3: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
108ed6: 31 c0 xor %eax,%eax
108ed8: 83 c9 ff or $0xffffffff,%ecx
108edb: 89 d7 mov %edx,%edi
108edd: f2 ae repnz scas %es:(%edi),%al
108edf: f7 d1 not %ecx
108ee1: 49 dec %ecx
108ee2: 6a 01 push $0x1
108ee4: 8d 7d d4 lea -0x2c(%ebp),%edi
108ee7: 57 push %edi
108ee8: 6a 00 push $0x0
108eea: 51 push %ecx
108eeb: 52 push %edx
108eec: e8 83 01 00 00 call 109074 <rtems_filesystem_evaluate_path>
108ef1: 83 c4 20 add $0x20,%esp
108ef4: 83 ca ff or $0xffffffff,%edx
108ef7: 85 c0 test %eax,%eax
108ef9: 75 58 jne 108f53 <chown+0x8f>
return -1;
if ( !loc.ops->chown_h ) {
108efb: 8b 55 e0 mov -0x20(%ebp),%edx
108efe: 8b 42 18 mov 0x18(%edx),%eax
108f01: 85 c0 test %eax,%eax
108f03: 75 20 jne 108f25 <chown+0x61> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
108f05: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
108f08: 85 c0 test %eax,%eax <== NOT EXECUTED
108f0a: 74 09 je 108f15 <chown+0x51> <== NOT EXECUTED
108f0c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108f0f: 57 push %edi <== NOT EXECUTED
108f10: ff d0 call *%eax <== NOT EXECUTED
108f12: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
108f15: e8 1e bd 00 00 call 114c38 <__errno> <== NOT EXECUTED
108f1a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
108f20: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
108f23: eb 2e jmp 108f53 <chown+0x8f> <== NOT EXECUTED
}
result = (*loc.ops->chown_h)( &loc, owner, group );
108f25: 52 push %edx
108f26: 0f b7 db movzwl %bx,%ebx
108f29: 53 push %ebx
108f2a: 0f b7 f6 movzwl %si,%esi
108f2d: 56 push %esi
108f2e: 57 push %edi
108f2f: ff d0 call *%eax
108f31: 89 c2 mov %eax,%edx
rtems_filesystem_freenode( &loc );
108f33: 8b 45 e0 mov -0x20(%ebp),%eax
108f36: 83 c4 10 add $0x10,%esp
108f39: 85 c0 test %eax,%eax
108f3b: 74 16 je 108f53 <chown+0x8f> <== NEVER TAKEN
108f3d: 8b 40 1c mov 0x1c(%eax),%eax
108f40: 85 c0 test %eax,%eax
108f42: 74 0f je 108f53 <chown+0x8f> <== NEVER TAKEN
108f44: 83 ec 0c sub $0xc,%esp
108f47: 57 push %edi
108f48: 89 55 c4 mov %edx,-0x3c(%ebp)
108f4b: ff d0 call *%eax
108f4d: 83 c4 10 add $0x10,%esp
108f50: 8b 55 c4 mov -0x3c(%ebp),%edx
return result;
}
108f53: 89 d0 mov %edx,%eax
108f55: 8d 65 f4 lea -0xc(%ebp),%esp
108f58: 5b pop %ebx
108f59: 5e pop %esi
108f5a: 5f pop %edi
108f5b: c9 leave
108f5c: c3 ret
00107710 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
107710: 55 push %ebp
107711: 89 e5 mov %esp,%ebp
107713: 57 push %edi
107714: 56 push %esi
107715: 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) {
107718: 81 3d 34 3f 12 00 d4 cmpl $0x1260d4,0x123f34
10771f: 60 12 00
107722: 75 1e jne 107742 <chroot+0x32> <== NEVER TAKEN
rtems_libio_set_private_env(); /* try to set a new private env*/
107724: e8 67 12 00 00 call 108990 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
107729: 81 3d 34 3f 12 00 d4 cmpl $0x1260d4,0x123f34
107730: 60 12 00
107733: 75 0d jne 107742 <chroot+0x32> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
107735: e8 8a b7 00 00 call 112ec4 <__errno> <== NOT EXECUTED
10773a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
107740: eb 22 jmp 107764 <chroot+0x54> <== NOT EXECUTED
}
result = chdir(pathname);
107742: 83 ec 0c sub $0xc,%esp
107745: ff 75 08 pushl 0x8(%ebp)
107748: e8 e3 7e 00 00 call 10f630 <chdir>
if (result) {
10774d: 83 c4 10 add $0x10,%esp
107750: 85 c0 test %eax,%eax
107752: 74 15 je 107769 <chroot+0x59> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( errno );
107754: e8 6b b7 00 00 call 112ec4 <__errno> <== NOT EXECUTED
107759: 89 c6 mov %eax,%esi <== NOT EXECUTED
10775b: e8 64 b7 00 00 call 112ec4 <__errno> <== NOT EXECUTED
107760: 8b 00 mov (%eax),%eax <== NOT EXECUTED
107762: 89 06 mov %eax,(%esi) <== NOT EXECUTED
107764: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
107767: eb 53 jmp 1077bc <chroot+0xac> <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
107769: 83 ec 0c sub $0xc,%esp
10776c: 6a 00 push $0x0
10776e: 8d 45 e4 lea -0x1c(%ebp),%eax
107771: 50 push %eax
107772: 6a 00 push $0x0
107774: 6a 01 push $0x1
107776: 68 20 0a 12 00 push $0x120a20
10777b: e8 e0 01 00 00 call 107960 <rtems_filesystem_evaluate_path>
107780: 83 c4 20 add $0x20,%esp
107783: 85 c0 test %eax,%eax
107785: 75 cd jne 107754 <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);
107787: 8b 15 34 3f 12 00 mov 0x123f34,%edx
10778d: 8b 42 24 mov 0x24(%edx),%eax
107790: 85 c0 test %eax,%eax
107792: 74 13 je 1077a7 <chroot+0x97> <== NEVER TAKEN
107794: 8b 40 1c mov 0x1c(%eax),%eax
107797: 85 c0 test %eax,%eax
107799: 74 0c je 1077a7 <chroot+0x97> <== NEVER TAKEN
10779b: 83 ec 0c sub $0xc,%esp
10779e: 83 c2 18 add $0x18,%edx
1077a1: 52 push %edx
1077a2: ff d0 call *%eax
1077a4: 83 c4 10 add $0x10,%esp
rtems_filesystem_root = loc;
1077a7: 8b 3d 34 3f 12 00 mov 0x123f34,%edi
1077ad: 83 c7 18 add $0x18,%edi
1077b0: 8d 75 e4 lea -0x1c(%ebp),%esi
1077b3: b9 05 00 00 00 mov $0x5,%ecx
1077b8: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
1077ba: 31 c0 xor %eax,%eax
return 0;
}
1077bc: 8d 65 f8 lea -0x8(%ebp),%esp
1077bf: 5e pop %esi
1077c0: 5f pop %edi
1077c1: c9 leave
1077c2: c3 ret
00109e18 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
109e18: 55 push %ebp
109e19: 89 e5 mov %esp,%ebp
109e1b: 83 ec 08 sub $0x8,%esp
109e1e: 8b 45 08 mov 0x8(%ebp),%eax
109e21: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
109e24: 85 d2 test %edx,%edx
109e26: 74 3c je 109e64 <clock_gettime+0x4c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
109e28: 83 f8 01 cmp $0x1,%eax
109e2b: 75 0b jne 109e38 <clock_gettime+0x20>
_TOD_Get(tp);
109e2d: 83 ec 0c sub $0xc,%esp
109e30: 52 push %edx
109e31: e8 86 1b 00 00 call 10b9bc <_TOD_Get>
109e36: eb 13 jmp 109e4b <clock_gettime+0x33>
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
109e38: 83 f8 04 cmp $0x4,%eax
109e3b: 74 05 je 109e42 <clock_gettime+0x2a> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
109e3d: 83 f8 02 cmp $0x2,%eax
109e40: 75 10 jne 109e52 <clock_gettime+0x3a>
_TOD_Get_uptime_as_timespec( tp );
109e42: 83 ec 0c sub $0xc,%esp
109e45: 52 push %edx
109e46: e8 cd 1b 00 00 call 10ba18 <_TOD_Get_uptime_as_timespec>
109e4b: 31 c0 xor %eax,%eax
return 0;
109e4d: 83 c4 10 add $0x10,%esp
109e50: eb 20 jmp 109e72 <clock_gettime+0x5a>
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
109e52: 83 f8 03 cmp $0x3,%eax
109e55: 75 0d jne 109e64 <clock_gettime+0x4c>
rtems_set_errno_and_return_minus_one( ENOSYS );
109e57: e8 70 82 00 00 call 1120cc <__errno>
109e5c: c7 00 58 00 00 00 movl $0x58,(%eax)
109e62: eb 0b jmp 109e6f <clock_gettime+0x57>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
109e64: e8 63 82 00 00 call 1120cc <__errno>
109e69: c7 00 16 00 00 00 movl $0x16,(%eax)
109e6f: 83 c8 ff or $0xffffffff,%eax
return 0;
}
109e72: c9 leave
109e73: c3 ret
00109e74 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
109e74: 55 push %ebp
109e75: 89 e5 mov %esp,%ebp
109e77: 83 ec 08 sub $0x8,%esp
109e7a: 8b 45 08 mov 0x8(%ebp),%eax
109e7d: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
109e80: 85 d2 test %edx,%edx
109e82: 74 44 je 109ec8 <clock_settime+0x54> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
109e84: 83 f8 01 cmp $0x1,%eax
109e87: 75 28 jne 109eb1 <clock_settime+0x3d>
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
109e89: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx)
109e8f: 76 37 jbe 109ec8 <clock_settime+0x54>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
109e91: a1 34 62 12 00 mov 0x126234,%eax
109e96: 40 inc %eax
109e97: a3 34 62 12 00 mov %eax,0x126234
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
109e9c: 83 ec 0c sub $0xc,%esp
109e9f: 52 push %edx
109ea0: e8 cb 1b 00 00 call 10ba70 <_TOD_Set>
_Thread_Enable_dispatch();
109ea5: e8 1f 2c 00 00 call 10cac9 <_Thread_Enable_dispatch>
109eaa: 31 c0 xor %eax,%eax
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
109eac: 83 c4 10 add $0x10,%esp
109eaf: eb 25 jmp 109ed6 <clock_settime+0x62>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
109eb1: 83 f8 02 cmp $0x2,%eax
109eb4: 74 05 je 109ebb <clock_settime+0x47>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
109eb6: 83 f8 03 cmp $0x3,%eax
109eb9: 75 0d jne 109ec8 <clock_settime+0x54>
rtems_set_errno_and_return_minus_one( ENOSYS );
109ebb: e8 0c 82 00 00 call 1120cc <__errno>
109ec0: c7 00 58 00 00 00 movl $0x58,(%eax)
109ec6: eb 0b jmp 109ed3 <clock_settime+0x5f>
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
109ec8: e8 ff 81 00 00 call 1120cc <__errno>
109ecd: c7 00 16 00 00 00 movl $0x16,(%eax)
109ed3: 83 c8 ff or $0xffffffff,%eax
return 0;
}
109ed6: c9 leave
109ed7: c3 ret
0010dd24 <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
10dd24: 55 push %ebp
10dd25: 89 e5 mov %esp,%ebp
10dd27: 56 push %esi
10dd28: 53 push %ebx
10dd29: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
10dd2c: 3b 1d 44 01 12 00 cmp 0x120144,%ebx
10dd32: 73 0f jae 10dd43 <close+0x1f>
iop = rtems_libio_iop(fd);
10dd34: c1 e3 06 shl $0x6,%ebx
10dd37: 03 1d 98 40 12 00 add 0x124098,%ebx
rtems_libio_check_is_open(iop);
10dd3d: f6 43 15 01 testb $0x1,0x15(%ebx)
10dd41: 75 10 jne 10dd53 <close+0x2f>
10dd43: e8 bc 36 00 00 call 111404 <__errno>
10dd48: c7 00 09 00 00 00 movl $0x9,(%eax)
10dd4e: 83 c8 ff or $0xffffffff,%eax
10dd51: eb 3f jmp 10dd92 <close+0x6e>
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
10dd53: 8b 43 3c mov 0x3c(%ebx),%eax
10dd56: 8b 40 04 mov 0x4(%eax),%eax
10dd59: 31 f6 xor %esi,%esi
10dd5b: 85 c0 test %eax,%eax
10dd5d: 74 0b je 10dd6a <close+0x46> <== NEVER TAKEN
rc = (*iop->handlers->close_h)( iop );
10dd5f: 83 ec 0c sub $0xc,%esp
10dd62: 53 push %ebx
10dd63: ff d0 call *%eax
10dd65: 89 c6 mov %eax,%esi
10dd67: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &iop->pathinfo );
10dd6a: 8b 43 24 mov 0x24(%ebx),%eax
10dd6d: 85 c0 test %eax,%eax
10dd6f: 74 13 je 10dd84 <close+0x60> <== NEVER TAKEN
10dd71: 8b 40 1c mov 0x1c(%eax),%eax
10dd74: 85 c0 test %eax,%eax
10dd76: 74 0c je 10dd84 <close+0x60>
10dd78: 83 ec 0c sub $0xc,%esp
10dd7b: 8d 53 18 lea 0x18(%ebx),%edx
10dd7e: 52 push %edx
10dd7f: ff d0 call *%eax
10dd81: 83 c4 10 add $0x10,%esp
rtems_libio_free( iop );
10dd84: 83 ec 0c sub $0xc,%esp
10dd87: 53 push %ebx
10dd88: e8 5d 02 00 00 call 10dfea <rtems_libio_free>
return rc;
10dd8d: 89 f0 mov %esi,%eax
10dd8f: 83 c4 10 add $0x10,%esp
}
10dd92: 8d 65 f8 lea -0x8(%ebp),%esp
10dd95: 5b pop %ebx
10dd96: 5e pop %esi
10dd97: c9 leave
10dd98: c3 ret
0010d3d0 <devFS_close>:
#include "devfs.h"
int devFS_close(
rtems_libio_t *iop
)
{
10d3d0: 55 push %ebp
10d3d1: 89 e5 mov %esp,%ebp
10d3d3: 83 ec 1c sub $0x1c,%esp
10d3d6: 8b 55 08 mov 0x8(%ebp),%edx
rtems_libio_open_close_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
10d3d9: 8b 42 38 mov 0x38(%edx),%eax
args.iop = iop;
10d3dc: 89 55 ec mov %edx,-0x14(%ebp)
args.flags = 0;
10d3df: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
args.mode = 0;
10d3e6: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
status = rtems_io_close(
10d3ed: 8d 55 ec lea -0x14(%ebp),%edx
10d3f0: 52 push %edx
10d3f1: ff 70 0c pushl 0xc(%eax)
10d3f4: ff 70 08 pushl 0x8(%eax)
10d3f7: e8 2c 0f 00 00 call 10e328 <rtems_io_close>
10d3fc: 89 c2 mov %eax,%edx
np->major,
np->minor,
(void *) &args
);
if ( status ) {
10d3fe: 83 c4 10 add $0x10,%esp
10d401: 31 c0 xor %eax,%eax
10d403: 85 d2 test %edx,%edx
10d405: 74 0c je 10d413 <devFS_close+0x43> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
10d407: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10d40a: 52 push %edx <== NOT EXECUTED
10d40b: e8 a8 00 00 00 call 10d4b8 <rtems_deviceio_errno> <== NOT EXECUTED
10d410: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
10d413: c9 leave
10d414: c3 ret
0010d427 <devFS_evaluate_path>:
const char *pathname,
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
10d427: 55 push %ebp
10d428: 89 e5 mov %esp,%ebp
10d42a: 57 push %edi
10d42b: 56 push %esi
10d42c: 53 push %ebx
10d42d: 83 ec 1c sub $0x1c,%esp
10d430: 8b 4d 0c mov 0xc(%ebp),%ecx
10d433: 8b 5d 14 mov 0x14(%ebp),%ebx
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
10d436: 8b 33 mov (%ebx),%esi
if (!device_name_table)
10d438: 85 f6 test %esi,%esi
10d43a: 74 04 je 10d440 <devFS_evaluate_path+0x19><== NEVER TAKEN
10d43c: 31 ff xor %edi,%edi
10d43e: eb 5a jmp 10d49a <devFS_evaluate_path+0x73>
rtems_set_errno_and_return_minus_one( EFAULT );
10d440: e8 a7 1f 00 00 call 10f3ec <__errno> <== NOT EXECUTED
10d445: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
10d44b: eb 60 jmp 10d4ad <devFS_evaluate_path+0x86><== NOT EXECUTED
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
10d44d: 8b 16 mov (%esi),%edx
10d44f: 85 d2 test %edx,%edx
10d451: 74 43 je 10d496 <devFS_evaluate_path+0x6f>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
10d453: 50 push %eax
10d454: 51 push %ecx
10d455: 52 push %edx
10d456: ff 75 08 pushl 0x8(%ebp)
10d459: 89 55 e4 mov %edx,-0x1c(%ebp)
10d45c: 89 4d e0 mov %ecx,-0x20(%ebp)
10d45f: e8 98 2b 00 00 call 10fffc <strncmp>
10d464: 83 c4 10 add $0x10,%esp
10d467: 85 c0 test %eax,%eax
10d469: 8b 55 e4 mov -0x1c(%ebp),%edx
10d46c: 8b 4d e0 mov -0x20(%ebp),%ecx
10d46f: 75 25 jne 10d496 <devFS_evaluate_path+0x6f><== NEVER TAKEN
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
10d471: 80 3c 0a 00 cmpb $0x0,(%edx,%ecx,1)
10d475: 75 1f jne 10d496 <devFS_evaluate_path+0x6f><== NEVER TAKEN
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
10d477: 89 33 mov %esi,(%ebx)
pathloc->handlers = &devFS_file_handlers;
10d479: c7 43 08 68 ff 11 00 movl $0x11ff68,0x8(%ebx)
pathloc->ops = &devFS_ops;
10d480: c7 43 0c 20 ff 11 00 movl $0x11ff20,0xc(%ebx)
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
10d487: a1 b4 ff 11 00 mov 0x11ffb4,%eax
10d48c: 8b 40 28 mov 0x28(%eax),%eax
10d48f: 89 43 10 mov %eax,0x10(%ebx)
10d492: 31 c0 xor %eax,%eax
return 0;
10d494: eb 1a jmp 10d4b0 <devFS_evaluate_path+0x89>
/* 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++) {
10d496: 47 inc %edi
10d497: 83 c6 14 add $0x14,%esi
10d49a: 3b 3d 48 e1 11 00 cmp 0x11e148,%edi
10d4a0: 72 ab jb 10d44d <devFS_evaluate_path+0x26>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
10d4a2: e8 45 1f 00 00 call 10f3ec <__errno>
10d4a7: c7 00 02 00 00 00 movl $0x2,(%eax)
10d4ad: 83 c8 ff or $0xffffffff,%eax
}
10d4b0: 8d 65 f4 lea -0xc(%ebp),%esp
10d4b3: 5b pop %ebx
10d4b4: 5e pop %esi
10d4b5: 5f pop %edi
10d4b6: c9 leave
10d4b7: c3 ret
00106d70 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
106d70: 55 push %ebp
106d71: 89 e5 mov %esp,%ebp
106d73: 57 push %edi
106d74: 53 push %ebx
106d75: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
106d78: 83 ec 0c sub $0xc,%esp
106d7b: 6b 05 48 e1 11 00 14 imul $0x14,0x11e148,%eax
106d82: 50 push %eax
106d83: e8 0c 62 00 00 call 10cf94 <_Workspace_Allocate>
106d88: 89 c2 mov %eax,%edx
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
106d8a: 83 c4 10 add $0x10,%esp
106d8d: 85 c0 test %eax,%eax
106d8f: 75 10 jne 106da1 <devFS_initialize+0x31> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
106d91: e8 56 86 00 00 call 10f3ec <__errno> <== NOT EXECUTED
106d96: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
106d9c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
106d9f: eb 20 jmp 106dc1 <devFS_initialize+0x51> <== NOT EXECUTED
memset(
106da1: 6b 0d 48 e1 11 00 14 imul $0x14,0x11e148,%ecx
106da8: 31 c0 xor %eax,%eax
106daa: 89 d7 mov %edx,%edi
106dac: f3 aa rep stos %al,%es:(%edi)
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
106dae: c7 43 24 68 ff 11 00 movl $0x11ff68,0x24(%ebx)
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
106db5: c7 43 28 20 ff 11 00 movl $0x11ff20,0x28(%ebx)
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
106dbc: 89 53 1c mov %edx,0x1c(%ebx)
106dbf: 31 c0 xor %eax,%eax
return 0;
}
106dc1: 8d 65 f8 lea -0x8(%ebp),%esp
106dc4: 5b pop %ebx
106dc5: 5f pop %edi
106dc6: c9 leave
106dc7: c3 ret
00106ed4 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
106ed4: 55 push %ebp
106ed5: 89 e5 mov %esp,%ebp
106ed7: 83 ec 1c sub $0x1c,%esp
106eda: 8b 55 08 mov 0x8(%ebp),%edx
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
106edd: 8b 42 38 mov 0x38(%edx),%eax
args.iop = iop;
106ee0: 89 55 e8 mov %edx,-0x18(%ebp)
args.command = command;
106ee3: 8b 55 0c mov 0xc(%ebp),%edx
106ee6: 89 55 ec mov %edx,-0x14(%ebp)
args.buffer = buffer;
106ee9: 8b 55 10 mov 0x10(%ebp),%edx
106eec: 89 55 f0 mov %edx,-0x10(%ebp)
status = rtems_io_control(
106eef: 8d 55 e8 lea -0x18(%ebp),%edx
106ef2: 52 push %edx
106ef3: ff 70 0c pushl 0xc(%eax)
106ef6: ff 70 08 pushl 0x8(%eax)
106ef9: e8 ee 38 00 00 call 10a7ec <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
106efe: 83 c4 10 add $0x10,%esp
106f01: 85 c0 test %eax,%eax
106f03: 74 0e je 106f13 <devFS_ioctl+0x3f>
return rtems_deviceio_errno(status);
106f05: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106f08: 50 push %eax <== NOT EXECUTED
106f09: e8 aa 65 00 00 call 10d4b8 <rtems_deviceio_errno> <== NOT EXECUTED
106f0e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106f11: eb 03 jmp 106f16 <devFS_ioctl+0x42> <== NOT EXECUTED
return args.ioctl_return;
106f13: 8b 45 f4 mov -0xc(%ebp),%eax
}
106f16: c9 leave
106f17: c3 ret
00106dc8 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
106dc8: 55 push %ebp
106dc9: 89 e5 mov %esp,%ebp
106dcb: 57 push %edi
106dcc: 56 push %esi
106dcd: 53 push %ebx
106dce: 83 ec 1c sub $0x1c,%esp
106dd1: 8b 7d 08 mov 0x8(%ebp),%edi
106dd4: 8b 4d 10 mov 0x10(%ebp),%ecx
106dd7: 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') &&
106dda: 80 3f 64 cmpb $0x64,(%edi)
106ddd: 75 18 jne 106df7 <devFS_mknod+0x2f> <== NEVER TAKEN
106ddf: 80 7f 01 65 cmpb $0x65,0x1(%edi)
106de3: 75 12 jne 106df7 <devFS_mknod+0x2f> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
106de5: 80 7f 02 76 cmpb $0x76,0x2(%edi)
106de9: 75 0c jne 106df7 <devFS_mknod+0x2f> <== NEVER TAKEN
106deb: 31 c0 xor %eax,%eax
106ded: 80 7f 03 00 cmpb $0x0,0x3(%edi)
106df1: 0f 84 c9 00 00 00 je 106ec0 <devFS_mknod+0xf8>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
106df7: 8b 45 0c mov 0xc(%ebp),%eax
106dfa: 25 00 f0 00 00 and $0xf000,%eax
106dff: 3d 00 20 00 00 cmp $0x2000,%eax
106e04: 74 14 je 106e1a <devFS_mknod+0x52> <== ALWAYS TAKEN
106e06: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED
106e0b: 74 0d je 106e1a <devFS_mknod+0x52> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
106e0d: e8 da 85 00 00 call 10f3ec <__errno> <== NOT EXECUTED
106e12: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
106e18: eb 23 jmp 106e3d <devFS_mknod+0x75> <== NOT EXECUTED
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
106e1a: 89 4d e0 mov %ecx,-0x20(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
106e1d: 89 55 e4 mov %edx,-0x1c(%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;
106e20: 8b 45 18 mov 0x18(%ebp),%eax
106e23: 8b 08 mov (%eax),%ecx
if (!device_name_table)
106e25: 85 c9 test %ecx,%ecx
106e27: 74 09 je 106e32 <devFS_mknod+0x6a> <== NEVER TAKEN
106e29: 89 ca mov %ecx,%edx
106e2b: 83 ce ff or $0xffffffff,%esi
106e2e: 31 db xor %ebx,%ebx
106e30: eb 46 jmp 106e78 <devFS_mknod+0xb0>
rtems_set_errno_and_return_minus_one( EFAULT );
106e32: e8 b5 85 00 00 call 10f3ec <__errno> <== NOT EXECUTED
106e37: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
106e3d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
106e40: eb 7e jmp 106ec0 <devFS_mknod+0xf8> <== NOT EXECUTED
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
106e42: 8b 02 mov (%edx),%eax
106e44: 85 c0 test %eax,%eax
106e46: 74 2a je 106e72 <devFS_mknod+0xaa> <== ALWAYS TAKEN
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
106e48: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
106e4b: 50 push %eax <== NOT EXECUTED
106e4c: 57 push %edi <== NOT EXECUTED
106e4d: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
106e50: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED
106e53: e8 74 90 00 00 call 10fecc <strcmp> <== NOT EXECUTED
106e58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106e5b: 85 c0 test %eax,%eax <== NOT EXECUTED
106e5d: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
106e60: 8b 4d d8 mov -0x28(%ebp),%ecx <== NOT EXECUTED
106e63: 75 0f jne 106e74 <devFS_mknod+0xac> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EEXIST );
106e65: e8 82 85 00 00 call 10f3ec <__errno> <== NOT EXECUTED
106e6a: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED
106e70: eb cb jmp 106e3d <devFS_mknod+0x75> <== NOT EXECUTED
106e72: 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++){
106e74: 43 inc %ebx
106e75: 83 c2 14 add $0x14,%edx
106e78: 3b 1d 48 e1 11 00 cmp 0x11e148,%ebx
106e7e: 72 c2 jb 106e42 <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)
106e80: 83 fe ff cmp $0xffffffff,%esi
106e83: 75 0d jne 106e92 <devFS_mknod+0xca> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
106e85: e8 62 85 00 00 call 10f3ec <__errno> <== NOT EXECUTED
106e8a: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
106e90: eb ab jmp 106e3d <devFS_mknod+0x75> <== NOT EXECUTED
_ISR_Disable(level);
106e92: 9c pushf
106e93: fa cli
106e94: 5b pop %ebx
device_name_table[slot].device_name = (char *)path;
106e95: 6b d6 14 imul $0x14,%esi,%edx
106e98: 8d 14 11 lea (%ecx,%edx,1),%edx
106e9b: 89 3a mov %edi,(%edx)
device_name_table[slot].device_name_length = strlen(path);
106e9d: 31 c0 xor %eax,%eax
106e9f: 83 c9 ff or $0xffffffff,%ecx
106ea2: f2 ae repnz scas %es:(%edi),%al
106ea4: f7 d1 not %ecx
106ea6: 49 dec %ecx
106ea7: 89 4a 04 mov %ecx,0x4(%edx)
device_name_table[slot].major = major;
106eaa: 8b 45 e0 mov -0x20(%ebp),%eax
106ead: 89 42 08 mov %eax,0x8(%edx)
device_name_table[slot].minor = minor;
106eb0: 8b 45 e4 mov -0x1c(%ebp),%eax
106eb3: 89 42 0c mov %eax,0xc(%edx)
device_name_table[slot].mode = mode;
106eb6: 8b 45 0c mov 0xc(%ebp),%eax
106eb9: 89 42 10 mov %eax,0x10(%edx)
_ISR_Enable(level);
106ebc: 53 push %ebx
106ebd: 9d popf
106ebe: 31 c0 xor %eax,%eax
return 0;
}
106ec0: 8d 65 f4 lea -0xc(%ebp),%esp
106ec3: 5b pop %ebx
106ec4: 5e pop %esi
106ec5: 5f pop %edi
106ec6: c9 leave
106ec7: c3 ret
00106f18 <devFS_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
106f18: 55 push %ebp
106f19: 89 e5 mov %esp,%ebp
106f1b: 83 ec 1c sub $0x1c,%esp
106f1e: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_open_close_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
106f21: 8b 50 38 mov 0x38(%eax),%edx
args.iop = iop;
106f24: 89 45 ec mov %eax,-0x14(%ebp)
args.flags = iop->flags;
106f27: 8b 40 14 mov 0x14(%eax),%eax
106f2a: 89 45 f0 mov %eax,-0x10(%ebp)
args.mode = mode;
106f2d: 8b 45 14 mov 0x14(%ebp),%eax
106f30: 89 45 f4 mov %eax,-0xc(%ebp)
status = rtems_io_open(
106f33: 8d 45 ec lea -0x14(%ebp),%eax
106f36: 50 push %eax
106f37: ff 72 0c pushl 0xc(%edx)
106f3a: ff 72 08 pushl 0x8(%edx)
106f3d: e8 82 39 00 00 call 10a8c4 <rtems_io_open>
106f42: 89 c2 mov %eax,%edx
np->major,
np->minor,
(void *) &args
);
if ( status )
106f44: 83 c4 10 add $0x10,%esp
106f47: 31 c0 xor %eax,%eax
106f49: 85 d2 test %edx,%edx
106f4b: 74 0c je 106f59 <devFS_open+0x41> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
106f4d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106f50: 52 push %edx <== NOT EXECUTED
106f51: e8 62 65 00 00 call 10d4b8 <rtems_deviceio_errno> <== NOT EXECUTED
106f56: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0;
}
106f59: c9 leave
106f5a: c3 ret
00106f5c <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
106f5c: 55 push %ebp <== NOT EXECUTED
106f5d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106f5f: 53 push %ebx <== NOT EXECUTED
106f60: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED
106f63: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
106f66: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
args.iop = iop;
106f69: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
args.offset = iop->offset;
106f6c: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
106f6f: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED
106f72: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
106f75: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED
args.buffer = buffer;
106f78: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
106f7b: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED
args.count = count;
106f7e: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
106f81: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED
args.flags = iop->flags;
106f84: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
106f87: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
args.bytes_moved = 0;
106f8a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED
status = rtems_io_read(
106f91: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
106f94: 50 push %eax <== NOT EXECUTED
106f95: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED
106f98: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED
106f9b: e8 54 39 00 00 call 10a8f4 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
106fa0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106fa3: 85 c0 test %eax,%eax <== NOT EXECUTED
106fa5: 74 0e je 106fb5 <devFS_read+0x59> <== NOT EXECUTED
return rtems_deviceio_errno(status);
106fa7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106faa: 50 push %eax <== NOT EXECUTED
106fab: e8 08 65 00 00 call 10d4b8 <rtems_deviceio_errno> <== NOT EXECUTED
106fb0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106fb3: eb 03 jmp 106fb8 <devFS_read+0x5c> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
106fb5: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
}
106fb8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
106fbb: c9 leave <== NOT EXECUTED
106fbc: c3 ret <== NOT EXECUTED
00106fc0 <devFS_stat>:
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
106fc0: 55 push %ebp
106fc1: 89 e5 mov %esp,%ebp
106fc3: 53 push %ebx
106fc4: 83 ec 04 sub $0x4,%esp
106fc7: 8b 55 0c mov 0xc(%ebp),%edx
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
106fca: 8b 45 08 mov 0x8(%ebp),%eax
106fcd: 8b 00 mov (%eax),%eax
if (!the_dev)
106fcf: 85 c0 test %eax,%eax
106fd1: 75 10 jne 106fe3 <devFS_stat+0x23> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
106fd3: e8 14 84 00 00 call 10f3ec <__errno> <== NOT EXECUTED
106fd8: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
106fde: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
106fe1: eb 14 jmp 106ff7 <devFS_stat+0x37> <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
106fe3: 8b 48 0c mov 0xc(%eax),%ecx
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
106fe6: 8b 58 08 mov 0x8(%eax),%ebx
106fe9: 89 5a 18 mov %ebx,0x18(%edx)
106fec: 89 4a 1c mov %ecx,0x1c(%edx)
buf->st_mode = the_dev->mode;
106fef: 8b 40 10 mov 0x10(%eax),%eax
106ff2: 89 42 0c mov %eax,0xc(%edx)
106ff5: 31 c0 xor %eax,%eax
return 0;
}
106ff7: 5a pop %edx
106ff8: 5b pop %ebx
106ff9: c9 leave
106ffa: c3 ret
00106ffc <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
106ffc: 55 push %ebp
106ffd: 89 e5 mov %esp,%ebp
106fff: 53 push %ebx
107000: 83 ec 28 sub $0x28,%esp
107003: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
107006: 8b 50 38 mov 0x38(%eax),%edx
args.iop = iop;
107009: 89 45 dc mov %eax,-0x24(%ebp)
args.offset = iop->offset;
10700c: 8b 48 0c mov 0xc(%eax),%ecx
10700f: 8b 58 10 mov 0x10(%eax),%ebx
107012: 89 4d e0 mov %ecx,-0x20(%ebp)
107015: 89 5d e4 mov %ebx,-0x1c(%ebp)
args.buffer = (void *) buffer;
107018: 8b 4d 0c mov 0xc(%ebp),%ecx
10701b: 89 4d e8 mov %ecx,-0x18(%ebp)
args.count = count;
10701e: 8b 4d 10 mov 0x10(%ebp),%ecx
107021: 89 4d ec mov %ecx,-0x14(%ebp)
args.flags = iop->flags;
107024: 8b 40 14 mov 0x14(%eax),%eax
107027: 89 45 f0 mov %eax,-0x10(%ebp)
args.bytes_moved = 0;
10702a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
status = rtems_io_write(
107031: 8d 45 dc lea -0x24(%ebp),%eax
107034: 50 push %eax
107035: ff 72 0c pushl 0xc(%edx)
107038: ff 72 08 pushl 0x8(%edx)
10703b: e8 e4 38 00 00 call 10a924 <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
107040: 83 c4 10 add $0x10,%esp
107043: 85 c0 test %eax,%eax
107045: 74 0e je 107055 <devFS_write+0x59> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
107047: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10704a: 50 push %eax <== NOT EXECUTED
10704b: e8 68 64 00 00 call 10d4b8 <rtems_deviceio_errno> <== NOT EXECUTED
107050: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107053: eb 03 jmp 107058 <devFS_write+0x5c> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
107055: 8b 45 f4 mov -0xc(%ebp),%eax
}
107058: 8b 5d fc mov -0x4(%ebp),%ebx
10705b: c9 leave
10705c: c3 ret
0010f6f8 <device_close>:
*/
int device_close(
rtems_libio_t *iop
)
{
10f6f8: 55 push %ebp
10f6f9: 89 e5 mov %esp,%ebp
10f6fb: 83 ec 1c sub $0x1c,%esp
10f6fe: 8b 55 08 mov 0x8(%ebp),%edx
rtems_libio_open_close_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
10f701: 8b 42 38 mov 0x38(%edx),%eax
args.iop = iop;
10f704: 89 55 ec mov %edx,-0x14(%ebp)
args.flags = 0;
10f707: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
args.mode = 0;
10f70e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
status = rtems_io_close(
10f715: 8d 55 ec lea -0x14(%ebp),%edx
10f718: 52 push %edx
10f719: ff 70 54 pushl 0x54(%eax)
10f71c: ff 70 50 pushl 0x50(%eax)
10f71f: e8 3c 11 00 00 call 110860 <rtems_io_close>
10f724: 89 c2 mov %eax,%edx
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
10f726: 83 c4 10 add $0x10,%esp
10f729: 31 c0 xor %eax,%eax
10f72b: 85 d2 test %edx,%edx
10f72d: 74 0c je 10f73b <device_close+0x43> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
10f72f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f732: 52 push %edx <== NOT EXECUTED
10f733: e8 a8 15 00 00 call 110ce0 <rtems_deviceio_errno> <== NOT EXECUTED
10f738: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
10f73b: c9 leave
10f73c: c3 ret
0010f5f2 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
10f5f2: 55 push %ebp
10f5f3: 89 e5 mov %esp,%ebp
10f5f5: 83 ec 1c sub $0x1c,%esp
10f5f8: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
10f5fb: 89 45 e8 mov %eax,-0x18(%ebp)
args.command = command;
10f5fe: 8b 55 0c mov 0xc(%ebp),%edx
10f601: 89 55 ec mov %edx,-0x14(%ebp)
args.buffer = buffer;
10f604: 8b 55 10 mov 0x10(%ebp),%edx
10f607: 89 55 f0 mov %edx,-0x10(%ebp)
the_jnode = iop->file_info;
10f60a: 8b 40 38 mov 0x38(%eax),%eax
status = rtems_io_control(
10f60d: 8d 55 e8 lea -0x18(%ebp),%edx
10f610: 52 push %edx
10f611: ff 70 54 pushl 0x54(%eax)
10f614: ff 70 50 pushl 0x50(%eax)
10f617: e8 74 12 00 00 call 110890 <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
10f61c: 83 c4 10 add $0x10,%esp
10f61f: 85 c0 test %eax,%eax
10f621: 74 0e je 10f631 <device_ioctl+0x3f> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
10f623: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f626: 50 push %eax <== NOT EXECUTED
10f627: e8 b4 16 00 00 call 110ce0 <rtems_deviceio_errno> <== NOT EXECUTED
10f62c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f62f: eb 03 jmp 10f634 <device_ioctl+0x42> <== NOT EXECUTED
return args.ioctl_return;
10f631: 8b 45 f4 mov -0xc(%ebp),%eax
}
10f634: c9 leave
10f635: c3 ret
0010f73d <device_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
10f73d: 55 push %ebp
10f73e: 89 e5 mov %esp,%ebp
10f740: 83 ec 1c sub $0x1c,%esp
10f743: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_open_close_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
10f746: 8b 50 38 mov 0x38(%eax),%edx
args.iop = iop;
10f749: 89 45 ec mov %eax,-0x14(%ebp)
args.flags = iop->flags;
10f74c: 8b 40 14 mov 0x14(%eax),%eax
10f74f: 89 45 f0 mov %eax,-0x10(%ebp)
args.mode = mode;
10f752: 8b 45 14 mov 0x14(%ebp),%eax
10f755: 89 45 f4 mov %eax,-0xc(%ebp)
status = rtems_io_open(
10f758: 8d 45 ec lea -0x14(%ebp),%eax
10f75b: 50 push %eax
10f75c: ff 72 54 pushl 0x54(%edx)
10f75f: ff 72 50 pushl 0x50(%edx)
10f762: e8 59 11 00 00 call 1108c0 <rtems_io_open>
10f767: 89 c2 mov %eax,%edx
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
10f769: 83 c4 10 add $0x10,%esp
10f76c: 31 c0 xor %eax,%eax
10f76e: 85 d2 test %edx,%edx
10f770: 74 0c je 10f77e <device_open+0x41> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
10f772: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f775: 52 push %edx <== NOT EXECUTED
10f776: e8 65 15 00 00 call 110ce0 <rtems_deviceio_errno> <== NOT EXECUTED
10f77b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0;
}
10f77e: c9 leave
10f77f: c3 ret
0010f697 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
10f697: 55 push %ebp <== NOT EXECUTED
10f698: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10f69a: 53 push %ebx <== NOT EXECUTED
10f69b: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED
10f69e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
10f6a1: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
args.iop = iop;
10f6a4: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
args.offset = iop->offset;
10f6a7: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
10f6aa: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED
10f6ad: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
10f6b0: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED
args.buffer = buffer;
10f6b3: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
10f6b6: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED
args.count = count;
10f6b9: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
10f6bc: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED
args.flags = iop->flags;
10f6bf: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
10f6c2: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
args.bytes_moved = 0;
10f6c5: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED
status = rtems_io_read(
10f6cc: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
10f6cf: 50 push %eax <== NOT EXECUTED
10f6d0: ff 72 54 pushl 0x54(%edx) <== NOT EXECUTED
10f6d3: ff 72 50 pushl 0x50(%edx) <== NOT EXECUTED
10f6d6: e8 15 12 00 00 call 1108f0 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
10f6db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f6de: 85 c0 test %eax,%eax <== NOT EXECUTED
10f6e0: 74 0e je 10f6f0 <device_read+0x59> <== NOT EXECUTED
return rtems_deviceio_errno(status);
10f6e2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f6e5: 50 push %eax <== NOT EXECUTED
10f6e6: e8 f5 15 00 00 call 110ce0 <rtems_deviceio_errno> <== NOT EXECUTED
10f6eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f6ee: eb 03 jmp 10f6f3 <device_read+0x5c> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
10f6f0: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
}
10f6f3: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10f6f6: c9 leave <== NOT EXECUTED
10f6f7: c3 ret <== NOT EXECUTED
0010f636 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
10f636: 55 push %ebp
10f637: 89 e5 mov %esp,%ebp
10f639: 53 push %ebx
10f63a: 83 ec 28 sub $0x28,%esp
10f63d: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
10f640: 8b 50 38 mov 0x38(%eax),%edx
args.iop = iop;
10f643: 89 45 dc mov %eax,-0x24(%ebp)
args.offset = iop->offset;
10f646: 8b 48 0c mov 0xc(%eax),%ecx
10f649: 8b 58 10 mov 0x10(%eax),%ebx
10f64c: 89 4d e0 mov %ecx,-0x20(%ebp)
10f64f: 89 5d e4 mov %ebx,-0x1c(%ebp)
args.buffer = (void *) buffer;
10f652: 8b 4d 0c mov 0xc(%ebp),%ecx
10f655: 89 4d e8 mov %ecx,-0x18(%ebp)
args.count = count;
10f658: 8b 4d 10 mov 0x10(%ebp),%ecx
10f65b: 89 4d ec mov %ecx,-0x14(%ebp)
args.flags = iop->flags;
10f65e: 8b 40 14 mov 0x14(%eax),%eax
10f661: 89 45 f0 mov %eax,-0x10(%ebp)
args.bytes_moved = 0;
10f664: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
status = rtems_io_write(
10f66b: 8d 45 dc lea -0x24(%ebp),%eax
10f66e: 50 push %eax
10f66f: ff 72 54 pushl 0x54(%edx)
10f672: ff 72 50 pushl 0x50(%edx)
10f675: e8 a6 12 00 00 call 110920 <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
10f67a: 83 c4 10 add $0x10,%esp
10f67d: 85 c0 test %eax,%eax
10f67f: 74 0e je 10f68f <device_write+0x59> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
10f681: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f684: 50 push %eax <== NOT EXECUTED
10f685: e8 56 16 00 00 call 110ce0 <rtems_deviceio_errno> <== NOT EXECUTED
10f68a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f68d: eb 03 jmp 10f692 <device_write+0x5c> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
10f68f: 8b 45 f4 mov -0xc(%ebp),%eax
}
10f692: 8b 5d fc mov -0x4(%ebp),%ebx
10f695: c9 leave
10f696: c3 ret
00108a42 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
108a42: 55 push %ebp
108a43: 89 e5 mov %esp,%ebp
108a45: 53 push %ebx
108a46: 83 ec 04 sub $0x4,%esp
108a49: 89 c3 mov %eax,%ebx
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
108a4b: 83 b8 b4 00 00 00 00 cmpl $0x0,0xb4(%eax)
108a52: 74 46 je 108a9a <drainOutput+0x58>
rtems_interrupt_disable (level);
108a54: 9c pushf
108a55: fa cli
108a56: 58 pop %eax
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
108a57: eb 2f jmp 108a88 <drainOutput+0x46>
tty->rawOutBufState = rob_wait;
108a59: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
108a60: 00 00 00
rtems_interrupt_enable (level);
108a63: 50 push %eax
108a64: 9d popf
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
108a65: 50 push %eax
108a66: 6a 00 push $0x0
108a68: 6a 00 push $0x0
108a6a: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
108a70: e8 77 15 00 00 call 109fec <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
108a75: 83 c4 10 add $0x10,%esp
108a78: 85 c0 test %eax,%eax
108a7a: 74 09 je 108a85 <drainOutput+0x43> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
108a7c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108a7f: 50 push %eax <== NOT EXECUTED
108a80: e8 27 1b 00 00 call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_interrupt_disable (level);
108a85: 9c pushf
108a86: fa cli
108a87: 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) {
108a88: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
108a8e: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
108a94: 39 d1 cmp %edx,%ecx
108a96: 75 c1 jne 108a59 <drainOutput+0x17>
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
108a98: 50 push %eax
108a99: 9d popf
}
}
108a9a: 8b 5d fc mov -0x4(%ebp),%ebx
108a9d: c9 leave
108a9e: c3 ret
00107d08 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
107d08: 55 push %ebp
107d09: 89 e5 mov %esp,%ebp
107d0b: 57 push %edi
107d0c: 56 push %esi
107d0d: 53 push %ebx
107d0e: 83 ec 64 sub $0x64,%esp
107d11: 8b 5d 08 mov 0x8(%ebp),%ebx
107d14: 8b 75 0c mov 0xc(%ebp),%esi
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
107d17: 8d 7d a0 lea -0x60(%ebp),%edi
107d1a: 57 push %edi
107d1b: 53 push %ebx
107d1c: e8 d7 04 00 00 call 1081f8 <fstat>
if ( status == -1 )
107d21: 83 c4 10 add $0x10,%esp
107d24: 40 inc %eax
107d25: 74 1e je 107d45 <dup2+0x3d> <== NEVER TAKEN
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
107d27: 52 push %edx
107d28: 52 push %edx
107d29: 57 push %edi
107d2a: 56 push %esi
107d2b: e8 c8 04 00 00 call 1081f8 <fstat>
if ( status == -1 )
107d30: 83 c4 10 add $0x10,%esp
107d33: 40 inc %eax
107d34: 74 0f je 107d45 <dup2+0x3d> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
107d36: 50 push %eax <== NOT EXECUTED
107d37: 56 push %esi <== NOT EXECUTED
107d38: 6a 00 push $0x0 <== NOT EXECUTED
107d3a: 53 push %ebx <== NOT EXECUTED
107d3b: e8 e0 01 00 00 call 107f20 <fcntl> <== NOT EXECUTED
107d40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107d43: eb 03 jmp 107d48 <dup2+0x40> <== NOT EXECUTED
107d45: 83 c8 ff or $0xffffffff,%eax
}
107d48: 8d 65 f4 lea -0xc(%ebp),%esp
107d4b: 5b pop %ebx
107d4c: 5e pop %esi
107d4d: 5f pop %edi
107d4e: c9 leave
107d4f: c3 ret
0010865f <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
10865f: 55 push %ebp <== NOT EXECUTED
108660: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108662: 53 push %ebx <== NOT EXECUTED
108663: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
108666: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED
10866a: 74 3e je 1086aa <echo+0x4b> <== NOT EXECUTED
10866c: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED
10866f: 8b 1d 08 20 12 00 mov 0x122008,%ebx <== NOT EXECUTED
108675: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED
10867a: 74 2e je 1086aa <echo+0x4b> <== NOT EXECUTED
10867c: 3c 09 cmp $0x9,%al <== NOT EXECUTED
10867e: 74 2a je 1086aa <echo+0x4b> <== NOT EXECUTED
108680: 3c 0a cmp $0xa,%al <== NOT EXECUTED
108682: 74 26 je 1086aa <echo+0x4b> <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
108684: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
108688: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED
10868b: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
10868e: 50 push %eax <== NOT EXECUTED
10868f: 52 push %edx <== NOT EXECUTED
108690: 6a 02 push $0x2 <== NOT EXECUTED
108692: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED
108695: 50 push %eax <== NOT EXECUTED
108696: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
108699: e8 83 fd ff ff call 108421 <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
10869e: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1086a1: 83 42 28 02 addl $0x2,0x28(%edx) <== NOT EXECUTED
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
1086a5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1086a8: eb 08 jmp 1086b2 <echo+0x53> <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
1086aa: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
1086ad: e8 8f fe ff ff call 108541 <oproc> <== NOT EXECUTED
}
}
1086b2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1086b5: c9 leave <== NOT EXECUTED
1086b6: c3 ret <== NOT EXECUTED
00107864 <endgrent>:
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
107864: 55 push %ebp <== NOT EXECUTED
107865: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107867: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
if (group_fp != NULL)
10786a: a1 7c 6e 12 00 mov 0x126e7c,%eax <== NOT EXECUTED
10786f: 85 c0 test %eax,%eax <== NOT EXECUTED
107871: 74 0c je 10787f <endgrent+0x1b> <== NOT EXECUTED
fclose(group_fp);
107873: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107876: 50 push %eax <== NOT EXECUTED
107877: e8 98 b8 00 00 call 113114 <fclose> <== NOT EXECUTED
10787c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10787f: c9 leave <== NOT EXECUTED
107880: c3 ret <== NOT EXECUTED
00107881 <endpwent>:
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
107881: 55 push %ebp <== NOT EXECUTED
107882: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107884: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
if (passwd_fp != NULL)
107887: a1 94 6d 12 00 mov 0x126d94,%eax <== NOT EXECUTED
10788c: 85 c0 test %eax,%eax <== NOT EXECUTED
10788e: 74 0c je 10789c <endpwent+0x1b> <== NOT EXECUTED
fclose(passwd_fp);
107890: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107893: 50 push %eax <== NOT EXECUTED
107894: e8 7b b8 00 00 call 113114 <fclose> <== NOT EXECUTED
107899: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10789c: c9 leave <== NOT EXECUTED
10789d: c3 ret <== NOT EXECUTED
001086b7 <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)
{
1086b7: 55 push %ebp <== NOT EXECUTED
1086b8: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1086ba: 57 push %edi <== NOT EXECUTED
1086bb: 56 push %esi <== NOT EXECUTED
1086bc: 53 push %ebx <== NOT EXECUTED
1086bd: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
1086c0: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1086c2: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
if (tty->ccount == 0)
1086c5: 83 78 20 00 cmpl $0x0,0x20(%eax) <== NOT EXECUTED
1086c9: 0f 84 59 01 00 00 je 108828 <erase+0x171> <== NOT EXECUTED
return;
if (lineFlag) {
1086cf: 85 d2 test %edx,%edx <== NOT EXECUTED
1086d1: 0f 84 46 01 00 00 je 10881d <erase+0x166> <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
1086d7: 8b 40 3c mov 0x3c(%eax),%eax <== NOT EXECUTED
1086da: a8 08 test $0x8,%al <== NOT EXECUTED
1086dc: 75 0c jne 1086ea <erase+0x33> <== NOT EXECUTED
tty->ccount = 0;
1086de: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
return;
1086e5: e9 3e 01 00 00 jmp 108828 <erase+0x171> <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
1086ea: a8 10 test $0x10,%al <== NOT EXECUTED
1086ec: 0f 85 2b 01 00 00 jne 10881d <erase+0x166> <== NOT EXECUTED
tty->ccount = 0;
1086f2: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
1086f9: 0f b6 43 44 movzbl 0x44(%ebx),%eax <== NOT EXECUTED
1086fd: 89 da mov %ebx,%edx <== NOT EXECUTED
1086ff: e8 5b ff ff ff call 10865f <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
108704: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED
108708: 0f 84 1a 01 00 00 je 108828 <erase+0x171> <== NOT EXECUTED
echo ('\n', tty);
10870e: 89 da mov %ebx,%edx <== NOT EXECUTED
108710: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
108715: eb 30 jmp 108747 <erase+0x90> <== NOT EXECUTED
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
108717: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
10871a: 8d 48 ff lea -0x1(%eax),%ecx <== NOT EXECUTED
10871d: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED
108720: 8a 54 02 ff mov -0x1(%edx,%eax,1),%dl <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
108724: 8b 7b 3c mov 0x3c(%ebx),%edi <== NOT EXECUTED
108727: f7 c7 08 00 00 00 test $0x8,%edi <== NOT EXECUTED
10872d: 0f 84 e4 00 00 00 je 108817 <erase+0x160> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
108733: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED
108737: 75 1a jne 108753 <erase+0x9c> <== NOT EXECUTED
108739: f7 c7 10 00 00 00 test $0x10,%edi <== NOT EXECUTED
10873f: 75 12 jne 108753 <erase+0x9c> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
108741: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED
108745: 89 da mov %ebx,%edx <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
108747: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10874a: 5b pop %ebx <== NOT EXECUTED
10874b: 5e pop %esi <== NOT EXECUTED
10874c: 5f pop %edi <== NOT EXECUTED
10874d: 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);
10874e: e9 0c ff ff ff jmp 10865f <echo> <== NOT EXECUTED
}
else if (c == '\t') {
108753: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED
108756: 8b 0d 08 20 12 00 mov 0x122008,%ecx <== NOT EXECUTED
10875c: 75 5d jne 1087bb <erase+0x104> <== NOT EXECUTED
int col = tty->read_start_column;
10875e: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED
* Erase a character or line
* FIXME: Needs support for WERASE and ECHOPRT.
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
108761: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
108766: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED
10876c: 89 7d e0 mov %edi,-0x20(%ebp) <== NOT EXECUTED
10876f: 89 c7 mov %eax,%edi <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
108771: eb 27 jmp 10879a <erase+0xe3> <== NOT EXECUTED
c = tty->cbuf[i++];
108773: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
108776: 8a 44 10 ff mov -0x1(%eax,%edx,1),%al <== NOT EXECUTED
if (c == '\t') {
10877a: 3c 09 cmp $0x9,%al <== NOT EXECUTED
10877c: 75 05 jne 108783 <erase+0xcc> <== NOT EXECUTED
col = (col | 7) + 1;
10877e: 83 ce 07 or $0x7,%esi <== NOT EXECUTED
108781: eb 15 jmp 108798 <erase+0xe1> <== NOT EXECUTED
}
else if (iscntrl (c)) {
108783: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
108786: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) <== NOT EXECUTED
10878b: 74 0b je 108798 <erase+0xe1> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
10878d: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED
108791: 74 06 je 108799 <erase+0xe2> <== NOT EXECUTED
col += 2;
108793: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
108796: eb 01 jmp 108799 <erase+0xe2> <== NOT EXECUTED
}
else {
col++;
108798: 46 inc %esi <== NOT EXECUTED
108799: 42 inc %edx <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
10879a: 39 fa cmp %edi,%edx <== NOT EXECUTED
10879c: 75 d5 jne 108773 <erase+0xbc> <== NOT EXECUTED
10879e: eb 14 jmp 1087b4 <erase+0xfd> <== NOT EXECUTED
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
1087a0: 57 push %edi <== NOT EXECUTED
1087a1: 53 push %ebx <== NOT EXECUTED
1087a2: 6a 01 push $0x1 <== NOT EXECUTED
1087a4: 68 fd e6 11 00 push $0x11e6fd <== NOT EXECUTED
1087a9: e8 73 fc ff ff call 108421 <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
1087ae: ff 4b 28 decl 0x28(%ebx) <== NOT EXECUTED
1087b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
1087b4: 39 73 28 cmp %esi,0x28(%ebx) <== NOT EXECUTED
1087b7: 7f e7 jg 1087a0 <erase+0xe9> <== NOT EXECUTED
1087b9: eb 5c jmp 108817 <erase+0x160> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
1087bb: 0f b6 f2 movzbl %dl,%esi <== NOT EXECUTED
1087be: f6 44 31 01 20 testb $0x20,0x1(%ecx,%esi,1) <== NOT EXECUTED
1087c3: 74 24 je 1087e9 <erase+0x132> <== NOT EXECUTED
1087c5: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED
1087cb: 74 1c je 1087e9 <erase+0x132> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
1087cd: 51 push %ecx <== NOT EXECUTED
1087ce: 53 push %ebx <== NOT EXECUTED
1087cf: 6a 03 push $0x3 <== NOT EXECUTED
1087d1: 68 fb e6 11 00 push $0x11e6fb <== NOT EXECUTED
1087d6: e8 46 fc ff ff call 108421 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
1087db: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
1087de: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1087e1: 85 c0 test %eax,%eax <== NOT EXECUTED
1087e3: 74 04 je 1087e9 <erase+0x132> <== NOT EXECUTED
tty->column--;
1087e5: 48 dec %eax <== NOT EXECUTED
1087e6: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
1087e9: a1 08 20 12 00 mov 0x122008,%eax <== NOT EXECUTED
1087ee: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1) <== NOT EXECUTED
1087f3: 74 06 je 1087fb <erase+0x144> <== NOT EXECUTED
1087f5: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED
1087f9: 74 1c je 108817 <erase+0x160> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
1087fb: 52 push %edx <== NOT EXECUTED
1087fc: 53 push %ebx <== NOT EXECUTED
1087fd: 6a 03 push $0x3 <== NOT EXECUTED
1087ff: 68 fb e6 11 00 push $0x11e6fb <== NOT EXECUTED
108804: e8 18 fc ff ff call 108421 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
108809: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
10880c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10880f: 85 c0 test %eax,%eax <== NOT EXECUTED
108811: 74 04 je 108817 <erase+0x160> <== NOT EXECUTED
tty->column--;
108813: 48 dec %eax <== NOT EXECUTED
108814: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
}
}
if (!lineFlag)
108817: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED
10881b: 74 0b je 108828 <erase+0x171> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
10881d: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
108820: 85 c0 test %eax,%eax <== NOT EXECUTED
108822: 0f 85 ef fe ff ff jne 108717 <erase+0x60> <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
108828: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10882b: 5b pop %ebx <== NOT EXECUTED
10882c: 5e pop %esi <== NOT EXECUTED
10882d: 5f pop %edi <== NOT EXECUTED
10882e: c9 leave <== NOT EXECUTED
10882f: c3 ret <== NOT EXECUTED
00107f20 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
107f20: 55 push %ebp
107f21: 89 e5 mov %esp,%ebp
107f23: 57 push %edi
107f24: 56 push %esi
107f25: 53 push %ebx
107f26: 83 ec 0c sub $0xc,%esp
107f29: 8b 5d 08 mov 0x8(%ebp),%ebx
#include <sys/types.h>
#include <sys/stat.h> /* sigh. for the mode bits for open/creat */
extern int open _PARAMS ((const char *, int, ...));
extern int creat _PARAMS ((const char *, mode_t));
extern int fcntl _PARAMS ((int, int, ...));
107f2c: 8d 55 10 lea 0x10(%ebp),%edx
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
107f2f: 8b 0d 44 31 12 00 mov 0x123144,%ecx
107f35: 39 cb cmp %ecx,%ebx
107f37: 73 16 jae 107f4f <fcntl+0x2f> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
107f39: a1 98 70 12 00 mov 0x127098,%eax
107f3e: c1 e3 06 shl $0x6,%ebx
107f41: 8d 1c 18 lea (%eax,%ebx,1),%ebx
rtems_libio_check_is_open(iop);
107f44: 8b 73 14 mov 0x14(%ebx),%esi
107f47: f7 c6 00 01 00 00 test $0x100,%esi
107f4d: 75 10 jne 107f5f <fcntl+0x3f> <== ALWAYS TAKEN
107f4f: e8 40 b6 00 00 call 113594 <__errno> <== NOT EXECUTED
107f54: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
107f5a: e9 fe 00 00 00 jmp 10805d <fcntl+0x13d> <== NOT EXECUTED
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
107f5f: 83 7d 0c 09 cmpl $0x9,0xc(%ebp)
107f63: 0f 87 c1 00 00 00 ja 10802a <fcntl+0x10a>
107f69: 8b 7d 0c mov 0xc(%ebp),%edi
107f6c: ff 24 bd 98 16 12 00 jmp *0x121698(,%edi,4)
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
107f73: 8b 32 mov (%edx),%esi
if ( fd2 )
107f75: 85 f6 test %esi,%esi
107f77: 74 10 je 107f89 <fcntl+0x69> <== ALWAYS TAKEN
diop = rtems_libio_iop( fd2 );
107f79: 31 d2 xor %edx,%edx <== NOT EXECUTED
107f7b: 39 ce cmp %ecx,%esi <== NOT EXECUTED
107f7d: 73 1c jae 107f9b <fcntl+0x7b> <== NOT EXECUTED
107f7f: 89 f2 mov %esi,%edx <== NOT EXECUTED
107f81: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED
107f84: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED
107f87: eb 12 jmp 107f9b <fcntl+0x7b> <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
107f89: e8 b5 05 00 00 call 108543 <rtems_libio_allocate>
107f8e: 89 c2 mov %eax,%edx
if ( diop == 0 ) {
107f90: 83 ce ff or $0xffffffff,%esi
107f93: 85 c0 test %eax,%eax
107f95: 0f 84 c5 00 00 00 je 108060 <fcntl+0x140> <== NEVER TAKEN
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
107f9b: 8b 43 3c mov 0x3c(%ebx),%eax
107f9e: 89 42 3c mov %eax,0x3c(%edx)
diop->file_info = iop->file_info;
107fa1: 8b 43 38 mov 0x38(%ebx),%eax
107fa4: 89 42 38 mov %eax,0x38(%edx)
diop->flags = iop->flags;
107fa7: 8b 43 14 mov 0x14(%ebx),%eax
107faa: 89 42 14 mov %eax,0x14(%edx)
diop->pathinfo = iop->pathinfo;
107fad: 8d 7a 18 lea 0x18(%edx),%edi
107fb0: 8d 73 18 lea 0x18(%ebx),%esi
107fb3: b9 05 00 00 00 mov $0x5,%ecx
107fb8: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ret = (int) (diop - rtems_libio_iops);
107fba: 89 d6 mov %edx,%esi
107fbc: 2b 35 98 70 12 00 sub 0x127098,%esi
107fc2: c1 fe 06 sar $0x6,%esi
107fc5: eb 70 jmp 108037 <fcntl+0x117>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
107fc7: c1 ee 0b shr $0xb,%esi
107fca: 83 e6 01 and $0x1,%esi
107fcd: eb 6c jmp 10803b <fcntl+0x11b>
* 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 ) )
107fcf: 83 3a 00 cmpl $0x0,(%edx)
107fd2: 74 08 je 107fdc <fcntl+0xbc> <== NEVER TAKEN
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
107fd4: 81 ce 00 08 00 00 or $0x800,%esi
107fda: eb 06 jmp 107fe2 <fcntl+0xc2>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
107fdc: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi <== NOT EXECUTED
107fe2: 89 73 14 mov %esi,0x14(%ebx)
107fe5: 31 f6 xor %esi,%esi
107fe7: eb 52 jmp 10803b <fcntl+0x11b>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
107fe9: 83 ec 0c sub $0xc,%esp
107fec: 56 push %esi
107fed: e8 06 04 00 00 call 1083f8 <rtems_libio_to_fcntl_flags>
107ff2: 89 c6 mov %eax,%esi
107ff4: 83 c4 10 add $0x10,%esp
107ff7: eb 3e jmp 108037 <fcntl+0x117>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
107ff9: 83 ec 0c sub $0xc,%esp
107ffc: ff 32 pushl (%edx)
107ffe: e8 cb 05 00 00 call 1085ce <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
108003: 25 01 02 00 00 and $0x201,%eax
108008: 8b 53 14 mov 0x14(%ebx),%edx
10800b: 81 e2 fe fd ff ff and $0xfffffdfe,%edx
108011: 09 d0 or %edx,%eax
108013: 89 43 14 mov %eax,0x14(%ebx)
108016: 31 f6 xor %esi,%esi
108018: 83 c4 10 add $0x10,%esp
10801b: eb 1e jmp 10803b <fcntl+0x11b>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
10801d: e8 72 b5 00 00 call 113594 <__errno>
108022: c7 00 86 00 00 00 movl $0x86,(%eax)
108028: eb 33 jmp 10805d <fcntl+0x13d>
ret = -1;
break;
default:
errno = EINVAL;
10802a: e8 65 b5 00 00 call 113594 <__errno>
10802f: c7 00 16 00 00 00 movl $0x16,(%eax)
108035: eb 26 jmp 10805d <fcntl+0x13d>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
108037: 85 f6 test %esi,%esi
108039: 78 25 js 108060 <fcntl+0x140> <== NEVER TAKEN
if (iop->handlers->fcntl_h) {
10803b: 8b 43 3c mov 0x3c(%ebx),%eax
10803e: 8b 40 30 mov 0x30(%eax),%eax
108041: 85 c0 test %eax,%eax
108043: 74 1b je 108060 <fcntl+0x140> <== NEVER TAKEN
int err = (*iop->handlers->fcntl_h)( cmd, iop );
108045: 52 push %edx
108046: 52 push %edx
108047: 53 push %ebx
108048: ff 75 0c pushl 0xc(%ebp)
10804b: ff d0 call *%eax
10804d: 89 c3 mov %eax,%ebx
if (err) {
10804f: 83 c4 10 add $0x10,%esp
108052: 85 c0 test %eax,%eax
108054: 74 0a je 108060 <fcntl+0x140> <== ALWAYS TAKEN
errno = err;
108056: e8 39 b5 00 00 call 113594 <__errno> <== NOT EXECUTED
10805b: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
10805d: 83 ce ff or $0xffffffff,%esi
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
108060: 89 f0 mov %esi,%eax
108062: 8d 65 f4 lea -0xc(%ebp),%esp
108065: 5b pop %ebx
108066: 5e pop %esi
108067: 5f pop %edi
108068: c9 leave
108069: c3 ret
00108088 <fdatasync>:
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
108088: 55 push %ebp
108089: 89 e5 mov %esp,%ebp
10808b: 83 ec 08 sub $0x8,%esp
10808e: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
108091: 3b 05 44 31 12 00 cmp 0x123144,%eax
108097: 73 11 jae 1080aa <fdatasync+0x22>
iop = rtems_libio_iop( fd );
108099: c1 e0 06 shl $0x6,%eax
10809c: 03 05 98 70 12 00 add 0x127098,%eax
rtems_libio_check_is_open(iop);
1080a2: 8b 50 14 mov 0x14(%eax),%edx
1080a5: f6 c6 01 test $0x1,%dh
1080a8: 75 0d jne 1080b7 <fdatasync+0x2f> <== ALWAYS TAKEN
1080aa: e8 e5 b4 00 00 call 113594 <__errno>
1080af: c7 00 09 00 00 00 movl $0x9,(%eax)
1080b5: eb 2f jmp 1080e6 <fdatasync+0x5e>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
1080b7: 80 e2 04 and $0x4,%dl
1080ba: 75 0d jne 1080c9 <fdatasync+0x41>
1080bc: e8 d3 b4 00 00 call 113594 <__errno>
1080c1: c7 00 16 00 00 00 movl $0x16,(%eax)
1080c7: eb 1d jmp 1080e6 <fdatasync+0x5e>
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
1080c9: 8b 50 3c mov 0x3c(%eax),%edx
1080cc: 8b 52 2c mov 0x2c(%edx),%edx
1080cf: 85 d2 test %edx,%edx
1080d1: 75 0d jne 1080e0 <fdatasync+0x58>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1080d3: e8 bc b4 00 00 call 113594 <__errno>
1080d8: c7 00 86 00 00 00 movl $0x86,(%eax)
1080de: eb 06 jmp 1080e6 <fdatasync+0x5e>
return (*iop->handlers->fdatasync_h)( iop );
1080e0: 89 45 08 mov %eax,0x8(%ebp)
}
1080e3: c9 leave
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
1080e4: ff e2 jmp *%edx
}
1080e6: 83 c8 ff or $0xffffffff,%eax
1080e9: c9 leave
1080ea: c3 ret
0010fc43 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
10fc43: 55 push %ebp
10fc44: 89 e5 mov %esp,%ebp
10fc46: 57 push %edi
10fc47: 56 push %esi
10fc48: 53 push %ebx
10fc49: 83 ec 30 sub $0x30,%esp
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
10fc4c: 6a 00 push $0x0
10fc4e: 6a 00 push $0x0
10fc50: ff 35 98 3e 12 00 pushl 0x123e98
10fc56: e8 91 a3 ff ff call 109fec <rtems_semaphore_obtain>
10fc5b: 89 c2 mov %eax,%edx
10fc5d: 83 c4 10 add $0x10,%esp
10fc60: bf fc ff ff ff mov $0xfffffffc,%edi
10fc65: 85 c0 test %eax,%eax
10fc67: 0f 85 39 03 00 00 jne 10ffa6 <fifo_open+0x363>
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
return -EINTR;
pipe = *pipep;
10fc6d: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10fc70: 8b 18 mov (%eax),%ebx <== NOT EXECUTED
if (pipe == NULL) {
10fc72: 85 db test %ebx,%ebx <== NOT EXECUTED
10fc74: 0f 85 59 01 00 00 jne 10fdd3 <fifo_open+0x190> <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
10fc7a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fc7d: 6a 34 push $0x34 <== NOT EXECUTED
10fc7f: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
10fc82: e8 95 77 ff ff call 10741c <malloc> <== NOT EXECUTED
10fc87: 89 c6 mov %eax,%esi <== NOT EXECUTED
10fc89: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (pipe == NULL)
10fc8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fc8e: 66 bf f4 ff mov $0xfff4,%di <== NOT EXECUTED
10fc92: 85 c0 test %eax,%eax <== NOT EXECUTED
10fc94: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
10fc97: 0f 84 6a 01 00 00 je 10fe07 <fifo_open+0x1c4> <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
10fc9d: b9 0d 00 00 00 mov $0xd,%ecx <== NOT EXECUTED
10fca2: 89 c7 mov %eax,%edi <== NOT EXECUTED
10fca4: 89 d0 mov %edx,%eax <== NOT EXECUTED
10fca6: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED
pipe->Size = PIPE_BUF;
10fca8: c7 46 04 00 02 00 00 movl $0x200,0x4(%esi) <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
10fcaf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fcb2: 68 00 02 00 00 push $0x200 <== NOT EXECUTED
10fcb7: e8 60 77 ff ff call 10741c <malloc> <== NOT EXECUTED
10fcbc: 89 06 mov %eax,(%esi) <== NOT EXECUTED
if (! pipe->Buffer)
10fcbe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fcc1: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED
10fcc6: 85 c0 test %eax,%eax <== NOT EXECUTED
10fcc8: 0f 84 f7 00 00 00 je 10fdc5 <fifo_open+0x182> <== NOT EXECUTED
goto err_buf;
err = -EINTR;
if (rtems_barrier_create(
10fcce: 8d 46 2c lea 0x2c(%esi),%eax <== NOT EXECUTED
10fcd1: 50 push %eax <== NOT EXECUTED
10fcd2: 6a 00 push $0x0 <== NOT EXECUTED
10fcd4: 6a 00 push $0x0 <== NOT EXECUTED
10fcd6: 0f be 05 f4 1f 12 00 movsbl 0x121ff4,%eax <== NOT EXECUTED
10fcdd: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED
10fce2: 50 push %eax <== NOT EXECUTED
10fce3: e8 90 08 00 00 call 110578 <rtems_barrier_create> <== NOT EXECUTED
10fce8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fceb: 85 c0 test %eax,%eax <== NOT EXECUTED
10fced: 0f 85 c0 00 00 00 jne 10fdb3 <fifo_open+0x170> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
10fcf3: 8d 46 30 lea 0x30(%esi),%eax <== NOT EXECUTED
10fcf6: 50 push %eax <== NOT EXECUTED
10fcf7: 6a 00 push $0x0 <== NOT EXECUTED
10fcf9: 6a 00 push $0x0 <== NOT EXECUTED
10fcfb: 0f be 05 f4 1f 12 00 movsbl 0x121ff4,%eax <== NOT EXECUTED
10fd02: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED
10fd07: 50 push %eax <== NOT EXECUTED
10fd08: e8 6b 08 00 00 call 110578 <rtems_barrier_create> <== NOT EXECUTED
10fd0d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fd10: 85 c0 test %eax,%eax <== NOT EXECUTED
10fd12: 0f 85 8d 00 00 00 jne 10fda5 <fifo_open+0x162> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
10fd18: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fd1b: 8d 46 28 lea 0x28(%esi),%eax <== NOT EXECUTED
10fd1e: 50 push %eax <== NOT EXECUTED
10fd1f: 6a 00 push $0x0 <== NOT EXECUTED
10fd21: 6a 10 push $0x10 <== NOT EXECUTED
10fd23: 6a 01 push $0x1 <== NOT EXECUTED
10fd25: 0f be 05 f4 1f 12 00 movsbl 0x121ff4,%eax <== NOT EXECUTED
10fd2c: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED
10fd31: 50 push %eax <== NOT EXECUTED
10fd32: e8 89 a0 ff ff call 109dc0 <rtems_semaphore_create><== NOT EXECUTED
10fd37: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10fd3a: 85 c0 test %eax,%eax <== NOT EXECUTED
10fd3c: 75 59 jne 10fd97 <fifo_open+0x154> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
10fd3e: 50 push %eax <== NOT EXECUTED
10fd3f: 8d 75 e0 lea -0x20(%ebp),%esi <== NOT EXECUTED
10fd42: 56 push %esi <== NOT EXECUTED
10fd43: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10fd46: 68 80 4b 12 00 push $0x124b80 <== NOT EXECUTED
10fd4b: e8 70 b7 ff ff call 10b4c0 <_Objects_Get> <== NOT EXECUTED
/* Set barriers to be interruptible by signals. */
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
10fd50: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
10fd57: e8 55 bf ff ff call 10bcb1 <_Thread_Enable_dispatch><== NOT EXECUTED
10fd5c: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10fd5f: 56 push %esi <== NOT EXECUTED
10fd60: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10fd63: 68 80 4b 12 00 push $0x124b80 <== NOT EXECUTED
10fd68: e8 53 b7 ff ff call 10b4c0 <_Objects_Get> <== NOT EXECUTED
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
10fd6d: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
10fd74: e8 38 bf ff ff call 10bcb1 <_Thread_Enable_dispatch><== NOT EXECUTED
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
10fd79: a0 f4 1f 12 00 mov 0x121ff4,%al <== NOT EXECUTED
10fd7e: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
10fd81: 88 15 f4 1f 12 00 mov %dl,0x121ff4 <== NOT EXECUTED
10fd87: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fd8a: 3c 7a cmp $0x7a,%al <== NOT EXECUTED
10fd8c: 75 45 jne 10fdd3 <fifo_open+0x190> <== NOT EXECUTED
c = 'a';
10fd8e: c6 05 f4 1f 12 00 61 movb $0x61,0x121ff4 <== NOT EXECUTED
10fd95: eb 3c jmp 10fdd3 <fifo_open+0x190> <== NOT EXECUTED
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
10fd97: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fd9a: ff 76 30 pushl 0x30(%esi) <== NOT EXECUTED
10fd9d: e8 8e 08 00 00 call 110630 <rtems_barrier_delete> <== NOT EXECUTED
10fda2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
10fda5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fda8: ff 76 2c pushl 0x2c(%esi) <== NOT EXECUTED
10fdab: e8 80 08 00 00 call 110630 <rtems_barrier_delete> <== NOT EXECUTED
10fdb0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
err_rbar:
free(pipe->Buffer);
10fdb3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fdb6: ff 36 pushl (%esi) <== NOT EXECUTED
10fdb8: e8 33 74 ff ff call 1071f0 <free> <== NOT EXECUTED
10fdbd: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED
10fdc2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
err_buf:
free(pipe);
10fdc5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fdc8: 56 push %esi <== NOT EXECUTED
10fdc9: e8 22 74 ff ff call 1071f0 <free> <== NOT EXECUTED
10fdce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fdd1: eb 34 jmp 10fe07 <fifo_open+0x1c4> <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
10fdd3: 57 push %edi <== NOT EXECUTED
10fdd4: 6a 00 push $0x0 <== NOT EXECUTED
10fdd6: 6a 00 push $0x0 <== NOT EXECUTED
10fdd8: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fddb: e8 0c a2 ff ff call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
10fde0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fde3: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
10fde6: 19 ff sbb %edi,%edi <== NOT EXECUTED
10fde8: f7 d7 not %edi <== NOT EXECUTED
10fdea: 83 e7 fc and $0xfffffffc,%edi <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
10fded: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10fdf0: 83 38 00 cmpl $0x0,(%eax) <== NOT EXECUTED
10fdf3: 75 12 jne 10fe07 <fifo_open+0x1c4> <== NOT EXECUTED
if (err)
10fdf5: 85 ff test %edi,%edi <== NOT EXECUTED
10fdf7: 74 09 je 10fe02 <fifo_open+0x1bf> <== NOT EXECUTED
pipe_free(pipe);
10fdf9: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10fdfb: e8 38 fd ff ff call 10fb38 <pipe_free> <== NOT EXECUTED
10fe00: eb 05 jmp 10fe07 <fifo_open+0x1c4> <== NOT EXECUTED
else
*pipep = pipe;
10fe02: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10fe05: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
10fe07: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fe0a: ff 35 98 3e 12 00 pushl 0x123e98 <== NOT EXECUTED
10fe10: e8 c3 a2 ff ff call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
pipe_control_t *pipe;
uint prevCounter;
int err;
err = pipe_new(pipep);
if (err)
10fe15: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fe18: 85 ff test %edi,%edi <== NOT EXECUTED
10fe1a: 0f 85 86 01 00 00 jne 10ffa6 <fifo_open+0x363> <== NOT EXECUTED
return err;
pipe = *pipep;
10fe20: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10fe23: 8b 18 mov (%eax),%ebx <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
10fe25: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10fe28: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED
10fe2b: 89 d0 mov %edx,%eax <== NOT EXECUTED
10fe2d: 83 e0 06 and $0x6,%eax <== NOT EXECUTED
10fe30: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
10fe33: 0f 84 91 00 00 00 je 10feca <fifo_open+0x287> <== NOT EXECUTED
10fe39: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
10fe3c: 0f 84 00 01 00 00 je 10ff42 <fifo_open+0x2ff> <== NOT EXECUTED
10fe42: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
10fe45: 0f 85 39 01 00 00 jne 10ff84 <fifo_open+0x341> <== NOT EXECUTED
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
10fe4b: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
10fe4e: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10fe51: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
10fe54: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED
10fe57: 85 c0 test %eax,%eax <== NOT EXECUTED
10fe59: 75 11 jne 10fe6c <fifo_open+0x229> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
10fe5b: 56 push %esi <== NOT EXECUTED
10fe5c: 56 push %esi <== NOT EXECUTED
10fe5d: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10fe60: 50 push %eax <== NOT EXECUTED
10fe61: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10fe64: e8 27 08 00 00 call 110690 <rtems_barrier_release> <== NOT EXECUTED
10fe69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (pipe->Writers == 0) {
10fe6c: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED
10fe70: 0f 85 0e 01 00 00 jne 10ff84 <fifo_open+0x341> <== NOT EXECUTED
/* Not an error */
if (LIBIO_NODELAY(iop))
10fe76: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10fe79: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED
10fe7d: 0f 85 01 01 00 00 jne 10ff84 <fifo_open+0x341> <== NOT EXECUTED
break;
prevCounter = pipe->writerCounter;
10fe83: 8b 73 24 mov 0x24(%ebx),%esi <== NOT EXECUTED
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
10fe86: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fe89: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fe8c: e8 47 a2 ff ff call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
10fe91: 5a pop %edx <== NOT EXECUTED
10fe92: 59 pop %ecx <== NOT EXECUTED
10fe93: 6a 00 push $0x0 <== NOT EXECUTED
10fe95: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10fe98: e8 4b 08 00 00 call 1106e8 <rtems_barrier_wait> <== NOT EXECUTED
10fe9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fea0: 85 c0 test %eax,%eax <== NOT EXECUTED
10fea2: 0f 85 e9 00 00 00 jne 10ff91 <fifo_open+0x34e> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
10fea8: 50 push %eax <== NOT EXECUTED
10fea9: 6a 00 push $0x0 <== NOT EXECUTED
10feab: 6a 00 push $0x0 <== NOT EXECUTED
10fead: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10feb0: e8 37 a1 ff ff call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
10feb5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10feb8: 85 c0 test %eax,%eax <== NOT EXECUTED
10feba: 0f 85 d1 00 00 00 jne 10ff91 <fifo_open+0x34e> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
10fec0: 3b 73 24 cmp 0x24(%ebx),%esi <== NOT EXECUTED
10fec3: 74 c1 je 10fe86 <fifo_open+0x243> <== NOT EXECUTED
10fec5: e9 ba 00 00 00 jmp 10ff84 <fifo_open+0x341> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_WRITE:
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
10feca: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED
10fece: 75 0f jne 10fedf <fifo_open+0x29c> <== NOT EXECUTED
10fed0: 80 e2 01 and $0x1,%dl <== NOT EXECUTED
10fed3: 74 0a je 10fedf <fifo_open+0x29c> <== NOT EXECUTED
10fed5: bf fa ff ff ff mov $0xfffffffa,%edi <== NOT EXECUTED
10feda: e9 b7 00 00 00 jmp 10ff96 <fifo_open+0x353> <== NOT EXECUTED
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
10fedf: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
10fee2: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10fee5: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
10fee8: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED
10feeb: 85 c0 test %eax,%eax <== NOT EXECUTED
10feed: 75 11 jne 10ff00 <fifo_open+0x2bd> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
10feef: 56 push %esi <== NOT EXECUTED
10fef0: 56 push %esi <== NOT EXECUTED
10fef1: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10fef4: 50 push %eax <== NOT EXECUTED
10fef5: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10fef8: e8 93 07 00 00 call 110690 <rtems_barrier_release> <== NOT EXECUTED
10fefd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (pipe->Readers == 0) {
10ff00: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED
10ff04: 75 7e jne 10ff84 <fifo_open+0x341> <== NOT EXECUTED
prevCounter = pipe->readerCounter;
10ff06: 8b 73 20 mov 0x20(%ebx),%esi <== NOT EXECUTED
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
10ff09: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ff0c: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10ff0f: e8 c4 a1 ff ff call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
10ff14: 5a pop %edx <== NOT EXECUTED
10ff15: 59 pop %ecx <== NOT EXECUTED
10ff16: 6a 00 push $0x0 <== NOT EXECUTED
10ff18: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10ff1b: e8 c8 07 00 00 call 1106e8 <rtems_barrier_wait> <== NOT EXECUTED
10ff20: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ff23: 85 c0 test %eax,%eax <== NOT EXECUTED
10ff25: 75 6a jne 10ff91 <fifo_open+0x34e> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
10ff27: 50 push %eax <== NOT EXECUTED
10ff28: 6a 00 push $0x0 <== NOT EXECUTED
10ff2a: 6a 00 push $0x0 <== NOT EXECUTED
10ff2c: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10ff2f: e8 b8 a0 ff ff call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
10ff34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ff37: 85 c0 test %eax,%eax <== NOT EXECUTED
10ff39: 75 56 jne 10ff91 <fifo_open+0x34e> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
10ff3b: 3b 73 20 cmp 0x20(%ebx),%esi <== NOT EXECUTED
10ff3e: 74 c9 je 10ff09 <fifo_open+0x2c6> <== NOT EXECUTED
10ff40: eb 42 jmp 10ff84 <fifo_open+0x341> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
10ff42: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
10ff45: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10ff48: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
10ff4b: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED
10ff4e: 85 c0 test %eax,%eax <== NOT EXECUTED
10ff50: 75 11 jne 10ff63 <fifo_open+0x320> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
10ff52: 56 push %esi <== NOT EXECUTED
10ff53: 56 push %esi <== NOT EXECUTED
10ff54: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10ff57: 50 push %eax <== NOT EXECUTED
10ff58: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10ff5b: e8 30 07 00 00 call 110690 <rtems_barrier_release> <== NOT EXECUTED
10ff60: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
pipe->writerCounter ++;
10ff63: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
10ff66: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10ff69: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
10ff6c: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED
10ff6f: 85 c0 test %eax,%eax <== NOT EXECUTED
10ff71: 75 11 jne 10ff84 <fifo_open+0x341> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
10ff73: 51 push %ecx <== NOT EXECUTED
10ff74: 51 push %ecx <== NOT EXECUTED
10ff75: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10ff78: 50 push %eax <== NOT EXECUTED
10ff79: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10ff7c: e8 0f 07 00 00 call 110690 <rtems_barrier_release> <== NOT EXECUTED
10ff81: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
}
PIPE_UNLOCK(pipe);
10ff84: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ff87: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10ff8a: e8 49 a1 ff ff call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
10ff8f: eb 12 jmp 10ffa3 <fifo_open+0x360> <== NOT EXECUTED
return 0;
10ff91: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
10ff96: 52 push %edx <== NOT EXECUTED
10ff97: 52 push %edx <== NOT EXECUTED
10ff98: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
10ff9b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10ff9e: e8 d0 fb ff ff call 10fb73 <pipe_release> <== NOT EXECUTED
return err;
10ffa3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10ffa6: 89 f8 mov %edi,%eax
10ffa8: 8d 65 f4 lea -0xc(%ebp),%esp
10ffab: 5b pop %ebx
10ffac: 5e pop %esi
10ffad: 5f pop %edi
10ffae: c9 leave
10ffaf: c3 ret
0010cbc6 <file_systems_below_this_mountpoint>:
bool file_systems_below_this_mountpoint(
const char *path __attribute__((unused)),
rtems_filesystem_location_info_t *fs_root_loc,
rtems_filesystem_mount_table_entry_t *fs_to_unmount __attribute__((unused))
)
{
10cbc6: 55 push %ebp <== NOT EXECUTED
10cbc7: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10cbc9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
10cbcc: a1 d4 b9 12 00 mov 0x12b9d4,%eax <== NOT EXECUTED
10cbd1: eb 0e jmp 10cbe1 <file_systems_below_this_mountpoint+0x1b><== NOT EXECUTED
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) {
10cbd3: 8b 48 18 mov 0x18(%eax),%ecx <== NOT EXECUTED
10cbd6: 3b 4a 10 cmp 0x10(%edx),%ecx <== NOT EXECUTED
10cbd9: 75 04 jne 10cbdf <file_systems_below_this_mountpoint+0x19><== NOT EXECUTED
10cbdb: b0 01 mov $0x1,%al <== NOT EXECUTED
10cbdd: eb 0b jmp 10cbea <file_systems_below_this_mountpoint+0x24><== NOT EXECUTED
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
10cbdf: 8b 00 mov (%eax),%eax <== NOT EXECUTED
10cbe1: 3d d8 b9 12 00 cmp $0x12b9d8,%eax <== NOT EXECUTED
10cbe6: 75 eb jne 10cbd3 <file_systems_below_this_mountpoint+0xd><== NOT EXECUTED
10cbe8: 31 c0 xor %eax,%eax <== NOT EXECUTED
return true;
}
}
return false;
}
10cbea: c9 leave <== NOT EXECUTED
10cbeb: c3 ret <== NOT EXECUTED
001080ec <fpathconf>:
long fpathconf(
int fd,
int name
)
{
1080ec: 55 push %ebp
1080ed: 89 e5 mov %esp,%ebp
1080ef: 83 ec 08 sub $0x8,%esp
1080f2: 8b 45 08 mov 0x8(%ebp),%eax
1080f5: 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);
1080f8: 3b 05 44 31 12 00 cmp 0x123144,%eax
1080fe: 73 11 jae 108111 <fpathconf+0x25>
iop = rtems_libio_iop(fd);
108100: c1 e0 06 shl $0x6,%eax
108103: 03 05 98 70 12 00 add 0x127098,%eax
rtems_libio_check_is_open(iop);
108109: 8b 48 14 mov 0x14(%eax),%ecx
10810c: f6 c5 01 test $0x1,%ch
10810f: 75 0d jne 10811e <fpathconf+0x32> <== ALWAYS TAKEN
108111: e8 7e b4 00 00 call 113594 <__errno>
108116: c7 00 09 00 00 00 movl $0x9,(%eax)
10811c: eb 5b jmp 108179 <fpathconf+0x8d>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
10811e: 80 e1 02 and $0x2,%cl
108121: 74 4b je 10816e <fpathconf+0x82> <== NEVER TAKEN
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
108123: 8b 40 28 mov 0x28(%eax),%eax
switch ( name ) {
108126: 83 fa 0b cmp $0xb,%edx
108129: 77 43 ja 10816e <fpathconf+0x82>
10812b: ff 24 95 c0 16 12 00 jmp *0x1216c0(,%edx,4)
case _PC_LINK_MAX:
return_value = the_limits->link_max;
108132: 8b 40 38 mov 0x38(%eax),%eax
break;
108135: eb 45 jmp 10817c <fpathconf+0x90>
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
108137: 8b 40 3c mov 0x3c(%eax),%eax
break;
10813a: eb 40 jmp 10817c <fpathconf+0x90>
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
10813c: 8b 40 40 mov 0x40(%eax),%eax
break;
10813f: eb 3b jmp 10817c <fpathconf+0x90>
case _PC_NAME_MAX:
return_value = the_limits->name_max;
108141: 8b 40 44 mov 0x44(%eax),%eax
break;
108144: eb 36 jmp 10817c <fpathconf+0x90>
case _PC_PATH_MAX:
return_value = the_limits->path_max;
108146: 8b 40 48 mov 0x48(%eax),%eax
break;
108149: eb 31 jmp 10817c <fpathconf+0x90>
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
10814b: 8b 40 4c mov 0x4c(%eax),%eax
break;
10814e: eb 2c jmp 10817c <fpathconf+0x90>
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
108150: 8b 40 54 mov 0x54(%eax),%eax
break;
108153: eb 27 jmp 10817c <fpathconf+0x90>
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
108155: 8b 40 58 mov 0x58(%eax),%eax
break;
108158: eb 22 jmp 10817c <fpathconf+0x90>
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
10815a: 8b 40 64 mov 0x64(%eax),%eax
break;
10815d: eb 1d jmp 10817c <fpathconf+0x90>
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
10815f: 8b 40 50 mov 0x50(%eax),%eax
break;
108162: eb 18 jmp 10817c <fpathconf+0x90>
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
108164: 8b 40 5c mov 0x5c(%eax),%eax
break;
108167: eb 13 jmp 10817c <fpathconf+0x90>
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
108169: 8b 40 60 mov 0x60(%eax),%eax
break;
10816c: eb 0e jmp 10817c <fpathconf+0x90>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10816e: e8 21 b4 00 00 call 113594 <__errno>
108173: c7 00 16 00 00 00 movl $0x16,(%eax)
108179: 83 c8 ff or $0xffffffff,%eax
break;
}
return return_value;
}
10817c: c9 leave
10817d: c3 ret
001071f0 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
1071f0: 55 push %ebp
1071f1: 89 e5 mov %esp,%ebp
1071f3: 53 push %ebx
1071f4: 83 ec 04 sub $0x4,%esp
1071f7: 8b 5d 08 mov 0x8(%ebp),%ebx
1071fa: ff 05 bc 40 12 00 incl 0x1240bc
if ( !ptr )
107200: 85 db test %ebx,%ebx
107202: 74 5f je 107263 <free+0x73>
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
107204: 83 3d 8c 43 12 00 03 cmpl $0x3,0x12438c
10720b: 75 15 jne 107222 <free+0x32> <== NEVER TAKEN
10720d: e8 e2 00 00 00 call 1072f4 <malloc_is_system_state_OK>
107212: 84 c0 test %al,%al
107214: 75 0c jne 107222 <free+0x32> <== ALWAYS TAKEN
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
107216: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
107219: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10721c: c9 leave <== NOT EXECUTED
* 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);
10721d: e9 10 01 00 00 jmp 107332 <malloc_deferred_free> <== NOT EXECUTED
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
107222: a1 10 25 12 00 mov 0x122510,%eax
107227: 85 c0 test %eax,%eax
107229: 74 0a je 107235 <free+0x45> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_free)(ptr);
10722b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10722e: 53 push %ebx <== NOT EXECUTED
10722f: ff 50 08 call *0x8(%eax) <== NOT EXECUTED
107232: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
107235: 50 push %eax
107236: 50 push %eax
107237: 53 push %ebx
107238: ff 35 50 01 12 00 pushl 0x120150
10723e: e8 45 45 00 00 call 10b788 <_Protected_heap_Free>
107243: 83 c4 10 add $0x10,%esp
107246: 84 c0 test %al,%al
107248: 75 19 jne 107263 <free+0x73> <== ALWAYS TAKEN
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
10724a: a1 50 01 12 00 mov 0x120150,%eax <== NOT EXECUTED
*/
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",
10724f: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED
107252: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED
107255: 53 push %ebx <== NOT EXECUTED
107256: 68 c1 e6 11 00 push $0x11e6c1 <== NOT EXECUTED
10725b: e8 94 0b 00 00 call 107df4 <printk> <== NOT EXECUTED
107260: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
107263: 8b 5d fc mov -0x4(%ebp),%ebx
107266: c9 leave
107267: c3 ret
001088a4 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
1088a4: 55 push %ebp <== NOT EXECUTED
1088a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1088a7: 53 push %ebx <== NOT EXECUTED
1088a8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
1088ab: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
1088ae: 81 fb d4 60 12 00 cmp $0x1260d4,%ebx <== NOT EXECUTED
1088b4: 74 40 je 1088f6 <free_user_env+0x52> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
1088b6: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
1088b9: 85 c0 test %eax,%eax <== NOT EXECUTED
1088bb: 74 13 je 1088d0 <free_user_env+0x2c> <== NOT EXECUTED
1088bd: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
1088c0: 85 c0 test %eax,%eax <== NOT EXECUTED
1088c2: 74 0c je 1088d0 <free_user_env+0x2c> <== NOT EXECUTED
1088c4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1088c7: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED
1088ca: 52 push %edx <== NOT EXECUTED
1088cb: ff d0 call *%eax <== NOT EXECUTED
1088cd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
1088d0: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
1088d3: 85 c0 test %eax,%eax <== NOT EXECUTED
1088d5: 74 13 je 1088ea <free_user_env+0x46> <== NOT EXECUTED
1088d7: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
1088da: 85 c0 test %eax,%eax <== NOT EXECUTED
1088dc: 74 0c je 1088ea <free_user_env+0x46> <== NOT EXECUTED
1088de: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1088e1: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED
1088e4: 52 push %edx <== NOT EXECUTED
1088e5: ff d0 call *%eax <== NOT EXECUTED
1088e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
free(env);
1088ea: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
}
}
1088ed: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1088f0: c9 leave <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
1088f1: e9 12 f1 ff ff jmp 107a08 <free> <== NOT EXECUTED
}
}
1088f6: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1088f9: c9 leave <== NOT EXECUTED
1088fa: c3 ret <== NOT EXECUTED
0011c6c0 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
11c6c0: 55 push %ebp
11c6c1: 89 e5 mov %esp,%ebp
11c6c3: 57 push %edi
11c6c4: 53 push %ebx
11c6c5: 8b 55 08 mov 0x8(%ebp),%edx
11c6c8: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
11c6cb: 85 db test %ebx,%ebx
11c6cd: 75 0d jne 11c6dc <fstat+0x1c>
rtems_set_errno_and_return_minus_one( EFAULT );
11c6cf: e8 30 4d ff ff call 111404 <__errno>
11c6d4: c7 00 0e 00 00 00 movl $0xe,(%eax)
11c6da: eb 5d jmp 11c739 <fstat+0x79>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
11c6dc: 3b 15 44 01 12 00 cmp 0x120144,%edx
11c6e2: 73 16 jae 11c6fa <fstat+0x3a>
11c6e4: c1 e2 06 shl $0x6,%edx
11c6e7: 03 15 98 40 12 00 add 0x124098,%edx
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
11c6ed: f6 42 15 01 testb $0x1,0x15(%edx)
11c6f1: 74 07 je 11c6fa <fstat+0x3a> <== NEVER TAKEN
if ( !iop->handlers )
11c6f3: 8b 42 3c mov 0x3c(%edx),%eax
11c6f6: 85 c0 test %eax,%eax
11c6f8: 75 0d jne 11c707 <fstat+0x47> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
11c6fa: e8 05 4d ff ff call 111404 <__errno>
11c6ff: c7 00 09 00 00 00 movl $0x9,(%eax)
11c705: eb 32 jmp 11c739 <fstat+0x79>
if ( !iop->handlers->fstat_h )
11c707: 83 78 18 00 cmpl $0x0,0x18(%eax)
11c70b: 75 0d jne 11c71a <fstat+0x5a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
11c70d: e8 f2 4c ff ff call 111404 <__errno> <== NOT EXECUTED
11c712: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
11c718: eb 1f jmp 11c739 <fstat+0x79> <== NOT EXECUTED
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
11c71a: b9 12 00 00 00 mov $0x12,%ecx
11c71f: 31 c0 xor %eax,%eax
11c721: 89 df mov %ebx,%edi
11c723: f3 ab rep stos %eax,%es:(%edi)
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
11c725: 8b 42 3c mov 0x3c(%edx),%eax
11c728: 89 5d 0c mov %ebx,0xc(%ebp)
11c72b: 83 c2 18 add $0x18,%edx
11c72e: 89 55 08 mov %edx,0x8(%ebp)
11c731: 8b 40 18 mov 0x18(%eax),%eax
}
11c734: 5b pop %ebx
11c735: 5f pop %edi
11c736: c9 leave
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
11c737: ff e0 jmp *%eax
}
11c739: 83 c8 ff or $0xffffffff,%eax
11c73c: 5b pop %ebx
11c73d: 5f pop %edi
11c73e: c9 leave
11c73f: c3 ret
00108290 <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
108290: 55 push %ebp
108291: 89 e5 mov %esp,%ebp
108293: 83 ec 08 sub $0x8,%esp
108296: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
108299: 3b 05 44 31 12 00 cmp 0x123144,%eax
10829f: 73 2a jae 1082cb <fsync+0x3b> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
1082a1: c1 e0 06 shl $0x6,%eax
1082a4: 03 05 98 70 12 00 add 0x127098,%eax
rtems_libio_check_is_open(iop);
1082aa: 8b 50 14 mov 0x14(%eax),%edx
1082ad: f6 c6 01 test $0x1,%dh
1082b0: 74 19 je 1082cb <fsync+0x3b> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
1082b2: 80 e2 04 and $0x4,%dl
1082b5: 75 0d jne 1082c4 <fsync+0x34>
1082b7: e8 d8 b2 00 00 call 113594 <__errno>
1082bc: c7 00 16 00 00 00 movl $0x16,(%eax)
1082c2: eb 2e jmp 1082f2 <fsync+0x62>
/*
* Now process the fsync().
*/
if ( !iop->handlers )
1082c4: 8b 50 3c mov 0x3c(%eax),%edx
1082c7: 85 d2 test %edx,%edx
1082c9: 75 0d jne 1082d8 <fsync+0x48> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
1082cb: e8 c4 b2 00 00 call 113594 <__errno> <== NOT EXECUTED
1082d0: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
1082d6: eb 1a jmp 1082f2 <fsync+0x62> <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
1082d8: 8b 52 28 mov 0x28(%edx),%edx
1082db: 85 d2 test %edx,%edx
1082dd: 75 0d jne 1082ec <fsync+0x5c>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1082df: e8 b0 b2 00 00 call 113594 <__errno>
1082e4: c7 00 86 00 00 00 movl $0x86,(%eax)
1082ea: eb 06 jmp 1082f2 <fsync+0x62>
return (*iop->handlers->fsync_h)( iop );
1082ec: 89 45 08 mov %eax,0x8(%ebp)
}
1082ef: c9 leave
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
1082f0: ff e2 jmp *%edx
}
1082f2: 83 c8 ff or $0xffffffff,%eax
1082f5: c9 leave
1082f6: c3 ret
0010ddac <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
10ddac: 55 push %ebp
10ddad: 89 e5 mov %esp,%ebp
10ddaf: 57 push %edi
10ddb0: 56 push %esi
10ddb1: 53 push %ebx
10ddb2: 83 ec 3c sub $0x3c,%esp
10ddb5: 8b 5d 08 mov 0x8(%ebp),%ebx
10ddb8: 8b 45 0c mov 0xc(%ebp),%eax
10ddbb: 8b 55 10 mov 0x10(%ebp),%edx
10ddbe: 89 45 c0 mov %eax,-0x40(%ebp)
10ddc1: 89 55 c4 mov %edx,-0x3c(%ebp)
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
10ddc4: 3b 1d 44 01 12 00 cmp 0x120144,%ebx
10ddca: 73 0f jae 10dddb <ftruncate+0x2f> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
10ddcc: c1 e3 06 shl $0x6,%ebx
10ddcf: 03 1d 98 40 12 00 add 0x124098,%ebx
rtems_libio_check_is_open(iop);
10ddd5: f6 43 15 01 testb $0x1,0x15(%ebx)
10ddd9: 75 0d jne 10dde8 <ftruncate+0x3c> <== ALWAYS TAKEN
10dddb: e8 24 36 00 00 call 111404 <__errno> <== NOT EXECUTED
10dde0: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
10dde6: eb 5b jmp 10de43 <ftruncate+0x97> <== NOT EXECUTED
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
10dde8: 8d 7d d4 lea -0x2c(%ebp),%edi
10ddeb: 8d 73 18 lea 0x18(%ebx),%esi
10ddee: b9 05 00 00 00 mov $0x5,%ecx
10ddf3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !loc.ops->node_type_h )
10ddf5: 8b 45 e0 mov -0x20(%ebp),%eax
10ddf8: 8b 40 10 mov 0x10(%eax),%eax
10ddfb: 85 c0 test %eax,%eax
10ddfd: 74 39 je 10de38 <ftruncate+0x8c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
10ddff: 83 ec 0c sub $0xc,%esp
10de02: 8d 55 d4 lea -0x2c(%ebp),%edx
10de05: 52 push %edx
10de06: ff d0 call *%eax
10de08: 83 c4 10 add $0x10,%esp
10de0b: 48 dec %eax
10de0c: 75 0d jne 10de1b <ftruncate+0x6f>
rtems_set_errno_and_return_minus_one( EISDIR );
10de0e: e8 f1 35 00 00 call 111404 <__errno>
10de13: c7 00 15 00 00 00 movl $0x15,(%eax)
10de19: eb 28 jmp 10de43 <ftruncate+0x97>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
10de1b: f6 43 14 04 testb $0x4,0x14(%ebx)
10de1f: 75 0d jne 10de2e <ftruncate+0x82> <== ALWAYS TAKEN
10de21: e8 de 35 00 00 call 111404 <__errno> <== NOT EXECUTED
10de26: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
10de2c: eb 15 jmp 10de43 <ftruncate+0x97> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
10de2e: 8b 43 3c mov 0x3c(%ebx),%eax
10de31: 8b 40 20 mov 0x20(%eax),%eax
10de34: 85 c0 test %eax,%eax
10de36: 75 10 jne 10de48 <ftruncate+0x9c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
10de38: e8 c7 35 00 00 call 111404 <__errno> <== NOT EXECUTED
10de3d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10de43: 83 c8 ff or $0xffffffff,%eax
10de46: eb 0d jmp 10de55 <ftruncate+0xa9>
return (*iop->handlers->ftruncate_h)( iop, length );
10de48: 52 push %edx
10de49: ff 75 c4 pushl -0x3c(%ebp)
10de4c: ff 75 c0 pushl -0x40(%ebp)
10de4f: 53 push %ebx
10de50: ff d0 call *%eax
10de52: 83 c4 10 add $0x10,%esp
}
10de55: 8d 65 f4 lea -0xc(%ebp),%esp
10de58: 5b pop %ebx
10de59: 5e pop %esi
10de5a: 5f pop %edi
10de5b: c9 leave
10de5c: c3 ret
0011f774 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
11f774: 55 push %ebp
11f775: 89 e5 mov %esp,%ebp
11f777: 57 push %edi
11f778: 56 push %esi
11f779: 53 push %ebx
11f77a: 83 ec 2c sub $0x2c,%esp
11f77d: 8b 45 08 mov 0x8(%ebp),%eax
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
11f780: 31 db xor %ebx,%ebx
11f782: 3b 05 44 41 12 00 cmp 0x124144,%eax
11f788: 73 0b jae 11f795 <getdents+0x21> <== NEVER TAKEN
11f78a: 89 c3 mov %eax,%ebx
11f78c: c1 e3 06 shl $0x6,%ebx
11f78f: 03 1d c0 81 12 00 add 0x1281c0,%ebx
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
11f795: 8d 7d d4 lea -0x2c(%ebp),%edi
11f798: 8d 73 18 lea 0x18(%ebx),%esi
11f79b: b9 05 00 00 00 mov $0x5,%ecx
11f7a0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !loc.ops->node_type_h )
11f7a2: 8b 45 e0 mov -0x20(%ebp),%eax
11f7a5: 8b 40 10 mov 0x10(%eax),%eax
11f7a8: 85 c0 test %eax,%eax
11f7aa: 74 29 je 11f7d5 <getdents+0x61> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
11f7ac: 83 ec 0c sub $0xc,%esp
11f7af: 8d 55 d4 lea -0x2c(%ebp),%edx
11f7b2: 52 push %edx
11f7b3: ff d0 call *%eax
11f7b5: 83 c4 10 add $0x10,%esp
11f7b8: 48 dec %eax
11f7b9: 74 10 je 11f7cb <getdents+0x57>
rtems_set_errno_and_return_minus_one( ENOTDIR );
11f7bb: e8 d4 40 ff ff call 113894 <__errno>
11f7c0: c7 00 14 00 00 00 movl $0x14,(%eax)
11f7c6: 83 c8 ff or $0xffffffff,%eax
11f7c9: eb 24 jmp 11f7ef <getdents+0x7b>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
11f7cb: 8b 43 3c mov 0x3c(%ebx),%eax
11f7ce: 8b 40 08 mov 0x8(%eax),%eax
11f7d1: 85 c0 test %eax,%eax
11f7d3: 75 0d jne 11f7e2 <getdents+0x6e> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
11f7d5: e8 ba 40 ff ff call 113894 <__errno> <== NOT EXECUTED
11f7da: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
11f7e0: eb e4 jmp 11f7c6 <getdents+0x52> <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
11f7e2: 52 push %edx
11f7e3: ff 75 10 pushl 0x10(%ebp)
11f7e6: ff 75 0c pushl 0xc(%ebp)
11f7e9: 53 push %ebx
11f7ea: ff d0 call *%eax
11f7ec: 83 c4 10 add $0x10,%esp
}
11f7ef: 8d 65 f4 lea -0xc(%ebp),%esp
11f7f2: 5b pop %ebx
11f7f3: 5e pop %esi
11f7f4: 5f pop %edi
11f7f5: c9 leave
11f7f6: c3 ret
00107d4e <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
107d4e: 55 push %ebp
107d4f: 89 e5 mov %esp,%ebp
107d51: 57 push %edi
107d52: 56 push %esi
107d53: 53 push %ebx
107d54: 83 ec 1c sub $0x1c,%esp
107d57: 89 c7 mov %eax,%edi
107d59: 89 55 e4 mov %edx,-0x1c(%ebp)
107d5c: 89 ce mov %ecx,%esi
FILE *fp;
int match;
init_etc_passwd_group();
107d5e: e8 df fe ff ff call 107c42 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
107d63: 53 push %ebx
107d64: 53 push %ebx
107d65: 68 33 fe 11 00 push $0x11fe33
107d6a: 68 57 11 12 00 push $0x121157
107d6f: e8 04 ba 00 00 call 113778 <fopen>
107d74: 89 c3 mov %eax,%ebx
107d76: 83 c4 10 add $0x10,%esp
107d79: 85 c0 test %eax,%eax
107d7b: 75 10 jne 107d8d <getgr_r+0x3f> <== ALWAYS TAKEN
errno = EINVAL;
107d7d: e8 46 b2 00 00 call 112fc8 <__errno> <== NOT EXECUTED
107d82: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107d88: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
return -1;
107d8b: eb 6b jmp 107df8 <getgr_r+0xaa> <== NOT EXECUTED
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
107d8d: 83 ec 0c sub $0xc,%esp
107d90: ff 75 0c pushl 0xc(%ebp)
107d93: 8b 4d 08 mov 0x8(%ebp),%ecx
107d96: 89 f2 mov %esi,%edx
107d98: 89 d8 mov %ebx,%eax
107d9a: e8 39 fc ff ff call 1079d8 <scangr>
107d9f: 83 c4 10 add $0x10,%esp
107da2: 85 c0 test %eax,%eax
107da4: 75 19 jne 107dbf <getgr_r+0x71> <== ALWAYS TAKEN
errno = EINVAL;
107da6: e8 1d b2 00 00 call 112fc8 <__errno> <== NOT EXECUTED
107dab: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
fclose(fp);
107db1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107db4: 53 push %ebx <== NOT EXECUTED
107db5: e8 5a b3 00 00 call 113114 <fclose> <== NOT EXECUTED
107dba: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
107dbd: eb 36 jmp 107df5 <getgr_r+0xa7> <== NOT EXECUTED
return -1;
}
if (name) {
107dbf: 85 ff test %edi,%edi
107dc1: 74 11 je 107dd4 <getgr_r+0x86> <== NEVER TAKEN
match = (strcmp(grp->gr_name, name) == 0);
107dc3: 51 push %ecx
107dc4: 51 push %ecx
107dc5: 57 push %edi
107dc6: ff 36 pushl (%esi)
107dc8: e8 73 cd 00 00 call 114b40 <strcmp>
107dcd: 83 c4 10 add $0x10,%esp
107dd0: 85 c0 test %eax,%eax
107dd2: eb 07 jmp 107ddb <getgr_r+0x8d>
}
else {
match = (grp->gr_gid == gid);
107dd4: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED
107dd8: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED
107ddb: 0f 94 c0 sete %al
107dde: 0f b6 c0 movzbl %al,%eax
}
if (match) {
107de1: 85 c0 test %eax,%eax
107de3: 74 a8 je 107d8d <getgr_r+0x3f>
fclose(fp);
107de5: 83 ec 0c sub $0xc,%esp
107de8: 53 push %ebx
107de9: e8 26 b3 00 00 call 113114 <fclose>
*result = grp;
107dee: 8b 45 10 mov 0x10(%ebp),%eax
107df1: 89 30 mov %esi,(%eax)
107df3: 31 c0 xor %eax,%eax
return 0;
107df5: 83 c4 10 add $0x10,%esp
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
107df8: 8d 65 f4 lea -0xc(%ebp),%esp
107dfb: 5b pop %ebx
107dfc: 5e pop %esi
107dfd: 5f pop %edi
107dfe: c9 leave
107dff: c3 ret
00107ad7 <getgrent>:
return NULL;
return p;
}
struct group *getgrent(void)
{
107ad7: 55 push %ebp <== NOT EXECUTED
107ad8: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107ada: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
if (group_fp == NULL)
107add: a1 7c 6e 12 00 mov 0x126e7c,%eax <== NOT EXECUTED
107ae2: 85 c0 test %eax,%eax <== NOT EXECUTED
107ae4: 74 25 je 107b0b <getgrent+0x34> <== NOT EXECUTED
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
107ae6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107ae9: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED
107aee: b9 80 6e 12 00 mov $0x126e80,%ecx <== NOT EXECUTED
107af3: ba 48 6f 12 00 mov $0x126f48,%edx <== NOT EXECUTED
107af8: e8 db fe ff ff call 1079d8 <scangr> <== NOT EXECUTED
107afd: 89 c2 mov %eax,%edx <== NOT EXECUTED
107aff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107b02: b8 48 6f 12 00 mov $0x126f48,%eax <== NOT EXECUTED
107b07: 85 d2 test %edx,%edx <== NOT EXECUTED
107b09: 75 02 jne 107b0d <getgrent+0x36> <== NOT EXECUTED
107b0b: 31 c0 xor %eax,%eax <== NOT EXECUTED
return NULL;
return &grent;
}
107b0d: c9 leave <== NOT EXECUTED
107b0e: c3 ret <== NOT EXECUTED
00107e2a <getgrgid>:
}
struct group *getgrgid(
gid_t gid
)
{
107e2a: 55 push %ebp <== NOT EXECUTED
107e2b: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107e2d: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
107e30: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
107e33: 50 push %eax <== NOT EXECUTED
107e34: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED
107e39: 68 80 6e 12 00 push $0x126e80 <== NOT EXECUTED
107e3e: 68 48 6f 12 00 push $0x126f48 <== NOT EXECUTED
107e43: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED
107e47: 50 push %eax <== NOT EXECUTED
107e48: e8 b3 ff ff ff call 107e00 <getgrgid_r> <== NOT EXECUTED
107e4d: 89 c2 mov %eax,%edx <== NOT EXECUTED
107e4f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
107e52: 31 c0 xor %eax,%eax <== NOT EXECUTED
107e54: 85 d2 test %edx,%edx <== NOT EXECUTED
107e56: 75 03 jne 107e5b <getgrgid+0x31> <== NOT EXECUTED
return NULL;
return p;
107e58: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
}
107e5b: c9 leave <== NOT EXECUTED
107e5c: c3 ret <== NOT EXECUTED
00107e00 <getgrgid_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
107e00: 55 push %ebp <== NOT EXECUTED
107e01: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107e03: 53 push %ebx <== NOT EXECUTED
107e04: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
107e07: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
107e0a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
107e0d: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED
107e11: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
107e14: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED
107e17: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED
107e1a: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED
107e1d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
107e20: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
107e22: 5b pop %ebx <== NOT EXECUTED
107e23: 5b pop %ebx <== NOT EXECUTED
107e24: c9 leave <== NOT EXECUTED
char *buffer,
size_t bufsize,
struct group **result
)
{
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
107e25: e9 24 ff ff ff jmp 107d4e <getgr_r> <== NOT EXECUTED
00107e86 <getgrnam>:
}
struct group *getgrnam(
const char *name
)
{
107e86: 55 push %ebp
107e87: 89 e5 mov %esp,%ebp
107e89: 83 ec 24 sub $0x24,%esp
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
107e8c: 8d 45 f4 lea -0xc(%ebp),%eax
107e8f: 50 push %eax
107e90: 68 c8 00 00 00 push $0xc8
107e95: 68 80 6e 12 00 push $0x126e80
107e9a: 68 48 6f 12 00 push $0x126f48
107e9f: ff 75 08 pushl 0x8(%ebp)
107ea2: e8 b6 ff ff ff call 107e5d <getgrnam_r>
107ea7: 89 c2 mov %eax,%edx
107ea9: 83 c4 20 add $0x20,%esp
107eac: 31 c0 xor %eax,%eax
107eae: 85 d2 test %edx,%edx
107eb0: 75 03 jne 107eb5 <getgrnam+0x2f> <== NEVER TAKEN
return NULL;
return p;
107eb2: 8b 45 f4 mov -0xc(%ebp),%eax
}
107eb5: c9 leave
107eb6: c3 ret
00107ef2 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
107ef2: 55 push %ebp
107ef3: 89 e5 mov %esp,%ebp
107ef5: 57 push %edi
107ef6: 56 push %esi
107ef7: 53 push %ebx
107ef8: 83 ec 1c sub $0x1c,%esp
107efb: 89 c7 mov %eax,%edi
107efd: 89 55 e4 mov %edx,-0x1c(%ebp)
107f00: 89 ce mov %ecx,%esi
FILE *fp;
int match;
init_etc_passwd_group();
107f02: e8 3b fd ff ff call 107c42 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
107f07: 51 push %ecx
107f08: 51 push %ecx
107f09: 68 33 fe 11 00 push $0x11fe33
107f0e: 68 e4 10 12 00 push $0x1210e4
107f13: e8 60 b8 00 00 call 113778 <fopen>
107f18: 89 c3 mov %eax,%ebx
107f1a: 83 c4 10 add $0x10,%esp
107f1d: 85 c0 test %eax,%eax
107f1f: 75 10 jne 107f31 <getpw_r+0x3f> <== ALWAYS TAKEN
errno = EINVAL;
107f21: e8 a2 b0 00 00 call 112fc8 <__errno> <== NOT EXECUTED
107f26: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107f2c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
return -1;
107f2f: eb 6b jmp 107f9c <getpw_r+0xaa> <== NOT EXECUTED
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
107f31: 83 ec 0c sub $0xc,%esp
107f34: ff 75 0c pushl 0xc(%ebp)
107f37: 8b 4d 08 mov 0x8(%ebp),%ecx
107f3a: 89 f2 mov %esi,%edx
107f3c: 89 d8 mov %ebx,%eax
107f3e: e8 cc fb ff ff call 107b0f <scanpw>
107f43: 83 c4 10 add $0x10,%esp
107f46: 85 c0 test %eax,%eax
107f48: 75 19 jne 107f63 <getpw_r+0x71> <== ALWAYS TAKEN
errno = EINVAL;
107f4a: e8 79 b0 00 00 call 112fc8 <__errno> <== NOT EXECUTED
107f4f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
fclose(fp);
107f55: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f58: 53 push %ebx <== NOT EXECUTED
107f59: e8 b6 b1 00 00 call 113114 <fclose> <== NOT EXECUTED
107f5e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
107f61: eb 36 jmp 107f99 <getpw_r+0xa7> <== NOT EXECUTED
return -1;
}
if (name) {
107f63: 85 ff test %edi,%edi
107f65: 74 11 je 107f78 <getpw_r+0x86> <== NEVER TAKEN
match = (strcmp(pwd->pw_name, name) == 0);
107f67: 52 push %edx
107f68: 52 push %edx
107f69: 57 push %edi
107f6a: ff 36 pushl (%esi)
107f6c: e8 cf cb 00 00 call 114b40 <strcmp>
107f71: 83 c4 10 add $0x10,%esp
107f74: 85 c0 test %eax,%eax
107f76: eb 07 jmp 107f7f <getpw_r+0x8d>
}
else {
match = (pwd->pw_uid == uid);
107f78: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED
107f7c: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED
107f7f: 0f 94 c0 sete %al
107f82: 0f b6 c0 movzbl %al,%eax
}
if (match) {
107f85: 85 c0 test %eax,%eax
107f87: 74 a8 je 107f31 <getpw_r+0x3f>
fclose(fp);
107f89: 83 ec 0c sub $0xc,%esp
107f8c: 53 push %ebx
107f8d: e8 82 b1 00 00 call 113114 <fclose>
*result = pwd;
107f92: 8b 45 10 mov 0x10(%ebp),%eax
107f95: 89 30 mov %esi,(%eax)
107f97: 31 c0 xor %eax,%eax
return 0;
107f99: 83 c4 10 add $0x10,%esp
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
107f9c: 8d 65 f4 lea -0xc(%ebp),%esp
107f9f: 5b pop %ebx
107fa0: 5e pop %esi
107fa1: 5f pop %edi
107fa2: c9 leave
107fa3: c3 ret
00107c0a <getpwent>:
return NULL;
return p;
}
struct passwd *getpwent(void)
{
107c0a: 55 push %ebp <== NOT EXECUTED
107c0b: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107c0d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
if (passwd_fp == NULL)
107c10: a1 94 6d 12 00 mov 0x126d94,%eax <== NOT EXECUTED
107c15: 85 c0 test %eax,%eax <== NOT EXECUTED
107c17: 74 25 je 107c3e <getpwent+0x34> <== NOT EXECUTED
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
107c19: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107c1c: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED
107c21: b9 98 6d 12 00 mov $0x126d98,%ecx <== NOT EXECUTED
107c26: ba 60 6e 12 00 mov $0x126e60,%edx <== NOT EXECUTED
107c2b: e8 df fe ff ff call 107b0f <scanpw> <== NOT EXECUTED
107c30: 89 c2 mov %eax,%edx <== NOT EXECUTED
107c32: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107c35: b8 60 6e 12 00 mov $0x126e60,%eax <== NOT EXECUTED
107c3a: 85 d2 test %edx,%edx <== NOT EXECUTED
107c3c: 75 02 jne 107c40 <getpwent+0x36> <== NOT EXECUTED
107c3e: 31 c0 xor %eax,%eax <== NOT EXECUTED
return NULL;
return &pwent;
}
107c40: c9 leave <== NOT EXECUTED
107c41: c3 ret <== NOT EXECUTED
0010802a <getpwnam>:
}
struct passwd *getpwnam(
const char *name
)
{
10802a: 55 push %ebp
10802b: 89 e5 mov %esp,%ebp
10802d: 83 ec 24 sub $0x24,%esp
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
108030: 8d 45 f4 lea -0xc(%ebp),%eax
108033: 50 push %eax
108034: 68 c8 00 00 00 push $0xc8
108039: 68 98 6d 12 00 push $0x126d98
10803e: 68 60 6e 12 00 push $0x126e60
108043: ff 75 08 pushl 0x8(%ebp)
108046: e8 b6 ff ff ff call 108001 <getpwnam_r>
10804b: 89 c2 mov %eax,%edx
10804d: 83 c4 20 add $0x20,%esp
108050: 31 c0 xor %eax,%eax
108052: 85 d2 test %edx,%edx
108054: 75 03 jne 108059 <getpwnam+0x2f> <== NEVER TAKEN
return NULL;
return p;
108056: 8b 45 f4 mov -0xc(%ebp),%eax
}
108059: c9 leave
10805a: c3 ret
00107fce <getpwuid>:
}
struct passwd *getpwuid(
uid_t uid
)
{
107fce: 55 push %ebp <== NOT EXECUTED
107fcf: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107fd1: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
107fd4: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
107fd7: 50 push %eax <== NOT EXECUTED
107fd8: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED
107fdd: 68 98 6d 12 00 push $0x126d98 <== NOT EXECUTED
107fe2: 68 60 6e 12 00 push $0x126e60 <== NOT EXECUTED
107fe7: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED
107feb: 50 push %eax <== NOT EXECUTED
107fec: e8 b3 ff ff ff call 107fa4 <getpwuid_r> <== NOT EXECUTED
107ff1: 89 c2 mov %eax,%edx <== NOT EXECUTED
107ff3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
107ff6: 31 c0 xor %eax,%eax <== NOT EXECUTED
107ff8: 85 d2 test %edx,%edx <== NOT EXECUTED
107ffa: 75 03 jne 107fff <getpwuid+0x31> <== NOT EXECUTED
return NULL;
return p;
107ffc: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
}
107fff: c9 leave <== NOT EXECUTED
108000: c3 ret <== NOT EXECUTED
00107fa4 <getpwuid_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
107fa4: 55 push %ebp <== NOT EXECUTED
107fa5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107fa7: 53 push %ebx <== NOT EXECUTED
107fa8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
107fab: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
107fae: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
107fb1: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED
107fb5: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
107fb8: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED
107fbb: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED
107fbe: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED
107fc1: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
107fc4: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
107fc6: 5b pop %ebx <== NOT EXECUTED
107fc7: 5b pop %ebx <== NOT EXECUTED
107fc8: c9 leave <== NOT EXECUTED
char *buffer,
size_t bufsize,
struct passwd **result
)
{
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
107fc9: e9 24 ff ff ff jmp 107ef2 <getpw_r> <== NOT EXECUTED
0010de80 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
10de80: 55 push %ebp
10de81: 89 e5 mov %esp,%ebp
10de83: 56 push %esi
10de84: 53 push %ebx
10de85: 83 ec 10 sub $0x10,%esp
10de88: 8b 5d 08 mov 0x8(%ebp),%ebx
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
10de8b: 85 db test %ebx,%ebx
10de8d: 75 10 jne 10de9f <gettimeofday+0x1f> <== ALWAYS TAKEN
errno = EFAULT;
10de8f: e8 70 35 00 00 call 111404 <__errno> <== NOT EXECUTED
10de94: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
10de9a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
return -1;
10de9d: eb 29 jmp 10dec8 <gettimeofday+0x48> <== NOT EXECUTED
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
10de9f: 9c pushf
10dea0: fa cli
10dea1: 5e pop %esi
_TOD_Get( &now );
10dea2: 83 ec 0c sub $0xc,%esp
10dea5: 8d 45 f0 lea -0x10(%ebp),%eax
10dea8: 50 push %eax
10dea9: e8 e6 0e 00 00 call 10ed94 <_TOD_Get>
_ISR_Enable(level);
10deae: 56 push %esi
10deaf: 9d popf
useconds = (suseconds_t)now.tv_nsec;
10deb0: 8b 45 f4 mov -0xc(%ebp),%eax
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
10deb3: 8b 55 f0 mov -0x10(%ebp),%edx
10deb6: 89 13 mov %edx,(%ebx)
time->tv_usec = useconds;
10deb8: b9 e8 03 00 00 mov $0x3e8,%ecx
10debd: 99 cltd
10debe: f7 f9 idiv %ecx
10dec0: 89 43 04 mov %eax,0x4(%ebx)
10dec3: 31 c0 xor %eax,%eax
* 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;
10dec5: 83 c4 10 add $0x10,%esp
}
10dec8: 8d 65 f8 lea -0x8(%ebp),%esp
10decb: 5b pop %ebx
10decc: 5e pop %esi
10decd: c9 leave
10dece: c3 ret
00114e0c <imfs_dir_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
114e0c: 55 push %ebp
114e0d: 89 e5 mov %esp,%ebp
114e0f: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
114e12: 8b 4a 38 mov 0x38(%edx),%ecx
114e15: 83 c8 ff or $0xffffffff,%eax
114e18: 83 79 4c 01 cmpl $0x1,0x4c(%ecx)
114e1c: 75 10 jne 114e2e <imfs_dir_open+0x22> <== NEVER TAKEN
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
114e1e: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
114e25: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
114e2c: 31 c0 xor %eax,%eax
return 0;
}
114e2e: c9 leave
114e2f: c3 ret
00114f30 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
114f30: 55 push %ebp
114f31: 89 e5 mov %esp,%ebp
114f33: 56 push %esi
114f34: 53 push %ebx
114f35: 83 ec 10 sub $0x10,%esp
114f38: 8b 75 0c mov 0xc(%ebp),%esi
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
114f3b: 8b 1e mov (%esi),%ebx
114f3d: 8d 43 54 lea 0x54(%ebx),%eax
114f40: 39 43 50 cmp %eax,0x50(%ebx)
114f43: 74 0d je 114f52 <imfs_dir_rmnod+0x22>
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
114f45: e8 1e 0d 00 00 call 115c68 <__errno>
114f4a: c7 00 5a 00 00 00 movl $0x5a,(%eax)
114f50: eb 19 jmp 114f6b <imfs_dir_rmnod+0x3b>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
114f52: 8b 46 10 mov 0x10(%esi),%eax
114f55: 39 58 1c cmp %ebx,0x1c(%eax)
114f58: 74 06 je 114f60 <imfs_dir_rmnod+0x30>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
114f5a: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx)
114f5e: 74 10 je 114f70 <imfs_dir_rmnod+0x40> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
114f60: e8 03 0d 00 00 call 115c68 <__errno>
114f65: c7 00 10 00 00 00 movl $0x10,(%eax)
114f6b: 83 c8 ff or $0xffffffff,%eax
114f6e: eb 6b jmp 114fdb <imfs_dir_rmnod+0xab>
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
114f70: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
114f74: 74 13 je 114f89 <imfs_dir_rmnod+0x59>
114f76: 83 ec 0c sub $0xc,%esp
114f79: 53 push %ebx
114f7a: e8 3d 6f ff ff call 10bebc <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
114f7f: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
114f86: 83 c4 10 add $0x10,%esp
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
114f89: 66 ff 4b 34 decw 0x34(%ebx)
IMFS_update_ctime( the_jnode );
114f8d: 50 push %eax
114f8e: 50 push %eax
114f8f: 6a 00 push $0x0
114f91: 8d 45 f0 lea -0x10(%ebp),%eax
114f94: 50 push %eax
114f95: e8 96 34 ff ff call 108430 <gettimeofday>
114f9a: 8b 45 f0 mov -0x10(%ebp),%eax
114f9d: 89 43 48 mov %eax,0x48(%ebx)
/*
* The file cannot be open and the link must be less than 1 to free.
*/
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
114fa0: 89 1c 24 mov %ebx,(%esp)
114fa3: e8 f6 d2 ff ff call 11229e <rtems_libio_is_file_open>
114fa8: 83 c4 10 add $0x10,%esp
114fab: 85 c0 test %eax,%eax
114fad: 75 2a jne 114fd9 <imfs_dir_rmnod+0xa9>
114faf: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx)
114fb4: 75 23 jne 114fd9 <imfs_dir_rmnod+0xa9>
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
114fb6: a1 34 6f 12 00 mov 0x126f34,%eax
114fbb: 8b 50 04 mov 0x4(%eax),%edx
114fbe: 3b 16 cmp (%esi),%edx
114fc0: 75 07 jne 114fc9 <imfs_dir_rmnod+0x99> <== ALWAYS TAKEN
rtems_filesystem_current.node_access = NULL;
114fc2: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
114fc9: 83 ec 0c sub $0xc,%esp
114fcc: 53 push %ebx
114fcd: e8 e6 33 ff ff call 1083b8 <free>
114fd2: 31 c0 xor %eax,%eax
114fd4: 83 c4 10 add $0x10,%esp
114fd7: eb 02 jmp 114fdb <imfs_dir_rmnod+0xab>
114fd9: 31 c0 xor %eax,%eax
}
return 0;
}
114fdb: 8d 65 f8 lea -0x8(%ebp),%esp
114fde: 5b pop %ebx
114fdf: 5e pop %esi
114fe0: c9 leave
114fe1: c3 ret
00107c42 <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
107c42: 55 push %ebp
107c43: 89 e5 mov %esp,%ebp
107c45: 53 push %ebx
107c46: 83 ec 04 sub $0x4,%esp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
107c49: 80 3d 90 6d 12 00 00 cmpb $0x0,0x126d90
107c50: 0f 85 b8 00 00 00 jne 107d0e <init_etc_passwd_group+0xcc>
return;
etc_passwd_initted = 1;
107c56: c6 05 90 6d 12 00 01 movb $0x1,0x126d90
mkdir("/etc", 0777);
107c5d: 50 push %eax
107c5e: 50 push %eax
107c5f: 68 ff 01 00 00 push $0x1ff
107c64: 68 df 10 12 00 push $0x1210df
107c69: e8 ba 06 00 00 call 108328 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
107c6e: 59 pop %ecx
107c6f: 5b pop %ebx
107c70: 68 33 fe 11 00 push $0x11fe33
107c75: 68 e4 10 12 00 push $0x1210e4
107c7a: e8 f9 ba 00 00 call 113778 <fopen>
107c7f: 83 c4 10 add $0x10,%esp
107c82: 85 c0 test %eax,%eax
107c84: 74 06 je 107c8c <init_etc_passwd_group+0x4a><== ALWAYS TAKEN
fclose(fp);
107c86: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107c89: 50 push %eax <== NOT EXECUTED
107c8a: eb 2a jmp 107cb6 <init_etc_passwd_group+0x74><== NOT EXECUTED
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
107c8c: 52 push %edx
107c8d: 52 push %edx
107c8e: 68 3c fd 11 00 push $0x11fd3c
107c93: 68 e4 10 12 00 push $0x1210e4
107c98: e8 db ba 00 00 call 113778 <fopen>
107c9d: 89 c3 mov %eax,%ebx
107c9f: 83 c4 10 add $0x10,%esp
107ca2: 85 c0 test %eax,%eax
107ca4: 74 18 je 107cbe <init_etc_passwd_group+0x7c><== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
107ca6: 50 push %eax
107ca7: 50 push %eax
107ca8: 53 push %ebx
107ca9: 68 f0 10 12 00 push $0x1210f0
107cae: e8 91 bb 00 00 call 113844 <fputs>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
107cb3: 89 1c 24 mov %ebx,(%esp)
107cb6: e8 59 b4 00 00 call 113114 <fclose>
107cbb: 83 c4 10 add $0x10,%esp
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
107cbe: 51 push %ecx
107cbf: 51 push %ecx
107cc0: 68 33 fe 11 00 push $0x11fe33
107cc5: 68 57 11 12 00 push $0x121157
107cca: e8 a9 ba 00 00 call 113778 <fopen>
107ccf: 83 c4 10 add $0x10,%esp
107cd2: 85 c0 test %eax,%eax
107cd4: 74 06 je 107cdc <init_etc_passwd_group+0x9a><== ALWAYS TAKEN
fclose(fp);
107cd6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107cd9: 50 push %eax <== NOT EXECUTED
107cda: eb 2a jmp 107d06 <init_etc_passwd_group+0xc4><== NOT EXECUTED
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
107cdc: 52 push %edx
107cdd: 52 push %edx
107cde: 68 3c fd 11 00 push $0x11fd3c
107ce3: 68 57 11 12 00 push $0x121157
107ce8: e8 8b ba 00 00 call 113778 <fopen>
107ced: 89 c3 mov %eax,%ebx
107cef: 83 c4 10 add $0x10,%esp
107cf2: 85 c0 test %eax,%eax
107cf4: 74 18 je 107d0e <init_etc_passwd_group+0xcc><== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
107cf6: 50 push %eax
107cf7: 50 push %eax
107cf8: 53 push %ebx
107cf9: 68 62 11 12 00 push $0x121162
107cfe: e8 41 bb 00 00 call 113844 <fputs>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
107d03: 89 1c 24 mov %ebx,(%esp)
107d06: e8 09 b4 00 00 call 113114 <fclose>
107d0b: 83 c4 10 add $0x10,%esp
}
}
107d0e: 8b 5d fc mov -0x4(%ebp),%ebx
107d11: c9 leave
107d12: c3 ret
0010a408 <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
10a408: 55 push %ebp
10a409: 89 e5 mov %esp,%ebp
10a40b: 83 ec 08 sub $0x8,%esp
10a40e: 8b 45 08 mov 0x8(%ebp),%eax
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
10a411: 3b 05 44 51 12 00 cmp 0x125144,%eax
10a417: 73 19 jae 10a432 <ioctl+0x2a>
iop = rtems_libio_iop( fd );
10a419: c1 e0 06 shl $0x6,%eax
10a41c: 03 05 68 91 12 00 add 0x129168,%eax
rtems_libio_check_is_open(iop);
10a422: f6 40 15 01 testb $0x1,0x15(%eax)
10a426: 74 0a je 10a432 <ioctl+0x2a> <== NEVER TAKEN
va_start(ap, command);
buffer = va_arg(ap, void *);
10a428: 8b 4d 10 mov 0x10(%ebp),%ecx
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
10a42b: 8b 50 3c mov 0x3c(%eax),%edx
10a42e: 85 d2 test %edx,%edx
10a430: 75 0d jne 10a43f <ioctl+0x37> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
10a432: e8 51 ba 00 00 call 115e88 <__errno>
10a437: c7 00 09 00 00 00 movl $0x9,(%eax)
10a43d: eb 12 jmp 10a451 <ioctl+0x49>
if ( !iop->handlers->ioctl_h )
10a43f: 8b 52 10 mov 0x10(%edx),%edx
10a442: 85 d2 test %edx,%edx
10a444: 75 10 jne 10a456 <ioctl+0x4e> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
10a446: e8 3d ba 00 00 call 115e88 <__errno> <== NOT EXECUTED
10a44b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10a451: 83 c8 ff or $0xffffffff,%eax
10a454: eb 0d jmp 10a463 <ioctl+0x5b>
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
10a456: 83 ec 04 sub $0x4,%esp
10a459: 51 push %ecx
10a45a: ff 75 0c pushl 0xc(%ebp)
10a45d: 50 push %eax
10a45e: ff d2 call *%edx
return rc;
10a460: 83 c4 10 add $0x10,%esp
}
10a463: c9 leave
10a464: c3 ret
00108830 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
108830: 55 push %ebp <== NOT EXECUTED
108831: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108833: 53 push %ebx <== NOT EXECUTED
108834: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
108837: 89 d3 mov %edx,%ebx <== NOT EXECUTED
108839: 88 c1 mov %al,%cl <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
10883b: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED
10883e: a8 20 test $0x20,%al <== NOT EXECUTED
108840: 74 03 je 108845 <iproc+0x15> <== NOT EXECUTED
c &= 0x7f;
108842: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
108845: f6 c4 02 test $0x2,%ah <== NOT EXECUTED
108848: 74 17 je 108861 <iproc+0x31> <== NOT EXECUTED
c = tolower (c);
10884a: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED
10884d: 8b 15 08 20 12 00 mov 0x122008,%edx <== NOT EXECUTED
108853: 0f be 54 0a 01 movsbl 0x1(%edx,%ecx,1),%edx <== NOT EXECUTED
108858: 83 e2 03 and $0x3,%edx <== NOT EXECUTED
10885b: 4a dec %edx <== NOT EXECUTED
10885c: 75 03 jne 108861 <iproc+0x31> <== NOT EXECUTED
10885e: 83 c1 20 add $0x20,%ecx <== NOT EXECUTED
if (c == '\r') {
108861: 80 f9 0d cmp $0xd,%cl <== NOT EXECUTED
108864: 75 11 jne 108877 <iproc+0x47> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
108866: 84 c0 test %al,%al <== NOT EXECUTED
108868: 0f 88 d3 00 00 00 js 108941 <iproc+0x111> <== NOT EXECUTED
return 0;
if (tty->termios.c_iflag & ICRNL)
10886e: f6 c4 01 test $0x1,%ah <== NOT EXECUTED
108871: 74 19 je 10888c <iproc+0x5c> <== NOT EXECUTED
108873: b1 0a mov $0xa,%cl <== NOT EXECUTED
108875: eb 15 jmp 10888c <iproc+0x5c> <== NOT EXECUTED
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
108877: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED
10887a: 75 08 jne 108884 <iproc+0x54> <== NOT EXECUTED
10887c: a8 40 test $0x40,%al <== NOT EXECUTED
10887e: 74 0c je 10888c <iproc+0x5c> <== NOT EXECUTED
108880: b1 0d mov $0xd,%cl <== NOT EXECUTED
108882: eb 08 jmp 10888c <iproc+0x5c> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
108884: 84 c9 test %cl,%cl <== NOT EXECUTED
108886: 0f 84 87 00 00 00 je 108913 <iproc+0xe3> <== NOT EXECUTED
10888c: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED
10888f: f6 c2 02 test $0x2,%dl <== NOT EXECUTED
108892: 74 7f je 108913 <iproc+0xe3> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
108894: 3a 4b 43 cmp 0x43(%ebx),%cl <== NOT EXECUTED
108897: 75 04 jne 10889d <iproc+0x6d> <== NOT EXECUTED
erase (tty, 0);
108899: 31 d2 xor %edx,%edx <== NOT EXECUTED
10889b: eb 0a jmp 1088a7 <iproc+0x77> <== NOT EXECUTED
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
10889d: 3a 4b 44 cmp 0x44(%ebx),%cl <== NOT EXECUTED
1088a0: 75 11 jne 1088b3 <iproc+0x83> <== NOT EXECUTED
erase (tty, 1);
1088a2: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
1088a7: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1088a9: e8 09 fe ff ff call 1086b7 <erase> <== NOT EXECUTED
1088ae: e9 8e 00 00 00 jmp 108941 <iproc+0x111> <== NOT EXECUTED
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
1088b3: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
1088b8: 3a 4b 45 cmp 0x45(%ebx),%cl <== NOT EXECUTED
1088bb: 0f 84 82 00 00 00 je 108943 <iproc+0x113> <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
1088c1: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED
1088c4: 75 1a jne 1088e0 <iproc+0xb0> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
1088c6: 80 e2 48 and $0x48,%dl <== NOT EXECUTED
1088c9: 74 09 je 1088d4 <iproc+0xa4> <== NOT EXECUTED
echo (c, tty);
1088cb: 89 da mov %ebx,%edx <== NOT EXECUTED
1088cd: b0 0a mov $0xa,%al <== NOT EXECUTED
1088cf: e8 8b fd ff ff call 10865f <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
1088d4: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
1088d7: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
1088da: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED
1088de: eb 28 jmp 108908 <iproc+0xd8> <== NOT EXECUTED
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
1088e0: 3a 4b 4c cmp 0x4c(%ebx),%cl <== NOT EXECUTED
1088e3: 74 05 je 1088ea <iproc+0xba> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
1088e5: 3a 4b 51 cmp 0x51(%ebx),%cl <== NOT EXECUTED
1088e8: 75 29 jne 108913 <iproc+0xe3> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
1088ea: 80 e2 08 and $0x8,%dl <== NOT EXECUTED
1088ed: 74 10 je 1088ff <iproc+0xcf> <== NOT EXECUTED
echo (c, tty);
1088ef: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
1088f2: 89 da mov %ebx,%edx <== NOT EXECUTED
1088f4: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED
1088f7: e8 63 fd ff ff call 10865f <echo> <== NOT EXECUTED
1088fc: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
1088ff: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
108902: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
108905: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED
108908: 40 inc %eax <== NOT EXECUTED
108909: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
10890c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
108911: eb 30 jmp 108943 <iproc+0x113> <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
108913: a1 38 1f 12 00 mov 0x121f38,%eax <== NOT EXECUTED
108918: 48 dec %eax <== NOT EXECUTED
108919: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
10891c: 7d 23 jge 108941 <iproc+0x111> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
10891e: f6 43 3c 08 testb $0x8,0x3c(%ebx) <== NOT EXECUTED
108922: 74 10 je 108934 <iproc+0x104> <== NOT EXECUTED
echo (c, tty);
108924: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
108927: 89 da mov %ebx,%edx <== NOT EXECUTED
108929: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED
10892c: e8 2e fd ff ff call 10865f <echo> <== NOT EXECUTED
108931: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
108934: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
108937: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
10893a: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED
10893d: 40 inc %eax <== NOT EXECUTED
10893e: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
108941: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return 0;
}
108943: 83 c4 14 add $0x14,%esp <== NOT EXECUTED
108946: 5b pop %ebx <== NOT EXECUTED
108947: c9 leave <== NOT EXECUTED
108948: c3 ret <== NOT EXECUTED
00110f48 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
110f48: 55 push %ebp
110f49: 89 e5 mov %esp,%ebp
110f4b: 57 push %edi
110f4c: 56 push %esi
110f4d: 53 push %ebx
110f4e: 83 ec 3c sub $0x3c,%esp
110f51: 8b 5d 0c mov 0xc(%ebp),%ebx
110f54: 8b 7d 10 mov 0x10(%ebp),%edi
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
110f57: e8 08 f3 ff ff call 110264 <getpid>
110f5c: 39 45 08 cmp %eax,0x8(%ebp)
110f5f: 74 0d je 110f6e <killinfo+0x26>
rtems_set_errno_and_return_minus_one( ESRCH );
110f61: e8 9e 04 00 00 call 111404 <__errno>
110f66: c7 00 03 00 00 00 movl $0x3,(%eax)
110f6c: eb 0f jmp 110f7d <killinfo+0x35>
/*
* Validate the signal passed.
*/
if ( !sig )
110f6e: 85 db test %ebx,%ebx
110f70: 75 13 jne 110f85 <killinfo+0x3d>
rtems_set_errno_and_return_minus_one( EINVAL );
110f72: e8 8d 04 00 00 call 111404 <__errno>
110f77: c7 00 16 00 00 00 movl $0x16,(%eax)
110f7d: 83 c8 ff or $0xffffffff,%eax
110f80: e9 e7 01 00 00 jmp 11116c <killinfo+0x224>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
110f85: 8d 4b ff lea -0x1(%ebx),%ecx
if ( !is_valid_signo(sig) )
110f88: 83 f9 1f cmp $0x1f,%ecx
110f8b: 77 e5 ja 110f72 <killinfo+0x2a>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
110f8d: 6b d3 0c imul $0xc,%ebx,%edx
110f90: 31 c0 xor %eax,%eax
110f92: 83 ba 5c 47 12 00 01 cmpl $0x1,0x12475c(%edx)
110f99: 0f 84 cd 01 00 00 je 11116c <killinfo+0x224> <== NEVER TAKEN
/*
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
110f9f: 83 fb 04 cmp $0x4,%ebx
110fa2: 74 0a je 110fae <killinfo+0x66>
110fa4: 83 fb 08 cmp $0x8,%ebx
110fa7: 74 05 je 110fae <killinfo+0x66>
110fa9: 83 fb 0b cmp $0xb,%ebx
110fac: 75 16 jne 110fc4 <killinfo+0x7c>
return pthread_kill( pthread_self(), sig );
110fae: e8 d1 03 00 00 call 111384 <pthread_self>
110fb3: 56 push %esi
110fb4: 56 push %esi
110fb5: 53 push %ebx
110fb6: 50 push %eax
110fb7: e8 1c 03 00 00 call 1112d8 <pthread_kill>
110fbc: 83 c4 10 add $0x10,%esp
110fbf: e9 a8 01 00 00 jmp 11116c <killinfo+0x224>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
110fc4: be 01 00 00 00 mov $0x1,%esi
110fc9: d3 e6 shl %cl,%esi
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
110fcb: 89 5d dc mov %ebx,-0x24(%ebp)
siginfo->si_code = SI_USER;
110fce: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
if ( !value ) {
110fd5: 85 ff test %edi,%edi
110fd7: 75 09 jne 110fe2 <killinfo+0x9a>
siginfo->si_value.sival_int = 0;
110fd9: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
110fe0: eb 05 jmp 110fe7 <killinfo+0x9f>
} else {
siginfo->si_value = *value;
110fe2: 8b 07 mov (%edi),%eax
110fe4: 89 45 e4 mov %eax,-0x1c(%ebp)
110fe7: a1 f4 41 12 00 mov 0x1241f4,%eax
110fec: 40 inc %eax
110fed: a3 f4 41 12 00 mov %eax,0x1241f4
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
110ff2: 8b 15 b0 42 12 00 mov 0x1242b0,%edx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
110ff8: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax
110ffe: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax
111004: f7 d0 not %eax
111006: 85 c6 test %eax,%esi
111008: 0f 85 e0 00 00 00 jne 1110ee <killinfo+0x1a6>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
11100e: a1 e0 48 12 00 mov 0x1248e0,%eax
111013: eb 23 jmp 111038 <killinfo+0xf0>
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
111015: 89 c2 mov %eax,%edx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
111017: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
11101d: 85 70 30 test %esi,0x30(%eax)
111020: 0f 85 c8 00 00 00 jne 1110ee <killinfo+0x1a6>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
111026: 8b 89 cc 00 00 00 mov 0xcc(%ecx),%ecx
11102c: f7 d1 not %ecx
11102e: 85 ce test %ecx,%esi
111030: 0f 85 b8 00 00 00 jne 1110ee <killinfo+0x1a6>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
111036: 8b 00 mov (%eax),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
111038: 3d e4 48 12 00 cmp $0x1248e4,%eax
11103d: 75 d6 jne 111015 <killinfo+0xcd>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
11103f: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax
111046: 40 inc %eax
111047: 89 45 d4 mov %eax,-0x2c(%ebp)
11104a: 31 d2 xor %edx,%edx
11104c: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp)
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
111053: 8b 4d cc mov -0x34(%ebp),%ecx
111056: 8b 04 8d c8 41 12 00 mov 0x1241c8(,%ecx,4),%eax
11105d: 85 c0 test %eax,%eax
11105f: 74 7c je 1110dd <killinfo+0x195>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
111061: 8b 40 04 mov 0x4(%eax),%eax
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
111064: 0f b7 78 10 movzwl 0x10(%eax),%edi
111068: 89 7d c0 mov %edi,-0x40(%ebp)
object_table = the_info->local_table;
11106b: 8b 40 1c mov 0x1c(%eax),%eax
11106e: 89 45 c4 mov %eax,-0x3c(%ebp)
111071: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp)
for ( index = 1 ; index <= maximum ; index++ ) {
111078: eb 5b jmp 1110d5 <killinfo+0x18d>
the_thread = (Thread_Control *) object_table[ index ];
11107a: 8b 4d d0 mov -0x30(%ebp),%ecx
11107d: 8b 7d c4 mov -0x3c(%ebp),%edi
111080: 8b 04 8f mov (%edi,%ecx,4),%eax
if ( !the_thread )
111083: 85 c0 test %eax,%eax
111085: 74 41 je 1110c8 <killinfo+0x180>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
111087: 8b 48 14 mov 0x14(%eax),%ecx
11108a: 3b 4d d4 cmp -0x2c(%ebp),%ecx
11108d: 77 39 ja 1110c8 <killinfo+0x180>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
11108f: 8b b8 f8 00 00 00 mov 0xf8(%eax),%edi
111095: 8b bf cc 00 00 00 mov 0xcc(%edi),%edi
11109b: f7 d7 not %edi
11109d: 85 fe test %edi,%esi
11109f: 74 27 je 1110c8 <killinfo+0x180>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
1110a1: 3b 4d d4 cmp -0x2c(%ebp),%ecx
1110a4: 72 27 jb 1110cd <killinfo+0x185>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
1110a6: 8b 7a 10 mov 0x10(%edx),%edi
1110a9: 89 7d c8 mov %edi,-0x38(%ebp)
1110ac: 85 ff test %edi,%edi
1110ae: 74 18 je 1110c8 <killinfo+0x180> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
1110b0: 8b 78 10 mov 0x10(%eax),%edi
1110b3: 85 ff test %edi,%edi
1110b5: 74 16 je 1110cd <killinfo+0x185>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
1110b7: f7 45 c8 00 00 00 10 testl $0x10000000,-0x38(%ebp)
1110be: 75 08 jne 1110c8 <killinfo+0x180>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
1110c0: 81 e7 00 00 00 10 and $0x10000000,%edi
1110c6: 75 05 jne 1110cd <killinfo+0x185>
1110c8: 8b 4d d4 mov -0x2c(%ebp),%ecx
1110cb: eb 02 jmp 1110cf <killinfo+0x187>
1110cd: 89 c2 mov %eax,%edx
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
1110cf: ff 45 d0 incl -0x30(%ebp)
1110d2: 89 4d d4 mov %ecx,-0x2c(%ebp)
1110d5: 8b 45 c0 mov -0x40(%ebp),%eax
1110d8: 39 45 d0 cmp %eax,-0x30(%ebp)
1110db: 76 9d jbe 11107a <killinfo+0x132>
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
1110dd: ff 45 cc incl -0x34(%ebp)
1110e0: 83 7d cc 05 cmpl $0x5,-0x34(%ebp)
1110e4: 0f 85 69 ff ff ff jne 111053 <killinfo+0x10b>
}
}
}
}
if ( interested ) {
1110ea: 85 d2 test %edx,%edx
1110ec: 74 17 je 111105 <killinfo+0x1bd>
* thread needs to do the post context switch extension so it can
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
1110ee: c6 42 74 01 movb $0x1,0x74(%edx)
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
1110f2: 51 push %ecx
1110f3: 8d 45 dc lea -0x24(%ebp),%eax
1110f6: 50 push %eax
1110f7: 53 push %ebx
1110f8: 52 push %edx
1110f9: e8 e2 00 00 00 call 1111e0 <_POSIX_signals_Unblock_thread>
1110fe: 83 c4 10 add $0x10,%esp
111101: 84 c0 test %al,%al
111103: 75 60 jne 111165 <killinfo+0x21d>
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
111105: 83 ec 0c sub $0xc,%esp
111108: 56 push %esi
111109: e8 ae 00 00 00 call 1111bc <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
11110e: 6b db 0c imul $0xc,%ebx,%ebx
111111: 83 c4 10 add $0x10,%esp
111114: 83 bb 54 47 12 00 02 cmpl $0x2,0x124754(%ebx)
11111b: 75 48 jne 111165 <killinfo+0x21d>
psiginfo = (POSIX_signals_Siginfo_node *)
11111d: 83 ec 0c sub $0xc,%esp
111120: 68 d4 48 12 00 push $0x1248d4
111125: e8 4a 97 ff ff call 10a874 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
11112a: 83 c4 10 add $0x10,%esp
11112d: 85 c0 test %eax,%eax
11112f: 75 15 jne 111146 <killinfo+0x1fe>
_Thread_Enable_dispatch();
111131: e8 7b ab ff ff call 10bcb1 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
111136: e8 c9 02 00 00 call 111404 <__errno>
11113b: c7 00 0b 00 00 00 movl $0xb,(%eax)
111141: e9 37 fe ff ff jmp 110f7d <killinfo+0x35>
}
psiginfo->Info = *siginfo;
111146: 8d 78 08 lea 0x8(%eax),%edi
111149: 8d 75 dc lea -0x24(%ebp),%esi
11114c: b9 03 00 00 00 mov $0x3,%ecx
111151: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
111153: 52 push %edx
111154: 52 push %edx
111155: 50 push %eax
111156: 81 c3 4c 49 12 00 add $0x12494c,%ebx
11115c: 53 push %ebx
11115d: e8 ee 96 ff ff call 10a850 <_Chain_Append>
111162: 83 c4 10 add $0x10,%esp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
111165: e8 47 ab ff ff call 10bcb1 <_Thread_Enable_dispatch>
11116a: 31 c0 xor %eax,%eax
return 0;
}
11116c: 8d 65 f4 lea -0xc(%ebp),%esp
11116f: 5b pop %ebx
111170: 5e pop %esi
111171: 5f pop %edi
111172: c9 leave
111173: c3 ret
00108758 <link>:
int link(
const char *existing,
const char *new
)
{
108758: 55 push %ebp
108759: 89 e5 mov %esp,%ebp
10875b: 57 push %edi
10875c: 56 push %esi
10875d: 53 push %ebx
10875e: 83 ec 48 sub $0x48,%esp
108761: 8b 55 08 mov 0x8(%ebp),%edx
108764: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
108767: 31 c0 xor %eax,%eax
108769: 83 c9 ff or $0xffffffff,%ecx
10876c: 89 d7 mov %edx,%edi
10876e: f2 ae repnz scas %es:(%edi),%al
108770: f7 d1 not %ecx
108772: 49 dec %ecx
108773: 6a 01 push $0x1
108775: 8d 45 d0 lea -0x30(%ebp),%eax
108778: 50 push %eax
108779: 6a 00 push $0x0
10877b: 51 push %ecx
10877c: 52 push %edx
10877d: e8 aa fb ff ff call 10832c <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
108782: 83 c4 20 add $0x20,%esp
108785: 83 ce ff or $0xffffffff,%esi
108788: 85 c0 test %eax,%eax
10878a: 0f 85 80 01 00 00 jne 108910 <link+0x1b8>
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
108790: 8a 03 mov (%ebx),%al
108792: 3c 5c cmp $0x5c,%al
108794: 74 08 je 10879e <link+0x46> <== NEVER TAKEN
108796: 3c 2f cmp $0x2f,%al
108798: 74 04 je 10879e <link+0x46>
10879a: 84 c0 test %al,%al
10879c: 75 1a jne 1087b8 <link+0x60> <== ALWAYS TAKEN
10879e: 8d 7d bc lea -0x44(%ebp),%edi
1087a1: 8b 35 d4 5f 12 00 mov 0x125fd4,%esi
1087a7: 83 c6 18 add $0x18,%esi
1087aa: b9 05 00 00 00 mov $0x5,%ecx
1087af: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
1087b1: ba 01 00 00 00 mov $0x1,%edx
1087b6: eb 15 jmp 1087cd <link+0x75>
1087b8: 8d 7d bc lea -0x44(%ebp),%edi
1087bb: 8b 35 d4 5f 12 00 mov 0x125fd4,%esi
1087c1: 83 c6 04 add $0x4,%esi
1087c4: b9 05 00 00 00 mov $0x5,%ecx
1087c9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
1087cb: 31 d2 xor %edx,%edx
if ( !parent_loc.ops->evalformake_h ) {
1087cd: 8b 45 c8 mov -0x38(%ebp),%eax
1087d0: 8b 40 04 mov 0x4(%eax),%eax
1087d3: 85 c0 test %eax,%eax
1087d5: 75 21 jne 1087f8 <link+0xa0> <== ALWAYS TAKEN
rtems_filesystem_freenode( &existing_loc );
1087d7: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
1087da: 85 c0 test %eax,%eax <== NOT EXECUTED
1087dc: 0f 84 dd 00 00 00 je 1088bf <link+0x167> <== NOT EXECUTED
1087e2: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
1087e5: 85 c0 test %eax,%eax <== NOT EXECUTED
1087e7: 0f 84 d2 00 00 00 je 1088bf <link+0x167> <== NOT EXECUTED
1087ed: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1087f0: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED
1087f3: e9 c1 00 00 00 jmp 1088b9 <link+0x161> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
1087f8: 51 push %ecx
1087f9: 8d 4d e4 lea -0x1c(%ebp),%ecx
1087fc: 51 push %ecx
1087fd: 8d 75 bc lea -0x44(%ebp),%esi
108800: 56 push %esi
108801: 01 d3 add %edx,%ebx
108803: 53 push %ebx
108804: ff d0 call *%eax
108806: 89 c3 mov %eax,%ebx
if ( result != 0 ) {
108808: 83 c4 10 add $0x10,%esp
10880b: 85 c0 test %eax,%eax
10880d: 74 29 je 108838 <link+0xe0>
rtems_filesystem_freenode( &existing_loc );
10880f: 8b 45 dc mov -0x24(%ebp),%eax
108812: 85 c0 test %eax,%eax
108814: 74 13 je 108829 <link+0xd1> <== NEVER TAKEN
108816: 8b 40 1c mov 0x1c(%eax),%eax
108819: 85 c0 test %eax,%eax
10881b: 74 0c je 108829 <link+0xd1> <== NEVER TAKEN
10881d: 83 ec 0c sub $0xc,%esp
108820: 8d 55 d0 lea -0x30(%ebp),%edx
108823: 52 push %edx
108824: ff d0 call *%eax
108826: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( result );
108829: e8 66 b0 00 00 call 113894 <__errno>
10882e: 89 18 mov %ebx,(%eax)
108830: 83 ce ff or $0xffffffff,%esi
108833: e9 d8 00 00 00 jmp 108910 <link+0x1b8>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
108838: 8b 45 cc mov -0x34(%ebp),%eax
10883b: 3b 45 e0 cmp -0x20(%ebp),%eax
10883e: 74 41 je 108881 <link+0x129>
rtems_filesystem_freenode( &existing_loc );
108840: 8b 45 dc mov -0x24(%ebp),%eax
108843: 85 c0 test %eax,%eax
108845: 74 13 je 10885a <link+0x102> <== NEVER TAKEN
108847: 8b 40 1c mov 0x1c(%eax),%eax
10884a: 85 c0 test %eax,%eax
10884c: 74 0c je 10885a <link+0x102> <== NEVER TAKEN
10884e: 83 ec 0c sub $0xc,%esp
108851: 8d 55 d0 lea -0x30(%ebp),%edx
108854: 52 push %edx
108855: ff d0 call *%eax
108857: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &parent_loc );
10885a: 8b 45 c8 mov -0x38(%ebp),%eax
10885d: 85 c0 test %eax,%eax
10885f: 74 13 je 108874 <link+0x11c> <== NEVER TAKEN
108861: 8b 40 1c mov 0x1c(%eax),%eax
108864: 85 c0 test %eax,%eax
108866: 74 0c je 108874 <link+0x11c> <== NEVER TAKEN
108868: 83 ec 0c sub $0xc,%esp
10886b: 8d 55 bc lea -0x44(%ebp),%edx
10886e: 52 push %edx
10886f: ff d0 call *%eax
108871: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EXDEV );
108874: e8 1b b0 00 00 call 113894 <__errno>
108879: c7 00 12 00 00 00 movl $0x12,(%eax)
10887f: eb af jmp 108830 <link+0xd8>
}
if ( !parent_loc.ops->link_h ) {
108881: 8b 45 c8 mov -0x38(%ebp),%eax
108884: 8b 40 08 mov 0x8(%eax),%eax
108887: 85 c0 test %eax,%eax
108889: 75 44 jne 1088cf <link+0x177> <== ALWAYS TAKEN
rtems_filesystem_freenode( &existing_loc );
10888b: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
10888e: 85 c0 test %eax,%eax <== NOT EXECUTED
108890: 74 13 je 1088a5 <link+0x14d> <== NOT EXECUTED
108892: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
108895: 85 c0 test %eax,%eax <== NOT EXECUTED
108897: 74 0c je 1088a5 <link+0x14d> <== NOT EXECUTED
108899: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10889c: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED
10889f: 52 push %edx <== NOT EXECUTED
1088a0: ff d0 call *%eax <== NOT EXECUTED
1088a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
1088a5: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
1088a8: 85 c0 test %eax,%eax <== NOT EXECUTED
1088aa: 74 13 je 1088bf <link+0x167> <== NOT EXECUTED
1088ac: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
1088af: 85 c0 test %eax,%eax <== NOT EXECUTED
1088b1: 74 0c je 1088bf <link+0x167> <== NOT EXECUTED
1088b3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1088b6: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED
1088b9: 52 push %edx <== NOT EXECUTED
1088ba: ff d0 call *%eax <== NOT EXECUTED
1088bc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1088bf: e8 d0 af 00 00 call 113894 <__errno> <== NOT EXECUTED
1088c4: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
1088ca: e9 61 ff ff ff jmp 108830 <link+0xd8> <== NOT EXECUTED
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
1088cf: 52 push %edx
1088d0: ff 75 e4 pushl -0x1c(%ebp)
1088d3: 56 push %esi
1088d4: 8d 5d d0 lea -0x30(%ebp),%ebx
1088d7: 53 push %ebx
1088d8: ff d0 call *%eax
1088da: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &existing_loc );
1088dc: 8b 45 dc mov -0x24(%ebp),%eax
1088df: 83 c4 10 add $0x10,%esp
1088e2: 85 c0 test %eax,%eax
1088e4: 74 10 je 1088f6 <link+0x19e> <== NEVER TAKEN
1088e6: 8b 40 1c mov 0x1c(%eax),%eax
1088e9: 85 c0 test %eax,%eax
1088eb: 74 09 je 1088f6 <link+0x19e> <== NEVER TAKEN
1088ed: 83 ec 0c sub $0xc,%esp
1088f0: 53 push %ebx
1088f1: ff d0 call *%eax
1088f3: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &parent_loc );
1088f6: 8b 45 c8 mov -0x38(%ebp),%eax
1088f9: 85 c0 test %eax,%eax
1088fb: 74 13 je 108910 <link+0x1b8> <== NEVER TAKEN
1088fd: 8b 40 1c mov 0x1c(%eax),%eax
108900: 85 c0 test %eax,%eax
108902: 74 0c je 108910 <link+0x1b8> <== NEVER TAKEN
108904: 83 ec 0c sub $0xc,%esp
108907: 8d 55 bc lea -0x44(%ebp),%edx
10890a: 52 push %edx
10890b: ff d0 call *%eax
10890d: 83 c4 10 add $0x10,%esp
return result;
}
108910: 89 f0 mov %esi,%eax
108912: 8d 65 f4 lea -0xc(%ebp),%esp
108915: 5b pop %ebx
108916: 5e pop %esi
108917: 5f pop %edi
108918: c9 leave
108919: c3 ret
0011c76c <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
11c76c: 55 push %ebp
11c76d: 89 e5 mov %esp,%ebp
11c76f: 57 push %edi
11c770: 56 push %esi
11c771: 53 push %ebx
11c772: 83 ec 1c sub $0x1c,%esp
11c775: 8b 5d 08 mov 0x8(%ebp),%ebx
11c778: 8b 45 0c mov 0xc(%ebp),%eax
11c77b: 8b 55 10 mov 0x10(%ebp),%edx
11c77e: 8b 4d 14 mov 0x14(%ebp),%ecx
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
11c781: 3b 1d 44 01 12 00 cmp 0x120144,%ebx
11c787: 73 0f jae 11c798 <lseek+0x2c> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
11c789: c1 e3 06 shl $0x6,%ebx
11c78c: 03 1d 98 40 12 00 add 0x124098,%ebx
rtems_libio_check_is_open(iop);
11c792: f6 43 15 01 testb $0x1,0x15(%ebx)
11c796: 75 0d jne 11c7a5 <lseek+0x39> <== ALWAYS TAKEN
11c798: e8 67 4c ff ff call 111404 <__errno> <== NOT EXECUTED
11c79d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
11c7a3: eb 61 jmp 11c806 <lseek+0x9a> <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
11c7a5: 8b 73 3c mov 0x3c(%ebx),%esi
11c7a8: 83 7e 14 00 cmpl $0x0,0x14(%esi)
11c7ac: 75 0d jne 11c7bb <lseek+0x4f> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
11c7ae: e8 51 4c ff ff call 111404 <__errno> <== NOT EXECUTED
11c7b3: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
11c7b9: eb 4b jmp 11c806 <lseek+0x9a> <== NOT EXECUTED
/*
* Now process the lseek().
*/
old_offset = iop->offset;
11c7bb: 8b 73 0c mov 0xc(%ebx),%esi
11c7be: 8b 7b 10 mov 0x10(%ebx),%edi
11c7c1: 89 75 e0 mov %esi,-0x20(%ebp)
11c7c4: 89 7d e4 mov %edi,-0x1c(%ebp)
switch ( whence ) {
11c7c7: 83 f9 01 cmp $0x1,%ecx
11c7ca: 74 11 je 11c7dd <lseek+0x71>
11c7cc: 83 f9 02 cmp $0x2,%ecx
11c7cf: 74 18 je 11c7e9 <lseek+0x7d>
11c7d1: 85 c9 test %ecx,%ecx
11c7d3: 75 26 jne 11c7fb <lseek+0x8f>
case SEEK_SET:
iop->offset = offset;
11c7d5: 89 43 0c mov %eax,0xc(%ebx)
11c7d8: 89 53 10 mov %edx,0x10(%ebx)
break;
11c7db: eb 30 jmp 11c80d <lseek+0xa1>
case SEEK_CUR:
iop->offset += offset;
11c7dd: 8b 75 e0 mov -0x20(%ebp),%esi
11c7e0: 8b 7d e4 mov -0x1c(%ebp),%edi
11c7e3: 01 c6 add %eax,%esi
11c7e5: 11 d7 adc %edx,%edi
11c7e7: eb 0a jmp 11c7f3 <lseek+0x87>
break;
case SEEK_END:
iop->offset = iop->size + offset;
11c7e9: 89 c6 mov %eax,%esi
11c7eb: 89 d7 mov %edx,%edi
11c7ed: 03 73 04 add 0x4(%ebx),%esi
11c7f0: 13 7b 08 adc 0x8(%ebx),%edi
11c7f3: 89 73 0c mov %esi,0xc(%ebx)
11c7f6: 89 7b 10 mov %edi,0x10(%ebx)
break;
11c7f9: eb 12 jmp 11c80d <lseek+0xa1>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
11c7fb: e8 04 4c ff ff call 111404 <__errno>
11c800: c7 00 16 00 00 00 movl $0x16,(%eax)
11c806: 83 c8 ff or $0xffffffff,%eax
11c809: 89 c2 mov %eax,%edx
11c80b: eb 23 jmp 11c830 <lseek+0xc4>
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
11c80d: 8b 73 3c mov 0x3c(%ebx),%esi
11c810: 51 push %ecx
11c811: 52 push %edx
11c812: 50 push %eax
11c813: 53 push %ebx
11c814: ff 56 14 call *0x14(%esi)
if ( status == (off_t) -1 )
11c817: 83 c4 10 add $0x10,%esp
11c81a: 83 fa ff cmp $0xffffffff,%edx
11c81d: 75 11 jne 11c830 <lseek+0xc4>
11c81f: 83 f8 ff cmp $0xffffffff,%eax
11c822: 75 0c jne 11c830 <lseek+0xc4> <== NEVER TAKEN
iop->offset = old_offset;
11c824: 8b 75 e0 mov -0x20(%ebp),%esi
11c827: 8b 7d e4 mov -0x1c(%ebp),%edi
11c82a: 89 73 0c mov %esi,0xc(%ebx)
11c82d: 89 7b 10 mov %edi,0x10(%ebx)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
11c830: 8d 65 f4 lea -0xc(%ebp),%esp
11c833: 5b pop %ebx
11c834: 5e pop %esi
11c835: 5f pop %edi
11c836: c9 leave
11c837: c3 ret
0010741c <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
10741c: 55 push %ebp
10741d: 89 e5 mov %esp,%ebp
10741f: 57 push %edi
107420: 56 push %esi
107421: 53 push %ebx
107422: 83 ec 0c sub $0xc,%esp
107425: 8b 75 08 mov 0x8(%ebp),%esi
107428: ff 05 b4 40 12 00 incl 0x1240b4
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
10742e: e8 17 ff ff ff call 10734a <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
107433: 85 f6 test %esi,%esi
107435: 74 7c je 1074b3 <malloc+0x97> <== NEVER TAKEN
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
107437: 83 3d 8c 43 12 00 03 cmpl $0x3,0x12438c
10743e: 75 09 jne 107449 <malloc+0x2d>
107440: e8 af fe ff ff call 1072f4 <malloc_is_system_state_OK>
107445: 84 c0 test %al,%al
107447: 74 6a je 1074b3 <malloc+0x97> <== 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 );
107449: 6a 00 push $0x0
10744b: 6a 00 push $0x0
10744d: 56 push %esi
10744e: ff 35 50 01 12 00 pushl 0x120150
107454: e8 f7 42 00 00 call 10b750 <_Protected_heap_Allocate_aligned_with_boundary>
107459: 89 c3 mov %eax,%ebx
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
10745b: 83 c4 10 add $0x10,%esp
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
return (void *) 0;
10745e: 89 c7 mov %eax,%edi
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
107460: 85 c0 test %eax,%eax
107462: 75 26 jne 10748a <malloc+0x6e>
if (rtems_malloc_sbrk_helpers)
107464: a1 14 25 12 00 mov 0x122514,%eax
107469: 85 c0 test %eax,%eax
10746b: 74 10 je 10747d <malloc+0x61> <== ALWAYS TAKEN
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
10746d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107470: 56 push %esi <== NOT EXECUTED
107471: ff 50 04 call *0x4(%eax) <== NOT EXECUTED
107474: 89 c7 mov %eax,%edi <== NOT EXECUTED
if ( !return_this ) {
107476: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107479: 85 c0 test %eax,%eax <== NOT EXECUTED
10747b: 75 0d jne 10748a <malloc+0x6e> <== NOT EXECUTED
errno = ENOMEM;
10747d: e8 82 9f 00 00 call 111404 <__errno>
107482: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
107488: eb 2b jmp 1074b5 <malloc+0x99>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
10748a: a1 18 25 12 00 mov 0x122518,%eax
10748f: 85 c0 test %eax,%eax
107491: 74 09 je 10749c <malloc+0x80> <== ALWAYS TAKEN
(*rtems_malloc_dirty_helper)( return_this, size );
107493: 52 push %edx <== NOT EXECUTED
107494: 52 push %edx <== NOT EXECUTED
107495: 56 push %esi <== NOT EXECUTED
107496: 57 push %edi <== NOT EXECUTED
107497: ff 10 call *(%eax) <== NOT EXECUTED
107499: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
10749c: a1 10 25 12 00 mov 0x122510,%eax
1074a1: 89 fb mov %edi,%ebx
1074a3: 85 c0 test %eax,%eax
1074a5: 74 0e je 1074b5 <malloc+0x99> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
1074a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1074aa: 57 push %edi <== NOT EXECUTED
1074ab: ff 50 04 call *0x4(%eax) <== NOT EXECUTED
1074ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1074b1: eb 02 jmp 1074b5 <malloc+0x99> <== NOT EXECUTED
1074b3: 31 db xor %ebx,%ebx <== NOT EXECUTED
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
1074b5: 89 d8 mov %ebx,%eax
1074b7: 8d 65 f4 lea -0xc(%ebp),%esp
1074ba: 5b pop %ebx
1074bb: 5e pop %esi
1074bc: 5f pop %edi
1074bd: c9 leave
1074be: c3 ret
00107332 <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
107332: 55 push %ebp <== NOT EXECUTED
107333: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107335: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
107338: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10733b: 68 a4 40 12 00 push $0x1240a4 <== NOT EXECUTED
107340: e8 0b 35 00 00 call 10a850 <_Chain_Append> <== NOT EXECUTED
107345: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer);
}
107348: c9 leave <== NOT EXECUTED
107349: c3 ret <== NOT EXECUTED
0010734a <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
10734a: 55 push %ebp
10734b: 89 e5 mov %esp,%ebp
10734d: 83 ec 08 sub $0x8,%esp
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
107350: eb 0c jmp 10735e <malloc_deferred_frees_process+0x14>
free(to_be_freed);
107352: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107355: 50 push %eax <== NOT EXECUTED
107356: e8 95 fe ff ff call 1071f0 <free> <== NOT EXECUTED
10735b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10735e: 83 ec 0c sub $0xc,%esp
107361: 68 a4 40 12 00 push $0x1240a4
107366: e8 09 35 00 00 call 10a874 <_Chain_Get>
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
10736b: 83 c4 10 add $0x10,%esp
10736e: 85 c0 test %eax,%eax
107370: 75 e0 jne 107352 <malloc_deferred_frees_process+0x8><== NEVER TAKEN
free(to_be_freed);
}
107372: c9 leave
107373: c3 ret
001072f4 <malloc_is_system_state_OK>:
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
1072f4: 55 push %ebp
1072f5: 89 e5 mov %esp,%ebp
if ( _Thread_Dispatch_disable_level > 0 )
1072f7: 8b 15 f4 41 12 00 mov 0x1241f4,%edx
1072fd: 31 c0 xor %eax,%eax
1072ff: 85 d2 test %edx,%edx
107301: 75 0a jne 10730d <malloc_is_system_state_OK+0x19><== NEVER TAKEN
return false;
if ( _ISR_Nest_level > 0 )
107303: a1 8c 42 12 00 mov 0x12428c,%eax
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
107308: 85 c0 test %eax,%eax
10730a: 0f 94 c0 sete %al
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
10730d: c9 leave
10730e: c3 ret
00113f50 <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
113f50: 55 push %ebp
113f51: 89 e5 mov %esp,%ebp
113f53: 83 ec 10 sub $0x10,%esp
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
113f56: ff 35 b8 8d 12 00 pushl 0x128db8
113f5c: 6a 01 push $0x1
113f5e: e8 5d 42 ff ff call 1081c0 <calloc>
if ( memory )
113f63: 83 c4 10 add $0x10,%esp
113f66: 85 c0 test %eax,%eax
113f68: 74 06 je 113f70 <memfile_alloc_block+0x20><== NEVER TAKEN
memfile_blocks_allocated++;
113f6a: ff 05 58 8f 12 00 incl 0x128f58
return memory;
}
113f70: c9 leave
113f71: c3 ret
001142d8 <memfile_check_rmnod>:
return memfile_check_rmnod( the_jnode );
}
int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
1142d8: 55 push %ebp
1142d9: 89 e5 mov %esp,%ebp
1142db: 53 push %ebx
1142dc: 83 ec 10 sub $0x10,%esp
1142df: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* The file cannot be open and the link must be less than 1 to free.
*/
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
1142e2: 53 push %ebx
1142e3: e8 b6 df ff ff call 11229e <rtems_libio_is_file_open>
1142e8: 83 c4 10 add $0x10,%esp
1142eb: 85 c0 test %eax,%eax
1142ed: 75 36 jne 114325 <memfile_check_rmnod+0x4d>
1142ef: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx)
1142f4: 75 2f jne 114325 <memfile_check_rmnod+0x4d><== NEVER TAKEN
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
1142f6: a1 34 6f 12 00 mov 0x126f34,%eax
1142fb: 39 58 04 cmp %ebx,0x4(%eax)
1142fe: 75 07 jne 114307 <memfile_check_rmnod+0x2f><== ALWAYS TAKEN
rtems_filesystem_current.node_access = NULL;
114300: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if (the_jnode->type != IMFS_LINEAR_FILE)
114307: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx)
11430b: 74 0c je 114319 <memfile_check_rmnod+0x41><== NEVER TAKEN
IMFS_memfile_remove( the_jnode );
11430d: 83 ec 0c sub $0xc,%esp
114310: 53 push %ebx
114311: e8 98 fe ff ff call 1141ae <IMFS_memfile_remove>
114316: 83 c4 10 add $0x10,%esp
free( the_jnode );
114319: 83 ec 0c sub $0xc,%esp
11431c: 53 push %ebx
11431d: e8 96 40 ff ff call 1083b8 <free>
114322: 83 c4 10 add $0x10,%esp
}
return 0;
}
114325: 31 c0 xor %eax,%eax
114327: 8b 5d fc mov -0x4(%ebp),%ebx
11432a: c9 leave
11432b: c3 ret
001140f9 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
1140f9: 55 push %ebp
1140fa: 89 e5 mov %esp,%ebp
1140fc: 57 push %edi
1140fd: 56 push %esi
1140fe: 53 push %ebx
1140ff: 83 ec 0c sub $0xc,%esp
114102: 8b 75 08 mov 0x8(%ebp),%esi
/*
* Perform internal consistency checks
*/
assert( block_table );
114105: 85 f6 test %esi,%esi
114107: 75 19 jne 114122 <memfile_free_blocks_in_table+0x29><== ALWAYS TAKEN
114109: 68 a0 39 12 00 push $0x1239a0 <== NOT EXECUTED
11410e: 68 94 3a 12 00 push $0x123a94 <== NOT EXECUTED
114113: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED
114118: 68 36 39 12 00 push $0x123936 <== NOT EXECUTED
11411d: e8 6a 3f ff ff call 10808c <__assert_func> <== NOT EXECUTED
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
114122: 8b 3e mov (%esi),%edi
114124: 31 db xor %ebx,%ebx
for ( i=0 ; i<entries ; i++ ) {
114126: eb 1b jmp 114143 <memfile_free_blocks_in_table+0x4a>
if ( b[i] ) {
114128: 8b 04 9f mov (%edi,%ebx,4),%eax
11412b: 85 c0 test %eax,%eax
11412d: 74 13 je 114142 <memfile_free_blocks_in_table+0x49>
memfile_free_block( b[i] );
11412f: 83 ec 0c sub $0xc,%esp
114132: 50 push %eax
114133: e8 ff fd ff ff call 113f37 <memfile_free_block>
b[i] = 0;
114138: c7 04 9f 00 00 00 00 movl $0x0,(%edi,%ebx,4)
11413f: 83 c4 10 add $0x10,%esp
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
114142: 43 inc %ebx
114143: 3b 5d 0c cmp 0xc(%ebp),%ebx
114146: 7c e0 jl 114128 <memfile_free_blocks_in_table+0x2f>
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
114148: 83 ec 0c sub $0xc,%esp
11414b: ff 36 pushl (%esi)
11414d: e8 e5 fd ff ff call 113f37 <memfile_free_block>
*block_table = 0;
114152: c7 06 00 00 00 00 movl $0x0,(%esi)
114158: 83 c4 10 add $0x10,%esp
}
11415b: 8d 65 f4 lea -0xc(%ebp),%esp
11415e: 5b pop %ebx
11415f: 5e pop %esi
114160: 5f pop %edi
114161: c9 leave
114162: c3 ret
00114539 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
114539: 55 push %ebp
11453a: 89 e5 mov %esp,%ebp
11453c: 53 push %ebx
11453d: 83 ec 14 sub $0x14,%esp
114540: 8b 4d 08 mov 0x8(%ebp),%ecx
114543: 8b 45 0c mov 0xc(%ebp),%eax
114546: 8b 55 10 mov 0x10(%ebp),%edx
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
114549: 8b 59 38 mov 0x38(%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 )
11454c: 3b 53 54 cmp 0x54(%ebx),%edx
11454f: 7c 12 jl 114563 <memfile_ftruncate+0x2a><== NEVER TAKEN
114551: 7f 05 jg 114558 <memfile_ftruncate+0x1f><== NEVER TAKEN
114553: 3b 43 50 cmp 0x50(%ebx),%eax
114556: 76 0b jbe 114563 <memfile_ftruncate+0x2a><== ALWAYS TAKEN
return IMFS_memfile_extend( the_jnode, length );
114558: 51 push %ecx <== NOT EXECUTED
114559: 52 push %edx <== NOT EXECUTED
11455a: 50 push %eax <== NOT EXECUTED
11455b: 53 push %ebx <== NOT EXECUTED
11455c: e8 b2 fe ff ff call 114413 <IMFS_memfile_extend> <== NOT EXECUTED
114561: eb 21 jmp 114584 <memfile_ftruncate+0x4b><== NOT EXECUTED
* 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;
114563: 89 43 50 mov %eax,0x50(%ebx)
114566: 89 53 54 mov %edx,0x54(%ebx)
iop->size = the_jnode->info.file.size;
114569: 89 41 04 mov %eax,0x4(%ecx)
11456c: 89 51 08 mov %edx,0x8(%ecx)
IMFS_update_atime( the_jnode );
11456f: 52 push %edx
114570: 52 push %edx
114571: 6a 00 push $0x0
114573: 8d 45 f0 lea -0x10(%ebp),%eax
114576: 50 push %eax
114577: e8 b4 3e ff ff call 108430 <gettimeofday>
11457c: 8b 45 f0 mov -0x10(%ebp),%eax
11457f: 89 43 40 mov %eax,0x40(%ebx)
114582: 31 c0 xor %eax,%eax
return 0;
114584: 83 c4 10 add $0x10,%esp
}
114587: 8b 5d fc mov -0x4(%ebp),%ebx
11458a: c9 leave
11458b: c3 ret
0011458c <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
11458c: 55 push %ebp
11458d: 89 e5 mov %esp,%ebp
11458f: 56 push %esi
114590: 53 push %ebx
114591: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
114594: 8b 73 38 mov 0x38(%ebx),%esi
if (the_jnode->type == IMFS_LINEAR_FILE) {
114597: 83 7e 4c 06 cmpl $0x6,0x4c(%esi)
11459b: 75 1a jne 1145b7 <memfile_lseek+0x2b> <== ALWAYS TAKEN
if (iop->offset > the_jnode->info.linearfile.size)
11459d: 8b 56 50 mov 0x50(%esi),%edx <== NOT EXECUTED
1145a0: 8b 46 54 mov 0x54(%esi),%eax <== NOT EXECUTED
1145a3: 39 43 10 cmp %eax,0x10(%ebx) <== NOT EXECUTED
1145a6: 7c 41 jl 1145e9 <memfile_lseek+0x5d> <== NOT EXECUTED
1145a8: 7f 05 jg 1145af <memfile_lseek+0x23> <== NOT EXECUTED
1145aa: 39 53 0c cmp %edx,0xc(%ebx) <== NOT EXECUTED
1145ad: 76 3a jbe 1145e9 <memfile_lseek+0x5d> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
1145af: 89 53 0c mov %edx,0xc(%ebx) <== NOT EXECUTED
1145b2: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED
1145b5: eb 32 jmp 1145e9 <memfile_lseek+0x5d> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
1145b7: 50 push %eax
1145b8: ff 73 10 pushl 0x10(%ebx)
1145bb: ff 73 0c pushl 0xc(%ebx)
1145be: 56 push %esi
1145bf: e8 4f fe ff ff call 114413 <IMFS_memfile_extend>
1145c4: 83 c4 10 add $0x10,%esp
1145c7: 85 c0 test %eax,%eax
1145c9: 74 12 je 1145dd <memfile_lseek+0x51> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
1145cb: e8 98 16 00 00 call 115c68 <__errno> <== NOT EXECUTED
1145d0: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
1145d6: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1145d9: 89 c2 mov %eax,%edx <== NOT EXECUTED
1145db: eb 12 jmp 1145ef <memfile_lseek+0x63> <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
1145dd: 8b 46 50 mov 0x50(%esi),%eax
1145e0: 8b 56 54 mov 0x54(%esi),%edx
1145e3: 89 43 04 mov %eax,0x4(%ebx)
1145e6: 89 53 08 mov %edx,0x8(%ebx)
}
return iop->offset;
1145e9: 8b 43 0c mov 0xc(%ebx),%eax
1145ec: 8b 53 10 mov 0x10(%ebx),%edx
}
1145ef: 8d 65 f8 lea -0x8(%ebp),%esp
1145f2: 5b pop %ebx
1145f3: 5e pop %esi
1145f4: c9 leave
1145f5: c3 ret
0011481b <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
11481b: 55 push %ebp
11481c: 89 e5 mov %esp,%ebp
11481e: 56 push %esi
11481f: 53 push %ebx
114820: 8b 75 08 mov 0x8(%ebp),%esi
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
114823: 8b 5e 38 mov 0x38(%esi),%ebx
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
114826: f7 46 14 04 02 00 00 testl $0x204,0x14(%esi)
11482d: 74 54 je 114883 <memfile_open+0x68>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
11482f: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx)
114833: 75 4e jne 114883 <memfile_open+0x68> <== ALWAYS TAKEN
uint32_t count = the_jnode->info.linearfile.size;
114835: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
114838: 8b 53 58 mov 0x58(%ebx),%edx <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
11483b: c7 43 4c 05 00 00 00 movl $0x5,0x4c(%ebx) <== NOT EXECUTED
the_jnode->info.file.size = 0;
114842: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED
114849: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
114850: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
114857: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
11485e: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) <== NOT EXECUTED
if ((count != 0)
114865: 85 c0 test %eax,%eax <== NOT EXECUTED
114867: 74 1a je 114883 <memfile_open+0x68> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
114869: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11486c: 50 push %eax <== NOT EXECUTED
11486d: 52 push %edx <== NOT EXECUTED
11486e: 6a 00 push $0x0 <== NOT EXECUTED
114870: 6a 00 push $0x0 <== NOT EXECUTED
114872: 53 push %ebx <== NOT EXECUTED
114873: e8 7e fd ff ff call 1145f6 <IMFS_memfile_write> <== NOT EXECUTED
114878: 89 c2 mov %eax,%edx <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
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)
11487a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11487d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
114880: 42 inc %edx <== NOT EXECUTED
114881: 74 20 je 1148a3 <memfile_open+0x88> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
114883: f6 46 15 02 testb $0x2,0x15(%esi)
114887: 74 0c je 114895 <memfile_open+0x7a>
iop->offset = the_jnode->info.file.size;
114889: 8b 43 50 mov 0x50(%ebx),%eax
11488c: 8b 53 54 mov 0x54(%ebx),%edx
11488f: 89 46 0c mov %eax,0xc(%esi)
114892: 89 56 10 mov %edx,0x10(%esi)
iop->size = the_jnode->info.file.size;
114895: 8b 43 50 mov 0x50(%ebx),%eax
114898: 8b 53 54 mov 0x54(%ebx),%edx
11489b: 89 46 04 mov %eax,0x4(%esi)
11489e: 89 56 08 mov %edx,0x8(%esi)
1148a1: 31 c0 xor %eax,%eax
return 0;
}
1148a3: 8d 65 f8 lea -0x8(%ebp),%esp
1148a6: 5b pop %ebx
1148a7: 5e pop %esi
1148a8: c9 leave
1148a9: c3 ret
0011432c <memfile_rmnod>:
int memfile_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
11432c: 55 push %ebp
11432d: 89 e5 mov %esp,%ebp
11432f: 53 push %ebx
114330: 83 ec 14 sub $0x14,%esp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
114333: 8b 45 0c mov 0xc(%ebp),%eax
114336: 8b 18 mov (%eax),%ebx
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
114338: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
11433c: 74 13 je 114351 <memfile_rmnod+0x25> <== NEVER TAKEN
11433e: 83 ec 0c sub $0xc,%esp
114341: 53 push %ebx
114342: e8 75 7b ff ff call 10bebc <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
114347: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
11434e: 83 c4 10 add $0x10,%esp
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
114351: 66 ff 4b 34 decw 0x34(%ebx)
IMFS_update_ctime( the_jnode );
114355: 50 push %eax
114356: 50 push %eax
114357: 6a 00 push $0x0
114359: 8d 45 f0 lea -0x10(%ebp),%eax
11435c: 50 push %eax
11435d: e8 ce 40 ff ff call 108430 <gettimeofday>
114362: 8b 45 f0 mov -0x10(%ebp),%eax
114365: 89 43 48 mov %eax,0x48(%ebx)
return memfile_check_rmnod( the_jnode );
114368: 89 1c 24 mov %ebx,(%esp)
11436b: e8 68 ff ff ff call 1142d8 <memfile_check_rmnod>
}
114370: 8b 5d fc mov -0x4(%ebp),%ebx
114373: c9 leave
114374: c3 ret
001074dc <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
1074dc: 55 push %ebp
1074dd: 89 e5 mov %esp,%ebp
1074df: 57 push %edi
1074e0: 56 push %esi
1074e1: 53 push %ebx
1074e2: 83 ec 3c sub $0x3c,%esp
1074e5: 8b 45 08 mov 0x8(%ebp),%eax
1074e8: 8b 5d 0c mov 0xc(%ebp),%ebx
1074eb: 8b 55 10 mov 0x10(%ebp),%edx
1074ee: 8b 4d 14 mov 0x14(%ebp),%ecx
1074f1: 89 55 c0 mov %edx,-0x40(%ebp)
1074f4: 89 4d c4 mov %ecx,-0x3c(%ebp)
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
1074f7: 66 f7 c3 00 f0 test $0xf000,%bx
1074fc: 75 0d jne 10750b <mknod+0x2f> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
1074fe: e8 01 9f 00 00 call 111404 <__errno> <== NOT EXECUTED
107503: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107509: eb 4f jmp 10755a <mknod+0x7e> <== NOT EXECUTED
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
10750b: 8a 10 mov (%eax),%dl
10750d: 80 fa 5c cmp $0x5c,%dl
107510: 74 09 je 10751b <mknod+0x3f> <== NEVER TAKEN
107512: 80 fa 2f cmp $0x2f,%dl
107515: 74 04 je 10751b <mknod+0x3f>
107517: 84 d2 test %dl,%dl
107519: 75 17 jne 107532 <mknod+0x56> <== ALWAYS TAKEN
10751b: 8d 7d d0 lea -0x30(%ebp),%edi
10751e: 8b 35 48 1f 12 00 mov 0x121f48,%esi
107524: 83 c6 18 add $0x18,%esi
107527: b9 05 00 00 00 mov $0x5,%ecx
10752c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10752e: b1 01 mov $0x1,%cl
107530: eb 13 jmp 107545 <mknod+0x69>
107532: 8d 7d d0 lea -0x30(%ebp),%edi
107535: 8b 35 48 1f 12 00 mov 0x121f48,%esi
10753b: 83 c6 04 add $0x4,%esi
10753e: b9 05 00 00 00 mov $0x5,%ecx
107543: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !temp_loc.ops->evalformake_h ) {
107545: 8b 55 dc mov -0x24(%ebp),%edx
107548: 8b 52 04 mov 0x4(%edx),%edx
10754b: 85 d2 test %edx,%edx
10754d: 75 10 jne 10755f <mknod+0x83> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
10754f: e8 b0 9e 00 00 call 111404 <__errno> <== NOT EXECUTED
107554: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10755a: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED
10755d: eb 60 jmp 1075bf <mknod+0xe3> <== NOT EXECUTED
}
result = (*temp_loc.ops->evalformake_h)(
10755f: 56 push %esi
107560: 8d 75 e4 lea -0x1c(%ebp),%esi
107563: 56 push %esi
107564: 8d 75 d0 lea -0x30(%ebp),%esi
107567: 56 push %esi
107568: 01 c8 add %ecx,%eax
10756a: 50 push %eax
10756b: ff d2 call *%edx
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
10756d: 83 c4 10 add $0x10,%esp
107570: 83 cf ff or $0xffffffff,%edi
107573: 85 c0 test %eax,%eax
107575: 75 48 jne 1075bf <mknod+0xe3>
return -1;
if ( !temp_loc.ops->mknod_h ) {
107577: 8b 55 dc mov -0x24(%ebp),%edx
10757a: 8b 42 14 mov 0x14(%edx),%eax
10757d: 85 c0 test %eax,%eax
10757f: 75 12 jne 107593 <mknod+0xb7> <== ALWAYS TAKEN
rtems_filesystem_freenode( &temp_loc );
107581: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
107584: 85 c0 test %eax,%eax <== NOT EXECUTED
107586: 74 c7 je 10754f <mknod+0x73> <== NOT EXECUTED
107588: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10758b: 56 push %esi <== NOT EXECUTED
10758c: ff d0 call *%eax <== NOT EXECUTED
10758e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107591: eb bc jmp 10754f <mknod+0x73> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
107593: 83 ec 0c sub $0xc,%esp
107596: 56 push %esi
107597: ff 75 c4 pushl -0x3c(%ebp)
10759a: ff 75 c0 pushl -0x40(%ebp)
10759d: 53 push %ebx
10759e: ff 75 e4 pushl -0x1c(%ebp)
1075a1: ff d0 call *%eax
1075a3: 89 c7 mov %eax,%edi
rtems_filesystem_freenode( &temp_loc );
1075a5: 8b 45 dc mov -0x24(%ebp),%eax
1075a8: 83 c4 20 add $0x20,%esp
1075ab: 85 c0 test %eax,%eax
1075ad: 74 10 je 1075bf <mknod+0xe3> <== NEVER TAKEN
1075af: 8b 40 1c mov 0x1c(%eax),%eax
1075b2: 85 c0 test %eax,%eax
1075b4: 74 09 je 1075bf <mknod+0xe3>
1075b6: 83 ec 0c sub $0xc,%esp
1075b9: 56 push %esi
1075ba: ff d0 call *%eax
1075bc: 83 c4 10 add $0x10,%esp
return result;
}
1075bf: 89 f8 mov %edi,%eax
1075c1: 8d 65 f4 lea -0xc(%ebp),%esp
1075c4: 5b pop %ebx
1075c5: 5e pop %esi
1075c6: 5f pop %edi
1075c7: c9 leave
1075c8: c3 ret
001075f1 <mount>:
const rtems_filesystem_operations_table *fs_ops,
rtems_filesystem_options_t options,
const char *device,
const char *mount_point
)
{
1075f1: 55 push %ebp
1075f2: 89 e5 mov %esp,%ebp
1075f4: 57 push %edi
1075f5: 56 push %esi
1075f6: 53 push %ebx
1075f7: 83 ec 3c sub $0x3c,%esp
1075fa: 8b 75 14 mov 0x14(%ebp),%esi
/*
* Is there a file system operations table?
*/
if ( fs_ops == NULL ) {
1075fd: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
107601: 74 06 je 107609 <mount+0x18>
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
107603: 83 7d 10 01 cmpl $0x1,0x10(%ebp)
107607: 76 10 jbe 107619 <mount+0x28>
options != RTEMS_FILESYSTEM_READ_WRITE ) {
errno = EINVAL;
107609: e8 f6 9d 00 00 call 111404 <__errno>
10760e: c7 00 16 00 00 00 movl $0x16,(%eax)
107614: e9 ea 01 00 00 jmp 107803 <mount+0x212>
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
107619: 8b 45 0c mov 0xc(%ebp),%eax
10761c: 83 78 24 00 cmpl $0x0,0x24(%eax)
107620: 75 19 jne 10763b <mount+0x4a> <== ALWAYS TAKEN
errno = ENOTSUP;
107622: e8 dd 9d 00 00 call 111404 <__errno> <== NOT EXECUTED
107627: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10762d: 31 f6 xor %esi,%esi <== NOT EXECUTED
10762f: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) <== NOT EXECUTED
goto cleanup_and_bail;
107636: e9 9a 01 00 00 jmp 1077d5 <mount+0x1e4> <== NOT EXECUTED
/*
* Allocate a mount table entry
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
10763b: b9 6c 00 00 00 mov $0x6c,%ecx
107640: 85 f6 test %esi,%esi
107642: 74 0e je 107652 <mount+0x61> <== ALWAYS TAKEN
size += strlen( device ) + 1;
107644: 31 c0 xor %eax,%eax <== NOT EXECUTED
107646: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED
107649: 89 f7 mov %esi,%edi <== NOT EXECUTED
10764b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
10764d: f7 d1 not %ecx <== NOT EXECUTED
10764f: 83 c1 6c add $0x6c,%ecx <== NOT EXECUTED
temp_mt_entry = malloc( size );
107652: 83 ec 0c sub $0xc,%esp
107655: 51 push %ecx
107656: e8 c1 fd ff ff call 10741c <malloc>
10765b: 89 c3 mov %eax,%ebx
10765d: 89 45 c4 mov %eax,-0x3c(%ebp)
if ( !temp_mt_entry ) {
107660: 83 c4 10 add $0x10,%esp
107663: 85 c0 test %eax,%eax
107665: 75 10 jne 107677 <mount+0x86> <== ALWAYS TAKEN
errno = ENOMEM;
107667: e8 98 9d 00 00 call 111404 <__errno> <== NOT EXECUTED
10766c: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107672: e9 8c 01 00 00 jmp 107803 <mount+0x212> <== NOT EXECUTED
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
107677: 89 43 2c mov %eax,0x2c(%ebx)
temp_mt_entry->options = options;
10767a: 8b 55 10 mov 0x10(%ebp),%edx
10767d: 89 50 30 mov %edx,0x30(%eax)
if ( device ) {
107680: 85 f6 test %esi,%esi
107682: 74 14 je 107698 <mount+0xa7> <== ALWAYS TAKEN
temp_mt_entry->dev =
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
107684: 8d 40 6c lea 0x6c(%eax),%eax <== NOT EXECUTED
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
if ( device ) {
temp_mt_entry->dev =
107687: 89 43 68 mov %eax,0x68(%ebx) <== NOT EXECUTED
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
strcpy( temp_mt_entry->dev, device );
10768a: 52 push %edx <== NOT EXECUTED
10768b: 52 push %edx <== NOT EXECUTED
10768c: 56 push %esi <== NOT EXECUTED
10768d: 50 push %eax <== NOT EXECUTED
10768e: e8 e5 a8 00 00 call 111f78 <strcpy> <== NOT EXECUTED
107693: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107696: eb 07 jmp 10769f <mount+0xae> <== NOT EXECUTED
} else
temp_mt_entry->dev = 0;
107698: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( mount_point ) {
10769f: 83 7d 18 00 cmpl $0x0,0x18(%ebp)
1076a3: 0f 84 b0 00 00 00 je 107759 <mount+0x168>
if ( rtems_filesystem_evaluate_path(
mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
1076a9: 31 c0 xor %eax,%eax
1076ab: 83 c9 ff or $0xffffffff,%ecx
1076ae: 8b 7d 18 mov 0x18(%ebp),%edi
1076b1: f2 ae repnz scas %es:(%edi),%al
1076b3: f7 d1 not %ecx
1076b5: 49 dec %ecx
* permissions in the existing tree.
*/
if ( mount_point ) {
if ( rtems_filesystem_evaluate_path(
1076b6: 83 ec 0c sub $0xc,%esp
1076b9: 6a 01 push $0x1
1076bb: 8d 75 d4 lea -0x2c(%ebp),%esi
1076be: 56 push %esi
1076bf: 6a 07 push $0x7
1076c1: 51 push %ecx
1076c2: ff 75 18 pushl 0x18(%ebp)
1076c5: e8 7e fa ff ff call 107148 <rtems_filesystem_evaluate_path>
1076ca: 83 c4 20 add $0x20,%esp
1076cd: 40 inc %eax
1076ce: 0f 84 ff 00 00 00 je 1077d3 <mount+0x1e2> <== NEVER TAKEN
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
1076d4: 8b 45 e0 mov -0x20(%ebp),%eax
1076d7: 8b 40 10 mov 0x10(%eax),%eax
1076da: 85 c0 test %eax,%eax
1076dc: 75 10 jne 1076ee <mount+0xfd> <== ALWAYS TAKEN
errno = ENOTSUP;
1076de: e8 21 9d 00 00 call 111404 <__errno> <== NOT EXECUTED
1076e3: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
goto cleanup_and_bail;
1076e9: e9 e7 00 00 00 jmp 1077d5 <mount+0x1e4> <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
1076ee: 83 ec 0c sub $0xc,%esp
1076f1: 56 push %esi
1076f2: ff d0 call *%eax
1076f4: 83 c4 10 add $0x10,%esp
1076f7: 48 dec %eax
1076f8: 74 10 je 10770a <mount+0x119>
errno = ENOTDIR;
1076fa: e8 05 9d 00 00 call 111404 <__errno>
1076ff: c7 00 14 00 00 00 movl $0x14,(%eax)
goto cleanup_and_bail;
107705: e9 cb 00 00 00 jmp 1077d5 <mount+0x1e4>
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
10770a: a1 dc 40 12 00 mov 0x1240dc,%eax
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node;
if ( the_mount_entry->mt_fs_root.node_access == loc->node_access )
10770f: 8b 55 d4 mov -0x2c(%ebp),%edx
107712: eb 07 jmp 10771b <mount+0x12a>
107714: 39 50 1c cmp %edx,0x1c(%eax)
107717: 74 0e je 107727 <mount+0x136>
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
107719: 8b 00 mov (%eax),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10771b: 3d e0 40 12 00 cmp $0x1240e0,%eax
107720: 75 f2 jne 107714 <mount+0x123>
107722: e9 e7 00 00 00 jmp 10780e <mount+0x21d>
/*
* You can only mount one file system onto a single mount point.
*/
if ( Is_node_fs_root( &loc ) ){
errno = EBUSY;
107727: e8 d8 9c 00 00 call 111404 <__errno>
10772c: c7 00 10 00 00 00 movl $0x10,(%eax)
107732: eb 0b jmp 10773f <mount+0x14e>
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
errno = ENOTSUP;
107734: e8 cb 9c 00 00 call 111404 <__errno> <== NOT EXECUTED
107739: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10773f: 8d 75 d4 lea -0x2c(%ebp),%esi
goto cleanup_and_bail;
107742: e9 8e 00 00 00 jmp 1077d5 <mount+0x1e4>
}
if ( loc.ops->mount_h( temp_mt_entry ) ) {
107747: 83 ec 0c sub $0xc,%esp
10774a: 53 push %ebx
10774b: ff d0 call *%eax
10774d: 83 c4 10 add $0x10,%esp
107750: 85 c0 test %eax,%eax
107752: 8d 75 d4 lea -0x2c(%ebp),%esi
107755: 74 35 je 10778c <mount+0x19b> <== ALWAYS TAKEN
107757: eb 7c jmp 1077d5 <mount+0x1e4> <== NOT EXECUTED
* This is a mount of the base file system --> The
* mt_point_node.node_access will be set to null to indicate that this
* is the root of the entire file system.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
107759: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
temp_mt_entry->mt_fs_root.handlers = NULL;
107760: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
temp_mt_entry->mt_fs_root.ops = NULL;
107767: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx)
temp_mt_entry->mt_point_node.node_access = NULL;
10776e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
temp_mt_entry->mt_point_node.handlers = NULL;
107775: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
temp_mt_entry->mt_point_node.ops = NULL;
10777c: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
temp_mt_entry->mt_point_node.mt_entry = NULL;
107783: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
10778a: 31 f6 xor %esi,%esi
}
if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
10778c: 83 ec 0c sub $0xc,%esp
10778f: 53 push %ebx
107790: 8b 55 0c mov 0xc(%ebp),%edx
107793: ff 52 24 call *0x24(%edx)
107796: 83 c4 10 add $0x10,%esp
107799: 85 c0 test %eax,%eax
10779b: 74 15 je 1077b2 <mount+0x1c1> <== ALWAYS TAKEN
/* try to undo the mount operation */
if ( loc.ops->unmount_h ) {
10779d: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
1077a0: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
1077a3: 85 c0 test %eax,%eax <== NOT EXECUTED
1077a5: 74 2e je 1077d5 <mount+0x1e4> <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
1077a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1077aa: 53 push %ebx <== NOT EXECUTED
1077ab: ff d0 call *%eax <== NOT EXECUTED
1077ad: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1077b0: eb 23 jmp 1077d5 <mount+0x1e4> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
1077b2: 50 push %eax
1077b3: 50 push %eax
1077b4: 53 push %ebx
1077b5: 68 dc 40 12 00 push $0x1240dc
1077ba: e8 91 30 00 00 call 10a850 <_Chain_Append>
*/
rtems_chain_append( &rtems_filesystem_mount_table_control,
&temp_mt_entry->Node );
if ( mt_entry )
1077bf: 83 c4 10 add $0x10,%esp
1077c2: 31 c0 xor %eax,%eax
1077c4: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
1077c8: 74 3c je 107806 <mount+0x215> <== NEVER TAKEN
*mt_entry = temp_mt_entry;
1077ca: 8b 45 08 mov 0x8(%ebp),%eax
1077cd: 89 18 mov %ebx,(%eax)
1077cf: 31 c0 xor %eax,%eax
1077d1: eb 33 jmp 107806 <mount+0x215>
1077d3: 31 f6 xor %esi,%esi <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
1077d5: 83 ec 0c sub $0xc,%esp
1077d8: ff 75 c4 pushl -0x3c(%ebp)
1077db: e8 10 fa ff ff call 1071f0 <free>
if ( loc_to_free )
1077e0: 83 c4 10 add $0x10,%esp
1077e3: 85 f6 test %esi,%esi
1077e5: 74 1c je 107803 <mount+0x212> <== NEVER TAKEN
rtems_filesystem_freenode( loc_to_free );
1077e7: 8b 46 0c mov 0xc(%esi),%eax
1077ea: 85 c0 test %eax,%eax
1077ec: 74 15 je 107803 <mount+0x212> <== NEVER TAKEN
1077ee: 8b 40 1c mov 0x1c(%eax),%eax
1077f1: 85 c0 test %eax,%eax
1077f3: 74 0e je 107803 <mount+0x212> <== NEVER TAKEN
1077f5: 83 ec 0c sub $0xc,%esp
1077f8: 56 push %esi
1077f9: ff d0 call *%eax
1077fb: 83 c8 ff or $0xffffffff,%eax
1077fe: 83 c4 10 add $0x10,%esp
107801: eb 03 jmp 107806 <mount+0x215>
107803: 83 c8 ff or $0xffffffff,%eax
return -1;
}
107806: 8d 65 f4 lea -0xc(%ebp),%esp
107809: 5b pop %ebx
10780a: 5e pop %esi
10780b: 5f pop %edi
10780c: c9 leave
10780d: c3 ret
* 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.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
10780e: 89 53 08 mov %edx,0x8(%ebx)
temp_mt_entry->mt_point_node.handlers = loc.handlers;
107811: 8b 45 dc mov -0x24(%ebp),%eax
107814: 89 43 10 mov %eax,0x10(%ebx)
temp_mt_entry->mt_point_node.ops = loc.ops;
107817: 8b 45 e0 mov -0x20(%ebp),%eax
10781a: 89 43 14 mov %eax,0x14(%ebx)
temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
10781d: 8b 55 e4 mov -0x1c(%ebp),%edx
107820: 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 ){
107823: 8b 40 20 mov 0x20(%eax),%eax
107826: 85 c0 test %eax,%eax
107828: 0f 85 19 ff ff ff jne 107747 <mount+0x156> <== ALWAYS TAKEN
10782e: e9 01 ff ff ff jmp 107734 <mount+0x143> <== NOT EXECUTED
0011d4ac <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
11d4ac: 55 push %ebp
11d4ad: 89 e5 mov %esp,%ebp
11d4af: 56 push %esi
11d4b0: 53 push %ebx
11d4b1: 8b 75 08 mov 0x8(%ebp),%esi
11d4b4: 8b 5d 0c mov 0xc(%ebp),%ebx
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
11d4b7: 83 ec 0c sub $0xc,%esp
11d4ba: 56 push %esi
11d4bb: e8 44 01 00 00 call 11d604 <_Timespec_Is_valid>
11d4c0: 83 c4 10 add $0x10,%esp
11d4c3: 84 c0 test %al,%al
11d4c5: 74 0b je 11d4d2 <nanosleep+0x26>
* Return EINVAL if the delay interval is negative.
*
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 )
11d4c7: 83 3e 00 cmpl $0x0,(%esi)
11d4ca: 78 06 js 11d4d2 <nanosleep+0x26> <== NEVER TAKEN
11d4cc: 83 7e 04 00 cmpl $0x0,0x4(%esi)
11d4d0: 79 10 jns 11d4e2 <nanosleep+0x36> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
11d4d2: e8 41 43 ff ff call 111818 <__errno>
11d4d7: c7 00 16 00 00 00 movl $0x16,(%eax)
11d4dd: e9 c4 00 00 00 jmp 11d5a6 <nanosleep+0xfa>
ticks = _Timespec_To_ticks( rqtp );
11d4e2: 83 ec 0c sub $0xc,%esp
11d4e5: 56 push %esi
11d4e6: e8 6d 24 ff ff call 10f958 <_Timespec_To_ticks>
11d4eb: 89 c6 mov %eax,%esi
* A nanosleep for zero time is implemented as a yield.
* This behavior is also beyond the POSIX specification but is
* consistent with the RTEMS API and yields desirable behavior.
*/
if ( !ticks ) {
11d4ed: 83 c4 10 add $0x10,%esp
11d4f0: 85 c0 test %eax,%eax
11d4f2: 75 2f jne 11d523 <nanosleep+0x77>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
11d4f4: a1 5c 52 12 00 mov 0x12525c,%eax
11d4f9: 40 inc %eax
11d4fa: a3 5c 52 12 00 mov %eax,0x12525c
_Thread_Disable_dispatch();
_Thread_Yield_processor();
11d4ff: e8 80 f6 fe ff call 10cb84 <_Thread_Yield_processor>
_Thread_Enable_dispatch();
11d504: e8 8c eb fe ff call 10c095 <_Thread_Enable_dispatch>
if ( rmtp ) {
11d509: 85 db test %ebx,%ebx
11d50b: 0f 84 9a 00 00 00 je 11d5ab <nanosleep+0xff>
rmtp->tv_sec = 0;
11d511: c7 03 00 00 00 00 movl $0x0,(%ebx)
rmtp->tv_nsec = 0;
11d517: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
11d51e: e9 88 00 00 00 jmp 11d5ab <nanosleep+0xff>
11d523: a1 5c 52 12 00 mov 0x12525c,%eax
11d528: 40 inc %eax
11d529: a3 5c 52 12 00 mov %eax,0x12525c
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
11d52e: 52 push %edx
11d52f: 52 push %edx
11d530: 68 08 00 00 10 push $0x10000008
11d535: ff 35 18 53 12 00 pushl 0x125318
11d53b: e8 64 f3 fe ff call 10c8a4 <_Thread_Set_state>
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
11d540: 8b 15 18 53 12 00 mov 0x125318,%edx
_Thread_Disable_dispatch();
_Thread_Set_state(
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
11d546: 8b 42 08 mov 0x8(%edx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11d549: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
the_watchdog->routine = routine;
11d550: c7 42 64 18 bf 10 00 movl $0x10bf18,0x64(%edx)
the_watchdog->id = id;
11d557: 89 42 68 mov %eax,0x68(%edx)
the_watchdog->user_data = user_data;
11d55a: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
11d561: 89 72 54 mov %esi,0x54(%edx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
11d564: 59 pop %ecx
11d565: 58 pop %eax
11d566: 83 c2 48 add $0x48,%edx
11d569: 52 push %edx
11d56a: 68 38 53 12 00 push $0x125338
11d56f: e8 70 f9 fe ff call 10cee4 <_Watchdog_Insert>
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
11d574: e8 1c eb fe ff call 10c095 <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
11d579: 83 c4 10 add $0x10,%esp
11d57c: 85 db test %ebx,%ebx
11d57e: 74 2b je 11d5ab <nanosleep+0xff>
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
11d580: a1 18 53 12 00 mov 0x125318,%eax
_Thread_Enable_dispatch();
/* calculate time remaining */
if ( rmtp ) {
ticks -=
11d585: 03 70 5c add 0x5c(%eax),%esi
11d588: 2b 70 60 sub 0x60(%eax),%esi
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
11d58b: 50 push %eax
11d58c: 50 push %eax
11d58d: 53 push %ebx
11d58e: 56 push %esi
11d58f: e8 48 00 00 00 call 11d5dc <_Timespec_From_ticks>
*/
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
11d594: 83 c4 10 add $0x10,%esp
11d597: 85 f6 test %esi,%esi
11d599: 74 10 je 11d5ab <nanosleep+0xff>
rtems_set_errno_and_return_minus_one( EINTR );
11d59b: e8 78 42 ff ff call 111818 <__errno>
11d5a0: c7 00 04 00 00 00 movl $0x4,(%eax)
11d5a6: 83 c8 ff or $0xffffffff,%eax
11d5a9: eb 02 jmp 11d5ad <nanosleep+0x101>
11d5ab: 31 c0 xor %eax,%eax
#endif
}
return 0;
}
11d5ad: 8d 65 f8 lea -0x8(%ebp),%esp
11d5b0: 5b pop %ebx
11d5b1: 5e pop %esi
11d5b2: c9 leave
11d5b3: c3 ret
0010783c <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
10783c: 55 push %ebp
10783d: 89 e5 mov %esp,%ebp
10783f: 57 push %edi
107840: 56 push %esi
107841: 53 push %ebx
107842: 83 ec 0c sub $0xc,%esp
107845: 8b 7d 08 mov 0x8(%ebp),%edi
107848: 8b 75 0c mov 0xc(%ebp),%esi
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
10784b: 39 f7 cmp %esi,%edi
10784d: 75 08 jne 107857 <newlib_delete_hook+0x1b>
ptr = _REENT;
10784f: 8b 1d 20 20 12 00 mov 0x122020,%ebx
107855: eb 06 jmp 10785d <newlib_delete_hook+0x21>
} else {
ptr = deleted_task->libc_reent;
107857: 8b 9e f0 00 00 00 mov 0xf0(%esi),%ebx
}
if (ptr && ptr != _global_impure_ptr) {
10785d: 85 db test %ebx,%ebx
10785f: 74 20 je 107881 <newlib_delete_hook+0x45><== NEVER TAKEN
107861: 3b 1d a0 f2 11 00 cmp 0x11f2a0,%ebx
107867: 74 18 je 107881 <newlib_delete_hook+0x45>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
107869: 50 push %eax
10786a: 50 push %eax
10786b: 68 a1 78 10 00 push $0x1078a1
107870: 53 push %ebx
107871: e8 3e a3 00 00 call 111bb4 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
107876: 89 1c 24 mov %ebx,(%esp)
107879: e8 43 54 00 00 call 10ccc1 <_Workspace_Free>
10787e: 83 c4 10 add $0x10,%esp
#endif
}
deleted_task->libc_reent = NULL;
107881: c7 86 f0 00 00 00 00 movl $0x0,0xf0(%esi)
107888: 00 00 00
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
10788b: 39 f7 cmp %esi,%edi
10788d: 75 0a jne 107899 <newlib_delete_hook+0x5d>
_REENT = 0;
10788f: c7 05 20 20 12 00 00 movl $0x0,0x122020
107896: 00 00 00
}
}
107899: 8d 65 f4 lea -0xc(%ebp),%esp
10789c: 5b pop %ebx
10789d: 5e pop %esi
10789e: 5f pop %edi
10789f: c9 leave
1078a0: c3 ret
001078a1 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
1078a1: 55 push %ebp
1078a2: 89 e5 mov %esp,%ebp
1078a4: 53 push %ebx
1078a5: 83 ec 10 sub $0x10,%esp
1078a8: 8b 5d 08 mov 0x8(%ebp),%ebx
switch ( fileno(fp) ) {
1078ab: 53 push %ebx
1078ac: e8 0b 9f 00 00 call 1117bc <fileno>
1078b1: 83 c4 10 add $0x10,%esp
1078b4: 83 f8 02 cmp $0x2,%eax
1078b7: 77 26 ja 1078df <newlib_free_buffers+0x3e><== NEVER TAKEN
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
1078b9: 80 7b 0c 00 cmpb $0x0,0xc(%ebx)
1078bd: 79 2c jns 1078eb <newlib_free_buffers+0x4a><== ALWAYS TAKEN
free( fp->_bf._base );
1078bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1078c2: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1078c5: e8 26 f9 ff ff call 1071f0 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
1078ca: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
1078d0: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
1078d6: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
1078dd: eb 09 jmp 1078e8 <newlib_free_buffers+0x47><== NOT EXECUTED
}
break;
default:
fclose(fp);
1078df: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1078e2: 53 push %ebx <== NOT EXECUTED
1078e3: e8 68 9c 00 00 call 111550 <fclose> <== NOT EXECUTED
1078e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
1078eb: 31 c0 xor %eax,%eax
1078ed: 8b 5d fc mov -0x4(%ebp),%ebx
1078f0: c9 leave
1078f1: c3 ret
001078d0 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
1078d0: 55 push %ebp
1078d1: 89 e5 mov %esp,%ebp
1078d3: 53 push %ebx
1078d4: 83 ec 04 sub $0x4,%esp
1078d7: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_device_driver status;
if ( !initialized ) {
1078da: 80 3d 20 5e 12 00 00 cmpb $0x0,0x125e20
1078e1: 75 2b jne 10790e <null_initialize+0x3e>
initialized = 1;
1078e3: c6 05 20 5e 12 00 01 movb $0x1,0x125e20
status = rtems_io_register_name(
1078ea: 50 push %eax
1078eb: 6a 00 push $0x0
1078ed: 53 push %ebx
1078ee: 68 1f fe 11 00 push $0x11fe1f
1078f3: e8 05 01 00 00 call 1079fd <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
1078f8: 83 c4 10 add $0x10,%esp
1078fb: 85 c0 test %eax,%eax
1078fd: 74 09 je 107908 <null_initialize+0x38> <== ALWAYS TAKEN
rtems_fatal_error_occurred(status);
1078ff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107902: 50 push %eax <== NOT EXECUTED
107903: e8 e4 39 00 00 call 10b2ec <rtems_fatal_error_occurred><== NOT EXECUTED
NULL_major = major;
107908: 89 1d 50 61 12 00 mov %ebx,0x126150
}
return RTEMS_SUCCESSFUL;
}
10790e: 31 c0 xor %eax,%eax
107910: 8b 5d fc mov -0x4(%ebp),%ebx
107913: c9 leave
107914: c3 ret
001078b5 <null_write>:
rtems_device_driver null_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void *pargp
)
{
1078b5: 55 push %ebp
1078b6: 89 e5 mov %esp,%ebp
1078b8: 8b 45 10 mov 0x10(%ebp),%eax
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
1078bb: 85 c0 test %eax,%eax
1078bd: 74 06 je 1078c5 <null_write+0x10> <== ALWAYS TAKEN
rw_args->bytes_moved = rw_args->count;
1078bf: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
1078c2: 89 50 18 mov %edx,0x18(%eax) <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
1078c5: 31 c0 xor %eax,%eax
1078c7: c9 leave
1078c8: c3 ret
00107bcc <open>:
int open(
const char *pathname,
int flags,
...
)
{
107bcc: 55 push %ebp
107bcd: 89 e5 mov %esp,%ebp
107bcf: 57 push %edi
107bd0: 56 push %esi
107bd1: 53 push %ebx
107bd2: 83 ec 3c sub $0x3c,%esp
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
107bd5: 8b 45 0c mov 0xc(%ebp),%eax
107bd8: 40 inc %eax
if ( ( status & _FREAD ) == _FREAD )
107bd9: 89 c6 mov %eax,%esi
107bdb: 83 e6 01 and $0x1,%esi
107bde: f7 de neg %esi
107be0: 83 e6 04 and $0x4,%esi
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
107be3: a8 02 test $0x2,%al
107be5: 74 03 je 107bea <open+0x1e>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
107be7: 83 ce 02 or $0x2,%esi
va_start(ap, flags);
mode = va_arg( ap, int );
107bea: 8b 45 10 mov 0x10(%ebp),%eax
107bed: 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();
107bf0: e8 4a 64 00 00 call 10e03f <rtems_libio_allocate>
107bf5: 89 c3 mov %eax,%ebx
if ( iop == 0 ) {
107bf7: bf 17 00 00 00 mov $0x17,%edi
107bfc: 85 c0 test %eax,%eax
107bfe: 0f 84 a8 01 00 00 je 107dac <open+0x1e0>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
107c04: 83 c9 ff or $0xffffffff,%ecx
107c07: 8b 7d 08 mov 0x8(%ebp),%edi
107c0a: 31 c0 xor %eax,%eax
107c0c: f2 ae repnz scas %es:(%edi),%al
107c0e: f7 d1 not %ecx
107c10: 49 dec %ecx
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
107c11: 83 ec 0c sub $0xc,%esp
107c14: 6a 01 push $0x1
107c16: 8d 45 d4 lea -0x2c(%ebp),%eax
107c19: 50 push %eax
107c1a: 56 push %esi
107c1b: 51 push %ecx
107c1c: ff 75 08 pushl 0x8(%ebp)
107c1f: e8 24 f5 ff ff call 107148 <rtems_filesystem_evaluate_path>
107c24: 89 c6 mov %eax,%esi
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
107c26: 83 c4 20 add $0x20,%esp
107c29: 83 f8 ff cmp $0xffffffff,%eax
107c2c: 75 7a jne 107ca8 <open+0xdc>
if ( errno != ENOENT ) {
107c2e: e8 d1 97 00 00 call 111404 <__errno>
107c33: 83 38 02 cmpl $0x2,(%eax)
107c36: 75 2f jne 107c67 <open+0x9b>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
107c38: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
107c3f: 75 0c jne 107c4d <open+0x81>
107c41: 31 f6 xor %esi,%esi
107c43: bf 02 00 00 00 mov $0x2,%edi
107c48: e9 34 01 00 00 jmp 107d81 <open+0x1b5>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
107c4d: 6a 00 push $0x0
107c4f: 6a 00 push $0x0
107c51: 8b 45 c4 mov -0x3c(%ebp),%eax
107c54: 80 cc 80 or $0x80,%ah
107c57: 50 push %eax
107c58: ff 75 08 pushl 0x8(%ebp)
107c5b: e8 7c f8 ff ff call 1074dc <mknod>
if ( rc ) {
107c60: 83 c4 10 add $0x10,%esp
107c63: 85 c0 test %eax,%eax
107c65: 74 0e je 107c75 <open+0xa9> <== ALWAYS TAKEN
rc = errno;
107c67: e8 98 97 00 00 call 111404 <__errno>
107c6c: 8b 38 mov (%eax),%edi
107c6e: 31 f6 xor %esi,%esi
goto done;
107c70: e9 08 01 00 00 jmp 107d7d <open+0x1b1>
}
/* Sanity check to see if the file name exists after the mknod() */
status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true );
107c75: 89 f1 mov %esi,%ecx
107c77: 8b 7d 08 mov 0x8(%ebp),%edi
107c7a: 31 c0 xor %eax,%eax
107c7c: f2 ae repnz scas %es:(%edi),%al
107c7e: f7 d1 not %ecx
107c80: 49 dec %ecx
107c81: 83 ec 0c sub $0xc,%esp
107c84: 6a 01 push $0x1
107c86: 8d 45 d4 lea -0x2c(%ebp),%eax
107c89: 50 push %eax
107c8a: 6a 00 push $0x0
107c8c: 51 push %ecx
107c8d: ff 75 08 pushl 0x8(%ebp)
107c90: e8 b3 f4 ff ff call 107148 <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
107c95: 83 c4 20 add $0x20,%esp
107c98: 85 c0 test %eax,%eax
107c9a: 74 28 je 107cc4 <open+0xf8> <== ALWAYS TAKEN
107c9c: 31 f6 xor %esi,%esi <== NOT EXECUTED
107c9e: bf 0d 00 00 00 mov $0xd,%edi <== NOT EXECUTED
107ca3: e9 d9 00 00 00 jmp 107d81 <open+0x1b5> <== NOT EXECUTED
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
107ca8: 8b 45 0c mov 0xc(%ebp),%eax
107cab: 25 00 0a 00 00 and $0xa00,%eax
107cb0: 3d 00 0a 00 00 cmp $0xa00,%eax
107cb5: 75 0d jne 107cc4 <open+0xf8>
107cb7: 8d 75 d4 lea -0x2c(%ebp),%esi
107cba: bf 11 00 00 00 mov $0x11,%edi
107cbf: e9 bd 00 00 00 jmp 107d81 <open+0x1b5>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
107cc4: 8b 45 dc mov -0x24(%ebp),%eax
107cc7: 89 43 3c mov %eax,0x3c(%ebx)
iop->file_info = loc.node_access;
107cca: 8b 45 d4 mov -0x2c(%ebp),%eax
107ccd: 89 43 38 mov %eax,0x38(%ebx)
iop->flags |= rtems_libio_fcntl_flags( flags );
107cd0: 8b 73 14 mov 0x14(%ebx),%esi
107cd3: 83 ec 0c sub $0xc,%esp
107cd6: ff 75 0c pushl 0xc(%ebp)
107cd9: e8 ec 63 00 00 call 10e0ca <rtems_libio_fcntl_flags>
107cde: 09 f0 or %esi,%eax
107ce0: 89 43 14 mov %eax,0x14(%ebx)
iop->pathinfo = loc;
107ce3: 8d 7b 18 lea 0x18(%ebx),%edi
107ce6: 8d 75 d4 lea -0x2c(%ebp),%esi
107ce9: b9 05 00 00 00 mov $0x5,%ecx
107cee: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !iop->handlers || !iop->handlers->open_h ) {
107cf0: 8b 43 3c mov 0x3c(%ebx),%eax
107cf3: 83 c4 10 add $0x10,%esp
107cf6: 85 c0 test %eax,%eax
107cf8: 0f 84 cd 00 00 00 je 107dcb <open+0x1ff> <== NEVER TAKEN
107cfe: 8b 00 mov (%eax),%eax
107d00: 85 c0 test %eax,%eax
107d02: 0f 84 c3 00 00 00 je 107dcb <open+0x1ff> <== NEVER TAKEN
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
107d08: ff 75 c4 pushl -0x3c(%ebp)
107d0b: ff 75 0c pushl 0xc(%ebp)
107d0e: ff 75 08 pushl 0x8(%ebp)
107d11: 53 push %ebx
107d12: ff d0 call *%eax
if ( rc ) {
107d14: 83 c4 10 add $0x10,%esp
107d17: 85 c0 test %eax,%eax
107d19: 74 0c je 107d27 <open+0x15b>
rc = errno;
107d1b: e8 e4 96 00 00 call 111404 <__errno>
107d20: 8b 38 mov (%eax),%edi
107d22: 8d 75 d4 lea -0x2c(%ebp),%esi
goto done;
107d25: eb 56 jmp 107d7d <open+0x1b1>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
107d27: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
107d2e: 0f 84 84 00 00 00 je 107db8 <open+0x1ec>
rc = ftruncate( iop - rtems_libio_iops, 0 );
107d34: 50 push %eax
107d35: 6a 00 push $0x0
107d37: 6a 00 push $0x0
107d39: 89 d8 mov %ebx,%eax
107d3b: 2b 05 98 40 12 00 sub 0x124098,%eax
107d41: c1 f8 06 sar $0x6,%eax
107d44: 50 push %eax
107d45: e8 62 60 00 00 call 10ddac <ftruncate>
107d4a: 89 c7 mov %eax,%edi
if ( rc ) {
107d4c: 83 c4 10 add $0x10,%esp
107d4f: 85 c0 test %eax,%eax
107d51: 74 65 je 107db8 <open+0x1ec> <== ALWAYS TAKEN
if(errno) rc = errno;
107d53: e8 ac 96 00 00 call 111404 <__errno> <== NOT EXECUTED
107d58: 83 38 00 cmpl $0x0,(%eax) <== NOT EXECUTED
107d5b: 74 07 je 107d64 <open+0x198> <== NOT EXECUTED
107d5d: e8 a2 96 00 00 call 111404 <__errno> <== NOT EXECUTED
107d62: 8b 38 mov (%eax),%edi <== NOT EXECUTED
close( iop - rtems_libio_iops );
107d64: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107d67: 2b 1d 98 40 12 00 sub 0x124098,%ebx <== NOT EXECUTED
107d6d: c1 fb 06 sar $0x6,%ebx <== NOT EXECUTED
107d70: 53 push %ebx <== NOT EXECUTED
107d71: e8 ae 5f 00 00 call 10dd24 <close> <== NOT EXECUTED
107d76: 31 f6 xor %esi,%esi <== NOT EXECUTED
107d78: 31 db xor %ebx,%ebx <== NOT EXECUTED
107d7a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*/
done:
va_end(ap);
if ( rc ) {
107d7d: 85 ff test %edi,%edi
107d7f: 74 37 je 107db8 <open+0x1ec> <== NEVER TAKEN
if ( iop )
107d81: 85 db test %ebx,%ebx
107d83: 74 0c je 107d91 <open+0x1c5> <== NEVER TAKEN
rtems_libio_free( iop );
107d85: 83 ec 0c sub $0xc,%esp
107d88: 53 push %ebx
107d89: e8 5c 62 00 00 call 10dfea <rtems_libio_free>
107d8e: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
107d91: 85 f6 test %esi,%esi
107d93: 74 17 je 107dac <open+0x1e0>
rtems_filesystem_freenode( loc_to_free );
107d95: 8b 46 0c mov 0xc(%esi),%eax
107d98: 85 c0 test %eax,%eax
107d9a: 74 10 je 107dac <open+0x1e0> <== NEVER TAKEN
107d9c: 8b 40 1c mov 0x1c(%eax),%eax
107d9f: 85 c0 test %eax,%eax
107da1: 74 09 je 107dac <open+0x1e0> <== NEVER TAKEN
107da3: 83 ec 0c sub $0xc,%esp
107da6: 56 push %esi
107da7: ff d0 call *%eax
107da9: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( rc );
107dac: e8 53 96 00 00 call 111404 <__errno>
107db1: 89 38 mov %edi,(%eax)
107db3: 83 c8 ff or $0xffffffff,%eax
107db6: eb 0b jmp 107dc3 <open+0x1f7>
}
return iop - rtems_libio_iops;
107db8: 89 d8 mov %ebx,%eax
107dba: 2b 05 98 40 12 00 sub 0x124098,%eax
107dc0: c1 f8 06 sar $0x6,%eax
}
107dc3: 8d 65 f4 lea -0xc(%ebp),%esp
107dc6: 5b pop %ebx
107dc7: 5e pop %esi
107dc8: 5f pop %edi
107dc9: c9 leave
107dca: c3 ret
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
107dcb: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED
107dce: bf 86 00 00 00 mov $0x86,%edi <== NOT EXECUTED
107dd3: eb ac jmp 107d81 <open+0x1b5> <== NOT EXECUTED
00107b6c <open_dev_console>:
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
107b6c: 55 push %ebp
107b6d: 89 e5 mov %esp,%ebp
107b6f: 83 ec 0c sub $0xc,%esp
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
107b72: 6a 00 push $0x0
107b74: 6a 00 push $0x0
107b76: 68 32 d1 11 00 push $0x11d132
107b7b: e8 4c 00 00 00 call 107bcc <open>
107b80: 83 c4 10 add $0x10,%esp
107b83: 40 inc %eax
107b84: 74 41 je 107bc7 <open_dev_console+0x5b>
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
107b86: 52 push %edx
107b87: 6a 00 push $0x0
107b89: 6a 01 push $0x1
107b8b: 68 32 d1 11 00 push $0x11d132
107b90: e8 37 00 00 00 call 107bcc <open>
107b95: 83 c4 10 add $0x10,%esp
107b98: 40 inc %eax
107b99: 75 0a jne 107ba5 <open_dev_console+0x39> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
107b9b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107b9e: 68 31 44 54 55 push $0x55544431 <== NOT EXECUTED
107ba3: eb 1d jmp 107bc2 <open_dev_console+0x56> <== NOT EXECUTED
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
107ba5: 50 push %eax
107ba6: 6a 00 push $0x0
107ba8: 6a 01 push $0x1
107baa: 68 32 d1 11 00 push $0x11d132
107baf: e8 18 00 00 00 call 107bcc <open>
107bb4: 83 c4 10 add $0x10,%esp
107bb7: 40 inc %eax
107bb8: 75 0d jne 107bc7 <open_dev_console+0x5b> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
107bba: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107bbd: 68 32 44 54 55 push $0x55544432 <== NOT EXECUTED
107bc2: e8 e5 29 00 00 call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
}
107bc7: c9 leave
107bc8: c3 ret
00108541 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
108541: 55 push %ebp
108542: 89 e5 mov %esp,%ebp
108544: 56 push %esi
108545: 53 push %ebx
108546: 83 ec 10 sub $0x10,%esp
108549: 89 d3 mov %edx,%ebx
10854b: 88 45 f4 mov %al,-0xc(%ebp)
int i;
if (tty->termios.c_oflag & OPOST) {
10854e: 8b 52 34 mov 0x34(%edx),%edx
108551: f6 c2 01 test $0x1,%dl
108554: 0f 84 ee 00 00 00 je 108648 <oproc+0x107> <== NEVER TAKEN
switch (c) {
10855a: 3c 09 cmp $0x9,%al
10855c: 74 76 je 1085d4 <oproc+0x93>
10855e: 77 0d ja 10856d <oproc+0x2c> <== ALWAYS TAKEN
108560: 3c 08 cmp $0x8,%al <== NOT EXECUTED
108562: 0f 85 ab 00 00 00 jne 108613 <oproc+0xd2> <== NOT EXECUTED
108568: e9 99 00 00 00 jmp 108606 <oproc+0xc5> <== NOT EXECUTED
10856d: 3c 0a cmp $0xa,%al
10856f: 74 0a je 10857b <oproc+0x3a>
108571: 3c 0d cmp $0xd,%al
108573: 0f 85 9a 00 00 00 jne 108613 <oproc+0xd2> <== ALWAYS TAKEN
108579: eb 33 jmp 1085ae <oproc+0x6d> <== NOT EXECUTED
case '\n':
if (tty->termios.c_oflag & ONLRET)
10857b: 80 e2 20 and $0x20,%dl
10857e: 74 07 je 108587 <oproc+0x46> <== ALWAYS TAKEN
tty->column = 0;
108580: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
108587: f6 43 34 04 testb $0x4,0x34(%ebx)
10858b: 0f 84 b7 00 00 00 je 108648 <oproc+0x107> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
108591: 56 push %esi
108592: 53 push %ebx
108593: 6a 01 push $0x1
108595: 68 f9 e6 11 00 push $0x11e6f9
10859a: e8 82 fe ff ff call 108421 <rtems_termios_puts>
tty->column = 0;
10859f: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx)
1085a6: 83 c4 10 add $0x10,%esp
1085a9: e9 9a 00 00 00 jmp 108648 <oproc+0x107>
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
1085ae: f6 c2 10 test $0x10,%dl <== NOT EXECUTED
1085b1: 74 0a je 1085bd <oproc+0x7c> <== NOT EXECUTED
1085b3: 83 7b 28 00 cmpl $0x0,0x28(%ebx) <== NOT EXECUTED
1085b7: 0f 84 9b 00 00 00 je 108658 <oproc+0x117> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
1085bd: f6 c2 08 test $0x8,%dl <== NOT EXECUTED
1085c0: 74 09 je 1085cb <oproc+0x8a> <== NOT EXECUTED
c = '\n';
1085c2: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
1085c6: 80 e2 20 and $0x20,%dl <== NOT EXECUTED
1085c9: 74 7d je 108648 <oproc+0x107> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
1085cb: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
break;
1085d2: eb 74 jmp 108648 <oproc+0x107> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
1085d4: 8b 4b 28 mov 0x28(%ebx),%ecx
1085d7: 89 ce mov %ecx,%esi
1085d9: 83 e6 07 and $0x7,%esi
1085dc: b8 08 00 00 00 mov $0x8,%eax
1085e1: 29 f0 sub %esi,%eax
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
1085e3: 81 e2 00 18 00 00 and $0x1800,%edx
1085e9: 81 fa 00 18 00 00 cmp $0x1800,%edx
1085ef: 8d 14 08 lea (%eax,%ecx,1),%edx
1085f2: 75 0d jne 108601 <oproc+0xc0> <== NEVER TAKEN
tty->column += i;
1085f4: 89 53 28 mov %edx,0x28(%ebx)
rtems_termios_puts ( " ", i, tty);
1085f7: 51 push %ecx
1085f8: 53 push %ebx
1085f9: 50 push %eax
1085fa: 68 a4 e3 11 00 push $0x11e3a4
1085ff: eb 4f jmp 108650 <oproc+0x10f>
return;
}
tty->column += i;
108601: 89 53 28 mov %edx,0x28(%ebx) <== NOT EXECUTED
break;
108604: eb 42 jmp 108648 <oproc+0x107> <== NOT EXECUTED
case '\b':
if (tty->column > 0)
108606: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
108609: 85 c0 test %eax,%eax <== NOT EXECUTED
10860b: 7e 3b jle 108648 <oproc+0x107> <== NOT EXECUTED
tty->column--;
10860d: 48 dec %eax <== NOT EXECUTED
10860e: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
108611: eb 35 jmp 108648 <oproc+0x107> <== NOT EXECUTED
break;
default:
if (tty->termios.c_oflag & OLCUC)
108613: 80 e2 02 and $0x2,%dl
108616: 74 1c je 108634 <oproc+0xf3> <== ALWAYS TAKEN
c = toupper(c);
108618: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
10861b: 8b 15 08 20 12 00 mov 0x122008,%edx <== NOT EXECUTED
108621: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx <== NOT EXECUTED
108626: 83 e2 03 and $0x3,%edx <== NOT EXECUTED
108629: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED
10862c: 75 03 jne 108631 <oproc+0xf0> <== NOT EXECUTED
10862e: 83 e8 20 sub $0x20,%eax <== NOT EXECUTED
108631: 88 45 f4 mov %al,-0xc(%ebp) <== NOT EXECUTED
if (!iscntrl(c))
108634: 0f b6 45 f4 movzbl -0xc(%ebp),%eax
108638: 8b 15 08 20 12 00 mov 0x122008,%edx
10863e: f6 44 02 01 20 testb $0x20,0x1(%edx,%eax,1)
108643: 75 03 jne 108648 <oproc+0x107> <== NEVER TAKEN
tty->column++;
108645: ff 43 28 incl 0x28(%ebx)
break;
}
}
rtems_termios_puts (&c, 1, tty);
108648: 52 push %edx
108649: 53 push %ebx
10864a: 6a 01 push $0x1
10864c: 8d 45 f4 lea -0xc(%ebp),%eax
10864f: 50 push %eax
108650: e8 cc fd ff ff call 108421 <rtems_termios_puts>
108655: 83 c4 10 add $0x10,%esp
}
108658: 8d 65 f8 lea -0x8(%ebp),%esp
10865b: 5b pop %ebx
10865c: 5e pop %esi
10865d: c9 leave
10865e: c3 ret
00110b94 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
110b94: 55 push %ebp
110b95: 89 e5 mov %esp,%ebp
110b97: 57 push %edi
110b98: 56 push %esi
110b99: 53 push %ebx
110b9a: 83 ec 48 sub $0x48,%esp
rtems_filesystem_location_info_t loc;
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
110b9d: 6a 01 push $0x1
110b9f: 8d 5d c4 lea -0x3c(%ebp),%ebx
110ba2: 53 push %ebx
110ba3: 6a 07 push $0x7
110ba5: 6a 03 push $0x3
110ba7: 68 f3 ee 11 00 push $0x11eef3
110bac: e8 97 65 ff ff call 107148 <rtems_filesystem_evaluate_path>
110bb1: 83 c4 20 add $0x20,%esp
110bb4: 85 c0 test %eax,%eax
110bb6: 74 2b je 110be3 <pipe_create+0x4f> <== NEVER TAKEN
!= 0) {
if (errno != ENOENT)
110bb8: e8 47 08 00 00 call 111404 <__errno>
110bbd: 83 38 02 cmpl $0x2,(%eax)
110bc0: 0f 85 0c 01 00 00 jne 110cd2 <pipe_create+0x13e> <== NEVER TAKEN
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
110bc6: 50 push %eax
110bc7: 50 push %eax
110bc8: 68 ff 03 00 00 push $0x3ff
110bcd: 68 f3 ee 11 00 push $0x11eef3
110bd2: e8 e9 68 ff ff call 1074c0 <mkdir>
110bd7: 83 c4 10 add $0x10,%esp
110bda: 85 c0 test %eax,%eax
110bdc: 74 1c je 110bfa <pipe_create+0x66> <== ALWAYS TAKEN
110bde: e9 ef 00 00 00 jmp 110cd2 <pipe_create+0x13e> <== NOT EXECUTED
return -1;
}
else
rtems_filesystem_freenode(&loc);
110be3: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
110be6: 85 c0 test %eax,%eax <== NOT EXECUTED
110be8: 74 10 je 110bfa <pipe_create+0x66> <== NOT EXECUTED
110bea: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
110bed: 85 c0 test %eax,%eax <== NOT EXECUTED
110bef: 74 09 je 110bfa <pipe_create+0x66> <== NOT EXECUTED
110bf1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110bf4: 53 push %ebx <== NOT EXECUTED
110bf5: ff d0 call *%eax <== NOT EXECUTED
110bf7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
110bfa: 8d 5d d9 lea -0x27(%ebp),%ebx
110bfd: be f8 ee 11 00 mov $0x11eef8,%esi
110c02: b9 0a 00 00 00 mov $0xa,%ecx
110c07: 89 df mov %ebx,%edi
110c09: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
110c0b: 0f b7 05 a0 3e 12 00 movzwl 0x123ea0,%eax
110c12: 8d 50 01 lea 0x1(%eax),%edx
110c15: 66 89 15 a0 3e 12 00 mov %dx,0x123ea0
110c1c: 57 push %edi
110c1d: 50 push %eax
110c1e: 68 03 ef 11 00 push $0x11ef03
110c23: 8d 45 e3 lea -0x1d(%ebp),%eax
110c26: 50 push %eax
110c27: e8 6c 11 00 00 call 111d98 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
110c2c: 59 pop %ecx
110c2d: 5e pop %esi
110c2e: 68 80 01 00 00 push $0x180
110c33: 53 push %ebx
110c34: e8 f7 00 00 00 call 110d30 <mkfifo>
110c39: 83 c4 10 add $0x10,%esp
110c3c: 85 c0 test %eax,%eax
110c3e: 74 0a je 110c4a <pipe_create+0xb6> <== ALWAYS TAKEN
if (errno != EEXIST){
110c40: e8 bf 07 00 00 call 111404 <__errno> <== NOT EXECUTED
110c45: e9 88 00 00 00 jmp 110cd2 <pipe_create+0x13e> <== NOT EXECUTED
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);
110c4a: 52 push %edx
110c4b: 52 push %edx
110c4c: 68 00 40 00 00 push $0x4000
110c51: 53 push %ebx
110c52: e8 75 6f ff ff call 107bcc <open>
110c57: 8b 55 08 mov 0x8(%ebp),%edx
110c5a: 89 02 mov %eax,(%edx)
if (filsdes[0] < 0) {
110c5c: 83 c4 10 add $0x10,%esp
110c5f: 85 c0 test %eax,%eax
110c61: 79 0d jns 110c70 <pipe_create+0xdc> <== NEVER TAKEN
err = errno;
110c63: e8 9c 07 00 00 call 111404 <__errno>
110c68: 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);
110c6a: 83 ec 0c sub $0xc,%esp
110c6d: 53 push %ebx
110c6e: eb 53 jmp 110cc3 <pipe_create+0x12f>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
110c70: 31 d2 xor %edx,%edx <== NOT EXECUTED
110c72: 3b 05 44 01 12 00 cmp 0x120144,%eax <== NOT EXECUTED
110c78: 73 0b jae 110c85 <pipe_create+0xf1> <== NOT EXECUTED
110c7a: 89 c2 mov %eax,%edx <== NOT EXECUTED
110c7c: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED
110c7f: 03 15 98 40 12 00 add 0x124098,%edx <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
110c85: 83 62 14 fe andl $0xfffffffe,0x14(%edx) <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
110c89: 50 push %eax <== NOT EXECUTED
110c8a: 50 push %eax <== NOT EXECUTED
110c8b: 6a 01 push $0x1 <== NOT EXECUTED
110c8d: 8d 45 d9 lea -0x27(%ebp),%eax <== NOT EXECUTED
110c90: 50 push %eax <== NOT EXECUTED
110c91: e8 36 6f ff ff call 107bcc <open> <== NOT EXECUTED
110c96: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
110c99: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED
if (filsdes[1] < 0) {
110c9c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110c9f: 31 f6 xor %esi,%esi <== NOT EXECUTED
110ca1: 85 c0 test %eax,%eax <== NOT EXECUTED
110ca3: 79 17 jns 110cbc <pipe_create+0x128> <== NOT EXECUTED
err = errno;
110ca5: e8 5a 07 00 00 call 111404 <__errno> <== NOT EXECUTED
110caa: 8b 30 mov (%eax),%esi <== NOT EXECUTED
close(filsdes[0]);
110cac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110caf: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
110cb2: ff 30 pushl (%eax) <== NOT EXECUTED
110cb4: e8 6b d0 ff ff call 10dd24 <close> <== NOT EXECUTED
110cb9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
unlink(fifopath);
110cbc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110cbf: 8d 45 d9 lea -0x27(%ebp),%eax <== NOT EXECUTED
110cc2: 50 push %eax <== NOT EXECUTED
110cc3: e8 84 00 00 00 call 110d4c <unlink>
110cc8: 83 c4 10 add $0x10,%esp
}
rtems_set_errno_and_return_minus_one(err);
110ccb: e8 34 07 00 00 call 111404 <__errno>
110cd0: 89 30 mov %esi,(%eax)
}
110cd2: 83 c8 ff or $0xffffffff,%eax
110cd5: 8d 65 f4 lea -0xc(%ebp),%esp
110cd8: 5b pop %ebx
110cd9: 5e pop %esi
110cda: 5f pop %edi
110cdb: c9 leave
110cdc: c3 ret
0010fb38 <pipe_free>:
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
10fb38: 55 push %ebp <== NOT EXECUTED
10fb39: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10fb3b: 53 push %ebx <== NOT EXECUTED
10fb3c: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
10fb3f: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_barrier_delete(pipe->readBarrier);
10fb41: ff 70 2c pushl 0x2c(%eax) <== NOT EXECUTED
10fb44: e8 e7 0a 00 00 call 110630 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
10fb49: 59 pop %ecx <== NOT EXECUTED
10fb4a: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10fb4d: e8 de 0a 00 00 call 110630 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
10fb52: 5a pop %edx <== NOT EXECUTED
10fb53: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fb56: e8 01 a4 ff ff call 109f5c <rtems_semaphore_delete><== NOT EXECUTED
free(pipe->Buffer);
10fb5b: 58 pop %eax <== NOT EXECUTED
10fb5c: ff 33 pushl (%ebx) <== NOT EXECUTED
10fb5e: e8 8d 76 ff ff call 1071f0 <free> <== NOT EXECUTED
free(pipe);
10fb63: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10fb66: e8 85 76 ff ff call 1071f0 <free> <== NOT EXECUTED
10fb6b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10fb6e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10fb71: c9 leave <== NOT EXECUTED
10fb72: c3 ret <== NOT EXECUTED
0010f7d7 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
10f7d7: 55 push %ebp <== NOT EXECUTED
10f7d8: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10f7da: 56 push %esi <== NOT EXECUTED
10f7db: 53 push %ebx <== NOT EXECUTED
10f7dc: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
10f7df: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
if (cmd == FIONREAD) {
10f7e2: b8 ea ff ff ff mov $0xffffffea,%eax <== NOT EXECUTED
10f7e7: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) <== NOT EXECUTED
10f7ee: 75 36 jne 10f826 <pipe_ioctl+0x4f> <== NOT EXECUTED
if (buffer == NULL)
10f7f0: b0 f2 mov $0xf2,%al <== NOT EXECUTED
10f7f2: 85 f6 test %esi,%esi <== NOT EXECUTED
10f7f4: 74 30 je 10f826 <pipe_ioctl+0x4f> <== NOT EXECUTED
return -EFAULT;
if (! PIPE_LOCK(pipe))
10f7f6: 50 push %eax <== NOT EXECUTED
10f7f7: 6a 00 push $0x0 <== NOT EXECUTED
10f7f9: 6a 00 push $0x0 <== NOT EXECUTED
10f7fb: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f7fe: e8 e9 a7 ff ff call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
10f803: 89 c2 mov %eax,%edx <== NOT EXECUTED
10f805: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f808: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED
10f80d: 85 d2 test %edx,%edx <== NOT EXECUTED
10f80f: 75 15 jne 10f826 <pipe_ioctl+0x4f> <== NOT EXECUTED
return -EINTR;
/* Return length of pipe */
*(uint *)buffer = pipe->Length;
10f811: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
10f814: 89 06 mov %eax,(%esi) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
10f816: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f819: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f81c: e8 b7 a8 ff ff call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
10f821: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
10f823: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return -EINVAL;
}
10f826: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10f829: 5b pop %ebx <== NOT EXECUTED
10f82a: 5e pop %esi <== NOT EXECUTED
10f82b: c9 leave <== NOT EXECUTED
10f82c: c3 ret <== NOT EXECUTED
0010f780 <pipe_lseek>:
pipe_control_t *pipe,
off_t offset,
int whence,
rtems_libio_t *iop
)
{
10f780: 55 push %ebp <== NOT EXECUTED
10f781: 89 e5 mov %esp,%ebp <== NOT EXECUTED
/* Seek on pipe is not supported */
return -ESPIPE;
}
10f783: b8 e3 ff ff ff mov $0xffffffe3,%eax <== NOT EXECUTED
10f788: c9 leave <== NOT EXECUTED
10f789: c3 ret <== NOT EXECUTED
0010f82d <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
10f82d: 55 push %ebp <== NOT EXECUTED
10f82e: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10f830: 57 push %edi <== NOT EXECUTED
10f831: 56 push %esi <== NOT EXECUTED
10f832: 53 push %ebx <== NOT EXECUTED
10f833: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED
10f836: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
10f839: 6a 00 push $0x0 <== NOT EXECUTED
10f83b: 6a 00 push $0x0 <== NOT EXECUTED
10f83d: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f840: e8 a7 a7 ff ff call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
10f845: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f848: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
10f84f: 85 c0 test %eax,%eax <== NOT EXECUTED
10f851: 0f 84 08 01 00 00 je 10f95f <pipe_read+0x132> <== NOT EXECUTED
10f857: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED
10f85e: e9 21 01 00 00 jmp 10f984 <pipe_read+0x157> <== NOT EXECUTED
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
10f863: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED
10f867: 0f 84 fe 00 00 00 je 10f96b <pipe_read+0x13e> <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
10f86d: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
10f870: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED
10f874: 74 0a je 10f880 <pipe_read+0x53> <== NOT EXECUTED
10f876: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED
10f87b: e9 ed 00 00 00 jmp 10f96d <pipe_read+0x140> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
10f880: ff 43 18 incl 0x18(%ebx) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
10f883: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f886: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f889: e8 4a a8 ff ff call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
10f88e: 59 pop %ecx <== NOT EXECUTED
10f88f: 5e pop %esi <== NOT EXECUTED
10f890: 6a 00 push $0x0 <== NOT EXECUTED
10f892: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10f895: e8 4e 0e 00 00 call 1106e8 <rtems_barrier_wait> <== NOT EXECUTED
10f89a: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10f89d: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
10f8a0: 19 f6 sbb %esi,%esi <== NOT EXECUTED
10f8a2: f7 d6 not %esi <== NOT EXECUTED
10f8a4: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
10f8a7: 6a 00 push $0x0 <== NOT EXECUTED
10f8a9: 6a 00 push $0x0 <== NOT EXECUTED
10f8ab: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f8ae: e8 39 a7 ff ff call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
10f8b3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f8b6: 85 c0 test %eax,%eax <== NOT EXECUTED
10f8b8: 74 0a je 10f8c4 <pipe_read+0x97> <== NOT EXECUTED
10f8ba: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
10f8bf: e9 b7 00 00 00 jmp 10f97b <pipe_read+0x14e> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
10f8c4: ff 4b 18 decl 0x18(%ebx) <== NOT EXECUTED
if (ret != 0)
10f8c7: 85 f6 test %esi,%esi <== NOT EXECUTED
10f8c9: 0f 85 9e 00 00 00 jne 10f96d <pipe_read+0x140> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
10f8cf: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
10f8d2: 85 d2 test %edx,%edx <== NOT EXECUTED
10f8d4: 74 8d je 10f863 <pipe_read+0x36> <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
10f8d6: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
10f8d9: 2b 45 d4 sub -0x2c(%ebp),%eax <== NOT EXECUTED
10f8dc: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
10f8df: 39 c2 cmp %eax,%edx <== NOT EXECUTED
10f8e1: 76 03 jbe 10f8e6 <pipe_read+0xb9> <== NOT EXECUTED
10f8e3: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
10f8e6: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED
10f8e9: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
10f8ec: 29 f0 sub %esi,%eax <== NOT EXECUTED
if (chunk > chunk1) {
10f8ee: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED
10f8f1: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
10f8f4: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
10f8f7: 8d 14 0f lea (%edi,%ecx,1),%edx <== NOT EXECUTED
10f8fa: 7e 1b jle 10f917 <pipe_read+0xea> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
10f8fc: 03 33 add (%ebx),%esi <== NOT EXECUTED
10f8fe: 89 d7 mov %edx,%edi <== NOT EXECUTED
10f900: 89 c1 mov %eax,%ecx <== NOT EXECUTED
10f902: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
10f904: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
10f907: 01 c2 add %eax,%edx <== NOT EXECUTED
10f909: 03 55 0c add 0xc(%ebp),%edx <== NOT EXECUTED
10f90c: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
10f90f: 29 c1 sub %eax,%ecx <== NOT EXECUTED
10f911: 8b 33 mov (%ebx),%esi <== NOT EXECUTED
10f913: 89 d7 mov %edx,%edi <== NOT EXECUTED
10f915: eb 07 jmp 10f91e <pipe_read+0xf1> <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
10f917: 03 33 add (%ebx),%esi <== NOT EXECUTED
10f919: 89 d7 mov %edx,%edi <== NOT EXECUTED
10f91b: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
10f91e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
pipe->Start += chunk;
10f920: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
10f923: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED
pipe->Start %= pipe->Size;
10f926: 31 d2 xor %edx,%edx <== NOT EXECUTED
10f928: f7 73 04 divl 0x4(%ebx) <== NOT EXECUTED
10f92b: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED
pipe->Length -= chunk;
10f92e: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
10f931: 2b 45 d0 sub -0x30(%ebp),%eax <== NOT EXECUTED
10f934: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
10f937: 85 c0 test %eax,%eax <== NOT EXECUTED
10f939: 75 07 jne 10f942 <pipe_read+0x115> <== NOT EXECUTED
pipe->Start = 0;
10f93b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED
if (pipe->waitingWriters > 0)
10f942: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) <== NOT EXECUTED
10f946: 74 11 je 10f959 <pipe_read+0x12c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
10f948: 52 push %edx <== NOT EXECUTED
10f949: 52 push %edx <== NOT EXECUTED
10f94a: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10f94d: 50 push %eax <== NOT EXECUTED
10f94e: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10f951: e8 3a 0d 00 00 call 110690 <rtems_barrier_release> <== NOT EXECUTED
10f956: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
read += chunk;
10f959: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
10f95c: 01 4d d4 add %ecx,-0x2c(%ebp) <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
10f95f: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
10f962: 39 7d d4 cmp %edi,-0x2c(%ebp) <== NOT EXECUTED
10f965: 0f 82 64 ff ff ff jb 10f8cf <pipe_read+0xa2> <== NOT EXECUTED
10f96b: 31 f6 xor %esi,%esi <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
10f96d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f970: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f973: e8 60 a7 ff ff call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
10f978: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
out_nolock:
if (read > 0)
10f97b: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED
10f97f: 7f 03 jg 10f984 <pipe_read+0x157> <== NOT EXECUTED
10f981: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED
return read;
return ret;
}
10f984: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
10f987: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f98a: 5b pop %ebx <== NOT EXECUTED
10f98b: 5e pop %esi <== NOT EXECUTED
10f98c: 5f pop %edi <== NOT EXECUTED
10f98d: c9 leave <== NOT EXECUTED
10f98e: c3 ret <== NOT EXECUTED
0010fb73 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
10fb73: 55 push %ebp <== NOT EXECUTED
10fb74: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10fb76: 57 push %edi <== NOT EXECUTED
10fb77: 56 push %esi <== NOT EXECUTED
10fb78: 53 push %ebx <== NOT EXECUTED
10fb79: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
10fb7c: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
10fb7f: 8b 1f mov (%edi),%ebx <== NOT EXECUTED
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
10fb81: 6a 00 push $0x0 <== NOT EXECUTED
10fb83: 6a 00 push $0x0 <== NOT EXECUTED
10fb85: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fb88: e8 5f a4 ff ff call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
10fb8d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fb90: 85 c0 test %eax,%eax <== NOT EXECUTED
10fb92: 75 34 jne 10fbc8 <pipe_release+0x55> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
10fb94: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10fb97: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
10fb9a: 89 c6 mov %eax,%esi <== NOT EXECUTED
10fb9c: 83 e6 06 and $0x6,%esi <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
10fb9f: a8 02 test $0x2,%al <== NOT EXECUTED
10fba1: 74 03 je 10fba6 <pipe_release+0x33> <== NOT EXECUTED
pipe->Readers --;
10fba3: ff 4b 10 decl 0x10(%ebx) <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
10fba6: f7 c6 04 00 00 00 test $0x4,%esi <== NOT EXECUTED
10fbac: 74 03 je 10fbb1 <pipe_release+0x3e> <== NOT EXECUTED
pipe->Writers --;
10fbae: ff 4b 14 decl 0x14(%ebx) <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
10fbb1: 50 push %eax <== NOT EXECUTED
10fbb2: 6a 00 push $0x0 <== NOT EXECUTED
10fbb4: 6a 00 push $0x0 <== NOT EXECUTED
10fbb6: ff 35 98 3e 12 00 pushl 0x123e98 <== NOT EXECUTED
10fbbc: e8 2b a4 ff ff call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
10fbc1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fbc4: 85 c0 test %eax,%eax <== NOT EXECUTED
10fbc6: 74 09 je 10fbd1 <pipe_release+0x5e> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
10fbc8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fbcb: 50 push %eax <== NOT EXECUTED
10fbcc: e8 db a9 ff ff call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
PIPE_UNLOCK(pipe);
10fbd1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fbd4: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fbd7: e8 fc a4 ff ff call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
10fbdc: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10fbdf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fbe2: 85 c0 test %eax,%eax <== NOT EXECUTED
10fbe4: 75 15 jne 10fbfb <pipe_release+0x88> <== NOT EXECUTED
10fbe6: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED
10fbea: 75 0f jne 10fbfb <pipe_release+0x88> <== NOT EXECUTED
#if 0
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
10fbec: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10fbee: e8 45 ff ff ff call 10fb38 <pipe_free> <== NOT EXECUTED
*pipep = NULL;
10fbf3: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
10fbf9: eb 30 jmp 10fc2b <pipe_release+0xb8> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
10fbfb: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED
10fbfe: 74 0f je 10fc0f <pipe_release+0x9c> <== NOT EXECUTED
10fc00: 85 c0 test %eax,%eax <== NOT EXECUTED
10fc02: 75 0b jne 10fc0f <pipe_release+0x9c> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
10fc04: 57 push %edi <== NOT EXECUTED
10fc05: 57 push %edi <== NOT EXECUTED
10fc06: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10fc09: 50 push %eax <== NOT EXECUTED
10fc0a: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10fc0d: eb 14 jmp 10fc23 <pipe_release+0xb0> <== NOT EXECUTED
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
10fc0f: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED
10fc12: 74 17 je 10fc2b <pipe_release+0xb8> <== NOT EXECUTED
10fc14: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED
10fc18: 75 11 jne 10fc2b <pipe_release+0xb8> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
10fc1a: 56 push %esi <== NOT EXECUTED
10fc1b: 56 push %esi <== NOT EXECUTED
10fc1c: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10fc1f: 50 push %eax <== NOT EXECUTED
10fc20: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10fc23: e8 68 0a 00 00 call 110690 <rtems_barrier_release> <== NOT EXECUTED
10fc28: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
10fc2b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fc2e: ff 35 98 3e 12 00 pushl 0x123e98 <== NOT EXECUTED
10fc34: e8 9f a4 ff ff call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
10fc39: 31 c0 xor %eax,%eax <== NOT EXECUTED
10fc3b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10fc3e: 5b pop %ebx <== NOT EXECUTED
10fc3f: 5e pop %esi <== NOT EXECUTED
10fc40: 5f pop %edi <== NOT EXECUTED
10fc41: c9 leave <== NOT EXECUTED
10fc42: c3 ret <== NOT EXECUTED
0010f98f <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
10f98f: 55 push %ebp <== NOT EXECUTED
10f990: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10f992: 57 push %edi <== NOT EXECUTED
10f993: 56 push %esi <== NOT EXECUTED
10f994: 53 push %ebx <== NOT EXECUTED
10f995: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
10f998: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
10f99b: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
10f9a2: 83 7d 10 00 cmpl $0x0,0x10(%ebp) <== NOT EXECUTED
10f9a6: 0f 84 81 01 00 00 je 10fb2d <pipe_write+0x19e> <== NOT EXECUTED
return 0;
if (! PIPE_LOCK(pipe))
10f9ac: 56 push %esi <== NOT EXECUTED
10f9ad: 6a 00 push $0x0 <== NOT EXECUTED
10f9af: 6a 00 push $0x0 <== NOT EXECUTED
10f9b1: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f9b4: e8 33 a6 ff ff call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
10f9b9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f9bc: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED
10f9c3: 85 c0 test %eax,%eax <== NOT EXECUTED
10f9c5: 0f 85 62 01 00 00 jne 10fb2d <pipe_write+0x19e> <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
10f9cb: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED
10f9cf: 75 11 jne 10f9e2 <pipe_write+0x53> <== NOT EXECUTED
10f9d1: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED
10f9d6: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
10f9dd: e9 1d 01 00 00 jmp 10faff <pipe_write+0x170> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
10f9e2: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
10f9e5: 3b 7b 04 cmp 0x4(%ebx),%edi <== NOT EXECUTED
10f9e8: 76 05 jbe 10f9ef <pipe_write+0x60> <== NOT EXECUTED
10f9ea: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
10f9ef: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
10f9f6: e9 f6 00 00 00 jmp 10faf1 <pipe_write+0x162> <== NOT EXECUTED
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
10f9fb: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
10f9fe: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED
10fa02: 74 0a je 10fa0e <pipe_write+0x7f> <== NOT EXECUTED
10fa04: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED
10fa09: e9 f1 00 00 00 jmp 10faff <pipe_write+0x170> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
10fa0e: ff 43 1c incl 0x1c(%ebx) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
10fa11: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fa14: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fa17: e8 bc a6 ff ff call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
10fa1c: 5a pop %edx <== NOT EXECUTED
10fa1d: 59 pop %ecx <== NOT EXECUTED
10fa1e: 6a 00 push $0x0 <== NOT EXECUTED
10fa20: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10fa23: e8 c0 0c 00 00 call 1106e8 <rtems_barrier_wait> <== NOT EXECUTED
10fa28: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10fa2b: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
10fa2e: 19 f6 sbb %esi,%esi <== NOT EXECUTED
10fa30: f7 d6 not %esi <== NOT EXECUTED
10fa32: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
10fa35: 6a 00 push $0x0 <== NOT EXECUTED
10fa37: 6a 00 push $0x0 <== NOT EXECUTED
10fa39: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fa3c: e8 ab a5 ff ff call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
10fa41: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fa44: 85 c0 test %eax,%eax <== NOT EXECUTED
10fa46: 74 0a je 10fa52 <pipe_write+0xc3> <== NOT EXECUTED
10fa48: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
10fa4d: e9 d2 00 00 00 jmp 10fb24 <pipe_write+0x195> <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
10fa52: ff 4b 1c decl 0x1c(%ebx) <== NOT EXECUTED
if (ret != 0)
10fa55: 85 f6 test %esi,%esi <== NOT EXECUTED
10fa57: 0f 85 a2 00 00 00 jne 10faff <pipe_write+0x170> <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
10fa5d: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED
10fa61: 75 0a jne 10fa6d <pipe_write+0xde> <== NOT EXECUTED
10fa63: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED
10fa68: e9 92 00 00 00 jmp 10faff <pipe_write+0x170> <== NOT EXECUTED
/* 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) {
10fa6d: 8b 73 04 mov 0x4(%ebx),%esi <== NOT EXECUTED
10fa70: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
10fa73: 89 f1 mov %esi,%ecx <== NOT EXECUTED
10fa75: 29 c1 sub %eax,%ecx <== NOT EXECUTED
10fa77: 39 f9 cmp %edi,%ecx <== NOT EXECUTED
10fa79: 72 80 jb 10f9fb <pipe_write+0x6c> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
10fa7b: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
10fa7e: 2b 55 d4 sub -0x2c(%ebp),%edx <== NOT EXECUTED
10fa81: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED
10fa84: 39 d1 cmp %edx,%ecx <== NOT EXECUTED
10fa86: 76 03 jbe 10fa8b <pipe_write+0xfc> <== NOT EXECUTED
10fa88: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
10fa8b: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED
10fa8e: 31 d2 xor %edx,%edx <== NOT EXECUTED
10fa90: f7 f6 div %esi <== NOT EXECUTED
10fa92: 89 f0 mov %esi,%eax <== NOT EXECUTED
10fa94: 29 d0 sub %edx,%eax <== NOT EXECUTED
if (chunk > chunk1) {
10fa96: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED
10fa99: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
10fa9c: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
10fa9f: 8d 34 0f lea (%edi,%ecx,1),%esi <== NOT EXECUTED
10faa2: 7e 1c jle 10fac0 <pipe_write+0x131> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
10faa4: 03 13 add (%ebx),%edx <== NOT EXECUTED
10faa6: 89 d7 mov %edx,%edi <== NOT EXECUTED
10faa8: 89 c1 mov %eax,%ecx <== NOT EXECUTED
10faaa: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
10faac: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
10faae: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
10fab1: 29 c1 sub %eax,%ecx <== NOT EXECUTED
10fab3: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
10fab6: 8d 34 38 lea (%eax,%edi,1),%esi <== NOT EXECUTED
10fab9: 03 75 0c add 0xc(%ebp),%esi <== NOT EXECUTED
10fabc: 89 d7 mov %edx,%edi <== NOT EXECUTED
10fabe: eb 07 jmp 10fac7 <pipe_write+0x138> <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
10fac0: 03 13 add (%ebx),%edx <== NOT EXECUTED
10fac2: 89 d7 mov %edx,%edi <== NOT EXECUTED
10fac4: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
10fac7: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
pipe->Length += chunk;
10fac9: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
10facc: 01 43 0c add %eax,0xc(%ebx) <== NOT EXECUTED
if (pipe->waitingReaders > 0)
10facf: 83 7b 18 00 cmpl $0x0,0x18(%ebx) <== NOT EXECUTED
10fad3: 74 11 je 10fae6 <pipe_write+0x157> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
10fad5: 50 push %eax <== NOT EXECUTED
10fad6: 50 push %eax <== NOT EXECUTED
10fad7: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
10fada: 51 push %ecx <== NOT EXECUTED
10fadb: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10fade: e8 ad 0b 00 00 call 110690 <rtems_barrier_release> <== NOT EXECUTED
10fae3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
written += chunk;
10fae6: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED
10fae9: 01 7d d4 add %edi,-0x2c(%ebp) <== NOT EXECUTED
10faec: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
10faf1: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
10faf4: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED
10faf7: 0f 82 70 ff ff ff jb 10fa6d <pipe_write+0xde> <== NOT EXECUTED
10fafd: 31 f6 xor %esi,%esi <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
10faff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fb02: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fb05: e8 ce a5 ff ff call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
10fb0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
10fb0d: 83 fe e0 cmp $0xffffffe0,%esi <== NOT EXECUTED
10fb10: 75 12 jne 10fb24 <pipe_write+0x195> <== NOT EXECUTED
kill(getpid(), SIGPIPE);
10fb12: e8 4d 07 00 00 call 110264 <getpid> <== NOT EXECUTED
10fb17: 57 push %edi <== NOT EXECUTED
10fb18: 57 push %edi <== NOT EXECUTED
10fb19: 6a 0d push $0xd <== NOT EXECUTED
10fb1b: 50 push %eax <== NOT EXECUTED
10fb1c: e8 57 08 00 00 call 110378 <kill> <== NOT EXECUTED
10fb21: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
#endif
if (written > 0)
10fb24: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED
10fb28: 7f 03 jg 10fb2d <pipe_write+0x19e> <== NOT EXECUTED
10fb2a: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED
return written;
return ret;
}
10fb2d: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
10fb30: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10fb33: 5b pop %ebx <== NOT EXECUTED
10fb34: 5e pop %esi <== NOT EXECUTED
10fb35: 5f pop %edi <== NOT EXECUTED
10fb36: c9 leave <== NOT EXECUTED
10fb37: c3 ret <== NOT EXECUTED
0010a490 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
10a490: 55 push %ebp
10a491: 89 e5 mov %esp,%ebp
10a493: 53 push %ebx
10a494: 83 ec 04 sub $0x4,%esp
10a497: 8b 55 08 mov 0x8(%ebp),%edx
10a49a: 8b 45 0c mov 0xc(%ebp),%eax
10a49d: 8b 4d 10 mov 0x10(%ebp),%ecx
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
10a4a0: ff 05 2c b1 12 00 incl 0x12b12c
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
10a4a6: 8d 58 ff lea -0x1(%eax),%ebx
10a4a9: 85 c3 test %eax,%ebx
10a4ab: 75 05 jne 10a4b2 <posix_memalign+0x22> <== NEVER TAKEN
10a4ad: 83 f8 03 cmp $0x3,%eax
10a4b0: 77 09 ja 10a4bb <posix_memalign+0x2b>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
10a4b2: b8 16 00 00 00 mov $0x16,%eax
10a4b7: 5a pop %edx
10a4b8: 5b pop %ebx
10a4b9: c9 leave
10a4ba: c3 ret
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
10a4bb: 89 4d 10 mov %ecx,0x10(%ebp)
10a4be: 89 45 0c mov %eax,0xc(%ebp)
10a4c1: 89 55 08 mov %edx,0x8(%ebp)
}
10a4c4: 58 pop %eax
10a4c5: 5b pop %ebx
10a4c6: c9 leave
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
10a4c7: e9 10 01 00 00 jmp 10a5dc <rtems_memalign>
0010e4f4 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
10e4f4: 55 push %ebp
10e4f5: 89 e5 mov %esp,%ebp
10e4f7: 8b 45 08 mov 0x8(%ebp),%eax
10e4fa: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr || !attr->is_initialized )
10e4fd: 85 c0 test %eax,%eax
10e4ff: 74 24 je 10e525 <pthread_attr_setschedpolicy+0x31>
10e501: 83 38 00 cmpl $0x0,(%eax)
10e504: 74 1f je 10e525 <pthread_attr_setschedpolicy+0x31>
return EINVAL;
switch ( policy ) {
10e506: 83 f9 04 cmp $0x4,%ecx
10e509: 77 0c ja 10e517 <pthread_attr_setschedpolicy+0x23>
10e50b: ba 01 00 00 00 mov $0x1,%edx
10e510: d3 e2 shl %cl,%edx
10e512: 80 e2 17 and $0x17,%dl
10e515: 75 07 jne 10e51e <pthread_attr_setschedpolicy+0x2a><== ALWAYS TAKEN
10e517: b8 86 00 00 00 mov $0x86,%eax
10e51c: eb 0c jmp 10e52a <pthread_attr_setschedpolicy+0x36>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
10e51e: 89 48 14 mov %ecx,0x14(%eax)
10e521: 31 c0 xor %eax,%eax
return 0;
10e523: eb 05 jmp 10e52a <pthread_attr_setschedpolicy+0x36>
10e525: b8 16 00 00 00 mov $0x16,%eax
default:
return ENOTSUP;
}
}
10e52a: c9 leave
10e52b: c3 ret
0010a360 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
10a360: 55 push %ebp
10a361: 89 e5 mov %esp,%ebp
10a363: 57 push %edi
10a364: 56 push %esi
10a365: 53 push %ebx
10a366: 83 ec 1c sub $0x1c,%esp
10a369: 8b 5d 08 mov 0x8(%ebp),%ebx
10a36c: 8b 75 10 mov 0x10(%ebp),%esi
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
10a36f: 85 db test %ebx,%ebx
10a371: 0f 84 93 00 00 00 je 10a40a <pthread_barrier_init+0xaa>
return EINVAL;
if ( count == 0 )
10a377: 85 f6 test %esi,%esi
10a379: 0f 84 8b 00 00 00 je 10a40a <pthread_barrier_init+0xaa>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10a37f: 8b 7d 0c mov 0xc(%ebp),%edi
10a382: 85 ff test %edi,%edi
10a384: 75 0f jne 10a395 <pthread_barrier_init+0x35>
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
10a386: 83 ec 0c sub $0xc,%esp
10a389: 8d 7d d8 lea -0x28(%ebp),%edi
10a38c: 57 push %edi
10a38d: e8 1a ff ff ff call 10a2ac <pthread_barrierattr_init>
10a392: 83 c4 10 add $0x10,%esp
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10a395: 83 3f 00 cmpl $0x0,(%edi)
10a398: 74 70 je 10a40a <pthread_barrier_init+0xaa>
return EINVAL;
switch ( the_attr->process_shared ) {
10a39a: 83 7f 04 00 cmpl $0x0,0x4(%edi)
10a39e: 75 6a jne 10a40a <pthread_barrier_init+0xaa><== NEVER TAKEN
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
10a3a0: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_attributes.maximum_count = count;
10a3a7: 89 75 e4 mov %esi,-0x1c(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10a3aa: a1 a4 62 12 00 mov 0x1262a4,%eax
10a3af: 40 inc %eax
10a3b0: a3 a4 62 12 00 mov %eax,0x1262a4
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
10a3b5: 83 ec 0c sub $0xc,%esp
10a3b8: 68 8c 66 12 00 push $0x12668c
10a3bd: e8 6a 1d 00 00 call 10c12c <_Objects_Allocate>
10a3c2: 89 c6 mov %eax,%esi
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
10a3c4: 83 c4 10 add $0x10,%esp
10a3c7: 85 c0 test %eax,%eax
10a3c9: 75 0c jne 10a3d7 <pthread_barrier_init+0x77>
_Thread_Enable_dispatch();
10a3cb: e8 61 29 00 00 call 10cd31 <_Thread_Enable_dispatch>
10a3d0: b8 0b 00 00 00 mov $0xb,%eax
return EAGAIN;
10a3d5: eb 38 jmp 10a40f <pthread_barrier_init+0xaf>
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
10a3d7: 50 push %eax
10a3d8: 50 push %eax
10a3d9: 8d 45 e0 lea -0x20(%ebp),%eax
10a3dc: 50 push %eax
10a3dd: 8d 46 10 lea 0x10(%esi),%eax
10a3e0: 50 push %eax
10a3e1: e8 7a 14 00 00 call 10b860 <_CORE_barrier_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10a3e6: 8b 46 08 mov 0x8(%esi),%eax
10a3e9: 0f b7 c8 movzwl %ax,%ecx
10a3ec: 8b 15 a8 66 12 00 mov 0x1266a8,%edx
10a3f2: 89 34 8a mov %esi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10a3f5: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
10a3fc: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10a3fe: e8 2e 29 00 00 call 10cd31 <_Thread_Enable_dispatch>
10a403: 31 c0 xor %eax,%eax
return 0;
10a405: 83 c4 10 add $0x10,%esp
10a408: eb 05 jmp 10a40f <pthread_barrier_init+0xaf>
10a40a: b8 16 00 00 00 mov $0x16,%eax
}
10a40f: 8d 65 f4 lea -0xc(%ebp),%esp
10a412: 5b pop %ebx
10a413: 5e pop %esi
10a414: 5f pop %edi
10a415: c9 leave
10a416: c3 ret
00109d40 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
109d40: 55 push %ebp
109d41: 89 e5 mov %esp,%ebp
109d43: 56 push %esi
109d44: 53 push %ebx
109d45: 8b 5d 08 mov 0x8(%ebp),%ebx
109d48: 8b 75 0c mov 0xc(%ebp),%esi
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
109d4b: 85 db test %ebx,%ebx
109d4d: 74 4b je 109d9a <pthread_cleanup_push+0x5a>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
109d4f: a1 dc 61 12 00 mov 0x1261dc,%eax
109d54: 40 inc %eax
109d55: a3 dc 61 12 00 mov %eax,0x1261dc
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
109d5a: 83 ec 0c sub $0xc,%esp
109d5d: 6a 10 push $0x10
109d5f: e8 84 3a 00 00 call 10d7e8 <_Workspace_Allocate>
if ( handler ) {
109d64: 83 c4 10 add $0x10,%esp
109d67: 85 c0 test %eax,%eax
109d69: 74 24 je 109d8f <pthread_cleanup_push+0x4f><== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
109d6b: 8b 15 98 62 12 00 mov 0x126298,%edx
109d71: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx
109d77: 81 c2 e0 00 00 00 add $0xe0,%edx
handler->routine = routine;
109d7d: 89 58 08 mov %ebx,0x8(%eax)
handler->arg = arg;
109d80: 89 70 0c mov %esi,0xc(%eax)
_Chain_Append( handler_stack, &handler->Node );
109d83: 51 push %ecx
109d84: 51 push %ecx
109d85: 50 push %eax
109d86: 52 push %edx
109d87: e8 88 15 00 00 call 10b314 <_Chain_Append>
109d8c: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
}
109d8f: 8d 65 f8 lea -0x8(%ebp),%esp
109d92: 5b pop %ebx
109d93: 5e pop %esi
109d94: c9 leave
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
109d95: e9 db 29 00 00 jmp 10c775 <_Thread_Enable_dispatch>
}
109d9a: 8d 65 f8 lea -0x8(%ebp),%esp
109d9d: 5b pop %ebx
109d9e: 5e pop %esi
109d9f: c9 leave
109da0: c3 ret
0010aab0 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
10aab0: 55 push %ebp
10aab1: 89 e5 mov %esp,%ebp
10aab3: 56 push %esi
10aab4: 53 push %ebx
10aab5: 8b 45 0c mov 0xc(%ebp),%eax
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10aab8: bb 0c 0c 12 00 mov $0x120c0c,%ebx
10aabd: 85 c0 test %eax,%eax
10aabf: 74 02 je 10aac3 <pthread_cond_init+0x13>
10aac1: 89 c3 mov %eax,%ebx
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10aac3: 83 7b 04 01 cmpl $0x1,0x4(%ebx)
10aac7: 74 78 je 10ab41 <pthread_cond_init+0x91><== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
10aac9: 83 3b 00 cmpl $0x0,(%ebx)
10aacc: 74 73 je 10ab41 <pthread_cond_init+0x91>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10aace: a1 54 72 12 00 mov 0x127254,%eax
10aad3: 40 inc %eax
10aad4: a3 54 72 12 00 mov %eax,0x127254
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
10aad9: 83 ec 0c sub $0xc,%esp
10aadc: 68 d4 76 12 00 push $0x1276d4
10aae1: e8 aa 22 00 00 call 10cd90 <_Objects_Allocate>
10aae6: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
10aae8: 83 c4 10 add $0x10,%esp
10aaeb: 85 c0 test %eax,%eax
10aaed: 75 0c jne 10aafb <pthread_cond_init+0x4b>
_Thread_Enable_dispatch();
10aaef: e8 a1 2e 00 00 call 10d995 <_Thread_Enable_dispatch>
10aaf4: b8 0c 00 00 00 mov $0xc,%eax
return ENOMEM;
10aaf9: eb 4b jmp 10ab46 <pthread_cond_init+0x96>
}
the_cond->process_shared = the_attr->process_shared;
10aafb: 8b 43 04 mov 0x4(%ebx),%eax
10aafe: 89 46 10 mov %eax,0x10(%esi)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10ab01: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
10ab08: 6a 74 push $0x74
10ab0a: 68 00 08 00 00 push $0x800
10ab0f: 6a 00 push $0x0
10ab11: 8d 46 18 lea 0x18(%esi),%eax
10ab14: 50 push %eax
10ab15: e8 92 35 00 00 call 10e0ac <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10ab1a: 8b 46 08 mov 0x8(%esi),%eax
10ab1d: 0f b7 c8 movzwl %ax,%ecx
10ab20: 8b 15 f0 76 12 00 mov 0x1276f0,%edx
10ab26: 89 34 8a mov %esi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10ab29: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
10ab30: 8b 55 08 mov 0x8(%ebp),%edx
10ab33: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
10ab35: e8 5b 2e 00 00 call 10d995 <_Thread_Enable_dispatch>
10ab3a: 31 c0 xor %eax,%eax
return 0;
10ab3c: 83 c4 10 add $0x10,%esp
10ab3f: eb 05 jmp 10ab46 <pthread_cond_init+0x96>
10ab41: b8 16 00 00 00 mov $0x16,%eax
}
10ab46: 8d 65 f8 lea -0x8(%ebp),%esp
10ab49: 5b pop %ebx
10ab4a: 5e pop %esi
10ab4b: c9 leave
10ab4c: c3 ret
0010a964 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
10a964: 55 push %ebp
10a965: 89 e5 mov %esp,%ebp
10a967: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10a96a: 85 c0 test %eax,%eax
10a96c: 74 0f je 10a97d <pthread_condattr_destroy+0x19>
10a96e: 83 38 00 cmpl $0x0,(%eax)
10a971: 74 0a je 10a97d <pthread_condattr_destroy+0x19><== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
10a973: c7 00 00 00 00 00 movl $0x0,(%eax)
10a979: 31 c0 xor %eax,%eax
return 0;
10a97b: eb 05 jmp 10a982 <pthread_condattr_destroy+0x1e>
10a97d: b8 16 00 00 00 mov $0x16,%eax
}
10a982: c9 leave
10a983: c3 ret
0010a08c <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
10a08c: 55 push %ebp
10a08d: 89 e5 mov %esp,%ebp
10a08f: 57 push %edi
10a090: 56 push %esi
10a091: 53 push %ebx
10a092: 83 ec 4c sub $0x4c,%esp
10a095: 8b 45 0c mov 0xc(%ebp),%eax
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
10a098: c7 45 b0 0e 00 00 00 movl $0xe,-0x50(%ebp)
10a09f: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10a0a3: 0f 84 08 02 00 00 je 10a2b1 <pthread_create+0x225>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10a0a9: bb 74 f7 11 00 mov $0x11f774,%ebx
10a0ae: 85 c0 test %eax,%eax
10a0b0: 74 02 je 10a0b4 <pthread_create+0x28>
10a0b2: 89 c3 mov %eax,%ebx
if ( !the_attr->is_initialized )
10a0b4: 83 3b 00 cmpl $0x0,(%ebx)
10a0b7: 0f 84 ed 01 00 00 je 10a2aa <pthread_create+0x21e>
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
10a0bd: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10a0c1: 74 0f je 10a0d2 <pthread_create+0x46>
10a0c3: 8b 43 08 mov 0x8(%ebx),%eax
10a0c6: 3b 05 14 12 12 00 cmp 0x121214,%eax
10a0cc: 0f 82 d8 01 00 00 jb 10a2aa <pthread_create+0x21e>
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
10a0d2: 8b 43 10 mov 0x10(%ebx),%eax
10a0d5: 83 f8 01 cmp $0x1,%eax
10a0d8: 74 0b je 10a0e5 <pthread_create+0x59>
10a0da: 83 f8 02 cmp $0x2,%eax
10a0dd: 0f 85 c7 01 00 00 jne 10a2aa <pthread_create+0x21e>
10a0e3: eb 1f jmp 10a104 <pthread_create+0x78>
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10a0e5: a1 a0 52 12 00 mov 0x1252a0,%eax
10a0ea: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
schedpolicy = api->schedpolicy;
10a0f0: 8b 86 80 00 00 00 mov 0x80(%esi),%eax
10a0f6: 89 45 ac mov %eax,-0x54(%ebp)
schedparam = api->schedparam;
10a0f9: 8d 7d c4 lea -0x3c(%ebp),%edi
10a0fc: 81 c6 84 00 00 00 add $0x84,%esi
10a102: eb 0c jmp 10a110 <pthread_create+0x84>
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
10a104: 8b 53 14 mov 0x14(%ebx),%edx
10a107: 89 55 ac mov %edx,-0x54(%ebp)
schedparam = the_attr->schedparam;
10a10a: 8d 7d c4 lea -0x3c(%ebp),%edi
10a10d: 8d 73 18 lea 0x18(%ebx),%esi
10a110: b9 07 00 00 00 mov $0x7,%ecx
10a115: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
10a117: c7 45 b0 86 00 00 00 movl $0x86,-0x50(%ebp)
10a11e: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
10a122: 0f 85 89 01 00 00 jne 10a2b1 <pthread_create+0x225>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
10a128: 83 ec 0c sub $0xc,%esp
10a12b: ff 75 c4 pushl -0x3c(%ebp)
10a12e: e8 8d 53 00 00 call 10f4c0 <_POSIX_Priority_Is_valid>
10a133: 83 c4 10 add $0x10,%esp
10a136: 84 c0 test %al,%al
10a138: 0f 84 6c 01 00 00 je 10a2aa <pthread_create+0x21e> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
10a13e: 8b 7d c4 mov -0x3c(%ebp),%edi
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10a141: 0f b6 35 18 12 12 00 movzbl 0x121218,%esi
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
10a148: 8d 45 e0 lea -0x20(%ebp),%eax
10a14b: 50 push %eax
10a14c: 8d 45 e4 lea -0x1c(%ebp),%eax
10a14f: 50 push %eax
10a150: 8d 45 c4 lea -0x3c(%ebp),%eax
10a153: 50 push %eax
10a154: ff 75 ac pushl -0x54(%ebp)
10a157: e8 84 53 00 00 call 10f4e0 <_POSIX_Thread_Translate_sched_param>
10a15c: 89 45 b0 mov %eax,-0x50(%ebp)
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
10a15f: 83 c4 10 add $0x10,%esp
10a162: 85 c0 test %eax,%eax
10a164: 0f 85 47 01 00 00 jne 10a2b1 <pthread_create+0x225> <== NEVER TAKEN
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10a16a: 83 ec 0c sub $0xc,%esp
10a16d: ff 35 98 52 12 00 pushl 0x125298
10a173: e8 44 15 00 00 call 10b6bc <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
10a178: c7 04 24 4c 54 12 00 movl $0x12544c,(%esp)
10a17f: e8 0c 1e 00 00 call 10bf90 <_Objects_Allocate>
10a184: 89 c2 mov %eax,%edx
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
10a186: 83 c4 10 add $0x10,%esp
10a189: 85 c0 test %eax,%eax
10a18b: 75 05 jne 10a192 <pthread_create+0x106>
_RTEMS_Unlock_allocator();
10a18d: 83 ec 0c sub $0xc,%esp
10a190: eb 53 jmp 10a1e5 <pthread_create+0x159>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
10a192: 8b 43 08 mov 0x8(%ebx),%eax
10a195: 51 push %ecx
10a196: 6a 00 push $0x0
10a198: 6a 00 push $0x0
10a19a: ff 75 e0 pushl -0x20(%ebp)
10a19d: ff 75 e4 pushl -0x1c(%ebp)
10a1a0: 6a 01 push $0x1
10a1a2: 81 e6 ff 00 00 00 and $0xff,%esi
10a1a8: 29 fe sub %edi,%esi
10a1aa: 56 push %esi
10a1ab: 6a 01 push $0x1
10a1ad: 8b 0d 14 12 12 00 mov 0x121214,%ecx
10a1b3: d1 e1 shl %ecx
10a1b5: 39 c1 cmp %eax,%ecx
10a1b7: 73 02 jae 10a1bb <pthread_create+0x12f>
10a1b9: 89 c1 mov %eax,%ecx
10a1bb: 51 push %ecx
10a1bc: ff 73 04 pushl 0x4(%ebx)
10a1bf: 52 push %edx
10a1c0: 68 4c 54 12 00 push $0x12544c
10a1c5: 89 55 a8 mov %edx,-0x58(%ebp)
10a1c8: e8 8b 2a 00 00 call 10cc58 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
10a1cd: 83 c4 30 add $0x30,%esp
10a1d0: 84 c0 test %al,%al
10a1d2: 8b 55 a8 mov -0x58(%ebp),%edx
10a1d5: 75 25 jne 10a1fc <pthread_create+0x170>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
10a1d7: 53 push %ebx
10a1d8: 53 push %ebx
10a1d9: 52 push %edx
10a1da: 68 4c 54 12 00 push $0x12544c
10a1df: e8 98 20 00 00 call 10c27c <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
10a1e4: 59 pop %ecx
10a1e5: ff 35 98 52 12 00 pushl 0x125298
10a1eb: e8 14 15 00 00 call 10b704 <_API_Mutex_Unlock>
10a1f0: c7 45 b0 0b 00 00 00 movl $0xb,-0x50(%ebp)
10a1f7: e9 a9 00 00 00 jmp 10a2a5 <pthread_create+0x219>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10a1fc: 8b 8a f8 00 00 00 mov 0xf8(%edx),%ecx
10a202: 89 4d b4 mov %ecx,-0x4c(%ebp)
api->Attributes = *the_attr;
10a205: b9 0f 00 00 00 mov $0xf,%ecx
10a20a: 8b 7d b4 mov -0x4c(%ebp),%edi
10a20d: 89 de mov %ebx,%esi
10a20f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = the_attr->detachstate;
10a211: 8b 43 38 mov 0x38(%ebx),%eax
10a214: 8b 4d b4 mov -0x4c(%ebp),%ecx
10a217: 89 41 3c mov %eax,0x3c(%ecx)
api->schedpolicy = schedpolicy;
10a21a: 8b 45 ac mov -0x54(%ebp),%eax
10a21d: 89 81 80 00 00 00 mov %eax,0x80(%ecx)
api->schedparam = schedparam;
10a223: 89 cf mov %ecx,%edi
10a225: 81 c7 84 00 00 00 add $0x84,%edi
10a22b: 8d 75 c4 lea -0x3c(%ebp),%esi
10a22e: b9 07 00 00 00 mov $0x7,%ecx
10a233: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
* This insures we evaluate the process-wide signals pending when we
* first run.
*
* NOTE: Since the thread starts with all unblocked, this is necessary.
*/
the_thread->do_post_task_switch_extension = true;
10a235: c6 42 74 01 movb $0x1,0x74(%edx)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
10a239: 83 ec 0c sub $0xc,%esp
10a23c: 6a 00 push $0x0
10a23e: ff 75 14 pushl 0x14(%ebp)
10a241: ff 75 10 pushl 0x10(%ebp)
10a244: 6a 01 push $0x1
10a246: 52 push %edx
10a247: 89 55 a8 mov %edx,-0x58(%ebp)
10a24a: e8 a1 33 00 00 call 10d5f0 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
10a24f: 83 c4 20 add $0x20,%esp
10a252: 83 7d ac 04 cmpl $0x4,-0x54(%ebp)
10a256: 8b 55 a8 mov -0x58(%ebp),%edx
10a259: 75 34 jne 10a28f <pthread_create+0x203>
_Watchdog_Insert_ticks(
10a25b: 83 ec 0c sub $0xc,%esp
10a25e: 8b 45 b4 mov -0x4c(%ebp),%eax
10a261: 05 8c 00 00 00 add $0x8c,%eax
10a266: 50 push %eax
10a267: e8 30 35 00 00 call 10d79c <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10a26c: 8b 4d b4 mov -0x4c(%ebp),%ecx
10a26f: 89 81 b0 00 00 00 mov %eax,0xb0(%ecx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10a275: 58 pop %eax
10a276: 5a pop %edx
10a277: 89 c8 mov %ecx,%eax
10a279: 05 a4 00 00 00 add $0xa4,%eax
10a27e: 50 push %eax
10a27f: 68 c0 52 12 00 push $0x1252c0
10a284: e8 bf 37 00 00 call 10da48 <_Watchdog_Insert>
10a289: 83 c4 10 add $0x10,%esp
10a28c: 8b 55 a8 mov -0x58(%ebp),%edx
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
10a28f: 8b 52 08 mov 0x8(%edx),%edx
10a292: 8b 45 08 mov 0x8(%ebp),%eax
10a295: 89 10 mov %edx,(%eax)
_RTEMS_Unlock_allocator();
10a297: 83 ec 0c sub $0xc,%esp
10a29a: ff 35 98 52 12 00 pushl 0x125298
10a2a0: e8 5f 14 00 00 call 10b704 <_API_Mutex_Unlock>
return 0;
10a2a5: 83 c4 10 add $0x10,%esp
10a2a8: eb 07 jmp 10a2b1 <pthread_create+0x225>
10a2aa: c7 45 b0 16 00 00 00 movl $0x16,-0x50(%ebp)
}
10a2b1: 8b 45 b0 mov -0x50(%ebp),%eax
10a2b4: 8d 65 f4 lea -0xc(%ebp),%esp
10a2b7: 5b pop %ebx
10a2b8: 5e pop %esi
10a2b9: 5f pop %edi
10a2ba: c9 leave
10a2bb: c3 ret
0011055c <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
11055c: 55 push %ebp
11055d: 89 e5 mov %esp,%ebp
11055f: 83 ec 10 sub $0x10,%esp
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
110562: ff 75 08 pushl 0x8(%ebp)
110565: ff 35 b0 42 12 00 pushl 0x1242b0
11056b: e8 88 ff ff ff call 1104f8 <_POSIX_Thread_Exit>
110570: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
110573: c9 leave <== NOT EXECUTED
110574: c3 ret <== NOT EXECUTED
00109be8 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
109be8: 55 push %ebp
109be9: 89 e5 mov %esp,%ebp
109beb: 8b 45 08 mov 0x8(%ebp),%eax
109bee: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
109bf1: 85 c0 test %eax,%eax
109bf3: 74 12 je 109c07 <pthread_mutexattr_gettype+0x1f>
return EINVAL;
if ( !attr->is_initialized )
109bf5: 83 38 00 cmpl $0x0,(%eax)
109bf8: 74 0d je 109c07 <pthread_mutexattr_gettype+0x1f>
return EINVAL;
if ( !type )
109bfa: 85 d2 test %edx,%edx
109bfc: 74 09 je 109c07 <pthread_mutexattr_gettype+0x1f><== NEVER TAKEN
return EINVAL;
*type = attr->type;
109bfe: 8b 40 10 mov 0x10(%eax),%eax
109c01: 89 02 mov %eax,(%edx)
109c03: 31 c0 xor %eax,%eax
return 0;
109c05: eb 05 jmp 109c0c <pthread_mutexattr_gettype+0x24>
109c07: b8 16 00 00 00 mov $0x16,%eax
}
109c0c: c9 leave
109c0d: c3 ret
0010ba80 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
10ba80: 55 push %ebp
10ba81: 89 e5 mov %esp,%ebp
10ba83: 8b 45 08 mov 0x8(%ebp),%eax
10ba86: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10ba89: 85 c0 test %eax,%eax
10ba8b: 74 11 je 10ba9e <pthread_mutexattr_setpshared+0x1e>
10ba8d: 83 38 00 cmpl $0x0,(%eax)
10ba90: 74 0c je 10ba9e <pthread_mutexattr_setpshared+0x1e>
return EINVAL;
switch ( pshared ) {
10ba92: 83 fa 01 cmp $0x1,%edx
10ba95: 77 07 ja 10ba9e <pthread_mutexattr_setpshared+0x1e><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10ba97: 89 50 04 mov %edx,0x4(%eax)
10ba9a: 31 c0 xor %eax,%eax
return 0;
10ba9c: eb 05 jmp 10baa3 <pthread_mutexattr_setpshared+0x23>
10ba9e: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10baa3: c9 leave
10baa4: c3 ret
00109c38 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
109c38: 55 push %ebp
109c39: 89 e5 mov %esp,%ebp
109c3b: 8b 45 08 mov 0x8(%ebp),%eax
109c3e: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
109c41: 85 c0 test %eax,%eax
109c43: 74 11 je 109c56 <pthread_mutexattr_settype+0x1e>
109c45: 83 38 00 cmpl $0x0,(%eax)
109c48: 74 0c je 109c56 <pthread_mutexattr_settype+0x1e><== NEVER TAKEN
return EINVAL;
switch ( type ) {
109c4a: 83 fa 03 cmp $0x3,%edx
109c4d: 77 07 ja 109c56 <pthread_mutexattr_settype+0x1e>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
109c4f: 89 50 10 mov %edx,0x10(%eax)
109c52: 31 c0 xor %eax,%eax
return 0;
109c54: eb 05 jmp 109c5b <pthread_mutexattr_settype+0x23>
109c56: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
109c5b: c9 leave
109c5c: c3 ret
0010a6d4 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
10a6d4: 55 push %ebp
10a6d5: 89 e5 mov %esp,%ebp
10a6d7: 56 push %esi
10a6d8: 53 push %ebx
10a6d9: 83 ec 10 sub $0x10,%esp
10a6dc: 8b 5d 08 mov 0x8(%ebp),%ebx
10a6df: 8b 75 0c mov 0xc(%ebp),%esi
if ( !once_control || !init_routine )
10a6e2: 85 f6 test %esi,%esi
10a6e4: 74 04 je 10a6ea <pthread_once+0x16>
10a6e6: 85 db test %ebx,%ebx
10a6e8: 75 07 jne 10a6f1 <pthread_once+0x1d>
10a6ea: b8 16 00 00 00 mov $0x16,%eax
10a6ef: eb 4b jmp 10a73c <pthread_once+0x68>
return EINVAL;
if ( !once_control->init_executed ) {
10a6f1: 31 c0 xor %eax,%eax
10a6f3: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10a6f7: 75 43 jne 10a73c <pthread_once+0x68>
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
10a6f9: 52 push %edx
10a6fa: 8d 45 f4 lea -0xc(%ebp),%eax
10a6fd: 50 push %eax
10a6fe: 68 00 01 00 00 push $0x100
10a703: 68 00 01 00 00 push $0x100
10a708: e8 93 0a 00 00 call 10b1a0 <rtems_task_mode>
if ( !once_control->init_executed ) {
10a70d: 83 c4 10 add $0x10,%esp
10a710: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10a714: 75 0f jne 10a725 <pthread_once+0x51> <== NEVER TAKEN
once_control->is_initialized = true;
10a716: c7 03 01 00 00 00 movl $0x1,(%ebx)
once_control->init_executed = true;
10a71c: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
(*init_routine)();
10a723: ff d6 call *%esi
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10a725: 50 push %eax
10a726: 8d 45 f4 lea -0xc(%ebp),%eax
10a729: 50 push %eax
10a72a: 68 00 01 00 00 push $0x100
10a72f: ff 75 f4 pushl -0xc(%ebp)
10a732: e8 69 0a 00 00 call 10b1a0 <rtems_task_mode>
10a737: 31 c0 xor %eax,%eax
10a739: 83 c4 10 add $0x10,%esp
}
return 0;
}
10a73c: 8d 65 f8 lea -0x8(%ebp),%esp
10a73f: 5b pop %ebx
10a740: 5e pop %esi
10a741: c9 leave
10a742: c3 ret
0010aca0 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
10aca0: 55 push %ebp
10aca1: 89 e5 mov %esp,%ebp
10aca3: 56 push %esi
10aca4: 53 push %ebx
10aca5: 83 ec 10 sub $0x10,%esp
10aca8: 8b 5d 08 mov 0x8(%ebp),%ebx
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
10acab: 85 db test %ebx,%ebx
10acad: 0f 84 81 00 00 00 je 10ad34 <pthread_rwlock_init+0x94>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10acb3: 8b 75 0c mov 0xc(%ebp),%esi
10acb6: 85 f6 test %esi,%esi
10acb8: 75 0f jne 10acc9 <pthread_rwlock_init+0x29>
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
10acba: 83 ec 0c sub $0xc,%esp
10acbd: 8d 75 ec lea -0x14(%ebp),%esi
10acc0: 56 push %esi
10acc1: e8 3e 09 00 00 call 10b604 <pthread_rwlockattr_init>
10acc6: 83 c4 10 add $0x10,%esp
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10acc9: 83 3e 00 cmpl $0x0,(%esi)
10accc: 74 66 je 10ad34 <pthread_rwlock_init+0x94><== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
10acce: 83 7e 04 00 cmpl $0x0,0x4(%esi)
10acd2: 75 60 jne 10ad34 <pthread_rwlock_init+0x94><== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10acd4: a1 04 72 12 00 mov 0x127204,%eax
10acd9: 40 inc %eax
10acda: a3 04 72 12 00 mov %eax,0x127204
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
10acdf: 83 ec 0c sub $0xc,%esp
10ace2: 68 2c 74 12 00 push $0x12742c
10ace7: e8 e4 22 00 00 call 10cfd0 <_Objects_Allocate>
10acec: 89 c6 mov %eax,%esi
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
10acee: 83 c4 10 add $0x10,%esp
10acf1: 85 c0 test %eax,%eax
10acf3: 75 0c jne 10ad01 <pthread_rwlock_init+0x61>
_Thread_Enable_dispatch();
10acf5: e8 db 2e 00 00 call 10dbd5 <_Thread_Enable_dispatch>
10acfa: b8 0b 00 00 00 mov $0xb,%eax
return EAGAIN;
10acff: eb 38 jmp 10ad39 <pthread_rwlock_init+0x99>
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
10ad01: 50 push %eax
10ad02: 50 push %eax
10ad03: 8d 45 f4 lea -0xc(%ebp),%eax
10ad06: 50 push %eax
10ad07: 8d 46 10 lea 0x10(%esi),%eax
10ad0a: 50 push %eax
10ad0b: e8 4c 1b 00 00 call 10c85c <_CORE_RWLock_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10ad10: 8b 46 08 mov 0x8(%esi),%eax
10ad13: 0f b7 c8 movzwl %ax,%ecx
10ad16: 8b 15 48 74 12 00 mov 0x127448,%edx
10ad1c: 89 34 8a mov %esi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10ad1f: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
10ad26: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10ad28: e8 a8 2e 00 00 call 10dbd5 <_Thread_Enable_dispatch>
10ad2d: 31 c0 xor %eax,%eax
return 0;
10ad2f: 83 c4 10 add $0x10,%esp
10ad32: eb 05 jmp 10ad39 <pthread_rwlock_init+0x99>
10ad34: b8 16 00 00 00 mov $0x16,%eax
}
10ad39: 8d 65 f8 lea -0x8(%ebp),%esp
10ad3c: 5b pop %ebx
10ad3d: 5e pop %esi
10ad3e: c9 leave
10ad3f: c3 ret
0010ada4 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10ada4: 55 push %ebp
10ada5: 89 e5 mov %esp,%ebp
10ada7: 56 push %esi
10ada8: 53 push %ebx
10ada9: 83 ec 20 sub $0x20,%esp
10adac: 8b 75 08 mov 0x8(%ebp),%esi
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10adaf: 85 f6 test %esi,%esi
10adb1: 0f 84 89 00 00 00 je 10ae40 <pthread_rwlock_timedrdlock+0x9c>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10adb7: 50 push %eax
10adb8: 50 push %eax
10adb9: 8d 45 f0 lea -0x10(%ebp),%eax
10adbc: 50 push %eax
10adbd: ff 75 0c pushl 0xc(%ebp)
10adc0: e8 87 56 00 00 call 11044c <_POSIX_Absolute_timeout_to_ticks>
10adc5: 89 c3 mov %eax,%ebx
10adc7: 83 c4 0c add $0xc,%esp
10adca: 8d 45 f4 lea -0xc(%ebp),%eax
10adcd: 50 push %eax
10adce: ff 36 pushl (%esi)
10add0: 68 2c 74 12 00 push $0x12742c
10add5: e8 0a 26 00 00 call 10d3e4 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
10adda: 83 c4 10 add $0x10,%esp
10addd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10ade1: 75 5d jne 10ae40 <pthread_rwlock_timedrdlock+0x9c>
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
10ade3: 83 fb 03 cmp $0x3,%ebx
10ade6: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10ade9: 83 ec 0c sub $0xc,%esp
10adec: 6a 00 push $0x0
10adee: ff 75 f0 pushl -0x10(%ebp)
10adf1: 0f b6 ca movzbl %dl,%ecx
10adf4: 51 push %ecx
10adf5: ff 36 pushl (%esi)
10adf7: 83 c0 10 add $0x10,%eax
10adfa: 50 push %eax
10adfb: 88 55 e4 mov %dl,-0x1c(%ebp)
10adfe: e8 8d 1a 00 00 call 10c890 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10ae03: 83 c4 20 add $0x20,%esp
10ae06: e8 ca 2d 00 00 call 10dbd5 <_Thread_Enable_dispatch>
if ( !do_wait ) {
10ae0b: 8a 55 e4 mov -0x1c(%ebp),%dl
10ae0e: 84 d2 test %dl,%dl
10ae10: 75 19 jne 10ae2b <pthread_rwlock_timedrdlock+0x87>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10ae12: a1 c0 72 12 00 mov 0x1272c0,%eax
10ae17: 83 78 34 02 cmpl $0x2,0x34(%eax)
10ae1b: 75 0e jne 10ae2b <pthread_rwlock_timedrdlock+0x87>
switch (status) {
10ae1d: 85 db test %ebx,%ebx
10ae1f: 74 1f je 10ae40 <pthread_rwlock_timedrdlock+0x9c><== NEVER TAKEN
10ae21: b8 74 00 00 00 mov $0x74,%eax
10ae26: 83 fb 02 cmp $0x2,%ebx
10ae29: 76 1a jbe 10ae45 <pthread_rwlock_timedrdlock+0xa1><== ALWAYS TAKEN
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10ae2b: 83 ec 0c sub $0xc,%esp
10ae2e: a1 c0 72 12 00 mov 0x1272c0,%eax
10ae33: ff 70 34 pushl 0x34(%eax)
10ae36: e8 b9 00 00 00 call 10aef4 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10ae3b: 83 c4 10 add $0x10,%esp
10ae3e: eb 05 jmp 10ae45 <pthread_rwlock_timedrdlock+0xa1>
10ae40: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ae45: 8d 65 f8 lea -0x8(%ebp),%esp
10ae48: 5b pop %ebx
10ae49: 5e pop %esi
10ae4a: c9 leave
10ae4b: c3 ret
0010ae4c <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10ae4c: 55 push %ebp
10ae4d: 89 e5 mov %esp,%ebp
10ae4f: 56 push %esi
10ae50: 53 push %ebx
10ae51: 83 ec 20 sub $0x20,%esp
10ae54: 8b 75 08 mov 0x8(%ebp),%esi
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10ae57: 85 f6 test %esi,%esi
10ae59: 0f 84 89 00 00 00 je 10aee8 <pthread_rwlock_timedwrlock+0x9c>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10ae5f: 50 push %eax
10ae60: 50 push %eax
10ae61: 8d 45 f0 lea -0x10(%ebp),%eax
10ae64: 50 push %eax
10ae65: ff 75 0c pushl 0xc(%ebp)
10ae68: e8 df 55 00 00 call 11044c <_POSIX_Absolute_timeout_to_ticks>
10ae6d: 89 c3 mov %eax,%ebx
10ae6f: 83 c4 0c add $0xc,%esp
10ae72: 8d 45 f4 lea -0xc(%ebp),%eax
10ae75: 50 push %eax
10ae76: ff 36 pushl (%esi)
10ae78: 68 2c 74 12 00 push $0x12742c
10ae7d: e8 62 25 00 00 call 10d3e4 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
10ae82: 83 c4 10 add $0x10,%esp
10ae85: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10ae89: 75 5d jne 10aee8 <pthread_rwlock_timedwrlock+0x9c>
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
10ae8b: 83 fb 03 cmp $0x3,%ebx
10ae8e: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10ae91: 83 ec 0c sub $0xc,%esp
10ae94: 6a 00 push $0x0
10ae96: ff 75 f0 pushl -0x10(%ebp)
10ae99: 0f b6 ca movzbl %dl,%ecx
10ae9c: 51 push %ecx
10ae9d: ff 36 pushl (%esi)
10ae9f: 83 c0 10 add $0x10,%eax
10aea2: 50 push %eax
10aea3: 88 55 e4 mov %dl,-0x1c(%ebp)
10aea6: e8 9d 1a 00 00 call 10c948 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10aeab: 83 c4 20 add $0x20,%esp
10aeae: e8 22 2d 00 00 call 10dbd5 <_Thread_Enable_dispatch>
if ( !do_wait &&
10aeb3: 8a 55 e4 mov -0x1c(%ebp),%dl
10aeb6: 84 d2 test %dl,%dl
10aeb8: 75 19 jne 10aed3 <pthread_rwlock_timedwrlock+0x87>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
10aeba: a1 c0 72 12 00 mov 0x1272c0,%eax
10aebf: 83 78 34 02 cmpl $0x2,0x34(%eax)
10aec3: 75 0e jne 10aed3 <pthread_rwlock_timedwrlock+0x87>
switch (status) {
10aec5: 85 db test %ebx,%ebx
10aec7: 74 1f je 10aee8 <pthread_rwlock_timedwrlock+0x9c><== NEVER TAKEN
10aec9: b8 74 00 00 00 mov $0x74,%eax
10aece: 83 fb 02 cmp $0x2,%ebx
10aed1: 76 1a jbe 10aeed <pthread_rwlock_timedwrlock+0xa1><== ALWAYS TAKEN
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10aed3: 83 ec 0c sub $0xc,%esp
10aed6: a1 c0 72 12 00 mov 0x1272c0,%eax
10aedb: ff 70 34 pushl 0x34(%eax)
10aede: e8 11 00 00 00 call 10aef4 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10aee3: 83 c4 10 add $0x10,%esp
10aee6: eb 05 jmp 10aeed <pthread_rwlock_timedwrlock+0xa1>
10aee8: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10aeed: 8d 65 f8 lea -0x8(%ebp),%esp
10aef0: 5b pop %ebx
10aef1: 5e pop %esi
10aef2: c9 leave
10aef3: c3 ret
0010afcc <pthread_rwlock_unlock>:
*/
int pthread_rwlock_unlock(
pthread_rwlock_t *rwlock
)
{
10afcc: 55 push %ebp
10afcd: 89 e5 mov %esp,%ebp
10afcf: 53 push %ebx
10afd0: 83 ec 14 sub $0x14,%esp
10afd3: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
CORE_RWLock_Status status;
if ( !rwlock )
10afd6: 85 c0 test %eax,%eax
10afd8: 74 3a je 10b014 <pthread_rwlock_unlock+0x48><== NEVER TAKEN
10afda: 52 push %edx
10afdb: 8d 55 f4 lea -0xc(%ebp),%edx
10afde: 52 push %edx
10afdf: ff 30 pushl (%eax)
10afe1: 68 2c 74 12 00 push $0x12742c
10afe6: e8 f9 23 00 00 call 10d3e4 <_Objects_Get>
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
10afeb: 83 c4 10 add $0x10,%esp
10afee: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10aff2: 75 20 jne 10b014 <pthread_rwlock_unlock+0x48><== NEVER TAKEN
case OBJECTS_LOCAL:
status = _CORE_RWLock_Release( &the_rwlock->RWLock );
10aff4: 83 ec 0c sub $0xc,%esp
10aff7: 83 c0 10 add $0x10,%eax
10affa: 50 push %eax
10affb: e8 cc 19 00 00 call 10c9cc <_CORE_RWLock_Release>
10b000: 89 c3 mov %eax,%ebx
_Thread_Enable_dispatch();
10b002: e8 ce 2b 00 00 call 10dbd5 <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code( status );
10b007: 89 1c 24 mov %ebx,(%esp)
10b00a: e8 e5 fe ff ff call 10aef4 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10b00f: 83 c4 10 add $0x10,%esp
10b012: eb 05 jmp 10b019 <pthread_rwlock_unlock+0x4d>
10b014: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b019: 8b 5d fc mov -0x4(%ebp),%ebx
10b01c: c9 leave
10b01d: c3 ret
0010b624 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
10b624: 55 push %ebp
10b625: 89 e5 mov %esp,%ebp
10b627: 8b 45 08 mov 0x8(%ebp),%eax
10b62a: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10b62d: 85 c0 test %eax,%eax
10b62f: 74 11 je 10b642 <pthread_rwlockattr_setpshared+0x1e>
return EINVAL;
if ( !attr->is_initialized )
10b631: 83 38 00 cmpl $0x0,(%eax)
10b634: 74 0c je 10b642 <pthread_rwlockattr_setpshared+0x1e>
return EINVAL;
switch ( pshared ) {
10b636: 83 fa 01 cmp $0x1,%edx
10b639: 77 07 ja 10b642 <pthread_rwlockattr_setpshared+0x1e><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10b63b: 89 50 04 mov %edx,0x4(%eax)
10b63e: 31 c0 xor %eax,%eax
return 0;
10b640: eb 05 jmp 10b647 <pthread_rwlockattr_setpshared+0x23>
10b642: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10b647: c9 leave
10b648: c3 ret
0010c5f8 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
10c5f8: 55 push %ebp
10c5f9: 89 e5 mov %esp,%ebp
10c5fb: 57 push %edi
10c5fc: 56 push %esi
10c5fd: 53 push %ebx
10c5fe: 83 ec 2c sub $0x2c,%esp
10c601: 8b 75 10 mov 0x10(%ebp),%esi
int rc;
/*
* Check all the parameters
*/
if ( !param )
10c604: c7 45 d4 16 00 00 00 movl $0x16,-0x2c(%ebp)
10c60b: 85 f6 test %esi,%esi
10c60d: 0f 84 ff 00 00 00 je 10c712 <pthread_setschedparam+0x11a>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
10c613: 8d 45 e0 lea -0x20(%ebp),%eax
10c616: 50 push %eax
10c617: 8d 45 e4 lea -0x1c(%ebp),%eax
10c61a: 50 push %eax
10c61b: 56 push %esi
10c61c: ff 75 0c pushl 0xc(%ebp)
10c61f: e8 48 4d 00 00 call 11136c <_POSIX_Thread_Translate_sched_param>
10c624: 89 45 d4 mov %eax,-0x2c(%ebp)
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
10c627: 83 c4 10 add $0x10,%esp
10c62a: 85 c0 test %eax,%eax
10c62c: 0f 85 e0 00 00 00 jne 10c712 <pthread_setschedparam+0x11a>
10c632: 53 push %ebx
10c633: 8d 45 dc lea -0x24(%ebp),%eax
10c636: 50 push %eax
10c637: ff 75 08 pushl 0x8(%ebp)
10c63a: 68 ac 94 12 00 push $0x1294ac
10c63f: e8 28 1c 00 00 call 10e26c <_Objects_Get>
10c644: 89 c2 mov %eax,%edx
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
10c646: 83 c4 10 add $0x10,%esp
10c649: 83 7d dc 00 cmpl $0x0,-0x24(%ebp)
10c64d: 74 0c je 10c65b <pthread_setschedparam+0x63>
10c64f: c7 45 d4 03 00 00 00 movl $0x3,-0x2c(%ebp)
10c656: e9 b7 00 00 00 jmp 10c712 <pthread_setschedparam+0x11a>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10c65b: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx
if ( api->schedpolicy == SCHED_SPORADIC )
10c661: 83 bb 80 00 00 00 04 cmpl $0x4,0x80(%ebx)
10c668: 75 18 jne 10c682 <pthread_setschedparam+0x8a>
(void) _Watchdog_Remove( &api->Sporadic_timer );
10c66a: 83 ec 0c sub $0xc,%esp
10c66d: 8d 83 a4 00 00 00 lea 0xa4(%ebx),%eax
10c673: 50 push %eax
10c674: 89 55 d0 mov %edx,-0x30(%ebp)
10c677: e8 0c 34 00 00 call 10fa88 <_Watchdog_Remove>
10c67c: 83 c4 10 add $0x10,%esp
10c67f: 8b 55 d0 mov -0x30(%ebp),%edx
api->schedpolicy = policy;
10c682: 8b 45 0c mov 0xc(%ebp),%eax
10c685: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
api->schedparam = *param;
10c68b: 8d bb 84 00 00 00 lea 0x84(%ebx),%edi
10c691: b9 07 00 00 00 mov $0x7,%ecx
10c696: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_thread->budget_algorithm = budget_algorithm;
10c698: 8b 45 e4 mov -0x1c(%ebp),%eax
10c69b: 89 42 7c mov %eax,0x7c(%edx)
the_thread->budget_callout = budget_callout;
10c69e: 8b 45 e0 mov -0x20(%ebp),%eax
10c6a1: 89 82 80 00 00 00 mov %eax,0x80(%edx)
switch ( api->schedpolicy ) {
10c6a7: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10c6ab: 78 60 js 10c70d <pthread_setschedparam+0x115><== NEVER TAKEN
10c6ad: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
10c6b1: 7e 08 jle 10c6bb <pthread_setschedparam+0xc3>
10c6b3: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10c6b7: 75 54 jne 10c70d <pthread_setschedparam+0x115><== NEVER TAKEN
10c6b9: eb 24 jmp 10c6df <pthread_setschedparam+0xe7>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10c6bb: a1 10 92 12 00 mov 0x129210,%eax
10c6c0: 89 42 78 mov %eax,0x78(%edx)
10c6c3: 0f b6 05 18 52 12 00 movzbl 0x125218,%eax
10c6ca: 2b 83 84 00 00 00 sub 0x84(%ebx),%eax
the_thread->real_priority =
10c6d0: 89 42 18 mov %eax,0x18(%edx)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
10c6d3: 51 push %ecx
10c6d4: 6a 01 push $0x1
10c6d6: 50 push %eax
10c6d7: 52 push %edx
10c6d8: e8 e3 1e 00 00 call 10e5c0 <_Thread_Change_priority>
10c6dd: eb 2b jmp 10c70a <pthread_setschedparam+0x112>
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
10c6df: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
10c6e5: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx)
_Watchdog_Remove( &api->Sporadic_timer );
10c6eb: 83 ec 0c sub $0xc,%esp
10c6ee: 81 c3 a4 00 00 00 add $0xa4,%ebx
10c6f4: 53 push %ebx
10c6f5: 89 55 d0 mov %edx,-0x30(%ebp)
10c6f8: e8 8b 33 00 00 call 10fa88 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
10c6fd: 58 pop %eax
10c6fe: 5a pop %edx
10c6ff: 8b 55 d0 mov -0x30(%ebp),%edx
10c702: 52 push %edx
10c703: 6a 00 push $0x0
10c705: e8 5d fe ff ff call 10c567 <_POSIX_Threads_Sporadic_budget_TSR>
10c70a: 83 c4 10 add $0x10,%esp
break;
}
_Thread_Enable_dispatch();
10c70d: e8 4b 23 00 00 call 10ea5d <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10c712: 8b 45 d4 mov -0x2c(%ebp),%eax
10c715: 8d 65 f4 lea -0xc(%ebp),%esp
10c718: 5b pop %ebx
10c719: 5e pop %esi
10c71a: 5f pop %edi
10c71b: c9 leave
10c71c: c3 ret
0010a4c4 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
10a4c4: 55 push %ebp
10a4c5: 89 e5 mov %esp,%ebp
10a4c7: 53 push %ebx
10a4c8: 83 ec 04 sub $0x4,%esp
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
10a4cb: a1 74 62 12 00 mov 0x126274,%eax
10a4d0: 85 c0 test %eax,%eax
10a4d2: 75 48 jne 10a51c <pthread_testcancel+0x58><== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10a4d4: a1 98 62 12 00 mov 0x126298,%eax
10a4d9: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10a4df: 8b 15 dc 61 12 00 mov 0x1261dc,%edx
10a4e5: 42 inc %edx
10a4e6: 89 15 dc 61 12 00 mov %edx,0x1261dc
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10a4ec: 31 db xor %ebx,%ebx
10a4ee: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax)
10a4f5: 75 0a jne 10a501 <pthread_testcancel+0x3d><== NEVER TAKEN
/* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */
int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate));
int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype));
void _EXFUN(pthread_testcancel, (void));
10a4f7: 83 b8 dc 00 00 00 00 cmpl $0x0,0xdc(%eax)
10a4fe: 0f 95 c3 setne %bl
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10a501: e8 6f 22 00 00 call 10c775 <_Thread_Enable_dispatch>
if ( cancel )
10a506: 84 db test %bl,%bl
10a508: 74 12 je 10a51c <pthread_testcancel+0x58>
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
10a50a: 50 push %eax
10a50b: 50 push %eax
10a50c: 6a ff push $0xffffffff
10a50e: ff 35 98 62 12 00 pushl 0x126298
10a514: e8 e7 4c 00 00 call 10f200 <_POSIX_Thread_Exit>
10a519: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10a51c: 8b 5d fc mov -0x4(%ebp),%ebx
10a51f: c9 leave
10a520: c3 ret
0011c8f8 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
11c8f8: 55 push %ebp
11c8f9: 89 e5 mov %esp,%ebp
11c8fb: 56 push %esi
11c8fc: 53 push %ebx
11c8fd: 8b 5d 08 mov 0x8(%ebp),%ebx
11c900: 8b 55 0c mov 0xc(%ebp),%edx
11c903: 8b 4d 10 mov 0x10(%ebp),%ecx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11c906: 3b 1d 44 01 12 00 cmp 0x120144,%ebx
11c90c: 73 14 jae 11c922 <read+0x2a> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
11c90e: c1 e3 06 shl $0x6,%ebx
11c911: 03 1d 98 40 12 00 add 0x124098,%ebx
rtems_libio_check_is_open( iop );
11c917: 8b 73 14 mov 0x14(%ebx),%esi
11c91a: f7 c6 00 01 00 00 test $0x100,%esi
11c920: 75 0d jne 11c92f <read+0x37>
11c922: e8 dd 4a ff ff call 111404 <__errno>
11c927: c7 00 09 00 00 00 movl $0x9,(%eax)
11c92d: eb 31 jmp 11c960 <read+0x68>
rtems_libio_check_buffer( buffer );
11c92f: 85 d2 test %edx,%edx
11c931: 74 0b je 11c93e <read+0x46> <== NEVER TAKEN
rtems_libio_check_count( count );
11c933: 31 c0 xor %eax,%eax
11c935: 85 c9 test %ecx,%ecx
11c937: 74 44 je 11c97d <read+0x85> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
11c939: 83 e6 02 and $0x2,%esi
11c93c: 75 0d jne 11c94b <read+0x53> <== ALWAYS TAKEN
11c93e: e8 c1 4a ff ff call 111404 <__errno> <== NOT EXECUTED
11c943: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11c949: eb 15 jmp 11c960 <read+0x68> <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
11c94b: 8b 43 3c mov 0x3c(%ebx),%eax
11c94e: 8b 40 08 mov 0x8(%eax),%eax
11c951: 85 c0 test %eax,%eax
11c953: 75 10 jne 11c965 <read+0x6d> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
11c955: e8 aa 4a ff ff call 111404 <__errno> <== NOT EXECUTED
11c95a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
11c960: 83 c8 ff or $0xffffffff,%eax
11c963: eb 18 jmp 11c97d <read+0x85>
rc = (*iop->handlers->read_h)( iop, buffer, count );
11c965: 56 push %esi
11c966: 51 push %ecx
11c967: 52 push %edx
11c968: 53 push %ebx
11c969: ff d0 call *%eax
if ( rc > 0 )
11c96b: 83 c4 10 add $0x10,%esp
11c96e: 85 c0 test %eax,%eax
11c970: 7e 0b jle 11c97d <read+0x85>
iop->offset += rc;
11c972: 89 c1 mov %eax,%ecx
11c974: c1 f9 1f sar $0x1f,%ecx
11c977: 01 43 0c add %eax,0xc(%ebx)
11c97a: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
11c97d: 8d 65 f8 lea -0x8(%ebp),%esp
11c980: 5b pop %ebx
11c981: 5e pop %esi
11c982: c9 leave
11c983: c3 ret
0010a040 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
10a040: 55 push %ebp
10a041: 89 e5 mov %esp,%ebp
10a043: 57 push %edi
10a044: 56 push %esi
10a045: 53 push %ebx
10a046: 83 ec 2c sub $0x2c,%esp
10a049: 8b 55 08 mov 0x8(%ebp),%edx
10a04c: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
10a04f: 85 db test %ebx,%ebx
10a051: 75 0d jne 10a060 <readlink+0x20> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
10a053: e8 e0 ab 00 00 call 114c38 <__errno> <== NOT EXECUTED
10a058: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
10a05e: eb 51 jmp 10a0b1 <readlink+0x71> <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
10a060: 31 c0 xor %eax,%eax
10a062: 83 c9 ff or $0xffffffff,%ecx
10a065: 89 d7 mov %edx,%edi
10a067: f2 ae repnz scas %es:(%edi),%al
10a069: f7 d1 not %ecx
10a06b: 49 dec %ecx
10a06c: 83 ec 0c sub $0xc,%esp
10a06f: 6a 00 push $0x0
10a071: 8d 75 d4 lea -0x2c(%ebp),%esi
10a074: 56 push %esi
10a075: 6a 00 push $0x0
10a077: 51 push %ecx
10a078: 52 push %edx
10a079: e8 f6 ef ff ff call 109074 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
10a07e: 83 c4 20 add $0x20,%esp
10a081: 83 cf ff or $0xffffffff,%edi
10a084: 85 c0 test %eax,%eax
10a086: 0f 85 8c 00 00 00 jne 10a118 <readlink+0xd8> <== NEVER TAKEN
return -1;
if ( !loc.ops->node_type_h ){
10a08c: 8b 55 e0 mov -0x20(%ebp),%edx
10a08f: 8b 42 10 mov 0x10(%edx),%eax
10a092: 85 c0 test %eax,%eax
10a094: 75 20 jne 10a0b6 <readlink+0x76> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
10a096: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
10a099: 85 c0 test %eax,%eax <== NOT EXECUTED
10a09b: 74 09 je 10a0a6 <readlink+0x66> <== NOT EXECUTED
10a09d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a0a0: 56 push %esi <== NOT EXECUTED
10a0a1: ff d0 call *%eax <== NOT EXECUTED
10a0a3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10a0a6: e8 8d ab 00 00 call 114c38 <__errno> <== NOT EXECUTED
10a0ab: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10a0b1: 83 cf ff or $0xffffffff,%edi
10a0b4: eb 62 jmp 10a118 <readlink+0xd8>
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
10a0b6: 83 ec 0c sub $0xc,%esp
10a0b9: 56 push %esi
10a0ba: ff d0 call *%eax
10a0bc: 83 c4 10 add $0x10,%esp
10a0bf: 83 f8 04 cmp $0x4,%eax
10a0c2: 8b 45 e0 mov -0x20(%ebp),%eax
10a0c5: 74 21 je 10a0e8 <readlink+0xa8>
rtems_filesystem_freenode( &loc );
10a0c7: 85 c0 test %eax,%eax
10a0c9: 74 10 je 10a0db <readlink+0x9b> <== NEVER TAKEN
10a0cb: 8b 40 1c mov 0x1c(%eax),%eax
10a0ce: 85 c0 test %eax,%eax
10a0d0: 74 09 je 10a0db <readlink+0x9b> <== NEVER TAKEN
10a0d2: 83 ec 0c sub $0xc,%esp
10a0d5: 56 push %esi
10a0d6: ff d0 call *%eax
10a0d8: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EINVAL );
10a0db: e8 58 ab 00 00 call 114c38 <__errno>
10a0e0: c7 00 16 00 00 00 movl $0x16,(%eax)
10a0e6: eb c9 jmp 10a0b1 <readlink+0x71>
}
if ( !loc.ops->readlink_h ){
10a0e8: 8b 50 3c mov 0x3c(%eax),%edx
10a0eb: 85 d2 test %edx,%edx
10a0ed: 75 05 jne 10a0f4 <readlink+0xb4> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
10a0ef: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10a0f2: eb a5 jmp 10a099 <readlink+0x59> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
10a0f4: 50 push %eax
10a0f5: ff 75 10 pushl 0x10(%ebp)
10a0f8: 53 push %ebx
10a0f9: 56 push %esi
10a0fa: ff d2 call *%edx
10a0fc: 89 c7 mov %eax,%edi
rtems_filesystem_freenode( &loc );
10a0fe: 8b 45 e0 mov -0x20(%ebp),%eax
10a101: 83 c4 10 add $0x10,%esp
10a104: 85 c0 test %eax,%eax
10a106: 74 10 je 10a118 <readlink+0xd8> <== NEVER TAKEN
10a108: 8b 40 1c mov 0x1c(%eax),%eax
10a10b: 85 c0 test %eax,%eax
10a10d: 74 09 je 10a118 <readlink+0xd8> <== NEVER TAKEN
10a10f: 83 ec 0c sub $0xc,%esp
10a112: 56 push %esi
10a113: ff d0 call *%eax
10a115: 83 c4 10 add $0x10,%esp
return result;
}
10a118: 89 f8 mov %edi,%eax
10a11a: 8d 65 f4 lea -0xc(%ebp),%esp
10a11d: 5b pop %ebx
10a11e: 5e pop %esi
10a11f: 5f pop %edi
10a120: c9 leave
10a121: c3 ret
00108d38 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
108d38: 55 push %ebp
108d39: 89 e5 mov %esp,%ebp
108d3b: 57 push %edi
108d3c: 56 push %esi
108d3d: 53 push %ebx
108d3e: 83 ec 2c sub $0x2c,%esp
108d41: 8b 75 08 mov 0x8(%ebp),%esi
108d44: 8b 7d 0c mov 0xc(%ebp),%edi
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
108d47: 3b 35 24 47 12 00 cmp 0x124724,%esi
108d4d: 73 11 jae 108d60 <readv+0x28> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
108d4f: c1 e6 06 shl $0x6,%esi
108d52: 03 35 48 8e 12 00 add 0x128e48,%esi
rtems_libio_check_is_open( iop );
108d58: 8b 46 14 mov 0x14(%esi),%eax
108d5b: f6 c4 01 test $0x1,%ah
108d5e: 75 10 jne 108d70 <readv+0x38> <== ALWAYS TAKEN
108d60: e8 37 a5 00 00 call 11329c <__errno> <== NOT EXECUTED
108d65: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
108d6b: e9 95 00 00 00 jmp 108e05 <readv+0xcd> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
108d70: a8 02 test $0x2,%al
108d72: 74 46 je 108dba <readv+0x82> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
108d74: 85 ff test %edi,%edi
108d76: 74 42 je 108dba <readv+0x82>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
108d78: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
108d7c: 7e 3c jle 108dba <readv+0x82>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
108d7e: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp)
108d85: 7f 33 jg 108dba <readv+0x82> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
108d87: 8b 46 3c mov 0x3c(%esi),%eax
108d8a: 83 78 08 00 cmpl $0x0,0x8(%eax)
108d8e: 75 0d jne 108d9d <readv+0x65> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
108d90: e8 07 a5 00 00 call 11329c <__errno> <== NOT EXECUTED
108d95: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
108d9b: eb 68 jmp 108e05 <readv+0xcd> <== NOT EXECUTED
108d9d: b2 01 mov $0x1,%dl
108d9f: 31 c0 xor %eax,%eax
108da1: 31 c9 xor %ecx,%ecx
108da3: 89 75 d4 mov %esi,-0x2c(%ebp)
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ssize_t old;
if ( !iov[v].iov_base )
108da6: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8)
108daa: 74 0e je 108dba <readv+0x82>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
108dac: 8b 5c c7 04 mov 0x4(%edi,%eax,8),%ebx
108db0: 8d 34 19 lea (%ecx,%ebx,1),%esi
108db3: 89 75 e4 mov %esi,-0x1c(%ebp)
if ( total < old )
108db6: 39 ce cmp %ecx,%esi
108db8: 7d 0d jge 108dc7 <readv+0x8f>
rtems_set_errno_and_return_minus_one( EINVAL );
108dba: e8 dd a4 00 00 call 11329c <__errno>
108dbf: c7 00 16 00 00 00 movl $0x16,(%eax)
108dc5: eb 3e jmp 108e05 <readv+0xcd>
if ( iov[v].iov_len )
108dc7: 85 db test %ebx,%ebx
108dc9: 0f 94 c1 sete %cl
108dcc: f7 d9 neg %ecx
108dce: 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++ ) {
108dd0: 40 inc %eax
108dd1: 3b 45 10 cmp 0x10(%ebp),%eax
108dd4: 7d 05 jge 108ddb <readv+0xa3>
108dd6: 8b 4d e4 mov -0x1c(%ebp),%ecx
108dd9: eb cb jmp 108da6 <readv+0x6e>
108ddb: 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 ) {
108dde: 31 db xor %ebx,%ebx
108de0: 84 d2 test %dl,%dl
108de2: 75 49 jne 108e2d <readv+0xf5>
108de4: 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->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
108deb: 50 push %eax
108dec: 8b 46 3c mov 0x3c(%esi),%eax
108def: 8b 55 e4 mov -0x1c(%ebp),%edx
108df2: ff 74 d7 04 pushl 0x4(%edi,%edx,8)
108df6: ff 34 d7 pushl (%edi,%edx,8)
108df9: 56 push %esi
108dfa: ff 50 08 call *0x8(%eax)
if ( bytes < 0 )
108dfd: 83 c4 10 add $0x10,%esp
108e00: 83 f8 00 cmp $0x0,%eax
108e03: 7d 05 jge 108e0a <readv+0xd2> <== ALWAYS TAKEN
108e05: 83 cb ff or $0xffffffff,%ebx
108e08: eb 23 jmp 108e2d <readv+0xf5>
return -1;
if ( bytes > 0 ) {
108e0a: 74 0d je 108e19 <readv+0xe1> <== NEVER TAKEN
iop->offset += bytes;
108e0c: 89 c1 mov %eax,%ecx
108e0e: c1 f9 1f sar $0x1f,%ecx
108e11: 01 46 0c add %eax,0xc(%esi)
108e14: 11 4e 10 adc %ecx,0x10(%esi)
total += bytes;
108e17: 01 c3 add %eax,%ebx
}
if (bytes != iov[ v ].iov_len)
108e19: 8b 55 e4 mov -0x1c(%ebp),%edx
108e1c: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax
108e20: 75 0b jne 108e2d <readv+0xf5> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
108e22: 42 inc %edx
108e23: 89 55 e4 mov %edx,-0x1c(%ebp)
108e26: 8b 45 10 mov 0x10(%ebp),%eax
108e29: 39 c2 cmp %eax,%edx
108e2b: 7c be jl 108deb <readv+0xb3>
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
108e2d: 89 d8 mov %ebx,%eax
108e2f: 8d 65 f4 lea -0xc(%ebp),%esp
108e32: 5b pop %ebx
108e33: 5e pop %esi
108e34: 5f pop %edi
108e35: c9 leave
108e36: c3 ret
0011ca04 <realloc>:
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
11ca04: 55 push %ebp
11ca05: 89 e5 mov %esp,%ebp
11ca07: 57 push %edi
11ca08: 56 push %esi
11ca09: 53 push %ebx
11ca0a: 83 ec 2c sub $0x2c,%esp
11ca0d: 8b 5d 08 mov 0x8(%ebp),%ebx
11ca10: 8b 75 0c mov 0xc(%ebp),%esi
11ca13: ff 05 c0 40 12 00 incl 0x1240c0
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
11ca19: 83 3d 8c 43 12 00 03 cmpl $0x3,0x12438c
11ca20: 75 1a jne 11ca3c <realloc+0x38> <== NEVER TAKEN
if (_Thread_Dispatch_disable_level > 0)
11ca22: a1 f4 41 12 00 mov 0x1241f4,%eax
11ca27: 85 c0 test %eax,%eax
11ca29: 0f 85 a7 00 00 00 jne 11cad6 <realloc+0xd2> <== NEVER TAKEN
return (void *) 0;
if (_ISR_Nest_level > 0)
11ca2f: a1 8c 42 12 00 mov 0x12428c,%eax
11ca34: 85 c0 test %eax,%eax
11ca36: 0f 85 9a 00 00 00 jne 11cad6 <realloc+0xd2> <== NEVER TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
11ca3c: 85 db test %ebx,%ebx
11ca3e: 75 0e jne 11ca4e <realloc+0x4a>
return malloc( size );
11ca40: 83 ec 0c sub $0xc,%esp
11ca43: 56 push %esi
11ca44: e8 d3 a9 fe ff call 10741c <malloc>
11ca49: e9 81 00 00 00 jmp 11cacf <realloc+0xcb>
if ( !size ) {
11ca4e: 85 f6 test %esi,%esi
11ca50: 75 0d jne 11ca5f <realloc+0x5b> <== ALWAYS TAKEN
free( ptr );
11ca52: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11ca55: 53 push %ebx <== NOT EXECUTED
11ca56: e8 95 a7 fe ff call 1071f0 <free> <== NOT EXECUTED
11ca5b: 31 db xor %ebx,%ebx <== NOT EXECUTED
11ca5d: eb 72 jmp 11cad1 <realloc+0xcd> <== NOT EXECUTED
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
11ca5f: 52 push %edx
11ca60: 8d 45 e4 lea -0x1c(%ebp),%eax
11ca63: 50 push %eax
11ca64: 53 push %ebx
11ca65: ff 35 50 01 12 00 pushl 0x120150
11ca6b: e8 00 01 00 00 call 11cb70 <_Protected_heap_Get_block_size>
11ca70: 83 c4 10 add $0x10,%esp
11ca73: 84 c0 test %al,%al
11ca75: 75 0d jne 11ca84 <realloc+0x80>
errno = EINVAL;
11ca77: e8 88 49 ff ff call 111404 <__errno>
11ca7c: c7 00 16 00 00 00 movl $0x16,(%eax)
11ca82: eb 52 jmp 11cad6 <realloc+0xd2>
#if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
if (rtems_malloc_boundary_helpers)
resize += (*rtems_malloc_boundary_helpers->overhead)();
#endif
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) {
11ca84: 50 push %eax
11ca85: 56 push %esi
11ca86: 53 push %ebx
11ca87: ff 35 50 01 12 00 pushl 0x120150
11ca8d: e8 16 01 00 00 call 11cba8 <_Protected_heap_Resize_block>
11ca92: 83 c4 10 add $0x10,%esp
11ca95: 84 c0 test %al,%al
11ca97: 75 3f jne 11cad8 <realloc+0xd4>
* 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 );
11ca99: 83 ec 0c sub $0xc,%esp
11ca9c: 56 push %esi
11ca9d: e8 7a a9 fe ff call 10741c <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
11caa2: ff 0d b4 40 12 00 decl 0x1240b4
if ( !new_area ) {
11caa8: 83 c4 10 add $0x10,%esp
11caab: 85 c0 test %eax,%eax
11caad: 74 27 je 11cad6 <realloc+0xd2>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
11caaf: 8b 55 e4 mov -0x1c(%ebp),%edx
11cab2: 89 f1 mov %esi,%ecx
11cab4: 39 d6 cmp %edx,%esi
11cab6: 76 02 jbe 11caba <realloc+0xb6> <== NEVER TAKEN
11cab8: 89 d1 mov %edx,%ecx
11caba: 89 c7 mov %eax,%edi
11cabc: 89 de mov %ebx,%esi
11cabe: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
free( ptr );
11cac0: 83 ec 0c sub $0xc,%esp
11cac3: 53 push %ebx
11cac4: 89 45 d4 mov %eax,-0x2c(%ebp)
11cac7: e8 24 a7 fe ff call 1071f0 <free>
11cacc: 8b 45 d4 mov -0x2c(%ebp),%eax
11cacf: 89 c3 mov %eax,%ebx
return new_area;
11cad1: 83 c4 10 add $0x10,%esp
11cad4: eb 02 jmp 11cad8 <realloc+0xd4>
11cad6: 31 db xor %ebx,%ebx
}
11cad8: 89 d8 mov %ebx,%eax
11cada: 8d 65 f4 lea -0xc(%ebp),%esp
11cadd: 5b pop %ebx
11cade: 5e pop %esi
11cadf: 5f pop %edi
11cae0: c9 leave
11cae1: c3 ret
0010ad7c <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
10ad7c: 55 push %ebp
10ad7d: 89 e5 mov %esp,%ebp
10ad7f: 57 push %edi
10ad80: 56 push %esi
10ad81: 53 push %ebx
10ad82: 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 );
10ad85: ff 75 08 pushl 0x8(%ebp)
10ad88: e8 12 eb ff ff call 10989f <rtems_filesystem_dirname>
10ad8d: 89 c2 mov %eax,%edx
if ( parentpathlen == 0 )
10ad8f: 83 c4 10 add $0x10,%esp
10ad92: 85 c0 test %eax,%eax
10ad94: 75 36 jne 10adcc <rmdir+0x50>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
10ad96: 8b 4d 08 mov 0x8(%ebp),%ecx
10ad99: 8a 01 mov (%ecx),%al
10ad9b: 3c 5c cmp $0x5c,%al
10ad9d: 74 08 je 10ada7 <rmdir+0x2b> <== NEVER TAKEN
10ad9f: 3c 2f cmp $0x2f,%al
10ada1: 74 04 je 10ada7 <rmdir+0x2b> <== ALWAYS TAKEN
10ada3: 84 c0 test %al,%al <== NOT EXECUTED
10ada5: 75 0e jne 10adb5 <rmdir+0x39> <== NOT EXECUTED
10ada7: 8d 7d d4 lea -0x2c(%ebp),%edi
10adaa: 8b 35 68 8f 12 00 mov 0x128f68,%esi
10adb0: 83 c6 18 add $0x18,%esi
10adb3: eb 0c jmp 10adc1 <rmdir+0x45>
10adb5: 8d 7d d4 lea -0x2c(%ebp),%edi <== NOT EXECUTED
10adb8: 8b 35 68 8f 12 00 mov 0x128f68,%esi <== NOT EXECUTED
10adbe: 83 c6 04 add $0x4,%esi <== NOT EXECUTED
10adc1: b9 05 00 00 00 mov $0x5,%ecx
10adc6: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10adc8: 31 db xor %ebx,%ebx
10adca: eb 27 jmp 10adf3 <rmdir+0x77>
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
10adcc: 83 ec 0c sub $0xc,%esp
10adcf: 6a 00 push $0x0
10add1: 8d 45 d4 lea -0x2c(%ebp),%eax
10add4: 50 push %eax
10add5: 6a 02 push $0x2
10add7: 52 push %edx
10add8: ff 75 08 pushl 0x8(%ebp)
10addb: 89 55 b4 mov %edx,-0x4c(%ebp)
10adde: e8 a9 eb ff ff call 10998c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
10ade3: 83 c4 20 add $0x20,%esp
10ade6: 85 c0 test %eax,%eax
10ade8: 8b 55 b4 mov -0x4c(%ebp),%edx
10adeb: 0f 85 72 01 00 00 jne 10af63 <rmdir+0x1e7> <== NEVER TAKEN
10adf1: b3 01 mov $0x1,%bl
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
10adf3: 8d 7d c0 lea -0x40(%ebp),%edi
10adf6: 8d 75 d4 lea -0x2c(%ebp),%esi
10adf9: b9 05 00 00 00 mov $0x5,%ecx
10adfe: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = pathname + parentpathlen;
10ae00: 8b 75 08 mov 0x8(%ebp),%esi
10ae03: 01 d6 add %edx,%esi
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
10ae05: 83 c9 ff or $0xffffffff,%ecx
10ae08: 89 f7 mov %esi,%edi
10ae0a: 31 c0 xor %eax,%eax
10ae0c: f2 ae repnz scas %es:(%edi),%al
10ae0e: f7 d1 not %ecx
10ae10: 49 dec %ecx
10ae11: 57 push %edi
10ae12: 57 push %edi
10ae13: 51 push %ecx
10ae14: 56 push %esi
10ae15: e8 5e ea ff ff call 109878 <rtems_filesystem_prefix_separators>
10ae1a: 01 c6 add %eax,%esi
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
10ae1c: 83 c9 ff or $0xffffffff,%ecx
10ae1f: 89 f7 mov %esi,%edi
10ae21: 31 c0 xor %eax,%eax
10ae23: f2 ae repnz scas %es:(%edi),%al
10ae25: f7 d1 not %ecx
10ae27: 49 dec %ecx
10ae28: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10ae2f: 8d 7d c0 lea -0x40(%ebp),%edi
10ae32: 57 push %edi
10ae33: 6a 00 push $0x0
10ae35: 51 push %ecx
10ae36: 56 push %esi
10ae37: e8 96 ea ff ff call 1098d2 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
10ae3c: 83 c4 20 add $0x20,%esp
10ae3f: 85 c0 test %eax,%eax
10ae41: 74 2f je 10ae72 <rmdir+0xf6>
if ( free_parentloc )
10ae43: 84 db test %bl,%bl
10ae45: 0f 84 18 01 00 00 je 10af63 <rmdir+0x1e7> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
10ae4b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10ae4e: 85 c0 test %eax,%eax <== NOT EXECUTED
10ae50: 0f 84 0d 01 00 00 je 10af63 <rmdir+0x1e7> <== NOT EXECUTED
10ae56: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10ae59: 85 c0 test %eax,%eax <== NOT EXECUTED
10ae5b: 0f 84 02 01 00 00 je 10af63 <rmdir+0x1e7> <== NOT EXECUTED
10ae61: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ae64: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
10ae67: 52 push %edx <== NOT EXECUTED
10ae68: ff d0 call *%eax <== NOT EXECUTED
10ae6a: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
10ae6d: e9 ec 00 00 00 jmp 10af5e <rmdir+0x1e2> <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
10ae72: 8b 55 cc mov -0x34(%ebp),%edx
10ae75: 8b 42 10 mov 0x10(%edx),%eax
10ae78: 85 c0 test %eax,%eax
10ae7a: 75 05 jne 10ae81 <rmdir+0x105> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
10ae7c: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
10ae7f: eb 65 jmp 10aee6 <rmdir+0x16a> <== NOT EXECUTED
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
10ae81: 83 ec 0c sub $0xc,%esp
10ae84: 57 push %edi
10ae85: ff d0 call *%eax
10ae87: 83 c4 10 add $0x10,%esp
10ae8a: 48 dec %eax
10ae8b: 74 45 je 10aed2 <rmdir+0x156>
rtems_filesystem_freenode( &loc );
10ae8d: 8b 45 cc mov -0x34(%ebp),%eax
10ae90: 85 c0 test %eax,%eax
10ae92: 74 10 je 10aea4 <rmdir+0x128> <== NEVER TAKEN
10ae94: 8b 40 1c mov 0x1c(%eax),%eax
10ae97: 85 c0 test %eax,%eax
10ae99: 74 09 je 10aea4 <rmdir+0x128> <== NEVER TAKEN
10ae9b: 83 ec 0c sub $0xc,%esp
10ae9e: 57 push %edi
10ae9f: ff d0 call *%eax
10aea1: 83 c4 10 add $0x10,%esp
if ( free_parentloc )
10aea4: 84 db test %bl,%bl
10aea6: 74 1a je 10aec2 <rmdir+0x146> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
10aea8: 8b 45 e0 mov -0x20(%ebp),%eax
10aeab: 85 c0 test %eax,%eax
10aead: 74 13 je 10aec2 <rmdir+0x146> <== NEVER TAKEN
10aeaf: 8b 40 1c mov 0x1c(%eax),%eax
10aeb2: 85 c0 test %eax,%eax
10aeb4: 74 0c je 10aec2 <rmdir+0x146> <== NEVER TAKEN
10aeb6: 83 ec 0c sub $0xc,%esp
10aeb9: 8d 55 d4 lea -0x2c(%ebp),%edx
10aebc: 52 push %edx
10aebd: ff d0 call *%eax
10aebf: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTDIR );
10aec2: e8 89 a6 00 00 call 115550 <__errno>
10aec7: c7 00 14 00 00 00 movl $0x14,(%eax)
10aecd: e9 91 00 00 00 jmp 10af63 <rmdir+0x1e7>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
10aed2: 8b 45 c8 mov -0x38(%ebp),%eax
10aed5: 8b 40 34 mov 0x34(%eax),%eax
10aed8: 85 c0 test %eax,%eax
10aeda: 75 42 jne 10af1e <rmdir+0x1a2> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
10aedc: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
10aedf: 85 c0 test %eax,%eax <== NOT EXECUTED
10aee1: 74 10 je 10aef3 <rmdir+0x177> <== NOT EXECUTED
10aee3: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10aee6: 85 c0 test %eax,%eax <== NOT EXECUTED
10aee8: 74 09 je 10aef3 <rmdir+0x177> <== NOT EXECUTED
10aeea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10aeed: 57 push %edi <== NOT EXECUTED
10aeee: ff d0 call *%eax <== NOT EXECUTED
10aef0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( free_parentloc )
10aef3: 84 db test %bl,%bl <== NOT EXECUTED
10aef5: 74 1a je 10af11 <rmdir+0x195> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
10aef7: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10aefa: 85 c0 test %eax,%eax <== NOT EXECUTED
10aefc: 74 13 je 10af11 <rmdir+0x195> <== NOT EXECUTED
10aefe: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10af01: 85 c0 test %eax,%eax <== NOT EXECUTED
10af03: 74 0c je 10af11 <rmdir+0x195> <== NOT EXECUTED
10af05: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10af08: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
10af0b: 52 push %edx <== NOT EXECUTED
10af0c: ff d0 call *%eax <== NOT EXECUTED
10af0e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10af11: e8 3a a6 00 00 call 115550 <__errno> <== NOT EXECUTED
10af16: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10af1c: eb 45 jmp 10af63 <rmdir+0x1e7> <== NOT EXECUTED
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
10af1e: 52 push %edx
10af1f: 52 push %edx
10af20: 57 push %edi
10af21: 8d 55 d4 lea -0x2c(%ebp),%edx
10af24: 52 push %edx
10af25: ff d0 call *%eax
10af27: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &loc );
10af29: 8b 45 cc mov -0x34(%ebp),%eax
10af2c: 83 c4 10 add $0x10,%esp
10af2f: 85 c0 test %eax,%eax
10af31: 74 10 je 10af43 <rmdir+0x1c7> <== NEVER TAKEN
10af33: 8b 40 1c mov 0x1c(%eax),%eax
10af36: 85 c0 test %eax,%eax
10af38: 74 09 je 10af43 <rmdir+0x1c7> <== NEVER TAKEN
10af3a: 83 ec 0c sub $0xc,%esp
10af3d: 57 push %edi
10af3e: ff d0 call *%eax
10af40: 83 c4 10 add $0x10,%esp
if ( free_parentloc )
10af43: 84 db test %bl,%bl
10af45: 74 1f je 10af66 <rmdir+0x1ea>
rtems_filesystem_freenode( &parentloc );
10af47: 8b 45 e0 mov -0x20(%ebp),%eax
10af4a: 85 c0 test %eax,%eax
10af4c: 74 18 je 10af66 <rmdir+0x1ea> <== NEVER TAKEN
10af4e: 8b 40 1c mov 0x1c(%eax),%eax
10af51: 85 c0 test %eax,%eax
10af53: 74 11 je 10af66 <rmdir+0x1ea> <== NEVER TAKEN
10af55: 83 ec 0c sub $0xc,%esp
10af58: 8d 55 d4 lea -0x2c(%ebp),%edx
10af5b: 52 push %edx
10af5c: ff d0 call *%eax
10af5e: 83 c4 10 add $0x10,%esp
10af61: eb 03 jmp 10af66 <rmdir+0x1ea>
10af63: 83 ce ff or $0xffffffff,%esi
return result;
}
10af66: 89 f0 mov %esi,%eax
10af68: 8d 65 f4 lea -0xc(%ebp),%esp
10af6b: 5b pop %ebx
10af6c: 5e pop %esi
10af6d: 5f pop %edi
10af6e: c9 leave
10af6f: c3 ret
00116478 <rtems_assoc_name_bad>:
uint32_t bad_value
#else
uint32_t bad_value __attribute((unused))
#endif
)
{
116478: 55 push %ebp <== NOT EXECUTED
116479: 89 e5 mov %esp,%ebp <== NOT EXECUTED
sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value);
#else
static char bad_buffer[40] = "<assocnamebad.c: : BAD NAME>";
#endif
return bad_buffer;
}
11647b: b8 cc a0 12 00 mov $0x12a0cc,%eax <== NOT EXECUTED
116480: c9 leave <== NOT EXECUTED
116481: c3 ret <== NOT EXECUTED
00113538 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
113538: 55 push %ebp
113539: 89 e5 mov %esp,%ebp
11353b: 53 push %ebx
11353c: 83 ec 0c sub $0xc,%esp
11353f: 8b 5d 0c mov 0xc(%ebp),%ebx
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
113542: 53 push %ebx
113543: ff 75 08 pushl 0x8(%ebp)
113546: e8 1d 00 00 00 call 113568 <rtems_assoc_ptr_by_local>
if (nap)
11354b: 83 c4 10 add $0x10,%esp
11354e: 85 c0 test %eax,%eax
113550: 74 07 je 113559 <rtems_assoc_name_by_local+0x21><== NEVER TAKEN
return nap->name;
113552: 8b 00 mov (%eax),%eax
return rtems_assoc_name_bad(local_value);
}
113554: 8b 5d fc mov -0x4(%ebp),%ebx
113557: c9 leave
113558: c3 ret
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
113559: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
}
11355c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
11355f: c9 leave <== NOT EXECUTED
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
113560: e9 13 2f 00 00 jmp 116478 <rtems_assoc_name_bad> <== NOT EXECUTED
001113a4 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
1113a4: 55 push %ebp
1113a5: 89 e5 mov %esp,%ebp
1113a7: 56 push %esi
1113a8: 53 push %ebx
1113a9: 8b 5d 08 mov 0x8(%ebp),%ebx
1113ac: 8b 75 0c mov 0xc(%ebp),%esi
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
1113af: 8b 03 mov (%ebx),%eax
1113b1: 85 c0 test %eax,%eax
1113b3: 74 1b je 1113d0 <rtems_assoc_ptr_by_local+0x2c><== NEVER TAKEN
1113b5: 52 push %edx
1113b6: 52 push %edx
1113b7: 68 e9 ee 11 00 push $0x11eee9
1113bc: 50 push %eax
1113bd: e8 5e 0b 00 00 call 111f20 <strcmp>
1113c2: 83 c4 10 add $0x10,%esp
1113c5: 85 c0 test %eax,%eax
1113c7: 75 07 jne 1113d0 <rtems_assoc_ptr_by_local+0x2c><== ALWAYS TAKEN
default_ap = ap++;
1113c9: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1113cb: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED
1113ce: eb 0c jmp 1113dc <rtems_assoc_ptr_by_local+0x38><== NOT EXECUTED
1113d0: 31 c0 xor %eax,%eax
1113d2: eb 08 jmp 1113dc <rtems_assoc_ptr_by_local+0x38>
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
1113d4: 39 73 04 cmp %esi,0x4(%ebx)
1113d7: 74 0a je 1113e3 <rtems_assoc_ptr_by_local+0x3f>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
1113d9: 83 c3 0c add $0xc,%ebx
1113dc: 83 3b 00 cmpl $0x0,(%ebx)
1113df: 75 f3 jne 1113d4 <rtems_assoc_ptr_by_local+0x30>
1113e1: 89 c3 mov %eax,%ebx
if (ap->local_value == local_value)
return ap;
return default_ap;
}
1113e3: 89 d8 mov %ebx,%eax
1113e5: 8d 65 f8 lea -0x8(%ebp),%esp
1113e8: 5b pop %ebx
1113e9: 5e pop %esi
1113ea: c9 leave
1113eb: c3 ret
0011021c <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
11021c: 55 push %ebp
11021d: 89 e5 mov %esp,%ebp
11021f: 56 push %esi
110220: 53 push %ebx
110221: 8b 5d 08 mov 0x8(%ebp),%ebx
110224: 8b 75 0c mov 0xc(%ebp),%esi
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
110227: 8b 03 mov (%ebx),%eax
110229: 85 c0 test %eax,%eax
11022b: 74 1b je 110248 <rtems_assoc_ptr_by_remote+0x2c><== NEVER TAKEN
11022d: 52 push %edx
11022e: 52 push %edx
11022f: 68 e9 ee 11 00 push $0x11eee9
110234: 50 push %eax
110235: e8 e6 1c 00 00 call 111f20 <strcmp>
11023a: 83 c4 10 add $0x10,%esp
11023d: 85 c0 test %eax,%eax
11023f: 75 07 jne 110248 <rtems_assoc_ptr_by_remote+0x2c><== ALWAYS TAKEN
default_ap = ap++;
110241: 89 d8 mov %ebx,%eax <== NOT EXECUTED
110243: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED
110246: eb 0c jmp 110254 <rtems_assoc_ptr_by_remote+0x38><== NOT EXECUTED
110248: 31 c0 xor %eax,%eax
11024a: eb 08 jmp 110254 <rtems_assoc_ptr_by_remote+0x38>
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
11024c: 39 73 08 cmp %esi,0x8(%ebx)
11024f: 74 0a je 11025b <rtems_assoc_ptr_by_remote+0x3f>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
110251: 83 c3 0c add $0xc,%ebx
110254: 83 3b 00 cmpl $0x0,(%ebx)
110257: 75 f3 jne 11024c <rtems_assoc_ptr_by_remote+0x30>
110259: 89 c3 mov %eax,%ebx
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
11025b: 89 d8 mov %ebx,%eax
11025d: 8d 65 f8 lea -0x8(%ebp),%esp
110260: 5b pop %ebx
110261: 5e pop %esi
110262: c9 leave
110263: c3 ret
00110d0c <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
110d0c: 55 push %ebp <== NOT EXECUTED
110d0d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
110d0f: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
110d12: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
110d15: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
110d18: e8 87 06 00 00 call 1113a4 <rtems_assoc_ptr_by_local><== NOT EXECUTED
110d1d: 89 c2 mov %eax,%edx <== NOT EXECUTED
if (nap)
110d1f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110d22: 31 c0 xor %eax,%eax <== NOT EXECUTED
110d24: 85 d2 test %edx,%edx <== NOT EXECUTED
110d26: 74 03 je 110d2b <rtems_assoc_remote_by_local+0x1f><== NOT EXECUTED
return nap->remote_value;
110d28: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
return 0;
}
110d2b: c9 leave <== NOT EXECUTED
110d2c: c3 ret <== NOT EXECUTED
001071ec <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
1071ec: 55 push %ebp
1071ed: 89 e5 mov %esp,%ebp
1071ef: 57 push %edi
1071f0: 56 push %esi
1071f1: 53 push %ebx
1071f2: 83 ec 0c sub $0xc,%esp
1071f5: 8b 45 08 mov 0x8(%ebp),%eax
1071f8: 8b 5d 0c mov 0xc(%ebp),%ebx
1071fb: 8b 75 10 mov 0x10(%ebp),%esi
const char *p;
if ( !name )
1071fe: 85 c0 test %eax,%eax
107200: 74 4c je 10724e <rtems_bsp_cmdline_get_param+0x62>
return NULL;
if ( !value )
107202: 85 db test %ebx,%ebx
107204: 74 4a je 107250 <rtems_bsp_cmdline_get_param+0x64>
return NULL;
if ( !length )
107206: 85 f6 test %esi,%esi
107208: 74 44 je 10724e <rtems_bsp_cmdline_get_param+0x62>
return NULL;
value[0] = '\0';
10720a: c6 03 00 movb $0x0,(%ebx)
p = rtems_bsp_cmdline_get_param_raw( name );
10720d: 83 ec 0c sub $0xc,%esp
107210: 50 push %eax
107211: e8 46 00 00 00 call 10725c <rtems_bsp_cmdline_get_param_raw>
if ( !p )
107216: 83 c4 10 add $0x10,%esp
107219: 85 c0 test %eax,%eax
10721b: 74 31 je 10724e <rtems_bsp_cmdline_get_param+0x62>
10721d: 31 ff xor %edi,%edi
10721f: 31 d2 xor %edx,%edx
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
107221: 4e dec %esi
107222: eb 1d jmp 107241 <rtems_bsp_cmdline_get_param+0x55>
if ( *p == '\"' ) {
107224: 80 f9 22 cmp $0x22,%cl
107227: 75 03 jne 10722c <rtems_bsp_cmdline_get_param+0x40>
quotes++;
107229: 47 inc %edi
10722a: eb 0d jmp 107239 <rtems_bsp_cmdline_get_param+0x4d>
} else if ( ((quotes % 2) == 0) && *p == ' ' )
10722c: f7 c7 01 00 00 00 test $0x1,%edi
107232: 75 05 jne 107239 <rtems_bsp_cmdline_get_param+0x4d>
107234: 80 f9 20 cmp $0x20,%cl
107237: 74 17 je 107250 <rtems_bsp_cmdline_get_param+0x64>
break;
value[i++] = *p++;
107239: 88 0c 13 mov %cl,(%ebx,%edx,1)
10723c: 42 inc %edx
value[i] = '\0';
10723d: 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; ) {
107241: 8a 0c 10 mov (%eax,%edx,1),%cl
107244: 84 c9 test %cl,%cl
107246: 74 08 je 107250 <rtems_bsp_cmdline_get_param+0x64>
107248: 39 f2 cmp %esi,%edx
10724a: 72 d8 jb 107224 <rtems_bsp_cmdline_get_param+0x38><== ALWAYS TAKEN
10724c: eb 02 jmp 107250 <rtems_bsp_cmdline_get_param+0x64><== NOT EXECUTED
10724e: 31 db xor %ebx,%ebx
return NULL;
copy_string( p, value, length );
return value;
}
107250: 89 d8 mov %ebx,%eax
107252: 8d 65 f4 lea -0xc(%ebp),%esp
107255: 5b pop %ebx
107256: 5e pop %esi
107257: 5f pop %edi
107258: c9 leave
107259: c3 ret
00107284 <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
107284: 55 push %ebp
107285: 89 e5 mov %esp,%ebp
107287: 57 push %edi
107288: 53 push %ebx
107289: 8b 7d 08 mov 0x8(%ebp),%edi
10728c: 8b 5d 0c mov 0xc(%ebp),%ebx
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
10728f: 50 push %eax
107290: ff 75 10 pushl 0x10(%ebp)
107293: 53 push %ebx
107294: 57 push %edi
107295: e8 52 ff ff ff call 1071ec <rtems_bsp_cmdline_get_param>
10729a: 89 c2 mov %eax,%edx
if ( !p )
10729c: 83 c4 10 add $0x10,%esp
10729f: 85 c0 test %eax,%eax
1072a1: 74 3c je 1072df <rtems_bsp_cmdline_get_param_rhs+0x5b>
return NULL;
rhs = &p[strlen(name)];
1072a3: 31 c0 xor %eax,%eax
1072a5: 83 c9 ff or $0xffffffff,%ecx
1072a8: f2 ae repnz scas %es:(%edi),%al
1072aa: f7 d1 not %ecx
1072ac: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax
if ( *rhs != '=' )
1072b0: 80 38 3d cmpb $0x3d,(%eax)
1072b3: 75 2a jne 1072df <rtems_bsp_cmdline_get_param_rhs+0x5b><== NEVER TAKEN
return NULL;
rhs++;
1072b5: 8d 50 01 lea 0x1(%eax),%edx
if ( *rhs == '\"' )
1072b8: 80 78 01 22 cmpb $0x22,0x1(%eax)
1072bc: 75 03 jne 1072c1 <rtems_bsp_cmdline_get_param_rhs+0x3d>
rhs++;
1072be: 8d 50 02 lea 0x2(%eax),%edx
1072c1: 89 d8 mov %ebx,%eax
1072c3: eb 04 jmp 1072c9 <rtems_bsp_cmdline_get_param_rhs+0x45>
for ( d=value ; *rhs ; )
*d++ = *rhs++;
1072c5: 88 08 mov %cl,(%eax)
1072c7: 40 inc %eax
1072c8: 42 inc %edx
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
1072c9: 8a 0a mov (%edx),%cl
1072cb: 84 c9 test %cl,%cl
1072cd: 75 f6 jne 1072c5 <rtems_bsp_cmdline_get_param_rhs+0x41>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
1072cf: 8d 50 ff lea -0x1(%eax),%edx
1072d2: 80 78 ff 22 cmpb $0x22,-0x1(%eax)
1072d6: 75 02 jne 1072da <rtems_bsp_cmdline_get_param_rhs+0x56>
1072d8: 89 d0 mov %edx,%eax
d--;
*d = '\0';
1072da: c6 00 00 movb $0x0,(%eax)
return value;
1072dd: eb 02 jmp 1072e1 <rtems_bsp_cmdline_get_param_rhs+0x5d>
1072df: 31 db xor %ebx,%ebx
}
1072e1: 89 d8 mov %ebx,%eax
1072e3: 8d 65 f8 lea -0x8(%ebp),%esp
1072e6: 5b pop %ebx
1072e7: 5f pop %edi
1072e8: c9 leave
1072e9: c3 ret
00107920 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
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 6c sub $0x6c,%esp
107929: 8b 5d 08 mov 0x8(%ebp),%ebx
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
10792c: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
107930: 0f 84 53 01 00 00 je 107a89 <rtems_cpu_usage_report_with_plugin+0x169><== 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 );
107936: 83 ec 0c sub $0xc,%esp
107939: 8d 75 d8 lea -0x28(%ebp),%esi
10793c: 56 push %esi
10793d: e8 2a 47 00 00 call 10c06c <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
107942: 83 c4 0c add $0xc,%esp
107945: 8d 45 d0 lea -0x30(%ebp),%eax
107948: 50 push %eax
107949: 56 push %esi
10794a: 68 78 f5 12 00 push $0x12f578
10794f: e8 08 67 00 00 call 10e05c <_Timespec_Subtract>
}
}
}
#endif
(*print)(
107954: 5e pop %esi
107955: 5f pop %edi
107956: 68 40 08 12 00 push $0x120840
10795b: 53 push %ebx
10795c: ff 55 0c call *0xc(%ebp)
10795f: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp)
107966: 83 c4 10 add $0x10,%esp
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
107969: 8b 55 a4 mov -0x5c(%ebp),%edx
10796c: 8b 04 95 ac ef 12 00 mov 0x12efac(,%edx,4),%eax
107973: 85 c0 test %eax,%eax
107975: 0f 84 e5 00 00 00 je 107a60 <rtems_cpu_usage_report_with_plugin+0x140>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
10797b: 8b 70 04 mov 0x4(%eax),%esi
if ( information ) {
10797e: 85 f6 test %esi,%esi
107980: 0f 84 da 00 00 00 je 107a60 <rtems_cpu_usage_report_with_plugin+0x140><== NEVER TAKEN
107986: bf 01 00 00 00 mov $0x1,%edi
10798b: 89 5d 94 mov %ebx,-0x6c(%ebp)
10798e: e9 be 00 00 00 jmp 107a51 <rtems_cpu_usage_report_with_plugin+0x131>
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
107993: 8b 46 1c mov 0x1c(%esi),%eax
107996: 8b 14 b8 mov (%eax,%edi,4),%edx
if ( !the_thread )
107999: 85 d2 test %edx,%edx
10799b: 0f 84 af 00 00 00 je 107a50 <rtems_cpu_usage_report_with_plugin+0x130><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
1079a1: 51 push %ecx
1079a2: 8d 4d b3 lea -0x4d(%ebp),%ecx
1079a5: 51 push %ecx
1079a6: 6a 0d push $0xd
1079a8: ff 72 08 pushl 0x8(%edx)
1079ab: 89 55 a0 mov %edx,-0x60(%ebp)
1079ae: e8 6d 35 00 00 call 10af20 <rtems_object_get_name>
(*print)(
1079b3: 8d 5d b3 lea -0x4d(%ebp),%ebx
1079b6: 53 push %ebx
1079b7: 8b 55 a0 mov -0x60(%ebp),%edx
1079ba: ff 72 08 pushl 0x8(%edx)
1079bd: 68 b2 09 12 00 push $0x1209b2
1079c2: ff 75 94 pushl -0x6c(%ebp)
1079c5: 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;
1079c8: 8b 55 a0 mov -0x60(%ebp),%edx
1079cb: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx
1079d1: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx
1079d7: 89 4d c8 mov %ecx,-0x38(%ebp)
1079da: 89 5d cc mov %ebx,-0x34(%ebp)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
1079dd: 83 c4 20 add $0x20,%esp
1079e0: a1 94 f0 12 00 mov 0x12f094,%eax
1079e5: 8b 40 08 mov 0x8(%eax),%eax
1079e8: 3b 42 08 cmp 0x8(%edx),%eax
1079eb: 75 28 jne 107a15 <rtems_cpu_usage_report_with_plugin+0xf5>
Timestamp_Control used;
_Timestamp_Subtract(
1079ed: 50 push %eax
1079ee: 8d 45 c0 lea -0x40(%ebp),%eax
1079f1: 50 push %eax
1079f2: 8d 55 d8 lea -0x28(%ebp),%edx
1079f5: 52 push %edx
1079f6: 68 9c f0 12 00 push $0x12f09c
1079fb: 89 45 a0 mov %eax,-0x60(%ebp)
1079fe: e8 59 66 00 00 call 10e05c <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
107a03: 59 pop %ecx
107a04: 5b pop %ebx
107a05: 8b 45 a0 mov -0x60(%ebp),%eax
107a08: 50 push %eax
107a09: 8d 5d c8 lea -0x38(%ebp),%ebx
107a0c: 53 push %ebx
107a0d: e8 4e 65 00 00 call 10df60 <_Timespec_Add_to>
107a12: 83 c4 10 add $0x10,%esp
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
107a15: 8d 45 e0 lea -0x20(%ebp),%eax
107a18: 50 push %eax
107a19: 8d 55 e4 lea -0x1c(%ebp),%edx
107a1c: 52 push %edx
107a1d: 8d 4d d0 lea -0x30(%ebp),%ecx
107a20: 51 push %ecx
107a21: 8d 5d c8 lea -0x38(%ebp),%ebx
107a24: 53 push %ebx
107a25: e8 66 65 00 00 call 10df90 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
107a2a: 58 pop %eax
107a2b: 5a pop %edx
107a2c: ff 75 e0 pushl -0x20(%ebp)
107a2f: ff 75 e4 pushl -0x1c(%ebp)
107a32: 8b 45 cc mov -0x34(%ebp),%eax
107a35: b9 e8 03 00 00 mov $0x3e8,%ecx
107a3a: 31 d2 xor %edx,%edx
107a3c: f7 f1 div %ecx
107a3e: 50 push %eax
107a3f: ff 75 c8 pushl -0x38(%ebp)
107a42: 68 c5 09 12 00 push $0x1209c5
107a47: ff 75 94 pushl -0x6c(%ebp)
107a4a: ff 55 0c call *0xc(%ebp)
107a4d: 83 c4 20 add $0x20,%esp
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
107a50: 47 inc %edi
107a51: 0f b7 46 10 movzwl 0x10(%esi),%eax
107a55: 39 c7 cmp %eax,%edi
107a57: 0f 86 36 ff ff ff jbe 107993 <rtems_cpu_usage_report_with_plugin+0x73>
107a5d: 8b 5d 94 mov -0x6c(%ebp),%ebx
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
107a60: ff 45 a4 incl -0x5c(%ebp)
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
107a63: 83 7d a4 05 cmpl $0x5,-0x5c(%ebp)
107a67: 0f 85 fc fe ff ff jne 107969 <rtems_cpu_usage_report_with_plugin+0x49>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
107a6d: 8b 45 d4 mov -0x2c(%ebp),%eax
107a70: b9 e8 03 00 00 mov $0x3e8,%ecx
107a75: 31 d2 xor %edx,%edx
107a77: f7 f1 div %ecx
107a79: 50 push %eax
107a7a: ff 75 d0 pushl -0x30(%ebp)
107a7d: 68 dd 09 12 00 push $0x1209dd
107a82: 53 push %ebx
107a83: ff 55 0c call *0xc(%ebp)
107a86: 83 c4 10 add $0x10,%esp
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
107a89: 8d 65 f4 lea -0xc(%ebp),%esp
107a8c: 5b pop %ebx
107a8d: 5e pop %esi
107a8e: 5f pop %edi
107a8f: c9 leave
107a90: c3 ret
00110ce0 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
int
rtems_deviceio_errno(rtems_status_code code)
{
110ce0: 55 push %ebp <== NOT EXECUTED
110ce1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
110ce3: 53 push %ebx <== NOT EXECUTED
110ce4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
110ce7: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
110cea: 68 74 ef 11 00 push $0x11ef74 <== NOT EXECUTED
110cef: e8 18 00 00 00 call 110d0c <rtems_assoc_remote_by_local><== NOT EXECUTED
110cf4: 89 c3 mov %eax,%ebx <== NOT EXECUTED
110cf6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110cf9: 85 c0 test %eax,%eax <== NOT EXECUTED
110cfb: 74 07 je 110d04 <rtems_deviceio_errno+0x24><== NOT EXECUTED
{
errno = rc;
110cfd: e8 02 07 00 00 call 111404 <__errno> <== NOT EXECUTED
110d02: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
return -1;
}
return -1;
}
110d04: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
110d07: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
110d0a: c9 leave <== NOT EXECUTED
110d0b: c3 ret <== NOT EXECUTED
0010b6cb <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
10b6cb: 55 push %ebp <== NOT EXECUTED
10b6cc: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10b6ce: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
* printf(3) format string, with its concommitant arguments.
*
* Returns the number of characters written.
*/
int rtems_error(
10b6d1: 8d 4d 10 lea 0x10(%ebp),%ecx <== NOT EXECUTED
{
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
chars_written = rtems_verror(error_flag, printf_format, arglist);
10b6d4: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
10b6d7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10b6da: e8 6a fe ff ff call 10b549 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
10b6df: c9 leave <== NOT EXECUTED
10b6e0: c3 ret <== NOT EXECUTED
0010705b <rtems_filesystem_dirname>:
}
int rtems_filesystem_dirname(
const char *pathname
)
{
10705b: 55 push %ebp
10705c: 89 e5 mov %esp,%ebp
10705e: 57 push %edi
10705f: 8b 55 08 mov 0x8(%ebp),%edx
int len = strlen( pathname );
107062: 31 c0 xor %eax,%eax
107064: 83 c9 ff or $0xffffffff,%ecx
107067: 89 d7 mov %edx,%edi
107069: f2 ae repnz scas %es:(%edi),%al
10706b: f7 d1 not %ecx
10706d: 8d 41 ff lea -0x1(%ecx),%eax
107070: 01 c2 add %eax,%edx
while ( len ) {
107072: eb 13 jmp 107087 <rtems_filesystem_dirname+0x2c>
len--;
107074: 48 dec %eax
if ( rtems_filesystem_is_separator( pathname[len] ) )
107075: 8a 4a ff mov -0x1(%edx),%cl
107078: 80 f9 5c cmp $0x5c,%cl
10707b: 74 0e je 10708b <rtems_filesystem_dirname+0x30><== NEVER TAKEN
10707d: 80 f9 2f cmp $0x2f,%cl
107080: 74 09 je 10708b <rtems_filesystem_dirname+0x30>
107082: 4a dec %edx
107083: 84 c9 test %cl,%cl
107085: 74 04 je 10708b <rtems_filesystem_dirname+0x30><== NEVER TAKEN
const char *pathname
)
{
int len = strlen( pathname );
while ( len ) {
107087: 85 c0 test %eax,%eax
107089: 75 e9 jne 107074 <rtems_filesystem_dirname+0x19>
if ( rtems_filesystem_is_separator( pathname[len] ) )
break;
}
return len;
}
10708b: 5f pop %edi
10708c: c9 leave
10708d: c3 ret
00107148 <rtems_filesystem_evaluate_path>:
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
107148: 55 push %ebp
107149: 89 e5 mov %esp,%ebp
10714b: 57 push %edi
10714c: 56 push %esi
10714d: 53 push %ebx
10714e: 83 ec 1c sub $0x1c,%esp
107151: 8b 55 08 mov 0x8(%ebp),%edx
107154: 8b 45 0c mov 0xc(%ebp),%eax
107157: 89 45 e4 mov %eax,-0x1c(%ebp)
10715a: 8b 45 10 mov 0x10(%ebp),%eax
10715d: 89 45 e0 mov %eax,-0x20(%ebp)
107160: 8b 45 14 mov 0x14(%ebp),%eax
107163: 8b 5d 18 mov 0x18(%ebp),%ebx
/*
* Verify Input parameters.
*/
if ( !pathname )
107166: 85 d2 test %edx,%edx
107168: 75 0d jne 107177 <rtems_filesystem_evaluate_path+0x2f><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
10716a: e8 95 a2 00 00 call 111404 <__errno> <== NOT EXECUTED
10716f: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
107175: eb 6e jmp 1071e5 <rtems_filesystem_evaluate_path+0x9d><== NOT EXECUTED
if ( !pathloc )
107177: 85 c0 test %eax,%eax
107179: 75 0d jne 107188 <rtems_filesystem_evaluate_path+0x40><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
10717b: e8 84 a2 00 00 call 111404 <__errno> <== NOT EXECUTED
107180: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
107186: eb 5d jmp 1071e5 <rtems_filesystem_evaluate_path+0x9d><== NOT EXECUTED
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
107188: 8a 0a mov (%edx),%cl
10718a: 80 f9 5c cmp $0x5c,%cl
10718d: 74 09 je 107198 <rtems_filesystem_evaluate_path+0x50><== NEVER TAKEN
10718f: 80 f9 2f cmp $0x2f,%cl
107192: 74 04 je 107198 <rtems_filesystem_evaluate_path+0x50>
107194: 84 c9 test %cl,%cl
107196: 75 16 jne 1071ae <rtems_filesystem_evaluate_path+0x66><== ALWAYS TAKEN
107198: 8b 35 48 1f 12 00 mov 0x121f48,%esi
10719e: 83 c6 18 add $0x18,%esi
1071a1: b9 05 00 00 00 mov $0x5,%ecx
1071a6: 89 c7 mov %eax,%edi
1071a8: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
1071aa: b1 01 mov $0x1,%cl
1071ac: eb 12 jmp 1071c0 <rtems_filesystem_evaluate_path+0x78>
1071ae: 8b 35 48 1f 12 00 mov 0x121f48,%esi
1071b4: 83 c6 04 add $0x4,%esi
1071b7: b9 05 00 00 00 mov $0x5,%ecx
1071bc: 89 c7 mov %eax,%edi
1071be: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
1071c0: 89 5d 18 mov %ebx,0x18(%ebp)
1071c3: 89 45 14 mov %eax,0x14(%ebp)
1071c6: 8b 45 e0 mov -0x20(%ebp),%eax
1071c9: 89 45 10 mov %eax,0x10(%ebp)
1071cc: 8b 45 e4 mov -0x1c(%ebp),%eax
1071cf: 29 c8 sub %ecx,%eax
1071d1: 89 45 0c mov %eax,0xc(%ebp)
1071d4: 01 ca add %ecx,%edx
1071d6: 89 55 08 mov %edx,0x8(%ebp)
pathnamelen - i,
flags,
pathloc,
follow_link );
}
1071d9: 83 c4 1c add $0x1c,%esp
1071dc: 5b pop %ebx
1071dd: 5e pop %esi
1071de: 5f pop %edi
1071df: c9 leave
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
1071e0: e9 a9 fe ff ff jmp 10708e <rtems_filesystem_evaluate_relative_path>
pathnamelen - i,
flags,
pathloc,
follow_link );
}
1071e5: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1071e8: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
1071eb: 5b pop %ebx <== NOT EXECUTED
1071ec: 5e pop %esi <== NOT EXECUTED
1071ed: 5f pop %edi <== NOT EXECUTED
1071ee: c9 leave <== NOT EXECUTED
1071ef: c3 ret <== NOT EXECUTED
0010708e <rtems_filesystem_evaluate_relative_path>:
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
10708e: 55 push %ebp
10708f: 89 e5 mov %esp,%ebp
107091: 57 push %edi
107092: 56 push %esi
107093: 53 push %ebx
107094: 83 ec 1c sub $0x1c,%esp
107097: 8b 4d 08 mov 0x8(%ebp),%ecx
10709a: 8b 75 0c mov 0xc(%ebp),%esi
10709d: 8b 7d 10 mov 0x10(%ebp),%edi
1070a0: 8b 5d 14 mov 0x14(%ebp),%ebx
1070a3: 8b 55 18 mov 0x18(%ebp),%edx
/*
* Verify Input parameters.
*/
if ( !pathname )
1070a6: 85 c9 test %ecx,%ecx
1070a8: 75 0d jne 1070b7 <rtems_filesystem_evaluate_relative_path+0x29><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
1070aa: e8 55 a3 00 00 call 111404 <__errno> <== NOT EXECUTED
1070af: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
1070b5: eb 0f jmp 1070c6 <rtems_filesystem_evaluate_relative_path+0x38><== NOT EXECUTED
if ( !pathloc )
1070b7: 85 db test %ebx,%ebx
1070b9: 75 10 jne 1070cb <rtems_filesystem_evaluate_relative_path+0x3d><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
1070bb: e8 44 a3 00 00 call 111404 <__errno> <== NOT EXECUTED
1070c0: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
1070c6: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
1070c9: eb 73 jmp 10713e <rtems_filesystem_evaluate_relative_path+0xb0><== NOT EXECUTED
if ( !pathloc->ops->evalpath_h )
1070cb: 8b 43 0c mov 0xc(%ebx),%eax
1070ce: 8b 00 mov (%eax),%eax
1070d0: 85 c0 test %eax,%eax
1070d2: 74 4e je 107122 <rtems_filesystem_evaluate_relative_path+0x94><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
1070d4: 53 push %ebx
1070d5: 57 push %edi
1070d6: 56 push %esi
1070d7: 51 push %ecx
1070d8: 89 55 e4 mov %edx,-0x1c(%ebp)
1070db: ff d0 call *%eax
1070dd: 89 c6 mov %eax,%esi
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
1070df: 83 c4 10 add $0x10,%esp
1070e2: 85 c0 test %eax,%eax
1070e4: 8b 55 e4 mov -0x1c(%ebp),%edx
1070e7: 75 55 jne 10713e <rtems_filesystem_evaluate_relative_path+0xb0>
1070e9: 85 d2 test %edx,%edx
1070eb: 74 51 je 10713e <rtems_filesystem_evaluate_relative_path+0xb0>
if ( !pathloc->ops->node_type_h ){
1070ed: 8b 53 0c mov 0xc(%ebx),%edx
1070f0: 8b 42 10 mov 0x10(%edx),%eax
1070f3: 85 c0 test %eax,%eax
1070f5: 74 1b je 107112 <rtems_filesystem_evaluate_relative_path+0x84><== NEVER TAKEN
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
1070f7: 83 ec 0c sub $0xc,%esp
1070fa: 53 push %ebx
1070fb: ff d0 call *%eax
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
1070fd: 83 e8 03 sub $0x3,%eax
107100: 83 c4 10 add $0x10,%esp
107103: 83 f8 01 cmp $0x1,%eax
107106: 77 36 ja 10713e <rtems_filesystem_evaluate_relative_path+0xb0>
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
107108: 8b 53 0c mov 0xc(%ebx),%edx
10710b: 8b 42 34 mov 0x34(%edx),%eax
10710e: 85 c0 test %eax,%eax
107110: 75 1d jne 10712f <rtems_filesystem_evaluate_relative_path+0xa1><== ALWAYS TAKEN
rtems_filesystem_freenode( pathloc );
107112: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
107115: 85 c0 test %eax,%eax <== NOT EXECUTED
107117: 74 09 je 107122 <rtems_filesystem_evaluate_relative_path+0x94><== NOT EXECUTED
107119: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10711c: 53 push %ebx <== NOT EXECUTED
10711d: ff d0 call *%eax <== NOT EXECUTED
10711f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
107122: e8 dd a2 00 00 call 111404 <__errno> <== NOT EXECUTED
107127: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10712d: eb 97 jmp 1070c6 <rtems_filesystem_evaluate_relative_path+0x38><== NOT EXECUTED
* pathloc will be passed up (and eventually released).
* Hence, the (valid) originial node that we submit to
* eval_link_h() should be released by the handler.
*/
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
10712f: 89 7d 0c mov %edi,0xc(%ebp)
107132: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
return result;
}
107135: 8d 65 f4 lea -0xc(%ebp),%esp
107138: 5b pop %ebx
107139: 5e pop %esi
10713a: 5f pop %edi
10713b: c9 leave
* pathloc will be passed up (and eventually released).
* Hence, the (valid) originial node that we submit to
* eval_link_h() should be released by the handler.
*/
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
10713c: ff e0 jmp *%eax
}
}
return result;
}
10713e: 89 f0 mov %esi,%eax
107140: 8d 65 f4 lea -0xc(%ebp),%esp
107143: 5b pop %ebx
107144: 5e pop %esi
107145: 5f pop %edi
107146: c9 leave
107147: c3 ret
00106f3c <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 )
{
106f3c: 55 push %ebp
106f3d: 89 e5 mov %esp,%ebp
106f3f: 57 push %edi
106f40: 56 push %esi
106f41: 53 push %ebx
106f42: 83 ec 2c sub $0x2c,%esp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
106f45: a1 48 1f 12 00 mov 0x121f48,%eax
106f4a: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax)
init_fs_mount_table();
106f51: e8 76 06 00 00 call 1075cc <init_fs_mount_table>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
106f56: 83 3d c8 cf 11 00 00 cmpl $0x0,0x11cfc8
106f5d: 75 0a jne 106f69 <rtems_filesystem_initialize+0x2d><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
106f5f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106f62: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED
106f67: eb 2a jmp 106f93 <rtems_filesystem_initialize+0x57><== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
106f69: a1 4c 01 12 00 mov 0x12014c,%eax
status = mount(
106f6e: 83 ec 0c sub $0xc,%esp
106f71: ff 70 0c pushl 0xc(%eax)
106f74: ff 70 08 pushl 0x8(%eax)
106f77: ff 70 04 pushl 0x4(%eax)
106f7a: ff 30 pushl (%eax)
106f7c: 8d 45 e4 lea -0x1c(%ebp),%eax
106f7f: 50 push %eax
106f80: e8 6c 06 00 00 call 1075f1 <mount>
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
106f85: 83 c4 20 add $0x20,%esp
106f88: 40 inc %eax
106f89: 75 0d jne 106f98 <rtems_filesystem_initialize+0x5c><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
106f8b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106f8e: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED
106f93: e8 14 36 00 00 call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_filesystem_link_counts = 0;
106f98: 8b 3d 48 1f 12 00 mov 0x121f48,%edi
106f9e: 66 c7 47 30 00 00 movw $0x0,0x30(%edi)
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
106fa4: 83 c7 18 add $0x18,%edi
106fa7: 8b 75 e4 mov -0x1c(%ebp),%esi
106faa: 83 c6 1c add $0x1c,%esi
106fad: b9 05 00 00 00 mov $0x5,%ecx
106fb2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
106fb4: 83 ec 0c sub $0xc,%esp
106fb7: 6a 00 push $0x0
106fb9: 8d 5d d0 lea -0x30(%ebp),%ebx
106fbc: 53 push %ebx
106fbd: 6a 00 push $0x0
106fbf: 6a 01 push $0x1
106fc1: 68 ba e6 11 00 push $0x11e6ba
106fc6: e8 7d 01 00 00 call 107148 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
106fcb: 8b 3d 48 1f 12 00 mov 0x121f48,%edi
106fd1: 83 c7 18 add $0x18,%edi
106fd4: b9 05 00 00 00 mov $0x5,%ecx
106fd9: 89 de mov %ebx,%esi
106fdb: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
106fdd: 83 c4 14 add $0x14,%esp
106fe0: 6a 00 push $0x0
106fe2: 53 push %ebx
106fe3: 6a 00 push $0x0
106fe5: 6a 01 push $0x1
106fe7: 68 ba e6 11 00 push $0x11e6ba
106fec: e8 57 01 00 00 call 107148 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
106ff1: 8b 3d 48 1f 12 00 mov 0x121f48,%edi
106ff7: 83 c7 04 add $0x4,%edi
106ffa: b9 05 00 00 00 mov $0x5,%ecx
106fff: 89 de mov %ebx,%esi
107001: 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);
107003: 83 c4 18 add $0x18,%esp
107006: 68 ff 01 00 00 push $0x1ff
10700b: 68 bc e6 11 00 push $0x11e6bc
107010: e8 ab 04 00 00 call 1074c0 <mkdir>
if ( status != 0 )
107015: 83 c4 10 add $0x10,%esp
107018: 85 c0 test %eax,%eax
10701a: 74 0d je 107029 <rtems_filesystem_initialize+0xed><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0003 );
10701c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10701f: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED
107024: e9 6a ff ff ff jmp 106f93 <rtems_filesystem_initialize+0x57><== 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.
*/
}
107029: 8d 65 f4 lea -0xc(%ebp),%esp
10702c: 5b pop %ebx
10702d: 5e pop %esi
10702e: 5f pop %edi
10702f: c9 leave
107030: c3 ret
0010cbb4 <rtems_filesystem_nodes_equal>:
);
bool rtems_filesystem_nodes_equal(
const rtems_filesystem_location_info_t *loc1,
const rtems_filesystem_location_info_t *loc2
){
10cbb4: 55 push %ebp <== NOT EXECUTED
10cbb5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10cbb7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10cbba: 8b 10 mov (%eax),%edx <== NOT EXECUTED
10cbbc: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10cbbf: 3b 10 cmp (%eax),%edx <== NOT EXECUTED
10cbc1: 0f 94 c0 sete %al <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access );
}
10cbc4: c9 leave <== NOT EXECUTED
10cbc5: c3 ret <== NOT EXECUTED
00107034 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
107034: 55 push %ebp
107035: 89 e5 mov %esp,%ebp
107037: 53 push %ebx
107038: 8b 5d 08 mov 0x8(%ebp),%ebx
10703b: 8b 4d 0c mov 0xc(%ebp),%ecx
10703e: 31 c0 xor %eax,%eax
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
107040: eb 01 jmp 107043 <rtems_filesystem_prefix_separators+0xf>
{
pathname++;
pathnamelen--;
stripped++;
107042: 40 inc %eax
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
107043: 8a 14 03 mov (%ebx,%eax,1),%dl
107046: 39 c1 cmp %eax,%ecx
107048: 74 0e je 107058 <rtems_filesystem_prefix_separators+0x24><== NEVER TAKEN
10704a: 84 d2 test %dl,%dl
10704c: 74 0a je 107058 <rtems_filesystem_prefix_separators+0x24><== NEVER TAKEN
10704e: 80 fa 5c cmp $0x5c,%dl
107051: 74 ef je 107042 <rtems_filesystem_prefix_separators+0xe><== NEVER TAKEN
107053: 80 fa 2f cmp $0x2f,%dl
107056: 74 ea je 107042 <rtems_filesystem_prefix_separators+0xe>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
107058: 5b pop %ebx
107059: c9 leave
10705a: c3 ret
00106df0 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
106df0: 55 push %ebp <== NOT EXECUTED
106df1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106df3: 57 push %edi <== NOT EXECUTED
106df4: 56 push %esi <== NOT EXECUTED
106df5: 53 push %ebx <== NOT EXECUTED
106df6: 83 ec 48 sub $0x48,%esp <== NOT EXECUTED
106df9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
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( name, strlen( name ), 0x00, &loc, true );
106dfc: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED
106dff: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
106e02: 31 c0 xor %eax,%eax <== NOT EXECUTED
106e04: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
106e06: f7 d1 not %ecx <== NOT EXECUTED
106e08: 49 dec %ecx <== NOT EXECUTED
106e09: 6a 01 push $0x1 <== NOT EXECUTED
106e0b: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED
106e0e: 56 push %esi <== NOT EXECUTED
106e0f: 6a 00 push $0x0 <== NOT EXECUTED
106e11: 51 push %ecx <== NOT EXECUTED
106e12: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
106e15: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
106e18: e8 2b 03 00 00 call 107148 <rtems_filesystem_evaluate_path><== NOT EXECUTED
106e1d: 89 c7 mov %eax,%edi <== NOT EXECUTED
the_jnode = loc.node_access;
106e1f: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
106e22: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
106e25: 8b 41 10 mov 0x10(%ecx),%eax <== NOT EXECUTED
106e28: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
106e2b: 85 c0 test %eax,%eax <== NOT EXECUTED
106e2d: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
106e30: 75 20 jne 106e52 <rtems_io_lookup_name+0x62><== NOT EXECUTED
rtems_filesystem_freenode( &loc );
106e32: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED
106e35: 85 c0 test %eax,%eax <== NOT EXECUTED
106e37: 74 09 je 106e42 <rtems_io_lookup_name+0x52><== NOT EXECUTED
106e39: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106e3c: 56 push %esi <== NOT EXECUTED
106e3d: ff d0 call *%eax <== NOT EXECUTED
106e3f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
106e42: e8 bd a5 00 00 call 111404 <__errno> <== NOT EXECUTED
106e47: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
106e4d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
106e50: eb 7b jmp 106ecd <rtems_io_lookup_name+0xdd><== NOT EXECUTED
}
node_type = (*loc.ops->node_type_h)( &loc );
106e52: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106e55: 56 push %esi <== NOT EXECUTED
106e56: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
106e59: ff d0 call *%eax <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
106e5b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106e5e: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
106e61: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
106e64: 75 04 jne 106e6a <rtems_io_lookup_name+0x7a><== NOT EXECUTED
106e66: 85 ff test %edi,%edi <== NOT EXECUTED
106e68: 74 1e je 106e88 <rtems_io_lookup_name+0x98><== NOT EXECUTED
rtems_filesystem_freenode( &loc );
106e6a: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
106e6d: 85 c0 test %eax,%eax <== NOT EXECUTED
106e6f: 74 53 je 106ec4 <rtems_io_lookup_name+0xd4><== NOT EXECUTED
106e71: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
106e74: 85 c0 test %eax,%eax <== NOT EXECUTED
106e76: 74 4c je 106ec4 <rtems_io_lookup_name+0xd4><== NOT EXECUTED
106e78: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106e7b: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
106e7e: 52 push %edx <== NOT EXECUTED
106e7f: ff d0 call *%eax <== NOT EXECUTED
106e81: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
106e86: eb 37 jmp 106ebf <rtems_io_lookup_name+0xcf><== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
106e88: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
106e8b: 89 02 mov %eax,(%edx) <== NOT EXECUTED
device_info->device_name_length = strlen( name );
106e8d: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED
106e90: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
106e93: 31 c0 xor %eax,%eax <== NOT EXECUTED
106e95: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
106e97: f7 d1 not %ecx <== NOT EXECUTED
106e99: 49 dec %ecx <== NOT EXECUTED
106e9a: 89 4a 04 mov %ecx,0x4(%edx) <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
106e9d: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED
106ea0: 89 42 08 mov %eax,0x8(%edx) <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
106ea3: 8b 43 54 mov 0x54(%ebx),%eax <== NOT EXECUTED
106ea6: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
106ea9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
106eac: 85 c0 test %eax,%eax <== NOT EXECUTED
106eae: 74 1b je 106ecb <rtems_io_lookup_name+0xdb><== NOT EXECUTED
106eb0: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
106eb3: 85 c0 test %eax,%eax <== NOT EXECUTED
106eb5: 74 14 je 106ecb <rtems_io_lookup_name+0xdb><== NOT EXECUTED
106eb7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106eba: 56 push %esi <== NOT EXECUTED
106ebb: ff d0 call *%eax <== NOT EXECUTED
106ebd: 31 c0 xor %eax,%eax <== NOT EXECUTED
106ebf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106ec2: eb 09 jmp 106ecd <rtems_io_lookup_name+0xdd><== NOT EXECUTED
106ec4: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
106ec9: eb 02 jmp 106ecd <rtems_io_lookup_name+0xdd><== NOT EXECUTED
106ecb: 31 c0 xor %eax,%eax <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
106ecd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
106ed0: 5b pop %ebx <== NOT EXECUTED
106ed1: 5e pop %esi <== NOT EXECUTED
106ed2: 5f pop %edi <== NOT EXECUTED
106ed3: c9 leave <== NOT EXECUTED
106ed4: c3 ret <== NOT EXECUTED
0010c550 <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)
{
10c550: 55 push %ebp
10c551: 89 e5 mov %esp,%ebp
10c553: 57 push %edi
10c554: 56 push %esi
10c555: 53 push %ebx
10c556: 83 ec 0c sub $0xc,%esp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10c559: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
10c55d: 74 41 je 10c5a0 <rtems_iterate_over_all_threads+0x50><== NEVER TAKEN
10c55f: bb 01 00 00 00 mov $0x1,%ebx
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
10c564: 8b 04 9d ac ef 12 00 mov 0x12efac(,%ebx,4),%eax
10c56b: 85 c0 test %eax,%eax
10c56d: 74 2b je 10c59a <rtems_iterate_over_all_threads+0x4a>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
10c56f: 8b 78 04 mov 0x4(%eax),%edi
if ( !information )
10c572: be 01 00 00 00 mov $0x1,%esi
10c577: 85 ff test %edi,%edi
10c579: 75 17 jne 10c592 <rtems_iterate_over_all_threads+0x42>
10c57b: eb 1d jmp 10c59a <rtems_iterate_over_all_threads+0x4a>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
10c57d: 8b 47 1c mov 0x1c(%edi),%eax
10c580: 8b 04 b0 mov (%eax,%esi,4),%eax
if ( !the_thread )
10c583: 85 c0 test %eax,%eax
10c585: 74 0a je 10c591 <rtems_iterate_over_all_threads+0x41><== NEVER TAKEN
continue;
(*routine)(the_thread);
10c587: 83 ec 0c sub $0xc,%esp
10c58a: 50 push %eax
10c58b: ff 55 08 call *0x8(%ebp)
10c58e: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10c591: 46 inc %esi
10c592: 0f b7 47 10 movzwl 0x10(%edi),%eax
10c596: 39 c6 cmp %eax,%esi
10c598: 76 e3 jbe 10c57d <rtems_iterate_over_all_threads+0x2d>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10c59a: 43 inc %ebx
10c59b: 83 fb 05 cmp $0x5,%ebx
10c59e: 75 c4 jne 10c564 <rtems_iterate_over_all_threads+0x14>
(*routine)(the_thread);
}
}
}
10c5a0: 8d 65 f4 lea -0xc(%ebp),%esp
10c5a3: 5b pop %ebx
10c5a4: 5e pop %esi
10c5a5: 5f pop %edi
10c5a6: c9 leave
10c5a7: c3 ret
0010e03f <rtems_libio_allocate>:
* This routine searches the IOP Table for an unused entry. If it
* finds one, it returns it. Otherwise, it returns NULL.
*/
rtems_libio_t *rtems_libio_allocate( void )
{
10e03f: 55 push %ebp
10e040: 89 e5 mov %esp,%ebp
10e042: 57 push %edi
10e043: 53 push %ebx
10e044: 83 ec 14 sub $0x14,%esp
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 );
10e047: 6a 00 push $0x0
10e049: 6a 00 push $0x0
10e04b: ff 35 a0 40 12 00 pushl 0x1240a0
10e051: e8 96 bf ff ff call 109fec <rtems_semaphore_obtain>
rtems_status_code rc;
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
10e056: a1 9c 40 12 00 mov 0x12409c,%eax
10e05b: 83 c4 10 add $0x10,%esp
10e05e: 85 c0 test %eax,%eax
10e060: 74 4f je 10e0b1 <rtems_libio_allocate+0x72>
rc = rtems_semaphore_create(
10e062: 83 ec 0c sub $0xc,%esp
10e065: 8d 55 f4 lea -0xc(%ebp),%edx
10e068: 52 push %edx
10e069: 6a 00 push $0x0
10e06b: 6a 54 push $0x54
10e06d: 6a 01 push $0x1
10e06f: 2b 05 98 40 12 00 sub 0x124098,%eax
10e075: c1 f8 06 sar $0x6,%eax
10e078: 0d 00 49 42 4c or $0x4c424900,%eax
10e07d: 50 push %eax
10e07e: e8 3d bd ff ff call 109dc0 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
0,
&sema
);
if (rc != RTEMS_SUCCESSFUL)
10e083: 83 c4 20 add $0x20,%esp
10e086: 85 c0 test %eax,%eax
10e088: 75 27 jne 10e0b1 <rtems_libio_allocate+0x72><== NEVER TAKEN
goto failed;
iop = rtems_libio_iop_freelist;
10e08a: 8b 1d 9c 40 12 00 mov 0x12409c,%ebx
next = iop->data1;
10e090: 8b 53 34 mov 0x34(%ebx),%edx
(void) memset( iop, 0, sizeof(rtems_libio_t) );
10e093: b9 10 00 00 00 mov $0x10,%ecx
10e098: 89 df mov %ebx,%edi
10e09a: f3 ab rep stos %eax,%es:(%edi)
iop->flags = LIBIO_FLAGS_OPEN;
10e09c: c7 43 14 00 01 00 00 movl $0x100,0x14(%ebx)
iop->sem = sema;
10e0a3: 8b 45 f4 mov -0xc(%ebp),%eax
10e0a6: 89 43 2c mov %eax,0x2c(%ebx)
rtems_libio_iop_freelist = next;
10e0a9: 89 15 9c 40 12 00 mov %edx,0x12409c
goto done;
10e0af: eb 02 jmp 10e0b3 <rtems_libio_allocate+0x74>
10e0b1: 31 db xor %ebx,%ebx
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10e0b3: 83 ec 0c sub $0xc,%esp
10e0b6: ff 35 a0 40 12 00 pushl 0x1240a0
10e0bc: e8 17 c0 ff ff call 10a0d8 <rtems_semaphore_release>
iop = 0;
done:
rtems_libio_unlock();
return iop;
}
10e0c1: 89 d8 mov %ebx,%eax
10e0c3: 8d 65 f8 lea -0x8(%ebp),%esp
10e0c6: 5b pop %ebx
10e0c7: 5f pop %edi
10e0c8: c9 leave
10e0c9: c3 ret
0010dfea <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
10dfea: 55 push %ebp
10dfeb: 89 e5 mov %esp,%ebp
10dfed: 53 push %ebx
10dfee: 83 ec 08 sub $0x8,%esp
10dff1: 8b 5d 08 mov 0x8(%ebp),%ebx
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 );
10dff4: 6a 00 push $0x0
10dff6: 6a 00 push $0x0
10dff8: ff 35 a0 40 12 00 pushl 0x1240a0
10dffe: e8 e9 bf ff ff call 109fec <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
10e003: 8b 43 2c mov 0x2c(%ebx),%eax
10e006: 83 c4 10 add $0x10,%esp
10e009: 85 c0 test %eax,%eax
10e00b: 74 0c je 10e019 <rtems_libio_free+0x2f> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
10e00d: 83 ec 0c sub $0xc,%esp
10e010: 50 push %eax
10e011: e8 46 bf ff ff call 109f5c <rtems_semaphore_delete>
10e016: 83 c4 10 add $0x10,%esp
iop->flags &= ~LIBIO_FLAGS_OPEN;
10e019: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx)
iop->data1 = rtems_libio_iop_freelist;
10e020: a1 9c 40 12 00 mov 0x12409c,%eax
10e025: 89 43 34 mov %eax,0x34(%ebx)
rtems_libio_iop_freelist = iop;
10e028: 89 1d 9c 40 12 00 mov %ebx,0x12409c
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10e02e: a1 a0 40 12 00 mov 0x1240a0,%eax
10e033: 89 45 08 mov %eax,0x8(%ebp)
rtems_libio_unlock();
}
10e036: 8b 5d fc mov -0x4(%ebp),%ebx
10e039: c9 leave
10e03a: e9 99 c0 ff ff jmp 10a0d8 <rtems_semaphore_release>
00107268 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
107268: 55 push %ebp
107269: 89 e5 mov %esp,%ebp
10726b: 53 push %ebx
10726c: 83 ec 04 sub $0x4,%esp
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
10726f: a1 44 01 12 00 mov 0x120144,%eax
107274: 85 c0 test %eax,%eax
107276: 74 40 je 1072b8 <rtems_libio_init+0x50> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
107278: 52 push %edx
107279: 52 push %edx
10727a: 6a 40 push $0x40
10727c: 50 push %eax
10727d: e8 66 6a 00 00 call 10dce8 <calloc>
107282: a3 98 40 12 00 mov %eax,0x124098
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
107287: 83 c4 10 add $0x10,%esp
10728a: 85 c0 test %eax,%eax
10728c: 75 07 jne 107295 <rtems_libio_init+0x2d> <== ALWAYS TAKEN
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
10728e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107291: 6a 1a push $0x1a <== NOT EXECUTED
107293: eb 46 jmp 1072db <rtems_libio_init+0x73> <== NOT EXECUTED
iop = rtems_libio_iop_freelist = rtems_libio_iops;
107295: a3 9c 40 12 00 mov %eax,0x12409c
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
10729a: 8b 1d 44 01 12 00 mov 0x120144,%ebx
1072a0: 31 d2 xor %edx,%edx
1072a2: eb 03 jmp 1072a7 <rtems_libio_init+0x3f>
iop->data1 = iop + 1;
1072a4: 89 40 f4 mov %eax,-0xc(%eax)
1072a7: 89 c1 mov %eax,%ecx
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
1072a9: 42 inc %edx
1072aa: 83 c0 40 add $0x40,%eax
1072ad: 39 da cmp %ebx,%edx
1072af: 72 f3 jb 1072a4 <rtems_libio_init+0x3c>
iop->data1 = iop + 1;
iop->data1 = NULL;
1072b1: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
1072b8: 83 ec 0c sub $0xc,%esp
1072bb: 68 a0 40 12 00 push $0x1240a0
1072c0: 6a 00 push $0x0
1072c2: 6a 54 push $0x54
1072c4: 6a 01 push $0x1
1072c6: 68 4f 49 42 4c push $0x4c42494f
1072cb: e8 f0 2a 00 00 call 109dc0 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
1072d0: 83 c4 20 add $0x20,%esp
1072d3: 85 c0 test %eax,%eax
1072d5: 74 09 je 1072e0 <rtems_libio_init+0x78> <== ALWAYS TAKEN
rtems_fatal_error_occurred( rc );
1072d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1072da: 50 push %eax <== NOT EXECUTED
1072db: e8 cc 32 00 00 call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
1072e0: a1 40 01 12 00 mov 0x120140,%eax
1072e5: 85 c0 test %eax,%eax
1072e7: 74 06 je 1072ef <rtems_libio_init+0x87> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
1072e9: 8b 5d fc mov -0x4(%ebp),%ebx
1072ec: c9 leave
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
1072ed: ff e0 jmp *%eax
}
1072ef: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1072f2: c9 leave <== NOT EXECUTED
1072f3: c3 ret <== NOT EXECUTED
00108990 <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
108990: 55 push %ebp
108991: 89 e5 mov %esp,%ebp
108993: 57 push %edi
108994: 56 push %esi
108995: 53 push %ebx
108996: 83 ec 40 sub $0x40,%esp
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
108999: 8d 45 e4 lea -0x1c(%ebp),%eax
10899c: 50 push %eax
10899d: 6a 00 push $0x0
10899f: 6a 00 push $0x0
1089a1: e8 ce 26 00 00 call 10b074 <rtems_task_ident>
1089a6: 89 45 c4 mov %eax,-0x3c(%ebp)
if (sc != RTEMS_SUCCESSFUL) return sc;
1089a9: 83 c4 10 add $0x10,%esp
1089ac: 85 c0 test %eax,%eax
1089ae: 0f 85 da 00 00 00 jne 108a8e <rtems_libio_set_private_env+0xfe><== NEVER TAKEN
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
1089b4: 81 3d 34 3f 12 00 d4 cmpl $0x1260d4,0x123f34
1089bb: 60 12 00
1089be: 75 54 jne 108a14 <rtems_libio_set_private_env+0x84>
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
1089c0: 83 ec 0c sub $0xc,%esp
1089c3: 6a 48 push $0x48
1089c5: e8 ea f4 ff ff call 107eb4 <malloc>
1089ca: 89 c3 mov %eax,%ebx
if (!tmp)
1089cc: 83 c4 10 add $0x10,%esp
1089cf: 85 c0 test %eax,%eax
1089d1: 75 0c jne 1089df <rtems_libio_set_private_env+0x4f><== ALWAYS TAKEN
1089d3: c7 45 c4 1a 00 00 00 movl $0x1a,-0x3c(%ebp) <== NOT EXECUTED
1089da: e9 af 00 00 00 jmp 108a8e <rtems_libio_set_private_env+0xfe><== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
1089df: 56 push %esi
1089e0: 68 a4 88 10 00 push $0x1088a4
1089e5: 68 34 3f 12 00 push $0x123f34
1089ea: 6a 00 push $0x0
1089ec: e8 9f 27 00 00 call 10b190 <rtems_task_variable_add>
1089f1: 89 c6 mov %eax,%esi
if (sc != RTEMS_SUCCESSFUL) {
1089f3: 83 c4 10 add $0x10,%esp
1089f6: 85 c0 test %eax,%eax
1089f8: 74 14 je 108a0e <rtems_libio_set_private_env+0x7e><== ALWAYS TAKEN
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
1089fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1089fd: 53 push %ebx <== NOT EXECUTED
1089fe: e8 05 f0 ff ff call 107a08 <free> <== NOT EXECUTED
108a03: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED
return sc;
108a06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108a09: e9 80 00 00 00 jmp 108a8e <rtems_libio_set_private_env+0xfe><== NOT EXECUTED
}
rtems_current_user_env = tmp;
108a0e: 89 1d 34 3f 12 00 mov %ebx,0x123f34
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
108a14: a1 34 3f 12 00 mov 0x123f34,%eax
108a19: be d4 60 12 00 mov $0x1260d4,%esi
108a1e: b9 12 00 00 00 mov $0x12,%ecx
108a23: 89 c7 mov %eax,%edi
108a25: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_current_user_env->task_id=task_id; /* mark the local values*/
108a27: 8b 55 e4 mov -0x1c(%ebp),%edx
108a2a: 89 10 mov %edx,(%eax)
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
108a2c: 8d 78 18 lea 0x18(%eax),%edi
108a2f: 8b 35 bc 60 12 00 mov 0x1260bc,%esi
108a35: 83 c6 1c add $0x1c,%esi
108a38: b1 05 mov $0x5,%cl
108a3a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
108a3c: 83 ec 0c sub $0xc,%esp
108a3f: 6a 00 push $0x0
108a41: 8d 5d d0 lea -0x30(%ebp),%ebx
108a44: 53 push %ebx
108a45: 6a 00 push $0x0
108a47: 6a 01 push $0x1
108a49: 68 c4 04 12 00 push $0x1204c4
108a4e: e8 0d ef ff ff call 107960 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
108a53: 8b 3d 34 3f 12 00 mov 0x123f34,%edi
108a59: 83 c7 18 add $0x18,%edi
108a5c: b9 05 00 00 00 mov $0x5,%ecx
108a61: 89 de mov %ebx,%esi
108a63: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
108a65: 83 c4 14 add $0x14,%esp
108a68: 6a 00 push $0x0
108a6a: 53 push %ebx
108a6b: 6a 00 push $0x0
108a6d: 6a 01 push $0x1
108a6f: 68 c4 04 12 00 push $0x1204c4
108a74: e8 e7 ee ff ff call 107960 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
108a79: 8b 3d 34 3f 12 00 mov 0x123f34,%edi
108a7f: 83 c7 04 add $0x4,%edi
108a82: b9 05 00 00 00 mov $0x5,%ecx
108a87: 89 de mov %ebx,%esi
108a89: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return RTEMS_SUCCESSFUL;
108a8b: 83 c4 20 add $0x20,%esp
}
108a8e: 8b 45 c4 mov -0x3c(%ebp),%eax
108a91: 8d 65 f4 lea -0xc(%ebp),%esp
108a94: 5b pop %ebx
108a95: 5e pop %esi
108a96: 5f pop %edi
108a97: c9 leave
108a98: c3 ret
001088fb <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
#ifndef HAVE_USERENV_REFCNT
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) {
1088fb: 55 push %ebp <== NOT EXECUTED
1088fc: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1088fe: 53 push %ebx <== NOT EXECUTED
1088ff: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED
rtems_status_code sc;
rtems_user_env_t * shared_user_env;
rtems_id current_task_id;
sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id);
108902: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
108905: 50 push %eax <== NOT EXECUTED
108906: 6a 00 push $0x0 <== NOT EXECUTED
108908: 6a 00 push $0x0 <== NOT EXECUTED
10890a: e8 65 27 00 00 call 10b074 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
10890f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108912: 85 c0 test %eax,%eax <== NOT EXECUTED
108914: 75 75 jne 10898b <rtems_libio_share_private_env+0x90><== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
108916: 8b 1d 34 3f 12 00 mov 0x123f34,%ebx <== NOT EXECUTED
10891c: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
10891e: 3b 45 f0 cmp -0x10(%ebp),%eax <== NOT EXECUTED
108921: 75 21 jne 108944 <rtems_libio_share_private_env+0x49><== NOT EXECUTED
/* kill the current user env & task_var*/
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
108923: 51 push %ecx <== NOT EXECUTED
108924: 51 push %ecx <== NOT EXECUTED
108925: 68 34 3f 12 00 push $0x123f34 <== NOT EXECUTED
10892a: 6a 00 push $0x0 <== NOT EXECUTED
10892c: e8 f3 28 00 00 call 10b224 <rtems_task_variable_delete><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
108931: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108934: 85 c0 test %eax,%eax <== NOT EXECUTED
108936: 75 53 jne 10898b <rtems_libio_share_private_env+0x90><== NOT EXECUTED
free_user_env(tmp);
108938: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10893b: 53 push %ebx <== NOT EXECUTED
10893c: e8 63 ff ff ff call 1088a4 <free_user_env> <== NOT EXECUTED
108941: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
108944: 52 push %edx <== NOT EXECUTED
108945: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
108948: 50 push %eax <== NOT EXECUTED
108949: 68 34 3f 12 00 push $0x123f34 <== NOT EXECUTED
10894e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
108951: e8 4a 29 00 00 call 10b2a0 <rtems_task_variable_get><== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
108956: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108959: 85 c0 test %eax,%eax <== NOT EXECUTED
10895b: 75 24 jne 108981 <rtems_libio_share_private_env+0x86><== NOT EXECUTED
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
10895d: 50 push %eax <== NOT EXECUTED
10895e: 68 a4 88 10 00 push $0x1088a4 <== NOT EXECUTED
108963: 68 34 3f 12 00 push $0x123f34 <== NOT EXECUTED
108968: 6a 00 push $0x0 <== NOT EXECUTED
10896a: e8 21 28 00 00 call 10b190 <rtems_task_variable_add><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
10896f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108972: 85 c0 test %eax,%eax <== NOT EXECUTED
108974: 75 0b jne 108981 <rtems_libio_share_private_env+0x86><== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
108976: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED
108979: 89 15 34 3f 12 00 mov %edx,0x123f34 <== NOT EXECUTED
/* increase the reference count */
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
10897f: eb 0a jmp 10898b <rtems_libio_share_private_env+0x90><== NOT EXECUTED
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
108981: c7 05 34 3f 12 00 d4 movl $0x1260d4,0x123f34 <== NOT EXECUTED
108988: 60 12 00
return sc;
}
10898b: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10898e: c9 leave <== NOT EXECUTED
10898f: c3 ret <== NOT EXECUTED
0010def4 <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
10def4: 55 push %ebp
10def5: 89 e5 mov %esp,%ebp
10def7: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10defa: 89 d1 mov %edx,%ecx
10defc: 83 e1 06 and $0x6,%ecx
10deff: b8 02 00 00 00 mov $0x2,%eax
10df04: 83 f9 06 cmp $0x6,%ecx
10df07: 74 0f je 10df18 <rtems_libio_to_fcntl_flags+0x24><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
10df09: 30 c0 xor %al,%al
10df0b: f6 c2 02 test $0x2,%dl
10df0e: 75 08 jne 10df18 <rtems_libio_to_fcntl_flags+0x24><== ALWAYS TAKEN
10df10: 89 d0 mov %edx,%eax <== NOT EXECUTED
10df12: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED
10df15: 83 e0 01 and $0x1,%eax <== NOT EXECUTED
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
10df18: f6 c2 01 test $0x1,%dl
10df1b: 74 03 je 10df20 <rtems_libio_to_fcntl_flags+0x2c>
fcntl_flags |= O_NONBLOCK;
10df1d: 80 cc 40 or $0x40,%ah
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
10df20: f6 c6 02 test $0x2,%dh
10df23: 74 03 je 10df28 <rtems_libio_to_fcntl_flags+0x34>
fcntl_flags |= O_APPEND;
10df25: 83 c8 08 or $0x8,%eax
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
10df28: 80 e6 04 and $0x4,%dh
10df2b: 74 03 je 10df30 <rtems_libio_to_fcntl_flags+0x3c>
fcntl_flags |= O_CREAT;
10df2d: 80 cc 02 or $0x2,%ah
}
return fcntl_flags;
}
10df30: c9 leave
10df31: c3 ret
0011246c <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
11246c: 55 push %ebp
11246d: 89 e5 mov %esp,%ebp
11246f: 56 push %esi
112470: 53 push %ebx
112471: 8b 5d 08 mov 0x8(%ebp),%ebx
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
112474: 85 db test %ebx,%ebx
112476: 74 57 je 1124cf <rtems_memalign+0x63>
return EINVAL;
*pointer = NULL;
112478: 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()) &&
11247e: 83 3d 4c 94 12 00 03 cmpl $0x3,0x12944c
112485: 75 09 jne 112490 <rtems_memalign+0x24> <== NEVER TAKEN
112487: e8 a4 60 ff ff call 108530 <malloc_is_system_state_OK>
11248c: 84 c0 test %al,%al
11248e: 74 3f je 1124cf <rtems_memalign+0x63> <== NEVER TAKEN
/*
*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
112490: e8 f1 60 ff ff call 108586 <malloc_deferred_frees_process>
uintptr_t size,
uintptr_t alignment
)
{
return
_Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 );
112495: 6a 00 push $0x0
112497: ff 75 0c pushl 0xc(%ebp)
11249a: ff 75 10 pushl 0x10(%ebp)
11249d: ff 35 50 51 12 00 pushl 0x125150
1124a3: e8 64 a9 ff ff call 10ce0c <_Protected_heap_Allocate_aligned_with_boundary>
1124a8: 89 c6 mov %eax,%esi
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
1124aa: 83 c4 10 add $0x10,%esp
1124ad: b8 0c 00 00 00 mov $0xc,%eax
1124b2: 85 f6 test %esi,%esi
1124b4: 74 1e je 1124d4 <rtems_memalign+0x68>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
1124b6: a1 30 75 12 00 mov 0x127530,%eax
1124bb: 85 c0 test %eax,%eax
1124bd: 74 0a je 1124c9 <rtems_memalign+0x5d> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
1124bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1124c2: 53 push %ebx <== NOT EXECUTED
1124c3: ff 50 04 call *0x4(%eax) <== NOT EXECUTED
1124c6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*/
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
1124c9: 89 33 mov %esi,(%ebx)
1124cb: 31 c0 xor %eax,%eax
return 0;
1124cd: eb 05 jmp 1124d4 <rtems_memalign+0x68>
1124cf: b8 16 00 00 00 mov $0x16,%eax
}
1124d4: 8d 65 f8 lea -0x8(%ebp),%esp
1124d7: 5b pop %ebx
1124d8: 5e pop %esi
1124d9: c9 leave
1124da: c3 ret
0010b6b3 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
10b6b3: 55 push %ebp <== NOT EXECUTED
10b6b4: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10b6b6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
/*
* rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...)
*/
void rtems_panic(
10b6b9: 8d 4d 0c lea 0xc(%ebp),%ecx <== NOT EXECUTED
)
{
va_list arglist;
va_start(arglist, printf_format);
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
10b6bc: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
10b6bf: b8 00 00 00 20 mov $0x20000000,%eax <== NOT EXECUTED
10b6c4: e8 80 fe ff ff call 10b549 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
}
10b6c9: c9 leave <== NOT EXECUTED
10b6ca: c3 ret <== NOT EXECUTED
00114910 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
114910: 55 push %ebp
114911: 89 e5 mov %esp,%ebp
114913: 57 push %edi
114914: 56 push %esi
114915: 53 push %ebx
114916: 83 ec 1c sub $0x1c,%esp
114919: 8b 75 0c mov 0xc(%ebp),%esi
11491c: 8b 55 10 mov 0x10(%ebp),%edx
11491f: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
114922: b8 03 00 00 00 mov $0x3,%eax
114927: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
11492b: 0f 84 cf 00 00 00 je 114a00 <rtems_partition_create+0xf0>
return RTEMS_INVALID_NAME;
if ( !starting_address )
114931: 85 f6 test %esi,%esi
114933: 0f 84 bb 00 00 00 je 1149f4 <rtems_partition_create+0xe4>
return RTEMS_INVALID_ADDRESS;
if ( !id )
114939: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp)
11493d: 0f 84 b1 00 00 00 je 1149f4 <rtems_partition_create+0xe4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
114943: 85 ff test %edi,%edi
114945: 0f 84 b0 00 00 00 je 1149fb <rtems_partition_create+0xeb>
11494b: 85 d2 test %edx,%edx
11494d: 0f 84 a8 00 00 00 je 1149fb <rtems_partition_create+0xeb>
114953: 39 fa cmp %edi,%edx
114955: 0f 82 a0 00 00 00 jb 1149fb <rtems_partition_create+0xeb>
11495b: f7 c7 03 00 00 00 test $0x3,%edi
114961: 0f 85 94 00 00 00 jne 1149fb <rtems_partition_create+0xeb>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
114967: f7 c6 03 00 00 00 test $0x3,%esi
11496d: 0f 85 81 00 00 00 jne 1149f4 <rtems_partition_create+0xe4>
114973: a1 e8 e5 13 00 mov 0x13e5e8,%eax
114978: 40 inc %eax
114979: a3 e8 e5 13 00 mov %eax,0x13e5e8
* 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 );
11497e: 83 ec 0c sub $0xc,%esp
114981: 68 70 e4 13 00 push $0x13e470
114986: 89 55 e4 mov %edx,-0x1c(%ebp)
114989: e8 92 3c 00 00 call 118620 <_Objects_Allocate>
11498e: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
114990: 83 c4 10 add $0x10,%esp
114993: 85 c0 test %eax,%eax
114995: 8b 55 e4 mov -0x1c(%ebp),%edx
114998: 75 0c jne 1149a6 <rtems_partition_create+0x96>
_Thread_Enable_dispatch();
11499a: e8 36 49 00 00 call 1192d5 <_Thread_Enable_dispatch>
11499f: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
1149a4: eb 5a jmp 114a00 <rtems_partition_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
1149a6: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
1149a9: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
1149ac: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
1149af: 8b 45 18 mov 0x18(%ebp),%eax
1149b2: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
1149b5: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
1149bc: 57 push %edi
1149bd: 89 d0 mov %edx,%eax
1149bf: 31 d2 xor %edx,%edx
1149c1: f7 f7 div %edi
1149c3: 50 push %eax
1149c4: 56 push %esi
1149c5: 8d 43 24 lea 0x24(%ebx),%eax
1149c8: 50 push %eax
1149c9: e8 9a 2a 00 00 call 117468 <_Chain_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1149ce: 8b 43 08 mov 0x8(%ebx),%eax
1149d1: 0f b7 c8 movzwl %ax,%ecx
1149d4: 8b 15 8c e4 13 00 mov 0x13e48c,%edx
1149da: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1149dd: 8b 55 08 mov 0x8(%ebp),%edx
1149e0: 89 53 0c mov %edx,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
1149e3: 8b 55 1c mov 0x1c(%ebp),%edx
1149e6: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
1149e8: e8 e8 48 00 00 call 1192d5 <_Thread_Enable_dispatch>
1149ed: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1149ef: 83 c4 10 add $0x10,%esp
1149f2: eb 0c jmp 114a00 <rtems_partition_create+0xf0>
1149f4: b8 09 00 00 00 mov $0x9,%eax
1149f9: eb 05 jmp 114a00 <rtems_partition_create+0xf0>
1149fb: b8 08 00 00 00 mov $0x8,%eax
}
114a00: 8d 65 f4 lea -0xc(%ebp),%esp
114a03: 5b pop %ebx
114a04: 5e pop %esi
114a05: 5f pop %edi
114a06: c9 leave
114a07: c3 ret
0010f78a <rtems_pipe_initialize>:
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
10f78a: 55 push %ebp
10f78b: 89 e5 mov %esp,%ebp
10f78d: 83 ec 08 sub $0x8,%esp
if (!rtems_pipe_configured)
10f790: 80 3d 0c 25 12 00 00 cmpb $0x0,0x12250c
10f797: 74 3c je 10f7d5 <rtems_pipe_initialize+0x4b><== ALWAYS TAKEN
return;
if (rtems_pipe_semaphore)
10f799: 83 3d 98 3e 12 00 00 cmpl $0x0,0x123e98 <== NOT EXECUTED
10f7a0: 75 33 jne 10f7d5 <rtems_pipe_initialize+0x4b><== NOT EXECUTED
return;
rtems_status_code sc;
sc = rtems_semaphore_create(
10f7a2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f7a5: 68 98 3e 12 00 push $0x123e98 <== NOT EXECUTED
10f7aa: 6a 00 push $0x0 <== NOT EXECUTED
10f7ac: 6a 54 push $0x54 <== NOT EXECUTED
10f7ae: 6a 01 push $0x1 <== NOT EXECUTED
10f7b0: 68 45 50 49 50 push $0x50495045 <== NOT EXECUTED
10f7b5: e8 06 a6 ff ff call 109dc0 <rtems_semaphore_create><== NOT EXECUTED
rtems_build_name ('P', 'I', 'P', 'E'), 1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY, &rtems_pipe_semaphore);
if (sc != RTEMS_SUCCESSFUL)
10f7ba: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10f7bd: 85 c0 test %eax,%eax <== NOT EXECUTED
10f7bf: 74 09 je 10f7ca <rtems_pipe_initialize+0x40><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
10f7c1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f7c4: 50 push %eax <== NOT EXECUTED
10f7c5: e8 e2 ad ff ff call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
10f7ca: e8 ed a1 ff ff call 1099bc <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
rtems_pipe_no = now;
10f7cf: 66 a3 a0 3e 12 00 mov %ax,0x123ea0 <== NOT EXECUTED
}
10f7d5: c9 leave
10f7d6: c3 ret
0010ae6d <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
10ae6d: 55 push %ebp
10ae6e: 89 e5 mov %esp,%ebp
10ae70: 57 push %edi
10ae71: 56 push %esi
10ae72: 53 push %ebx
10ae73: 83 ec 30 sub $0x30,%esp
10ae76: 8b 75 08 mov 0x8(%ebp),%esi
10ae79: 8b 5d 0c mov 0xc(%ebp),%ebx
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
10ae7c: 8d 45 e4 lea -0x1c(%ebp),%eax
10ae7f: 50 push %eax
10ae80: 56 push %esi
10ae81: 68 20 72 12 00 push $0x127220
10ae86: e8 79 1d 00 00 call 10cc04 <_Objects_Get>
10ae8b: 89 c7 mov %eax,%edi
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
10ae8d: 83 c4 10 add $0x10,%esp
10ae90: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10ae94: 0f 85 40 01 00 00 jne 10afda <rtems_rate_monotonic_period+0x16d>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10ae9a: 8b 40 40 mov 0x40(%eax),%eax
10ae9d: 3b 05 d4 73 12 00 cmp 0x1273d4,%eax
10aea3: 74 0f je 10aeb4 <rtems_rate_monotonic_period+0x47>
_Thread_Enable_dispatch();
10aea5: e8 4b 25 00 00 call 10d3f5 <_Thread_Enable_dispatch>
10aeaa: bb 17 00 00 00 mov $0x17,%ebx
return RTEMS_NOT_OWNER_OF_RESOURCE;
10aeaf: e9 2b 01 00 00 jmp 10afdf <rtems_rate_monotonic_period+0x172>
}
if ( length == RTEMS_PERIOD_STATUS ) {
10aeb4: 85 db test %ebx,%ebx
10aeb6: 75 19 jne 10aed1 <rtems_rate_monotonic_period+0x64>
switch ( the_period->state ) {
10aeb8: 8b 47 38 mov 0x38(%edi),%eax
10aebb: 83 f8 04 cmp $0x4,%eax
10aebe: 77 07 ja 10aec7 <rtems_rate_monotonic_period+0x5a><== NEVER TAKEN
10aec0: 8b 1c 85 84 08 12 00 mov 0x120884(,%eax,4),%ebx
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10aec7: e8 29 25 00 00 call 10d3f5 <_Thread_Enable_dispatch>
return( return_value );
10aecc: e9 0e 01 00 00 jmp 10afdf <rtems_rate_monotonic_period+0x172>
}
_ISR_Disable( level );
10aed1: 9c pushf
10aed2: fa cli
10aed3: 8f 45 d4 popl -0x2c(%ebp)
switch ( the_period->state ) {
10aed6: 8b 47 38 mov 0x38(%edi),%eax
10aed9: 83 f8 02 cmp $0x2,%eax
10aedc: 74 5f je 10af3d <rtems_rate_monotonic_period+0xd0>
10aede: 83 f8 04 cmp $0x4,%eax
10aee1: 0f 84 ba 00 00 00 je 10afa1 <rtems_rate_monotonic_period+0x134>
10aee7: 85 c0 test %eax,%eax
10aee9: 0f 85 eb 00 00 00 jne 10afda <rtems_rate_monotonic_period+0x16d><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
10aeef: ff 75 d4 pushl -0x2c(%ebp)
10aef2: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10aef3: 83 ec 0c sub $0xc,%esp
10aef6: 57 push %edi
10aef7: e8 9c fd ff ff call 10ac98 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10aefc: 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;
10af03: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10af0a: c7 47 2c e8 b1 10 00 movl $0x10b1e8,0x2c(%edi)
the_watchdog->id = id;
10af11: 89 77 30 mov %esi,0x30(%edi)
the_watchdog->user_data = user_data;
10af14: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10af1b: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10af1e: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10af21: 5b pop %ebx
10af22: 5e pop %esi
10af23: 83 c7 10 add $0x10,%edi
10af26: 57 push %edi
10af27: 68 f4 73 12 00 push $0x1273f4
10af2c: e8 6b 34 00 00 call 10e39c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
10af31: e8 bf 24 00 00 call 10d3f5 <_Thread_Enable_dispatch>
10af36: 31 db xor %ebx,%ebx
10af38: e9 98 00 00 00 jmp 10afd5 <rtems_rate_monotonic_period+0x168>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10af3d: 83 ec 0c sub $0xc,%esp
10af40: 57 push %edi
10af41: e8 4c fe ff ff call 10ad92 <_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;
10af46: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi)
the_period->next_length = length;
10af4d: 89 5f 3c mov %ebx,0x3c(%edi)
_ISR_Enable( level );
10af50: ff 75 d4 pushl -0x2c(%ebp)
10af53: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10af54: a1 d4 73 12 00 mov 0x1273d4,%eax
10af59: 8b 57 08 mov 0x8(%edi),%edx
10af5c: 89 50 20 mov %edx,0x20(%eax)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10af5f: 5a pop %edx
10af60: 59 pop %ecx
10af61: 68 00 40 00 00 push $0x4000
10af66: 50 push %eax
10af67: e8 c4 2c 00 00 call 10dc30 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10af6c: 9c pushf
10af6d: fa cli
10af6e: 5a pop %edx
local_state = the_period->state;
10af6f: 8b 47 38 mov 0x38(%edi),%eax
the_period->state = RATE_MONOTONIC_ACTIVE;
10af72: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
_ISR_Enable( level );
10af79: 52 push %edx
10af7a: 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 )
10af7b: 83 c4 10 add $0x10,%esp
10af7e: 83 f8 03 cmp $0x3,%eax
10af81: 75 15 jne 10af98 <rtems_rate_monotonic_period+0x12b>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10af83: 56 push %esi
10af84: 56 push %esi
10af85: 68 00 40 00 00 push $0x4000
10af8a: ff 35 d4 73 12 00 pushl 0x1273d4
10af90: e8 e3 20 00 00 call 10d078 <_Thread_Clear_state>
10af95: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
10af98: e8 58 24 00 00 call 10d3f5 <_Thread_Enable_dispatch>
10af9d: 31 db xor %ebx,%ebx
return RTEMS_SUCCESSFUL;
10af9f: eb 3e jmp 10afdf <rtems_rate_monotonic_period+0x172>
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10afa1: 83 ec 0c sub $0xc,%esp
10afa4: 57 push %edi
10afa5: e8 e8 fd ff ff call 10ad92 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10afaa: ff 75 d4 pushl -0x2c(%ebp)
10afad: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10afae: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
the_period->next_length = length;
10afb5: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10afb8: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10afbb: 59 pop %ecx
10afbc: 5b pop %ebx
10afbd: 83 c7 10 add $0x10,%edi
10afc0: 57 push %edi
10afc1: 68 f4 73 12 00 push $0x1273f4
10afc6: e8 d1 33 00 00 call 10e39c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
10afcb: e8 25 24 00 00 call 10d3f5 <_Thread_Enable_dispatch>
10afd0: bb 06 00 00 00 mov $0x6,%ebx
return RTEMS_TIMEOUT;
10afd5: 83 c4 10 add $0x10,%esp
10afd8: eb 05 jmp 10afdf <rtems_rate_monotonic_period+0x172>
10afda: bb 04 00 00 00 mov $0x4,%ebx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10afdf: 89 d8 mov %ebx,%eax
10afe1: 8d 65 f4 lea -0xc(%ebp),%esp
10afe4: 5b pop %ebx
10afe5: 5e pop %esi
10afe6: 5f pop %edi
10afe7: c9 leave
10afe8: c3 ret
0010afec <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10afec: 55 push %ebp
10afed: 89 e5 mov %esp,%ebp
10afef: 57 push %edi
10aff0: 56 push %esi
10aff1: 53 push %ebx
10aff2: 83 ec 7c sub $0x7c,%esp
10aff5: 8b 5d 08 mov 0x8(%ebp),%ebx
10aff8: 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 )
10affb: 85 ff test %edi,%edi
10affd: 0f 84 2b 01 00 00 je 10b12e <rtems_rate_monotonic_report_statistics_with_plugin+0x142><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10b003: 52 push %edx
10b004: 52 push %edx
10b005: 68 98 08 12 00 push $0x120898
10b00a: 53 push %ebx
10b00b: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
10b00d: 5e pop %esi
10b00e: 58 pop %eax
10b00f: 68 b6 08 12 00 push $0x1208b6
10b014: 53 push %ebx
10b015: ff d7 call *%edi
(*print)( context, "--- Wall times are in seconds ---\n" );
10b017: 5a pop %edx
10b018: 59 pop %ecx
10b019: 68 d8 08 12 00 push $0x1208d8
10b01e: 53 push %ebx
10b01f: ff d7 call *%edi
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10b021: 5e pop %esi
10b022: 58 pop %eax
10b023: 68 fb 08 12 00 push $0x1208fb
10b028: 53 push %ebx
10b029: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10b02b: 5a pop %edx
10b02c: 59 pop %ecx
10b02d: 68 46 09 12 00 push $0x120946
10b032: 53 push %ebx
10b033: 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 ;
10b035: 8b 35 28 72 12 00 mov 0x127228,%esi
10b03b: 83 c4 10 add $0x10,%esp
10b03e: e9 df 00 00 00 jmp 10b122 <rtems_rate_monotonic_report_statistics_with_plugin+0x136>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10b043: 50 push %eax
10b044: 50 push %eax
10b045: 8d 45 88 lea -0x78(%ebp),%eax
10b048: 50 push %eax
10b049: 56 push %esi
10b04a: e8 85 51 00 00 call 1101d4 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10b04f: 83 c4 10 add $0x10,%esp
10b052: 85 c0 test %eax,%eax
10b054: 0f 85 c7 00 00 00 jne 10b121 <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 );
10b05a: 51 push %ecx
10b05b: 51 push %ecx
10b05c: 8d 55 c0 lea -0x40(%ebp),%edx
10b05f: 52 push %edx
10b060: 56 push %esi
10b061: e8 12 52 00 00 call 110278 <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 );
10b066: 83 c4 0c add $0xc,%esp
10b069: 8d 45 e3 lea -0x1d(%ebp),%eax
10b06c: 50 push %eax
10b06d: 6a 05 push $0x5
10b06f: ff 75 c0 pushl -0x40(%ebp)
10b072: e8 fd 01 00 00 call 10b274 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10b077: 58 pop %eax
10b078: 5a pop %edx
10b079: ff 75 8c pushl -0x74(%ebp)
10b07c: ff 75 88 pushl -0x78(%ebp)
10b07f: 8d 55 e3 lea -0x1d(%ebp),%edx
10b082: 52 push %edx
10b083: 56 push %esi
10b084: 68 92 09 12 00 push $0x120992
10b089: 53 push %ebx
10b08a: ff d7 call *%edi
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10b08c: 8b 45 88 mov -0x78(%ebp),%eax
10b08f: 83 c4 20 add $0x20,%esp
10b092: 85 c0 test %eax,%eax
10b094: 75 0f jne 10b0a5 <rtems_rate_monotonic_report_statistics_with_plugin+0xb9>
(*print)( context, "\n" );
10b096: 51 push %ecx
10b097: 51 push %ecx
10b098: 68 0c 0c 12 00 push $0x120c0c
10b09d: 53 push %ebx
10b09e: ff d7 call *%edi
continue;
10b0a0: 83 c4 10 add $0x10,%esp
10b0a3: eb 7c jmp 10b121 <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 );
10b0a5: 52 push %edx
10b0a6: 8d 55 d8 lea -0x28(%ebp),%edx
10b0a9: 52 push %edx
10b0aa: 50 push %eax
10b0ab: 8d 45 a0 lea -0x60(%ebp),%eax
10b0ae: 50 push %eax
10b0af: e8 bc 2f 00 00 call 10e070 <_Timespec_Divide_by_integer>
(*print)( context,
10b0b4: 8b 45 dc mov -0x24(%ebp),%eax
10b0b7: b9 e8 03 00 00 mov $0x3e8,%ecx
10b0bc: 99 cltd
10b0bd: f7 f9 idiv %ecx
10b0bf: 50 push %eax
10b0c0: ff 75 d8 pushl -0x28(%ebp)
10b0c3: 8b 45 9c mov -0x64(%ebp),%eax
10b0c6: 99 cltd
10b0c7: f7 f9 idiv %ecx
10b0c9: 50 push %eax
10b0ca: ff 75 98 pushl -0x68(%ebp)
10b0cd: 8b 45 94 mov -0x6c(%ebp),%eax
10b0d0: 99 cltd
10b0d1: f7 f9 idiv %ecx
10b0d3: 50 push %eax
10b0d4: ff 75 90 pushl -0x70(%ebp)
10b0d7: 68 a9 09 12 00 push $0x1209a9
10b0dc: 53 push %ebx
10b0dd: 89 4d 84 mov %ecx,-0x7c(%ebp)
10b0e0: 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);
10b0e2: 83 c4 2c add $0x2c,%esp
10b0e5: 8d 55 d8 lea -0x28(%ebp),%edx
10b0e8: 52 push %edx
10b0e9: ff 75 88 pushl -0x78(%ebp)
10b0ec: 8d 45 b8 lea -0x48(%ebp),%eax
10b0ef: 50 push %eax
10b0f0: e8 7b 2f 00 00 call 10e070 <_Timespec_Divide_by_integer>
(*print)( context,
10b0f5: 8b 45 dc mov -0x24(%ebp),%eax
10b0f8: 8b 4d 84 mov -0x7c(%ebp),%ecx
10b0fb: 99 cltd
10b0fc: f7 f9 idiv %ecx
10b0fe: 50 push %eax
10b0ff: ff 75 d8 pushl -0x28(%ebp)
10b102: 8b 45 b4 mov -0x4c(%ebp),%eax
10b105: 99 cltd
10b106: f7 f9 idiv %ecx
10b108: 50 push %eax
10b109: ff 75 b0 pushl -0x50(%ebp)
10b10c: 8b 45 ac mov -0x54(%ebp),%eax
10b10f: 99 cltd
10b110: f7 f9 idiv %ecx
10b112: 50 push %eax
10b113: ff 75 a8 pushl -0x58(%ebp)
10b116: 68 c8 09 12 00 push $0x1209c8
10b11b: 53 push %ebx
10b11c: ff d7 call *%edi
10b11e: 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++ ) {
10b121: 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 ;
10b122: 3b 35 2c 72 12 00 cmp 0x12722c,%esi
10b128: 0f 86 15 ff ff ff jbe 10b043 <rtems_rate_monotonic_report_statistics_with_plugin+0x57>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10b12e: 8d 65 f4 lea -0xc(%ebp),%esp
10b131: 5b pop %ebx
10b132: 5e pop %esi
10b133: 5f pop %edi
10b134: c9 leave
10b135: c3 ret
00115cb8 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
115cb8: 55 push %ebp
115cb9: 89 e5 mov %esp,%ebp
115cbb: 53 push %ebx
115cbc: 83 ec 14 sub $0x14,%esp
115cbf: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
115cc2: b8 0a 00 00 00 mov $0xa,%eax
115cc7: 85 db test %ebx,%ebx
115cc9: 74 71 je 115d3c <rtems_signal_send+0x84>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
115ccb: 50 push %eax
115ccc: 50 push %eax
115ccd: 8d 45 f4 lea -0xc(%ebp),%eax
115cd0: 50 push %eax
115cd1: ff 75 08 pushl 0x8(%ebp)
115cd4: e8 4b 36 00 00 call 119324 <_Thread_Get>
115cd9: 89 c1 mov %eax,%ecx
switch ( location ) {
115cdb: 83 c4 10 add $0x10,%esp
115cde: b8 04 00 00 00 mov $0x4,%eax
115ce3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115ce7: 75 53 jne 115d3c <rtems_signal_send+0x84>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
115ce9: 8b 91 f4 00 00 00 mov 0xf4(%ecx),%edx
asr = &api->Signal;
115cef: 83 7a 0c 00 cmpl $0x0,0xc(%edx)
115cf3: 74 3d je 115d32 <rtems_signal_send+0x7a>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
115cf5: 80 7a 08 00 cmpb $0x0,0x8(%edx)
115cf9: 74 26 je 115d21 <rtems_signal_send+0x69>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
115cfb: 9c pushf
115cfc: fa cli
115cfd: 58 pop %eax
*signal_set |= signals;
115cfe: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
115d01: 50 push %eax
115d02: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
115d03: c6 41 74 01 movb $0x1,0x74(%ecx)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
115d07: a1 80 e6 13 00 mov 0x13e680,%eax
115d0c: 85 c0 test %eax,%eax
115d0e: 74 19 je 115d29 <rtems_signal_send+0x71>
115d10: 3b 0d a4 e6 13 00 cmp 0x13e6a4,%ecx
115d16: 75 11 jne 115d29 <rtems_signal_send+0x71><== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
115d18: c6 05 38 e7 13 00 01 movb $0x1,0x13e738
115d1f: eb 08 jmp 115d29 <rtems_signal_send+0x71>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
115d21: 9c pushf
115d22: fa cli
115d23: 58 pop %eax
*signal_set |= signals;
115d24: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
115d27: 50 push %eax
115d28: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
115d29: e8 a7 35 00 00 call 1192d5 <_Thread_Enable_dispatch>
115d2e: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
115d30: eb 0a jmp 115d3c <rtems_signal_send+0x84>
}
_Thread_Enable_dispatch();
115d32: e8 9e 35 00 00 call 1192d5 <_Thread_Enable_dispatch>
115d37: b8 0b 00 00 00 mov $0xb,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115d3c: 8b 5d fc mov -0x4(%ebp),%ebx
115d3f: c9 leave
115d40: c3 ret
00106dc0 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
106dc0: 55 push %ebp
106dc1: 89 e5 mov %esp,%ebp
106dc3: 57 push %edi
106dc4: 56 push %esi
106dc5: 8b 45 08 mov 0x8(%ebp),%eax
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
106dc8: 83 78 08 00 cmpl $0x0,0x8(%eax)
106dcc: 74 15 je 106de3 <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;
106dce: 8b b8 c8 00 00 00 mov 0xc8(%eax),%edi
106dd4: 83 c7 08 add $0x8,%edi
106dd7: be a0 51 12 00 mov $0x1251a0,%esi
106ddc: b9 04 00 00 00 mov $0x4,%ecx
106de1: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
106de3: 5e pop %esi
106de4: 5f pop %edi
106de5: c9 leave
106de6: c3 ret
0010717e <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
10717e: 55 push %ebp
10717f: 89 e5 mov %esp,%ebp
107181: 57 push %edi
107182: 8b 7d 0c mov 0xc(%ebp),%edi
Stack_check_Initialize();
107185: e8 97 ff ff ff call 107121 <Stack_check_Initialize>
if (the_thread)
10718a: 85 ff test %edi,%edi
10718c: 74 12 je 1071a0 <rtems_stack_checker_create_extension+0x22><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
10718e: 8b 8f c4 00 00 00 mov 0xc4(%edi),%ecx
107194: 8b 97 c8 00 00 00 mov 0xc8(%edi),%edx
10719a: b0 a5 mov $0xa5,%al
10719c: 89 d7 mov %edx,%edi
10719e: f3 aa rep stos %al,%es:(%edi)
return true;
}
1071a0: b0 01 mov $0x1,%al
1071a2: 5f pop %edi
1071a3: c9 leave
1071a4: c3 ret
00107050 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
107050: 55 push %ebp
107051: 89 e5 mov %esp,%ebp
107053: 53 push %ebx
107054: 83 ec 04 sub $0x4,%esp
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
107057: 8b 15 d0 53 12 00 mov 0x1253d0,%edx
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
10705d: 8b 82 c8 00 00 00 mov 0xc8(%edx),%eax
107063: 31 db xor %ebx,%ebx
107065: 39 c5 cmp %eax,%ebp
107067: 72 0e jb 107077 <rtems_stack_checker_is_blown+0x27><== NEVER TAKEN
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
107069: 8b 8a c4 00 00 00 mov 0xc4(%edx),%ecx
10706f: 8d 14 08 lea (%eax,%ecx,1),%edx
107072: 39 d5 cmp %edx,%ebp
107074: 0f 96 c3 setbe %bl
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
107077: b2 01 mov $0x1,%dl
107079: 83 3d 88 4e 12 00 00 cmpl $0x0,0x124e88
107080: 74 19 je 10709b <rtems_stack_checker_is_blown+0x4b><== NEVER TAKEN
pattern_ok = (!memcmp(
107082: 83 c0 08 add $0x8,%eax
107085: 52 push %edx
107086: 6a 10 push $0x10
107088: 68 a0 51 12 00 push $0x1251a0
10708d: 50 push %eax
10708e: e8 61 b0 00 00 call 1120f4 <memcmp>
107093: 83 c4 10 add $0x10,%esp
107096: 85 c0 test %eax,%eax
107098: 0f 94 c2 sete %dl
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
10709b: 84 db test %bl,%bl
10709d: 74 06 je 1070a5 <rtems_stack_checker_is_blown+0x55><== NEVER TAKEN
10709f: 31 c0 xor %eax,%eax
1070a1: 84 d2 test %dl,%dl
1070a3: 75 16 jne 1070bb <rtems_stack_checker_is_blown+0x6b><== ALWAYS TAKEN
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
1070a5: 53 push %ebx <== NOT EXECUTED
1070a6: 53 push %ebx <== NOT EXECUTED
1070a7: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
1070aa: 52 push %edx <== NOT EXECUTED
1070ab: ff 35 d0 53 12 00 pushl 0x1253d0 <== NOT EXECUTED
1070b1: e8 e6 fe ff ff call 106f9c <Stack_check_report_blown_task><== NOT EXECUTED
1070b6: b0 01 mov $0x1,%al <== NOT EXECUTED
return true;
1070b8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1070bb: 8b 5d fc mov -0x4(%ebp),%ebx
1070be: c9 leave
1070bf: c3 ret
00106f85 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
106f85: 55 push %ebp <== NOT EXECUTED
106f86: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106f88: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
106f8b: 68 c4 81 10 00 push $0x1081c4 <== NOT EXECUTED
106f90: 6a 00 push $0x0 <== NOT EXECUTED
106f92: e8 8d ff ff ff call 106f24 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
106f97: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
106f9a: c9 leave <== NOT EXECUTED
106f9b: c3 ret <== NOT EXECUTED
00106f24 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
106f24: 55 push %ebp <== NOT EXECUTED
106f25: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106f27: 56 push %esi <== NOT EXECUTED
106f28: 53 push %ebx <== NOT EXECUTED
106f29: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
106f2c: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
print_context = context;
106f2f: 89 35 8c 4e 12 00 mov %esi,0x124e8c <== NOT EXECUTED
print_handler = print;
106f35: 89 1d 90 4e 12 00 mov %ebx,0x124e90 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
106f3b: 51 push %ecx <== NOT EXECUTED
106f3c: 51 push %ecx <== NOT EXECUTED
106f3d: 68 01 eb 11 00 push $0x11eb01 <== NOT EXECUTED
106f42: 56 push %esi <== NOT EXECUTED
106f43: ff d3 call *%ebx <== NOT EXECUTED
(*print)( context,
106f45: 58 pop %eax <== NOT EXECUTED
106f46: 5a pop %edx <== NOT EXECUTED
106f47: 68 18 eb 11 00 push $0x11eb18 <== NOT EXECUTED
106f4c: 56 push %esi <== NOT EXECUTED
106f4d: 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 );
106f4f: c7 04 24 0e 6e 10 00 movl $0x106e0e,(%esp) <== NOT EXECUTED
106f56: e8 e9 44 00 00 call 10b444 <rtems_iterate_over_all_threads><== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
106f5b: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED
106f62: e8 a7 fe ff ff call 106e0e <Stack_check_Dump_threads_usage><== NOT EXECUTED
print_context = NULL;
106f67: c7 05 8c 4e 12 00 00 movl $0x0,0x124e8c <== NOT EXECUTED
106f6e: 00 00 00
print_handler = NULL;
106f71: c7 05 90 4e 12 00 00 movl $0x0,0x124e90 <== NOT EXECUTED
106f78: 00 00 00
106f7b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
106f7e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
106f81: 5b pop %ebx <== NOT EXECUTED
106f82: 5e pop %esi <== NOT EXECUTED
106f83: c9 leave <== NOT EXECUTED
106f84: c3 ret <== NOT EXECUTED
001070c0 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
1070c0: 55 push %ebp
1070c1: 89 e5 mov %esp,%ebp
1070c3: 53 push %ebx
1070c4: 83 ec 14 sub $0x14,%esp
1070c7: 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;
1070ca: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
1070d0: 31 d2 xor %edx,%edx
1070d2: 39 c5 cmp %eax,%ebp
1070d4: 72 0d jb 1070e3 <rtems_stack_checker_switch_extension+0x23><== NEVER TAKEN
}
/*
* rtems_stack_checker_switch_extension
*/
void rtems_stack_checker_switch_extension(
1070d6: 8b 93 c4 00 00 00 mov 0xc4(%ebx),%edx
1070dc: 01 c2 add %eax,%edx
1070de: 39 d5 cmp %edx,%ebp
1070e0: 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,
1070e3: 83 c0 08 add $0x8,%eax
1070e6: 51 push %ecx
1070e7: 6a 10 push $0x10
1070e9: 68 a0 51 12 00 push $0x1251a0
1070ee: 50 push %eax
1070ef: 88 55 f4 mov %dl,-0xc(%ebp)
1070f2: e8 fd af 00 00 call 1120f4 <memcmp>
1070f7: 83 c4 10 add $0x10,%esp
1070fa: 85 c0 test %eax,%eax
1070fc: 0f 94 c0 sete %al
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
1070ff: 8a 55 f4 mov -0xc(%ebp),%dl
107102: 84 d2 test %dl,%dl
107104: 74 04 je 10710a <rtems_stack_checker_switch_extension+0x4a><== NEVER TAKEN
107106: 84 c0 test %al,%al
107108: 75 12 jne 10711c <rtems_stack_checker_switch_extension+0x5c><== ALWAYS TAKEN
Stack_check_report_blown_task( running, pattern_ok );
10710a: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
10710d: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
107110: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
}
}
107113: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
107116: c9 leave <== NOT EXECUTED
pattern_ok = (!memcmp( pattern,
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
107117: e9 80 fe ff ff jmp 106f9c <Stack_check_report_blown_task><== NOT EXECUTED
}
}
10711c: 8b 5d fc mov -0x4(%ebp),%ebx
10711f: c9 leave
107120: c3 ret
0010f130 <rtems_string_to_double>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10f130: 55 push %ebp
10f131: 89 e5 mov %esp,%ebp
10f133: 57 push %edi
10f134: 56 push %esi
10f135: 53 push %ebx
10f136: 83 ec 2c sub $0x2c,%esp
10f139: 8b 75 08 mov 0x8(%ebp),%esi
10f13c: 8b 5d 0c mov 0xc(%ebp),%ebx
10f13f: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10f142: b8 09 00 00 00 mov $0x9,%eax
10f147: 85 db test %ebx,%ebx
10f149: 74 6e je 10f1b9 <rtems_string_to_double+0x89>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f14b: e8 70 25 00 00 call 1116c0 <__errno>
10f150: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f156: c7 03 00 00 00 00 movl $0x0,(%ebx)
10f15c: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
10f163: 50 push %eax
10f164: 50 push %eax
10f165: 8d 45 e4 lea -0x1c(%ebp),%eax
10f168: 50 push %eax
10f169: 56 push %esi
10f16a: e8 41 50 00 00 call 1141b0 <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 )
10f16f: 83 c4 10 add $0x10,%esp
10f172: 85 ff test %edi,%edi
10f174: 74 05 je 10f17b <rtems_string_to_double+0x4b>
*endptr = end;
10f176: 8b 45 e4 mov -0x1c(%ebp),%eax
10f179: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
10f17b: b8 0b 00 00 00 mov $0xb,%eax
10f180: 39 75 e4 cmp %esi,-0x1c(%ebp)
10f183: 74 2e je 10f1b3 <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))
10f185: dd 05 c8 30 12 00 fldl 0x1230c8
10f18b: d9 c9 fxch %st(1)
10f18d: dd e1 fucom %st(1)
10f18f: df e0 fnstsw %ax
10f191: dd d9 fstp %st(1)
10f193: 9e sahf
10f194: 76 17 jbe 10f1ad <rtems_string_to_double+0x7d>
10f196: dd 5d c8 fstpl -0x38(%ebp)
10f199: e8 22 25 00 00 call 1116c0 <__errno>
10f19e: 89 c2 mov %eax,%edx
10f1a0: b8 0a 00 00 00 mov $0xa,%eax
10f1a5: 83 3a 22 cmpl $0x22,(%edx)
10f1a8: dd 45 c8 fldl -0x38(%ebp)
10f1ab: 74 0a je 10f1b7 <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;
10f1ad: dd 1b fstpl (%ebx)
10f1af: 31 c0 xor %eax,%eax
#endif
return RTEMS_SUCCESSFUL;
10f1b1: eb 06 jmp 10f1b9 <rtems_string_to_double+0x89>
10f1b3: dd d8 fstp %st(0)
10f1b5: eb 02 jmp 10f1b9 <rtems_string_to_double+0x89>
10f1b7: dd d8 fstp %st(0)
}
10f1b9: 8d 65 f4 lea -0xc(%ebp),%esp
10f1bc: 5b pop %ebx
10f1bd: 5e pop %esi
10f1be: 5f pop %edi
10f1bf: c9 leave
10f1c0: c3 ret
0010f1c4 <rtems_string_to_float>:
#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 75 08 mov 0x8(%ebp),%esi
10f1d0: 8b 5d 0c mov 0xc(%ebp),%ebx
10f1d3: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10f1d6: b8 09 00 00 00 mov $0x9,%eax
10f1db: 85 db test %ebx,%ebx
10f1dd: 74 67 je 10f246 <rtems_string_to_float+0x82>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f1df: e8 dc 24 00 00 call 1116c0 <__errno>
10f1e4: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f1ea: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
10f1f0: 50 push %eax
10f1f1: 50 push %eax
10f1f2: 8d 45 e4 lea -0x1c(%ebp),%eax
10f1f5: 50 push %eax
10f1f6: 56 push %esi
10f1f7: e8 70 4f 00 00 call 11416c <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 )
10f1fc: 83 c4 10 add $0x10,%esp
10f1ff: 85 ff test %edi,%edi
10f201: 74 05 je 10f208 <rtems_string_to_float+0x44>
*endptr = end;
10f203: 8b 45 e4 mov -0x1c(%ebp),%eax
10f206: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
10f208: b8 0b 00 00 00 mov $0xb,%eax
10f20d: 39 75 e4 cmp %esi,-0x1c(%ebp)
10f210: 74 2e je 10f240 <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))
10f212: d9 05 d0 30 12 00 flds 0x1230d0
10f218: d9 c9 fxch %st(1)
10f21a: dd e1 fucom %st(1)
10f21c: df e0 fnstsw %ax
10f21e: dd d9 fstp %st(1)
10f220: 9e sahf
10f221: 76 17 jbe 10f23a <rtems_string_to_float+0x76>
10f223: d9 5d c8 fstps -0x38(%ebp)
10f226: e8 95 24 00 00 call 1116c0 <__errno>
10f22b: 89 c2 mov %eax,%edx
10f22d: b8 0a 00 00 00 mov $0xa,%eax
10f232: 83 3a 22 cmpl $0x22,(%edx)
10f235: d9 45 c8 flds -0x38(%ebp)
10f238: 74 0a je 10f244 <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;
10f23a: d9 1b fstps (%ebx)
10f23c: 31 c0 xor %eax,%eax
#endif
return RTEMS_SUCCESSFUL;
10f23e: eb 06 jmp 10f246 <rtems_string_to_float+0x82>
10f240: dd d8 fstp %st(0)
10f242: eb 02 jmp 10f246 <rtems_string_to_float+0x82>
10f244: dd d8 fstp %st(0)
}
10f246: 8d 65 f4 lea -0xc(%ebp),%esp
10f249: 5b pop %ebx
10f24a: 5e pop %esi
10f24b: 5f pop %edi
10f24c: c9 leave
10f24d: c3 ret
0010f250 <rtems_string_to_int>:
#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 )
10f262: b8 09 00 00 00 mov $0x9,%eax
10f267: 85 db test %ebx,%ebx
10f269: 74 5a je 10f2c5 <rtems_string_to_int+0x75>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f26b: 89 55 d4 mov %edx,-0x2c(%ebp)
10f26e: e8 4d 24 00 00 call 1116c0 <__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 bf 50 00 00 call 11434c <strtol>
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_int+0x4e>
*endptr = end;
10f299: 8b 45 e4 mov -0x1c(%ebp),%eax
10f29c: 89 02 mov %eax,(%edx)
/* nothing was converted */
if ( end == s )
10f29e: b8 0b 00 00 00 mov $0xb,%eax
10f2a3: 39 7d e4 cmp %edi,-0x1c(%ebp)
10f2a6: 74 1d je 10f2c5 <rtems_string_to_int+0x75>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10f2a8: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi
10f2ae: 75 11 jne 10f2c1 <rtems_string_to_int+0x71>
10f2b0: e8 0b 24 00 00 call 1116c0 <__errno>
10f2b5: 89 c2 mov %eax,%edx
10f2b7: b8 0a 00 00 00 mov $0xa,%eax
10f2bc: 83 3a 22 cmpl $0x22,(%edx)
10f2bf: 74 04 je 10f2c5 <rtems_string_to_int+0x75><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
10f2c1: 89 33 mov %esi,(%ebx)
10f2c3: 31 c0 xor %eax,%eax
#endif
return RTEMS_SUCCESSFUL;
}
10f2c5: 8d 65 f4 lea -0xc(%ebp),%esp
10f2c8: 5b pop %ebx
10f2c9: 5e pop %esi
10f2ca: 5f pop %edi
10f2cb: c9 leave
10f2cc: c3 ret
0010f368 <rtems_string_to_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10f368: 55 push %ebp
10f369: 89 e5 mov %esp,%ebp
10f36b: 57 push %edi
10f36c: 56 push %esi
10f36d: 53 push %ebx
10f36e: 83 ec 2c sub $0x2c,%esp
10f371: 8b 7d 08 mov 0x8(%ebp),%edi
10f374: 8b 5d 0c mov 0xc(%ebp),%ebx
10f377: 8b 55 10 mov 0x10(%ebp),%edx
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10f37a: b8 09 00 00 00 mov $0x9,%eax
10f37f: 85 db test %ebx,%ebx
10f381: 74 62 je 10f3e5 <rtems_string_to_long+0x7d>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f383: 89 55 d4 mov %edx,-0x2c(%ebp)
10f386: e8 35 23 00 00 call 1116c0 <__errno>
10f38b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f391: 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 );
10f397: 50 push %eax
10f398: ff 75 14 pushl 0x14(%ebp)
10f39b: 8d 45 e4 lea -0x1c(%ebp),%eax
10f39e: 50 push %eax
10f39f: 57 push %edi
10f3a0: e8 a7 4f 00 00 call 11434c <strtol>
10f3a5: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
10f3a7: 83 c4 10 add $0x10,%esp
10f3aa: 8b 55 d4 mov -0x2c(%ebp),%edx
10f3ad: 85 d2 test %edx,%edx
10f3af: 74 05 je 10f3b6 <rtems_string_to_long+0x4e>
*endptr = end;
10f3b1: 8b 45 e4 mov -0x1c(%ebp),%eax
10f3b4: 89 02 mov %eax,(%edx)
/* nothing was converted */
if ( end == s )
10f3b6: b8 0b 00 00 00 mov $0xb,%eax
10f3bb: 39 7d e4 cmp %edi,-0x1c(%ebp)
10f3be: 74 25 je 10f3e5 <rtems_string_to_long+0x7d>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10f3c0: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi
10f3c6: 74 08 je 10f3d0 <rtems_string_to_long+0x68>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
10f3c8: 81 fe 00 00 00 80 cmp $0x80000000,%esi
10f3ce: 75 0a jne 10f3da <rtems_string_to_long+0x72>
10f3d0: e8 eb 22 00 00 call 1116c0 <__errno>
10f3d5: 83 38 22 cmpl $0x22,(%eax)
10f3d8: 74 06 je 10f3e0 <rtems_string_to_long+0x78><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
10f3da: 89 33 mov %esi,(%ebx)
10f3dc: 31 c0 xor %eax,%eax
#endif
return RTEMS_SUCCESSFUL;
10f3de: eb 05 jmp 10f3e5 <rtems_string_to_long+0x7d>
10f3e0: b8 0a 00 00 00 mov $0xa,%eax
}
10f3e5: 8d 65 f4 lea -0xc(%ebp),%esp
10f3e8: 5b pop %ebx
10f3e9: 5e pop %esi
10f3ea: 5f pop %edi
10f3eb: c9 leave
10f3ec: c3 ret
0010f2d0 <rtems_string_to_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10f2d0: 55 push %ebp
10f2d1: 89 e5 mov %esp,%ebp
10f2d3: 57 push %edi
10f2d4: 56 push %esi
10f2d5: 53 push %ebx
10f2d6: 83 ec 2c sub $0x2c,%esp
10f2d9: 8b 5d 0c mov 0xc(%ebp),%ebx
10f2dc: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10f2df: b8 09 00 00 00 mov $0x9,%eax
10f2e4: 85 db test %ebx,%ebx
10f2e6: 74 78 je 10f360 <rtems_string_to_long_long+0x90>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f2e8: e8 d3 23 00 00 call 1116c0 <__errno>
10f2ed: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f2f3: c7 03 00 00 00 00 movl $0x0,(%ebx)
10f2f9: 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 );
10f300: 50 push %eax
10f301: ff 75 14 pushl 0x14(%ebp)
10f304: 8d 45 e4 lea -0x1c(%ebp),%eax
10f307: 50 push %eax
10f308: ff 75 08 pushl 0x8(%ebp)
10f30b: e8 58 50 00 00 call 114368 <strtoll>
10f310: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
10f312: 83 c4 10 add $0x10,%esp
10f315: 85 ff test %edi,%edi
10f317: 74 05 je 10f31e <rtems_string_to_long_long+0x4e>
*endptr = end;
10f319: 8b 45 e4 mov -0x1c(%ebp),%eax
10f31c: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
10f31e: b8 0b 00 00 00 mov $0xb,%eax
10f323: 8b 4d 08 mov 0x8(%ebp),%ecx
10f326: 39 4d e4 cmp %ecx,-0x1c(%ebp)
10f329: 74 35 je 10f360 <rtems_string_to_long_long+0x90>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
10f32b: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
10f331: 75 05 jne 10f338 <rtems_string_to_long_long+0x68>
10f333: 83 fe ff cmp $0xffffffff,%esi
10f336: 74 0a je 10f342 <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))
10f338: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax
10f33e: 09 f0 or %esi,%eax
10f340: 75 10 jne 10f352 <rtems_string_to_long_long+0x82>
10f342: 89 55 d4 mov %edx,-0x2c(%ebp)
10f345: e8 76 23 00 00 call 1116c0 <__errno>
10f34a: 83 38 22 cmpl $0x22,(%eax)
10f34d: 8b 55 d4 mov -0x2c(%ebp),%edx
10f350: 74 09 je 10f35b <rtems_string_to_long_long+0x8b><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
10f352: 89 33 mov %esi,(%ebx)
10f354: 89 53 04 mov %edx,0x4(%ebx)
10f357: 31 c0 xor %eax,%eax
#endif
return RTEMS_SUCCESSFUL;
10f359: eb 05 jmp 10f360 <rtems_string_to_long_long+0x90>
10f35b: b8 0a 00 00 00 mov $0xa,%eax
}
10f360: 8d 65 f4 lea -0xc(%ebp),%esp
10f363: 5b pop %ebx
10f364: 5e pop %esi
10f365: 5f pop %edi
10f366: c9 leave
10f367: c3 ret
0010f3f0 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10f3f0: 55 push %ebp
10f3f1: 89 e5 mov %esp,%ebp
10f3f3: 57 push %edi
10f3f4: 56 push %esi
10f3f5: 53 push %ebx
10f3f6: 83 ec 2c sub $0x2c,%esp
10f3f9: 8b 7d 08 mov 0x8(%ebp),%edi
10f3fc: 8b 5d 0c mov 0xc(%ebp),%ebx
10f3ff: 8b 55 10 mov 0x10(%ebp),%edx
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10f402: b8 09 00 00 00 mov $0x9,%eax
10f407: 85 db test %ebx,%ebx
10f409: 74 56 je 10f461 <rtems_string_to_pointer+0x71>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f40b: 89 55 d4 mov %edx,-0x2c(%ebp)
10f40e: e8 ad 22 00 00 call 1116c0 <__errno>
10f413: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f419: 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 );
10f41f: 50 push %eax
10f420: 6a 10 push $0x10
10f422: 8d 45 e4 lea -0x1c(%ebp),%eax
10f425: 50 push %eax
10f426: 57 push %edi
10f427: e8 9c 53 00 00 call 1147c8 <strtoul>
10f42c: 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 )
10f42e: 83 c4 10 add $0x10,%esp
10f431: 8b 55 d4 mov -0x2c(%ebp),%edx
10f434: 85 d2 test %edx,%edx
10f436: 74 05 je 10f43d <rtems_string_to_pointer+0x4d>
*endptr = end;
10f438: 8b 45 e4 mov -0x1c(%ebp),%eax
10f43b: 89 02 mov %eax,(%edx)
/* nothing was converted */
if ( end == s )
10f43d: b8 0b 00 00 00 mov $0xb,%eax
10f442: 39 7d e4 cmp %edi,-0x1c(%ebp)
10f445: 74 1a je 10f461 <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))
10f447: 83 fe ff cmp $0xffffffff,%esi
10f44a: 75 11 jne 10f45d <rtems_string_to_pointer+0x6d><== ALWAYS TAKEN
10f44c: e8 6f 22 00 00 call 1116c0 <__errno> <== NOT EXECUTED
10f451: 89 c2 mov %eax,%edx <== NOT EXECUTED
10f453: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
10f458: 83 3a 22 cmpl $0x22,(%edx) <== NOT EXECUTED
10f45b: 74 04 je 10f461 <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;
10f45d: 89 33 mov %esi,(%ebx)
10f45f: 31 c0 xor %eax,%eax
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
10f461: 8d 65 f4 lea -0xc(%ebp),%esp
10f464: 5b pop %ebx
10f465: 5e pop %esi
10f466: 5f pop %edi
10f467: c9 leave
10f468: c3 ret
0010f4c8 <rtems_string_to_unsigned_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10f4c8: 55 push %ebp
10f4c9: 89 e5 mov %esp,%ebp
10f4cb: 57 push %edi
10f4cc: 56 push %esi
10f4cd: 53 push %ebx
10f4ce: 83 ec 2c sub $0x2c,%esp
10f4d1: 8b 7d 08 mov 0x8(%ebp),%edi
10f4d4: 8b 5d 0c mov 0xc(%ebp),%ebx
10f4d7: 8b 55 10 mov 0x10(%ebp),%edx
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10f4da: b8 09 00 00 00 mov $0x9,%eax
10f4df: 85 db test %ebx,%ebx
10f4e1: 74 57 je 10f53a <rtems_string_to_unsigned_int+0x72>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f4e3: 89 55 d4 mov %edx,-0x2c(%ebp)
10f4e6: e8 d5 21 00 00 call 1116c0 <__errno>
10f4eb: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f4f1: 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 );
10f4f7: 50 push %eax
10f4f8: ff 75 14 pushl 0x14(%ebp)
10f4fb: 8d 45 e4 lea -0x1c(%ebp),%eax
10f4fe: 50 push %eax
10f4ff: 57 push %edi
10f500: e8 c3 52 00 00 call 1147c8 <strtoul>
10f505: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
10f507: 83 c4 10 add $0x10,%esp
10f50a: 8b 55 d4 mov -0x2c(%ebp),%edx
10f50d: 85 d2 test %edx,%edx
10f50f: 74 05 je 10f516 <rtems_string_to_unsigned_int+0x4e>
*endptr = end;
10f511: 8b 45 e4 mov -0x1c(%ebp),%eax
10f514: 89 02 mov %eax,(%edx)
/* nothing was converted */
if ( end == s )
10f516: b8 0b 00 00 00 mov $0xb,%eax
10f51b: 39 7d e4 cmp %edi,-0x1c(%ebp)
10f51e: 74 1a je 10f53a <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))
10f520: 83 fe ff cmp $0xffffffff,%esi
10f523: 75 11 jne 10f536 <rtems_string_to_unsigned_int+0x6e>
10f525: e8 96 21 00 00 call 1116c0 <__errno>
10f52a: 89 c2 mov %eax,%edx
10f52c: b8 0a 00 00 00 mov $0xa,%eax
10f531: 83 3a 22 cmpl $0x22,(%edx)
10f534: 74 04 je 10f53a <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;
10f536: 89 33 mov %esi,(%ebx)
10f538: 31 c0 xor %eax,%eax
#endif
return RTEMS_SUCCESSFUL;
}
10f53a: 8d 65 f4 lea -0xc(%ebp),%esp
10f53d: 5b pop %ebx
10f53e: 5e pop %esi
10f53f: 5f pop %edi
10f540: c9 leave
10f541: c3 ret
0010f5d0 <rtems_string_to_unsigned_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10f5d0: 55 push %ebp
10f5d1: 89 e5 mov %esp,%ebp
10f5d3: 57 push %edi
10f5d4: 56 push %esi
10f5d5: 53 push %ebx
10f5d6: 83 ec 2c sub $0x2c,%esp
10f5d9: 8b 7d 08 mov 0x8(%ebp),%edi
10f5dc: 8b 5d 0c mov 0xc(%ebp),%ebx
10f5df: 8b 55 10 mov 0x10(%ebp),%edx
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10f5e2: b8 09 00 00 00 mov $0x9,%eax
10f5e7: 85 db test %ebx,%ebx
10f5e9: 74 57 je 10f642 <rtems_string_to_unsigned_long+0x72>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f5eb: 89 55 d4 mov %edx,-0x2c(%ebp)
10f5ee: e8 cd 20 00 00 call 1116c0 <__errno>
10f5f3: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f5f9: 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 );
10f5ff: 50 push %eax
10f600: ff 75 14 pushl 0x14(%ebp)
10f603: 8d 45 e4 lea -0x1c(%ebp),%eax
10f606: 50 push %eax
10f607: 57 push %edi
10f608: e8 bb 51 00 00 call 1147c8 <strtoul>
10f60d: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
10f60f: 83 c4 10 add $0x10,%esp
10f612: 8b 55 d4 mov -0x2c(%ebp),%edx
10f615: 85 d2 test %edx,%edx
10f617: 74 05 je 10f61e <rtems_string_to_unsigned_long+0x4e>
*endptr = end;
10f619: 8b 45 e4 mov -0x1c(%ebp),%eax
10f61c: 89 02 mov %eax,(%edx)
/* nothing was converted */
if ( end == s )
10f61e: b8 0b 00 00 00 mov $0xb,%eax
10f623: 39 7d e4 cmp %edi,-0x1c(%ebp)
10f626: 74 1a je 10f642 <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))
10f628: 83 fe ff cmp $0xffffffff,%esi
10f62b: 75 11 jne 10f63e <rtems_string_to_unsigned_long+0x6e>
10f62d: e8 8e 20 00 00 call 1116c0 <__errno>
10f632: 89 c2 mov %eax,%edx
10f634: b8 0a 00 00 00 mov $0xa,%eax
10f639: 83 3a 22 cmpl $0x22,(%edx)
10f63c: 74 04 je 10f642 <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;
10f63e: 89 33 mov %esi,(%ebx)
10f640: 31 c0 xor %eax,%eax
#endif
return RTEMS_SUCCESSFUL;
}
10f642: 8d 65 f4 lea -0xc(%ebp),%esp
10f645: 5b pop %ebx
10f646: 5e pop %esi
10f647: 5f pop %edi
10f648: c9 leave
10f649: c3 ret
0010f544 <rtems_string_to_unsigned_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
10f544: 55 push %ebp
10f545: 89 e5 mov %esp,%ebp
10f547: 57 push %edi
10f548: 56 push %esi
10f549: 53 push %ebx
10f54a: 83 ec 2c sub $0x2c,%esp
10f54d: 8b 5d 0c mov 0xc(%ebp),%ebx
10f550: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
10f553: b8 09 00 00 00 mov $0x9,%eax
10f558: 85 db test %ebx,%ebx
10f55a: 74 6b je 10f5c7 <rtems_string_to_unsigned_long_long+0x83>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10f55c: e8 5f 21 00 00 call 1116c0 <__errno>
10f561: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10f567: c7 03 00 00 00 00 movl $0x0,(%ebx)
10f56d: 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 );
10f574: 50 push %eax
10f575: ff 75 14 pushl 0x14(%ebp)
10f578: 8d 45 e4 lea -0x1c(%ebp),%eax
10f57b: 50 push %eax
10f57c: ff 75 08 pushl 0x8(%ebp)
10f57f: e8 60 52 00 00 call 1147e4 <strtoull>
10f584: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
10f586: 83 c4 10 add $0x10,%esp
10f589: 85 ff test %edi,%edi
10f58b: 74 05 je 10f592 <rtems_string_to_unsigned_long_long+0x4e>
*endptr = end;
10f58d: 8b 45 e4 mov -0x1c(%ebp),%eax
10f590: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
10f592: b8 0b 00 00 00 mov $0xb,%eax
10f597: 8b 4d 08 mov 0x8(%ebp),%ecx
10f59a: 39 4d e4 cmp %ecx,-0x1c(%ebp)
10f59d: 74 28 je 10f5c7 <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))
10f59f: 83 fa ff cmp $0xffffffff,%edx
10f5a2: 75 1c jne 10f5c0 <rtems_string_to_unsigned_long_long+0x7c>
10f5a4: 83 fe ff cmp $0xffffffff,%esi
10f5a7: 75 17 jne 10f5c0 <rtems_string_to_unsigned_long_long+0x7c><== NEVER TAKEN
10f5a9: 89 55 d4 mov %edx,-0x2c(%ebp)
10f5ac: e8 0f 21 00 00 call 1116c0 <__errno>
10f5b1: 89 c1 mov %eax,%ecx
10f5b3: b8 0a 00 00 00 mov $0xa,%eax
10f5b8: 83 39 22 cmpl $0x22,(%ecx)
10f5bb: 8b 55 d4 mov -0x2c(%ebp),%edx
10f5be: 74 07 je 10f5c7 <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;
10f5c0: 89 33 mov %esi,(%ebx)
10f5c2: 89 53 04 mov %edx,0x4(%ebx)
10f5c5: 31 c0 xor %eax,%eax
#endif
return RTEMS_SUCCESSFUL;
}
10f5c7: 8d 65 f4 lea -0xc(%ebp),%esp
10f5ca: 5b pop %ebx
10f5cb: 5e pop %esi
10f5cc: 5f pop %edi
10f5cd: c9 leave
10f5ce: c3 ret
00110748 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
110748: 55 push %ebp
110749: 89 e5 mov %esp,%ebp
11074b: 57 push %edi
11074c: 56 push %esi
11074d: 53 push %ebx
11074e: 83 ec 1c sub $0x1c,%esp
110751: 8b 4d 10 mov 0x10(%ebp),%ecx
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
110754: b8 09 00 00 00 mov $0x9,%eax
110759: 85 c9 test %ecx,%ecx
11075b: 0f 84 f4 00 00 00 je 110855 <rtems_task_mode+0x10d>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
110761: 8b 1d b0 42 12 00 mov 0x1242b0,%ebx
api = executing->API_Extensions[ THREAD_API_RTEMS ];
110767: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
11076d: 80 7b 75 01 cmpb $0x1,0x75(%ebx)
110771: 19 ff sbb %edi,%edi
110773: 81 e7 00 01 00 00 and $0x100,%edi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
110779: 83 7b 7c 00 cmpl $0x0,0x7c(%ebx)
11077d: 74 06 je 110785 <rtems_task_mode+0x3d>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
11077f: 81 cf 00 02 00 00 or $0x200,%edi
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
110785: 80 7e 08 01 cmpb $0x1,0x8(%esi)
110789: 19 d2 sbb %edx,%edx
11078b: 81 e2 00 04 00 00 and $0x400,%edx
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
110791: 89 55 e4 mov %edx,-0x1c(%ebp)
110794: 89 4d e0 mov %ecx,-0x20(%ebp)
110797: e8 6f c7 ff ff call 10cf0b <_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;
11079c: 8b 55 e4 mov -0x1c(%ebp),%edx
11079f: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
1107a1: 09 f8 or %edi,%eax
1107a3: 8b 4d e0 mov -0x20(%ebp),%ecx
1107a6: 89 01 mov %eax,(%ecx)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
1107a8: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
1107af: 74 0f je 1107c0 <rtems_task_mode+0x78>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
1107b1: 8b 45 08 mov 0x8(%ebp),%eax
1107b4: c1 e8 08 shr $0x8,%eax
1107b7: 83 f0 01 xor $0x1,%eax
1107ba: 83 e0 01 and $0x1,%eax
1107bd: 88 43 75 mov %al,0x75(%ebx)
if ( mask & RTEMS_TIMESLICE_MASK ) {
1107c0: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
1107c7: 74 21 je 1107ea <rtems_task_mode+0xa2>
if ( _Modes_Is_timeslice(mode_set) ) {
1107c9: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
1107d0: 74 11 je 1107e3 <rtems_task_mode+0x9b>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
1107d2: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
1107d9: a1 c0 41 12 00 mov 0x1241c0,%eax
1107de: 89 43 78 mov %eax,0x78(%ebx)
1107e1: eb 07 jmp 1107ea <rtems_task_mode+0xa2>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
1107e3: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
1107ea: f6 45 0c 01 testb $0x1,0xc(%ebp)
1107ee: 74 0a je 1107fa <rtems_task_mode+0xb2>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
1107f0: f6 45 08 01 testb $0x1,0x8(%ebp)
1107f4: 74 03 je 1107f9 <rtems_task_mode+0xb1>
1107f6: fa cli
1107f7: eb 01 jmp 1107fa <rtems_task_mode+0xb2>
1107f9: fb sti
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
1107fa: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
110801: 74 33 je 110836 <rtems_task_mode+0xee>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
110803: 8b 45 08 mov 0x8(%ebp),%eax
110806: c1 e8 0a shr $0xa,%eax
110809: 83 f0 01 xor $0x1,%eax
11080c: 83 e0 01 and $0x1,%eax
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
11080f: 3a 46 08 cmp 0x8(%esi),%al
110812: 74 22 je 110836 <rtems_task_mode+0xee>
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 ) {
asr->is_enabled = is_asr_enabled;
110814: 88 46 08 mov %al,0x8(%esi)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
110817: 9c pushf
110818: fa cli
110819: 58 pop %eax
_signals = information->signals_pending;
11081a: 8b 56 18 mov 0x18(%esi),%edx
information->signals_pending = information->signals_posted;
11081d: 8b 4e 14 mov 0x14(%esi),%ecx
110820: 89 4e 18 mov %ecx,0x18(%esi)
information->signals_posted = _signals;
110823: 89 56 14 mov %edx,0x14(%esi)
_ISR_Enable( _level );
110826: 50 push %eax
110827: 9d popf
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
110828: 83 7e 14 00 cmpl $0x0,0x14(%esi)
11082c: 74 08 je 110836 <rtems_task_mode+0xee>
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
11082e: c6 43 74 01 movb $0x1,0x74(%ebx)
110832: b3 01 mov $0x1,%bl
110834: eb 02 jmp 110838 <rtems_task_mode+0xf0>
110836: 31 db xor %ebx,%ebx
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
110838: 83 3d 8c 43 12 00 03 cmpl $0x3,0x12438c
11083f: 75 12 jne 110853 <rtems_task_mode+0x10b> <== NEVER TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
110841: e8 06 02 00 00 call 110a4c <_Thread_Evaluate_mode>
110846: 84 c0 test %al,%al
110848: 75 04 jne 11084e <rtems_task_mode+0x106>
11084a: 84 db test %bl,%bl
11084c: 74 05 je 110853 <rtems_task_mode+0x10b>
_Thread_Dispatch();
11084e: e8 19 b3 ff ff call 10bb6c <_Thread_Dispatch>
110853: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
110855: 83 c4 1c add $0x1c,%esp
110858: 5b pop %ebx
110859: 5e pop %esi
11085a: 5f pop %edi
11085b: c9 leave
11085c: c3 ret
0010e178 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10e178: 55 push %ebp
10e179: 89 e5 mov %esp,%ebp
10e17b: 56 push %esi
10e17c: 53 push %ebx
10e17d: 83 ec 10 sub $0x10,%esp
10e180: 8b 5d 0c mov 0xc(%ebp),%ebx
10e183: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10e186: 85 db test %ebx,%ebx
10e188: 74 10 je 10e19a <rtems_task_set_priority+0x22>
10e18a: 0f b6 05 f4 51 12 00 movzbl 0x1251f4,%eax
10e191: ba 13 00 00 00 mov $0x13,%edx
10e196: 39 c3 cmp %eax,%ebx
10e198: 77 50 ja 10e1ea <rtems_task_set_priority+0x72>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10e19a: ba 09 00 00 00 mov $0x9,%edx
10e19f: 85 f6 test %esi,%esi
10e1a1: 74 47 je 10e1ea <rtems_task_set_priority+0x72>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10e1a3: 51 push %ecx
10e1a4: 51 push %ecx
10e1a5: 8d 45 f4 lea -0xc(%ebp),%eax
10e1a8: 50 push %eax
10e1a9: ff 75 08 pushl 0x8(%ebp)
10e1ac: e8 f3 1b 00 00 call 10fda4 <_Thread_Get>
switch ( location ) {
10e1b1: 83 c4 10 add $0x10,%esp
10e1b4: ba 04 00 00 00 mov $0x4,%edx
10e1b9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10e1bd: 75 2b jne 10e1ea <rtems_task_set_priority+0x72>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10e1bf: 8b 50 14 mov 0x14(%eax),%edx
10e1c2: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10e1c4: 85 db test %ebx,%ebx
10e1c6: 74 1b je 10e1e3 <rtems_task_set_priority+0x6b>
the_thread->real_priority = new_priority;
10e1c8: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10e1cb: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10e1cf: 74 05 je 10e1d6 <rtems_task_set_priority+0x5e>
the_thread->current_priority > new_priority )
10e1d1: 39 58 14 cmp %ebx,0x14(%eax)
10e1d4: 76 0d jbe 10e1e3 <rtems_task_set_priority+0x6b><== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
10e1d6: 52 push %edx
10e1d7: 6a 00 push $0x0
10e1d9: 53 push %ebx
10e1da: 50 push %eax
10e1db: e8 d8 16 00 00 call 10f8b8 <_Thread_Change_priority>
10e1e0: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10e1e3: e8 6d 1b 00 00 call 10fd55 <_Thread_Enable_dispatch>
10e1e8: 31 d2 xor %edx,%edx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10e1ea: 89 d0 mov %edx,%eax
10e1ec: 8d 65 f8 lea -0x8(%ebp),%esp
10e1ef: 5b pop %ebx
10e1f0: 5e pop %esi
10e1f1: c9 leave
10e1f2: c3 ret
00109014 <rtems_termios_baud_to_index>:
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
109014: 55 push %ebp
109015: 89 e5 mov %esp,%ebp
109017: 8b 55 08 mov 0x8(%ebp),%edx
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
10901a: b8 09 00 00 00 mov $0x9,%eax
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10901f: 83 fa 09 cmp $0x9,%edx
109022: 0f 84 b5 00 00 00 je 1090dd <rtems_termios_baud_to_index+0xc9><== NEVER TAKEN
109028: 7f 54 jg 10907e <rtems_termios_baud_to_index+0x6a><== NEVER TAKEN
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
10902a: b0 04 mov $0x4,%al
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10902c: 83 fa 04 cmp $0x4,%edx
10902f: 0f 84 a8 00 00 00 je 1090dd <rtems_termios_baud_to_index+0xc9><== NEVER TAKEN
109035: 7f 2b jg 109062 <rtems_termios_baud_to_index+0x4e><== NEVER TAKEN
109037: b0 01 mov $0x1,%al
109039: 83 fa 01 cmp $0x1,%edx
10903c: 0f 84 9b 00 00 00 je 1090dd <rtems_termios_baud_to_index+0xc9><== NEVER TAKEN
109042: 7f 09 jg 10904d <rtems_termios_baud_to_index+0x39><== NEVER TAKEN
109044: 30 c0 xor %al,%al
109046: 85 d2 test %edx,%edx
109048: e9 8b 00 00 00 jmp 1090d8 <rtems_termios_baud_to_index+0xc4>
10904d: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED
109052: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED
109055: 0f 84 82 00 00 00 je 1090dd <rtems_termios_baud_to_index+0xc9><== NOT EXECUTED
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
10905b: b0 03 mov $0x3,%al <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10905d: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
109060: eb 76 jmp 1090d8 <rtems_termios_baud_to_index+0xc4><== NOT EXECUTED
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
109062: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
109067: 83 fa 06 cmp $0x6,%edx <== NOT EXECUTED
10906a: 74 71 je 1090dd <rtems_termios_baud_to_index+0xc9><== NOT EXECUTED
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
10906c: b0 05 mov $0x5,%al <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10906e: 7c 6d jl 1090dd <rtems_termios_baud_to_index+0xc9><== NOT EXECUTED
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
109070: b0 07 mov $0x7,%al <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
109072: 83 fa 07 cmp $0x7,%edx <== NOT EXECUTED
109075: 74 66 je 1090dd <rtems_termios_baud_to_index+0xc9><== NOT EXECUTED
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
109077: b0 08 mov $0x8,%al <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
109079: 83 fa 08 cmp $0x8,%edx <== NOT EXECUTED
10907c: eb 5a jmp 1090d8 <rtems_termios_baud_to_index+0xc4><== NOT EXECUTED
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
10907e: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
109083: 83 fa 0e cmp $0xe,%edx <== NOT EXECUTED
109086: 74 55 je 1090dd <rtems_termios_baud_to_index+0xc9><== NOT EXECUTED
109088: 7f 19 jg 1090a3 <rtems_termios_baud_to_index+0x8f><== NOT EXECUTED
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
10908a: b0 0b mov $0xb,%al <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10908c: 83 fa 0b cmp $0xb,%edx <== NOT EXECUTED
10908f: 74 4c je 1090dd <rtems_termios_baud_to_index+0xc9><== NOT EXECUTED
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
109091: b0 0a mov $0xa,%al <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
109093: 7c 48 jl 1090dd <rtems_termios_baud_to_index+0xc9><== NOT EXECUTED
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
109095: b0 0c mov $0xc,%al <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
109097: 83 fa 0c cmp $0xc,%edx <== NOT EXECUTED
10909a: 74 41 je 1090dd <rtems_termios_baud_to_index+0xc9><== NOT EXECUTED
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
10909c: b0 0d mov $0xd,%al <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10909e: 83 fa 0d cmp $0xd,%edx <== NOT EXECUTED
1090a1: eb 35 jmp 1090d8 <rtems_termios_baud_to_index+0xc4><== NOT EXECUTED
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
1090a3: b8 11 00 00 00 mov $0x11,%eax <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
1090a8: 81 fa 02 10 00 00 cmp $0x1002,%edx <== NOT EXECUTED
1090ae: 74 2d je 1090dd <rtems_termios_baud_to_index+0xc9><== NOT EXECUTED
1090b0: 7f 11 jg 1090c3 <rtems_termios_baud_to_index+0xaf><== NOT EXECUTED
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
1090b2: b0 0f mov $0xf,%al <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
1090b4: 83 fa 0f cmp $0xf,%edx <== NOT EXECUTED
1090b7: 74 24 je 1090dd <rtems_termios_baud_to_index+0xc9><== NOT EXECUTED
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
1090b9: b0 10 mov $0x10,%al <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
1090bb: 81 fa 01 10 00 00 cmp $0x1001,%edx <== NOT EXECUTED
1090c1: eb 15 jmp 1090d8 <rtems_termios_baud_to_index+0xc4><== NOT EXECUTED
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
1090c3: b8 12 00 00 00 mov $0x12,%eax <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
1090c8: 81 fa 03 10 00 00 cmp $0x1003,%edx <== NOT EXECUTED
1090ce: 74 0d je 1090dd <rtems_termios_baud_to_index+0xc9><== NOT EXECUTED
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
1090d0: b0 13 mov $0x13,%al <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
1090d2: 81 fa 04 10 00 00 cmp $0x1004,%edx <== NOT EXECUTED
1090d8: 74 03 je 1090dd <rtems_termios_baud_to_index+0xc9><== NEVER TAKEN
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
1090da: 83 c8 ff or $0xffffffff,%eax
default: baud_index = -1; break;
}
return baud_index;
}
1090dd: c9 leave
1090de: c3 ret
00107f34 <rtems_termios_bufsize>:
rtems_status_code rtems_termios_bufsize (
int cbufsize,
int raw_input,
int raw_output
)
{
107f34: 55 push %ebp <== NOT EXECUTED
107f35: 89 e5 mov %esp,%ebp <== NOT EXECUTED
rtems_termios_cbufsize = cbufsize;
107f37: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
107f3a: a3 38 1f 12 00 mov %eax,0x121f38 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
107f3f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
107f42: a3 3c 1f 12 00 mov %eax,0x121f3c <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
107f47: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
107f4a: a3 40 1f 12 00 mov %eax,0x121f40 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
107f4f: 31 c0 xor %eax,%eax <== NOT EXECUTED
107f51: c9 leave <== NOT EXECUTED
107f52: c3 ret <== NOT EXECUTED
001090be <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
1090be: 55 push %ebp
1090bf: 89 e5 mov %esp,%ebp
1090c1: 56 push %esi
1090c2: 53 push %ebx
1090c3: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
1090c6: 8b 06 mov (%esi),%eax
1090c8: 8b 58 34 mov 0x34(%eax),%ebx
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
1090cb: 50 push %eax
1090cc: 6a 00 push $0x0
1090ce: 6a 00 push $0x0
1090d0: ff 35 e8 40 12 00 pushl 0x1240e8
1090d6: e8 11 0f 00 00 call 109fec <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
1090db: 83 c4 10 add $0x10,%esp
1090de: 85 c0 test %eax,%eax
1090e0: 75 7d jne 10915f <rtems_termios_close+0xa1><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
1090e2: 8b 43 08 mov 0x8(%ebx),%eax
1090e5: 48 dec %eax
1090e6: 89 43 08 mov %eax,0x8(%ebx)
1090e9: 85 c0 test %eax,%eax
1090eb: 0f 85 33 01 00 00 jne 109224 <rtems_termios_close+0x166>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
1090f1: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
1090f7: c1 e0 05 shl $0x5,%eax
1090fa: 8b 80 8c 3d 12 00 mov 0x123d8c(%eax),%eax
109100: 85 c0 test %eax,%eax
109102: 74 0b je 10910f <rtems_termios_close+0x51><== ALWAYS TAKEN
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
109104: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109107: 53 push %ebx <== NOT EXECUTED
109108: ff d0 call *%eax <== NOT EXECUTED
10910a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10910d: eb 1b jmp 10912a <rtems_termios_close+0x6c><== NOT EXECUTED
}
else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10910f: 51 push %ecx
109110: 6a 00 push $0x0
109112: 6a 00 push $0x0
109114: ff 73 18 pushl 0x18(%ebx)
109117: e8 d0 0e 00 00 call 109fec <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
10911c: 83 c4 10 add $0x10,%esp
10911f: 85 c0 test %eax,%eax
109121: 75 3c jne 10915f <rtems_termios_close+0xa1><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
109123: 89 d8 mov %ebx,%eax
109125: e8 18 f9 ff ff call 108a42 <drainOutput>
}
if (tty->device.outputUsesInterrupts
10912a: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
109131: 75 35 jne 109168 <rtems_termios_close+0xaa><== ALWAYS TAKEN
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
109133: 52 push %edx <== NOT EXECUTED
109134: 52 push %edx <== NOT EXECUTED
109135: 6a 01 push $0x1 <== NOT EXECUTED
109137: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED
10913d: e8 3e 0a 00 00 call 109b80 <rtems_event_send> <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
109142: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109145: 85 c0 test %eax,%eax <== NOT EXECUTED
109147: 75 16 jne 10915f <rtems_termios_close+0xa1><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send(
109149: 50 push %eax <== NOT EXECUTED
10914a: 50 push %eax <== NOT EXECUTED
10914b: 6a 01 push $0x1 <== NOT EXECUTED
10914d: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED
109153: e8 28 0a 00 00 call 109b80 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
109158: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10915b: 85 c0 test %eax,%eax <== NOT EXECUTED
10915d: 74 09 je 109168 <rtems_termios_close+0xaa><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
10915f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109162: 50 push %eax <== NOT EXECUTED
109163: e8 44 14 00 00 call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
}
if (tty->device.lastClose)
109168: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax
10916e: 85 c0 test %eax,%eax
109170: 74 0d je 10917f <rtems_termios_close+0xc1>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
109172: 51 push %ecx
109173: 56 push %esi
109174: ff 73 10 pushl 0x10(%ebx)
109177: ff 73 0c pushl 0xc(%ebx)
10917a: ff d0 call *%eax
10917c: 83 c4 10 add $0x10,%esp
if (tty->forw == NULL) {
10917f: 8b 13 mov (%ebx),%edx
109181: 85 d2 test %edx,%edx
109183: 8b 43 04 mov 0x4(%ebx),%eax
109186: 75 11 jne 109199 <rtems_termios_close+0xdb>
rtems_termios_ttyTail = tty->back;
109188: a3 ec 40 12 00 mov %eax,0x1240ec
if ( rtems_termios_ttyTail != NULL ) {
10918d: 85 c0 test %eax,%eax
10918f: 74 0b je 10919c <rtems_termios_close+0xde><== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
109191: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
109197: eb 03 jmp 10919c <rtems_termios_close+0xde><== NOT EXECUTED
}
}
else {
tty->forw->back = tty->back;
109199: 89 42 04 mov %eax,0x4(%edx)
}
if (tty->back == NULL) {
10919c: 8b 53 04 mov 0x4(%ebx),%edx
10919f: 85 d2 test %edx,%edx
1091a1: 8b 03 mov (%ebx),%eax
1091a3: 75 12 jne 1091b7 <rtems_termios_close+0xf9><== NEVER TAKEN
rtems_termios_ttyHead = tty->forw;
1091a5: a3 f0 40 12 00 mov %eax,0x1240f0
if ( rtems_termios_ttyHead != NULL ) {
1091aa: 85 c0 test %eax,%eax
1091ac: 74 0b je 1091b9 <rtems_termios_close+0xfb>
rtems_termios_ttyHead->back = NULL;
1091ae: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
1091b5: eb 02 jmp 1091b9 <rtems_termios_close+0xfb>
}
}
else {
tty->back->forw = tty->forw;
1091b7: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
1091b9: 83 ec 0c sub $0xc,%esp
1091bc: ff 73 14 pushl 0x14(%ebx)
1091bf: e8 98 0d 00 00 call 109f5c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
1091c4: 5a pop %edx
1091c5: ff 73 18 pushl 0x18(%ebx)
1091c8: e8 8f 0d 00 00 call 109f5c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
1091cd: 58 pop %eax
1091ce: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
1091d4: e8 83 0d 00 00 call 109f5c <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
1091d9: 83 c4 10 add $0x10,%esp
1091dc: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
1091e3: 74 09 je 1091ee <rtems_termios_close+0x130>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
1091e5: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
1091ec: 75 0e jne 1091fc <rtems_termios_close+0x13e><== ALWAYS TAKEN
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
1091ee: 83 ec 0c sub $0xc,%esp
1091f1: ff 73 68 pushl 0x68(%ebx)
1091f4: e8 63 0d 00 00 call 109f5c <rtems_semaphore_delete>
1091f9: 83 c4 10 add $0x10,%esp
free (tty->rawInBuf.theBuf);
1091fc: 83 ec 0c sub $0xc,%esp
1091ff: ff 73 58 pushl 0x58(%ebx)
109202: e8 e9 df ff ff call 1071f0 <free>
free (tty->rawOutBuf.theBuf);
109207: 5e pop %esi
109208: ff 73 7c pushl 0x7c(%ebx)
10920b: e8 e0 df ff ff call 1071f0 <free>
free (tty->cbuf);
109210: 59 pop %ecx
109211: ff 73 1c pushl 0x1c(%ebx)
109214: e8 d7 df ff ff call 1071f0 <free>
free (tty);
109219: 89 1c 24 mov %ebx,(%esp)
10921c: e8 cf df ff ff call 1071f0 <free>
109221: 83 c4 10 add $0x10,%esp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
109224: 83 ec 0c sub $0xc,%esp
109227: ff 35 e8 40 12 00 pushl 0x1240e8
10922d: e8 a6 0e 00 00 call 10a0d8 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
109232: 31 c0 xor %eax,%eax
109234: 8d 65 f8 lea -0x8(%ebp),%esp
109237: 5b pop %ebx
109238: 5e pop %esi
109239: c9 leave
10923a: c3 ret
00108136 <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)
{
108136: 55 push %ebp
108137: 89 e5 mov %esp,%ebp
108139: 83 ec 08 sub $0x8,%esp
10813c: 8b 45 08 mov 0x8(%ebp),%eax
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
10813f: 8b 55 0c mov 0xc(%ebp),%edx
108142: 01 90 90 00 00 00 add %edx,0x90(%eax)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
108148: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
10814f: 75 1f jne 108170 <rtems_termios_dequeue_characters+0x3a><== ALWAYS TAKEN
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
108151: 52 push %edx <== NOT EXECUTED
108152: 52 push %edx <== NOT EXECUTED
108153: 6a 02 push $0x2 <== NOT EXECUTED
108155: ff b0 c8 00 00 00 pushl 0xc8(%eax) <== NOT EXECUTED
10815b: e8 20 1a 00 00 call 109b80 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
108160: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108163: 85 c0 test %eax,%eax <== NOT EXECUTED
108165: 74 30 je 108197 <rtems_termios_dequeue_characters+0x61><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
108167: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10816a: 50 push %eax <== NOT EXECUTED
10816b: e8 3c 24 00 00 call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
108170: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax)
108177: 75 15 jne 10818e <rtems_termios_dequeue_characters+0x58><== ALWAYS TAKEN
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
108179: 8b 15 3c 3e 12 00 mov 0x123e3c,%edx <== NOT EXECUTED
10817f: 85 d2 test %edx,%edx <== NOT EXECUTED
108181: 74 14 je 108197 <rtems_termios_dequeue_characters+0x61><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
108183: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108186: 50 push %eax <== NOT EXECUTED
108187: ff d2 call *%edx <== NOT EXECUTED
108189: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10818c: eb 09 jmp 108197 <rtems_termios_dequeue_characters+0x61><== NOT EXECUTED
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
10818e: 89 45 08 mov %eax,0x8(%ebp)
}
}
108191: c9 leave
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
108192: e9 d7 fd ff ff jmp 107f6e <rtems_termios_refill_transmitter>
}
}
108197: 31 c0 xor %eax,%eax <== NOT EXECUTED
108199: c9 leave <== NOT EXECUTED
10819a: c3 ret <== NOT EXECUTED
0010819b <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)
{
10819b: 55 push %ebp <== NOT EXECUTED
10819c: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10819e: 57 push %edi <== NOT EXECUTED
10819f: 56 push %esi <== NOT EXECUTED
1081a0: 53 push %ebx <== NOT EXECUTED
1081a1: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
1081a4: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
1081a7: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
1081aa: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
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) {
1081ad: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx <== NOT EXECUTED
1081b3: c1 e2 05 shl $0x5,%edx <== NOT EXECUTED
/*
* 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);
1081b6: 89 c6 mov %eax,%esi <== NOT EXECUTED
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) {
1081b8: 83 ba 98 3d 12 00 00 cmpl $0x0,0x123d98(%edx) <== NOT EXECUTED
1081bf: 75 35 jne 1081f6 <rtems_termios_enqueue_raw_characters+0x5b><== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
1081c1: 8d 53 4a lea 0x4a(%ebx),%edx <== NOT EXECUTED
1081c4: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
/*
* 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);
1081c7: 8d 4b 30 lea 0x30(%ebx),%ecx <== NOT EXECUTED
1081ca: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED
1081cd: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
1081d0: c6 45 de 00 movb $0x0,-0x22(%ebp) <== NOT EXECUTED
1081d4: 31 f6 xor %esi,%esi <== NOT EXECUTED
1081d6: e9 1d 02 00 00 jmp 1083f8 <rtems_termios_enqueue_raw_characters+0x25d><== NOT EXECUTED
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++;
1081db: 0f be 17 movsbl (%edi),%edx <== NOT EXECUTED
1081de: 47 inc %edi <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
1081df: 50 push %eax <== NOT EXECUTED
1081e0: 50 push %eax <== NOT EXECUTED
1081e1: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
1081e7: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
1081ea: 53 push %ebx <== NOT EXECUTED
1081eb: 52 push %edx <== NOT EXECUTED
1081ec: ff 90 98 3d 12 00 call *0x123d98(%eax) <== NOT EXECUTED
1081f2: 4e dec %esi <== NOT EXECUTED
1081f3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
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--) {
1081f6: 85 f6 test %esi,%esi <== NOT EXECUTED
1081f8: 75 e1 jne 1081db <rtems_termios_enqueue_raw_characters+0x40><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
1081fa: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx) <== NOT EXECUTED
108201: 0f 85 0e 02 00 00 jne 108415 <rtems_termios_enqueue_raw_characters+0x27a><== NOT EXECUTED
108207: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED
10820d: 85 c0 test %eax,%eax <== NOT EXECUTED
10820f: 0f 84 00 02 00 00 je 108415 <rtems_termios_enqueue_raw_characters+0x27a><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
108215: 51 push %ecx <== NOT EXECUTED
108216: 51 push %ecx <== NOT EXECUTED
108217: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED
10821d: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
108220: 52 push %edx <== NOT EXECUTED
108221: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
108223: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
10822a: 00 00 00
10822d: e9 de 01 00 00 jmp 108410 <rtems_termios_enqueue_raw_characters+0x275><== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
108232: 8a 07 mov (%edi),%al <== NOT EXECUTED
108234: 88 45 df mov %al,-0x21(%ebp) <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
108237: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10823d: f6 c4 02 test $0x2,%ah <== NOT EXECUTED
108240: 74 47 je 108289 <rtems_termios_enqueue_raw_characters+0xee><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
108242: 0f be 45 df movsbl -0x21(%ebp),%eax <== NOT EXECUTED
108246: 0f b6 53 4a movzbl 0x4a(%ebx),%edx <== NOT EXECUTED
10824a: 39 d0 cmp %edx,%eax <== NOT EXECUTED
10824c: 75 28 jne 108276 <rtems_termios_enqueue_raw_characters+0xdb><== NOT EXECUTED
if (c == tty->termios.c_cc[VSTART]) {
10824e: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED
108252: 39 d0 cmp %edx,%eax <== NOT EXECUTED
108254: 75 0b jne 108261 <rtems_termios_enqueue_raw_characters+0xc6><== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
108256: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10825c: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED
10825f: eb 09 jmp 10826a <rtems_termios_enqueue_raw_characters+0xcf><== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
108261: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108267: 83 c8 10 or $0x10,%eax <== NOT EXECUTED
10826a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
108270: c6 45 de 01 movb $0x1,-0x22(%ebp) <== NOT EXECUTED
108274: eb 19 jmp 10828f <rtems_termios_enqueue_raw_characters+0xf4><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
108276: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED
10827a: 39 d0 cmp %edx,%eax <== NOT EXECUTED
10827c: 75 0b jne 108289 <rtems_termios_enqueue_raw_characters+0xee><== NOT EXECUTED
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
10827e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108284: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED
108287: eb e1 jmp 10826a <rtems_termios_enqueue_raw_characters+0xcf><== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
108289: 80 7d de 00 cmpb $0x0,-0x22(%ebp) <== NOT EXECUTED
10828d: 74 51 je 1082e0 <rtems_termios_enqueue_raw_characters+0x145><== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
10828f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108295: 83 e0 30 and $0x30,%eax <== NOT EXECUTED
108298: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED
10829b: 0f 85 53 01 00 00 jne 1083f4 <rtems_termios_enqueue_raw_characters+0x259><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
1082a1: 9c pushf <== NOT EXECUTED
1082a2: fa cli <== NOT EXECUTED
1082a3: 8f 45 e4 popl -0x1c(%ebp) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
1082a6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1082ac: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
1082af: 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) {
1082b5: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
1082bc: 74 19 je 1082d7 <rtems_termios_enqueue_raw_characters+0x13c><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
1082be: 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)(tty->minor,
1082c4: 52 push %edx <== NOT EXECUTED
1082c5: 6a 01 push $0x1 <== NOT EXECUTED
1082c7: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
1082ca: 50 push %eax <== NOT EXECUTED
1082cb: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1082ce: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
1082d4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
1082d7: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
1082da: 9d popf <== NOT EXECUTED
1082db: e9 14 01 00 00 jmp 1083f4 <rtems_termios_enqueue_raw_characters+0x259><== NOT EXECUTED
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
1082e0: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
1082e3: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED
1082e6: 40 inc %eax <== NOT EXECUTED
1082e7: 31 d2 xor %edx,%edx <== NOT EXECUTED
1082e9: f7 f1 div %ecx <== NOT EXECUTED
1082eb: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
1082ee: 9c pushf <== NOT EXECUTED
1082ef: fa cli <== NOT EXECUTED
1082f0: 8f 45 d4 popl -0x2c(%ebp) <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
1082f3: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED
1082f6: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED
1082f9: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED
1082fc: 29 d0 sub %edx,%eax <== NOT EXECUTED
1082fe: 03 45 e4 add -0x1c(%ebp),%eax <== NOT EXECUTED
108301: 31 d2 xor %edx,%edx <== NOT EXECUTED
108303: f7 f1 div %ecx <== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
108305: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx <== NOT EXECUTED
10830b: 0f 86 98 00 00 00 jbe 1083a9 <rtems_termios_enqueue_raw_characters+0x20e><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
108311: 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)
108317: a8 01 test $0x1,%al <== NOT EXECUTED
108319: 0f 85 8a 00 00 00 jne 1083a9 <rtems_termios_enqueue_raw_characters+0x20e><== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
10831f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108325: 83 c8 01 or $0x1,%eax <== NOT EXECUTED
108328: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
10832e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108334: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED
108339: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED
10833e: 75 33 jne 108373 <rtems_termios_enqueue_raw_characters+0x1d8><== NOT EXECUTED
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
108340: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108346: a8 20 test $0x20,%al <== NOT EXECUTED
108348: 75 09 jne 108353 <rtems_termios_enqueue_raw_characters+0x1b8><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
10834a: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
108351: 75 56 jne 1083a9 <rtems_termios_enqueue_raw_characters+0x20e><== NOT EXECUTED
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
108353: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108359: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
10835c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
108362: 50 push %eax <== NOT EXECUTED
108363: 6a 01 push $0x1 <== NOT EXECUTED
108365: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
108368: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10836b: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
108371: eb 33 jmp 1083a6 <rtems_termios_enqueue_raw_characters+0x20b><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]),
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
108373: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108379: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED
10837e: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED
108383: 75 24 jne 1083a9 <rtems_termios_enqueue_raw_characters+0x20e><== NOT EXECUTED
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
108385: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10838b: 83 c8 04 or $0x4,%eax <== NOT EXECUTED
10838e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
108394: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED
10839a: 85 c0 test %eax,%eax <== NOT EXECUTED
10839c: 74 0b je 1083a9 <rtems_termios_enqueue_raw_characters+0x20e><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
10839e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1083a1: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1083a4: ff d0 call *%eax <== NOT EXECUTED
1083a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
1083a9: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
1083ac: 9d popf <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
1083ad: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED
1083b0: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED
1083b3: 75 03 jne 1083b8 <rtems_termios_enqueue_raw_characters+0x21d><== NOT EXECUTED
dropped++;
1083b5: 46 inc %esi <== NOT EXECUTED
1083b6: eb 3c jmp 1083f4 <rtems_termios_enqueue_raw_characters+0x259><== NOT EXECUTED
}
else {
tty->rawInBuf.theBuf[newTail] = c;
1083b8: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED
1083bb: 8a 4d df mov -0x21(%ebp),%cl <== NOT EXECUTED
1083be: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1083c1: 88 0c 10 mov %cl,(%eax,%edx,1) <== NOT EXECUTED
tty->rawInBuf.Tail = newTail;
1083c4: 89 53 60 mov %edx,0x60(%ebx) <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
1083c7: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx) <== NOT EXECUTED
1083ce: 75 24 jne 1083f4 <rtems_termios_enqueue_raw_characters+0x259><== NOT EXECUTED
1083d0: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED
1083d6: 85 c0 test %eax,%eax <== NOT EXECUTED
1083d8: 74 1a je 1083f4 <rtems_termios_enqueue_raw_characters+0x259><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
1083da: 51 push %ecx <== NOT EXECUTED
1083db: 51 push %ecx <== NOT EXECUTED
1083dc: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED
1083e2: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
1083e5: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
1083e7: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
1083ee: 00 00 00
1083f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
1083f4: 47 inc %edi <== NOT EXECUTED
1083f5: ff 4d e0 decl -0x20(%ebp) <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
1083f8: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED
1083fc: 0f 85 30 fe ff ff jne 108232 <rtems_termios_enqueue_raw_characters+0x97><== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
108402: 01 73 78 add %esi,0x78(%ebx) <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
108405: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108408: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED
10840b: e8 c8 1c 00 00 call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
return dropped;
108410: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108413: eb 02 jmp 108417 <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
108415: 31 f6 xor %esi,%esi <== NOT EXECUTED
}
108417: 89 f0 mov %esi,%eax <== NOT EXECUTED
108419: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10841c: 5b pop %ebx <== NOT EXECUTED
10841d: 5e pop %esi <== NOT EXECUTED
10841e: 5f pop %edi <== NOT EXECUTED
10841f: c9 leave <== NOT EXECUTED
108420: c3 ret <== NOT EXECUTED
00107ef8 <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
107ef8: 55 push %ebp
107ef9: 89 e5 mov %esp,%ebp
107efb: 83 ec 08 sub $0x8,%esp
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
107efe: 83 3d e8 40 12 00 00 cmpl $0x0,0x1240e8
107f05: 75 28 jne 107f2f <rtems_termios_initialize+0x37>
sc = rtems_semaphore_create (
107f07: 83 ec 0c sub $0xc,%esp
107f0a: 68 e8 40 12 00 push $0x1240e8
107f0f: 6a 00 push $0x0
107f11: 6a 54 push $0x54
107f13: 6a 01 push $0x1
107f15: 68 69 6d 52 54 push $0x54526d69
107f1a: e8 a1 1e 00 00 call 109dc0 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'm', 'i'),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
107f1f: 83 c4 20 add $0x20,%esp
107f22: 85 c0 test %eax,%eax
107f24: 74 09 je 107f2f <rtems_termios_initialize+0x37><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
107f26: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f29: 50 push %eax <== NOT EXECUTED
107f2a: e8 7d 26 00 00 call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
}
}
107f2f: c9 leave
107f30: c3 ret
00108d73 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
108d73: 55 push %ebp
108d74: 89 e5 mov %esp,%ebp
108d76: 57 push %edi
108d77: 56 push %esi
108d78: 53 push %ebx
108d79: 83 ec 20 sub $0x20,%esp
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
108d7c: 8b 55 08 mov 0x8(%ebp),%edx
108d7f: 8b 02 mov (%edx),%eax
108d81: 8b 58 34 mov 0x34(%eax),%ebx
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
108d84: 8b 72 08 mov 0x8(%edx),%esi
rtems_status_code sc;
args->ioctl_return = 0;
108d87: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108d8e: 6a 00 push $0x0
108d90: 6a 00 push $0x0
108d92: ff 73 18 pushl 0x18(%ebx)
108d95: e8 52 12 00 00 call 109fec <rtems_semaphore_obtain>
108d9a: 89 45 e4 mov %eax,-0x1c(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
108d9d: 83 c4 10 add $0x10,%esp
108da0: 85 c0 test %eax,%eax
108da2: 74 0b je 108daf <rtems_termios_ioctl+0x3c><== ALWAYS TAKEN
args->ioctl_return = sc;
108da4: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
108da7: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED
return sc;
108daa: e9 04 03 00 00 jmp 1090b3 <rtems_termios_ioctl+0x340><== NOT EXECUTED
}
switch (args->command) {
108daf: 8b 55 08 mov 0x8(%ebp),%edx
108db2: 8b 42 04 mov 0x4(%edx),%eax
108db5: 83 f8 04 cmp $0x4,%eax
108db8: 0f 84 4c 02 00 00 je 10900a <rtems_termios_ioctl+0x297><== NEVER TAKEN
108dbe: 77 10 ja 108dd0 <rtems_termios_ioctl+0x5d><== NEVER TAKEN
108dc0: 83 f8 02 cmp $0x2,%eax
108dc3: 74 77 je 108e3c <rtems_termios_ioctl+0xc9>
108dc5: 0f 87 1d 02 00 00 ja 108fe8 <rtems_termios_ioctl+0x275>
108dcb: 48 dec %eax
108dcc: 75 2f jne 108dfd <rtems_termios_ioctl+0x8a><== NEVER TAKEN
108dce: eb 55 jmp 108e25 <rtems_termios_ioctl+0xb2>
108dd0: 3d 7f 66 04 40 cmp $0x4004667f,%eax <== NOT EXECUTED
108dd5: 0f 84 a4 02 00 00 je 10907f <rtems_termios_ioctl+0x30c><== NOT EXECUTED
108ddb: 77 0a ja 108de7 <rtems_termios_ioctl+0x74><== NOT EXECUTED
108ddd: 83 f8 05 cmp $0x5,%eax <== NOT EXECUTED
108de0: 75 1b jne 108dfd <rtems_termios_ioctl+0x8a><== NOT EXECUTED
108de2: e9 0d 02 00 00 jmp 108ff4 <rtems_termios_ioctl+0x281><== NOT EXECUTED
108de7: 3d 1a 74 04 40 cmp $0x4004741a,%eax <== NOT EXECUTED
108dec: 0f 84 7d 02 00 00 je 10906f <rtems_termios_ioctl+0x2fc><== NOT EXECUTED
108df2: 3d 1b 74 04 80 cmp $0x8004741b,%eax <== NOT EXECUTED
108df7: 0f 84 20 02 00 00 je 10901d <rtems_termios_ioctl+0x2aa><== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
108dfd: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
108e03: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
108e06: 8b 80 a0 3d 12 00 mov 0x123da0(%eax),%eax <== NOT EXECUTED
108e0c: c7 45 e4 0a 00 00 00 movl $0xa,-0x1c(%ebp) <== NOT EXECUTED
108e13: 85 c0 test %eax,%eax <== NOT EXECUTED
108e15: 0f 84 81 02 00 00 je 10909c <rtems_termios_ioctl+0x329><== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
108e1b: 52 push %edx <== NOT EXECUTED
108e1c: 52 push %edx <== NOT EXECUTED
108e1d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
108e20: e9 3f 02 00 00 jmp 109064 <rtems_termios_ioctl+0x2f1><== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
108e25: 8b 4d 08 mov 0x8(%ebp),%ecx
108e28: 8b 41 08 mov 0x8(%ecx),%eax
108e2b: 8d 73 30 lea 0x30(%ebx),%esi
108e2e: b9 09 00 00 00 mov $0x9,%ecx
108e33: 89 c7 mov %eax,%edi
108e35: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
break;
108e37: e9 60 02 00 00 jmp 10909c <rtems_termios_ioctl+0x329>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
108e3c: 8b 45 08 mov 0x8(%ebp),%eax
108e3f: 8b 70 08 mov 0x8(%eax),%esi
108e42: 8d 7b 30 lea 0x30(%ebx),%edi
108e45: b9 09 00 00 00 mov $0x9,%ecx
108e4a: 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) &&
108e4c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108e52: f6 c4 02 test $0x2,%ah
108e55: 74 57 je 108eae <rtems_termios_ioctl+0x13b>
108e57: f6 43 31 04 testb $0x4,0x31(%ebx)
108e5b: 75 51 jne 108eae <rtems_termios_ioctl+0x13b><== ALWAYS TAKEN
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
108e5d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108e63: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED
108e68: 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) {
108e6e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108e74: a8 20 test $0x20,%al <== NOT EXECUTED
108e76: 74 36 je 108eae <rtems_termios_ioctl+0x13b><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
108e78: 9c pushf <== NOT EXECUTED
108e79: fa cli <== NOT EXECUTED
108e7a: 5e pop %esi <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
108e7b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108e81: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
108e84: 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) {
108e8a: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
108e91: 74 19 je 108eac <rtems_termios_ioctl+0x139><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
108e93: 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)(tty->minor,
108e99: 57 push %edi <== NOT EXECUTED
108e9a: 6a 01 push $0x1 <== NOT EXECUTED
108e9c: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
108e9f: 50 push %eax <== NOT EXECUTED
108ea0: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108ea3: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
108ea9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
108eac: 56 push %esi <== NOT EXECUTED
108ead: 9d popf <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
108eae: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108eb4: f6 c4 04 test $0x4,%ah
108eb7: 74 24 je 108edd <rtems_termios_ioctl+0x16a><== ALWAYS TAKEN
108eb9: f6 43 31 10 testb $0x10,0x31(%ebx) <== NOT EXECUTED
108ebd: 75 1e jne 108edd <rtems_termios_ioctl+0x16a><== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
108ebf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108ec5: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED
108ec8: 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);
108ece: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108ed4: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
108ed7: 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) &&
108edd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108ee3: f6 c4 01 test $0x1,%ah
108ee6: 74 43 je 108f2b <rtems_termios_ioctl+0x1b8><== ALWAYS TAKEN
108ee8: 83 7b 38 00 cmpl $0x0,0x38(%ebx) <== NOT EXECUTED
108eec: 78 3d js 108f2b <rtems_termios_ioctl+0x1b8><== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
108eee: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108ef4: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED
108ef7: 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) &&
108efd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108f03: a8 04 test $0x4,%al <== NOT EXECUTED
108f05: 74 15 je 108f1c <rtems_termios_ioctl+0x1a9><== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
108f07: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
108f0d: 85 c0 test %eax,%eax <== NOT EXECUTED
108f0f: 74 0b je 108f1c <rtems_termios_ioctl+0x1a9><== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
108f11: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108f14: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108f17: ff d0 call *%eax <== NOT EXECUTED
108f19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
108f1c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108f22: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
108f25: 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) {
108f2b: 83 7b 38 00 cmpl $0x0,0x38(%ebx)
108f2f: 79 0f jns 108f40 <rtems_termios_ioctl+0x1cd><== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
108f31: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108f37: 80 cc 01 or $0x1,%ah <== NOT EXECUTED
108f3a: 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) {
108f40: f6 43 31 10 testb $0x10,0x31(%ebx)
108f44: 74 0f je 108f55 <rtems_termios_ioctl+0x1e2><== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDXOF;
108f46: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108f4c: 80 cc 04 or $0x4,%ah <== NOT EXECUTED
108f4f: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
108f55: f6 43 31 04 testb $0x4,0x31(%ebx)
108f59: 74 0f je 108f6a <rtems_termios_ioctl+0x1f7><== NEVER TAKEN
tty->flow_ctrl |= FL_MDXON;
108f5b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108f61: 80 cc 02 or $0x2,%ah
108f64: 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) {
108f6a: f6 43 3c 02 testb $0x2,0x3c(%ebx)
108f6e: 75 39 jne 108fa9 <rtems_termios_ioctl+0x236><== ALWAYS TAKEN
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
108f70: 0f b6 73 46 movzbl 0x46(%ebx),%esi <== NOT EXECUTED
108f74: e8 2f 0a 00 00 call 1099a8 <rtems_clock_get_ticks_per_second><== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
108f79: 0f af c6 imul %esi,%eax <== NOT EXECUTED
108f7c: b9 0a 00 00 00 mov $0xa,%ecx <== NOT EXECUTED
108f81: 31 d2 xor %edx,%edx <== NOT EXECUTED
108f83: f7 f1 div %ecx <== NOT EXECUTED
108f85: 89 43 54 mov %eax,0x54(%ebx) <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
108f88: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
108f8c: 74 15 je 108fa3 <rtems_termios_ioctl+0x230><== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
108f8e: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
108f95: 89 43 70 mov %eax,0x70(%ebx) <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
108f98: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED
108f9c: 75 19 jne 108fb7 <rtems_termios_ioctl+0x244><== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
108f9e: 89 43 74 mov %eax,0x74(%ebx) <== NOT EXECUTED
108fa1: eb 24 jmp 108fc7 <rtems_termios_ioctl+0x254><== NOT EXECUTED
}
else {
if (tty->termios.c_cc[VMIN]) {
108fa3: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED
108fa7: 74 17 je 108fc0 <rtems_termios_ioctl+0x24d><== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
108fa9: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
108fb0: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
108fb7: c7 43 74 00 00 00 00 movl $0x0,0x74(%ebx)
108fbe: eb 07 jmp 108fc7 <rtems_termios_ioctl+0x254>
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
108fc0: c7 43 6c 01 00 00 00 movl $0x1,0x6c(%ebx) <== NOT EXECUTED
}
}
}
if (tty->device.setAttributes)
108fc7: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
108fcd: 85 c0 test %eax,%eax
108fcf: 0f 84 c7 00 00 00 je 10909c <rtems_termios_ioctl+0x329><== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
108fd5: 56 push %esi
108fd6: 56 push %esi
108fd7: 8d 53 30 lea 0x30(%ebx),%edx
108fda: 52 push %edx
108fdb: ff 73 10 pushl 0x10(%ebx)
108fde: ff d0 call *%eax
108fe0: 83 c4 10 add $0x10,%esp
108fe3: e9 b4 00 00 00 jmp 10909c <rtems_termios_ioctl+0x329>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
108fe8: 89 d8 mov %ebx,%eax
108fea: e8 53 fa ff ff call 108a42 <drainOutput>
break;
108fef: e9 a8 00 00 00 jmp 10909c <rtems_termios_ioctl+0x329>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
108ff4: 8b 06 mov (%esi),%eax <== NOT EXECUTED
108ff6: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED
108ff9: 89 83 d4 00 00 00 mov %eax,0xd4(%ebx) <== NOT EXECUTED
108fff: 89 93 d8 00 00 00 mov %edx,0xd8(%ebx) <== NOT EXECUTED
break;
109005: e9 92 00 00 00 jmp 10909c <rtems_termios_ioctl+0x329><== NOT EXECUTED
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
10900a: 8b 06 mov (%esi),%eax <== NOT EXECUTED
10900c: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED
10900f: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx) <== NOT EXECUTED
109015: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx) <== NOT EXECUTED
break;
10901b: eb 7f jmp 10909c <rtems_termios_ioctl+0x329><== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
10901d: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
109023: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
109026: 8b 80 8c 3d 12 00 mov 0x123d8c(%eax),%eax <== NOT EXECUTED
10902c: 85 c0 test %eax,%eax <== NOT EXECUTED
10902e: 74 0c je 10903c <rtems_termios_ioctl+0x2c9><== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
109030: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109033: 53 push %ebx <== NOT EXECUTED
109034: ff d0 call *%eax <== NOT EXECUTED
109036: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
109039: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->t_line=*(int*)(args->buffer);
10903c: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
10903f: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
109042: 8b 00 mov (%eax),%eax <== NOT EXECUTED
109044: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
10904a: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) <== NOT EXECUTED
109051: 00 00 00
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
109054: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
109057: 8b 80 88 3d 12 00 mov 0x123d88(%eax),%eax <== NOT EXECUTED
10905d: 85 c0 test %eax,%eax <== NOT EXECUTED
10905f: 74 3b je 10909c <rtems_termios_ioctl+0x329><== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
109061: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109064: 53 push %ebx <== NOT EXECUTED
109065: ff d0 call *%eax <== NOT EXECUTED
109067: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
10906a: e9 71 ff ff ff jmp 108fe0 <rtems_termios_ioctl+0x26d><== NOT EXECUTED
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
10906f: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
109072: 8b 41 08 mov 0x8(%ecx),%eax <== NOT EXECUTED
109075: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx <== NOT EXECUTED
10907b: 89 10 mov %edx,(%eax) <== NOT EXECUTED
break;
10907d: eb 1d jmp 10909c <rtems_termios_ioctl+0x329><== NOT EXECUTED
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
10907f: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
109082: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED
if ( rawnc < 0 )
109085: 29 d0 sub %edx,%eax <== NOT EXECUTED
109087: 79 05 jns 10908e <rtems_termios_ioctl+0x31b><== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
109089: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED
10908c: 01 d0 add %edx,%eax <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
10908e: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
109091: 8b 51 08 mov 0x8(%ecx),%edx <== NOT EXECUTED
109094: 03 43 20 add 0x20(%ebx),%eax <== NOT EXECUTED
109097: 2b 43 24 sub 0x24(%ebx),%eax <== NOT EXECUTED
10909a: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
10909c: 83 ec 0c sub $0xc,%esp
10909f: ff 73 18 pushl 0x18(%ebx)
1090a2: e8 31 10 00 00 call 10a0d8 <rtems_semaphore_release>
args->ioctl_return = sc;
1090a7: 8b 55 e4 mov -0x1c(%ebp),%edx
1090aa: 8b 45 08 mov 0x8(%ebp),%eax
1090ad: 89 50 0c mov %edx,0xc(%eax)
return sc;
1090b0: 83 c4 10 add $0x10,%esp
}
1090b3: 8b 45 e4 mov -0x1c(%ebp),%eax
1090b6: 8d 65 f4 lea -0xc(%ebp),%esp
1090b9: 5b pop %ebx
1090ba: 5e pop %esi
1090bb: 5f pop %edi
1090bc: c9 leave
1090bd: c3 ret
0010923b <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
10923b: 55 push %ebp
10923c: 89 e5 mov %esp,%ebp
10923e: 57 push %edi
10923f: 56 push %esi
109240: 53 push %ebx
109241: 83 ec 20 sub $0x20,%esp
109244: 8b 75 14 mov 0x14(%ebp),%esi
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
109247: 6a 00 push $0x0
109249: 6a 00 push $0x0
10924b: ff 35 e8 40 12 00 pushl 0x1240e8
109251: e8 96 0d 00 00 call 109fec <rtems_semaphore_obtain>
109256: 89 45 e4 mov %eax,-0x1c(%ebp)
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
109259: 83 c4 10 add $0x10,%esp
10925c: 85 c0 test %eax,%eax
10925e: 0f 85 cf 03 00 00 jne 109633 <rtems_termios_open+0x3f8><== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
109264: 8b 15 f0 40 12 00 mov 0x1240f0,%edx
10926a: eb 16 jmp 109282 <rtems_termios_open+0x47>
if ((tty->major == major) && (tty->minor == minor))
10926c: 8b 45 08 mov 0x8(%ebp),%eax
10926f: 39 42 0c cmp %eax,0xc(%edx)
109272: 75 0c jne 109280 <rtems_termios_open+0x45>
109274: 8b 4d 0c mov 0xc(%ebp),%ecx
109277: 39 4a 10 cmp %ecx,0x10(%edx)
10927a: 0f 84 24 03 00 00 je 1095a4 <rtems_termios_open+0x369><== 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) {
109280: 8b 12 mov (%edx),%edx
109282: 85 d2 test %edx,%edx
109284: 75 e6 jne 10926c <rtems_termios_open+0x31>
109286: e9 b3 03 00 00 jmp 10963e <rtems_termios_open+0x403>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
10928b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10928e: e9 98 00 00 00 jmp 10932b <rtems_termios_open+0xf0><== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
109293: a1 3c 1f 12 00 mov 0x121f3c,%eax
109298: 89 42 64 mov %eax,0x64(%edx)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
10929b: 8b 42 64 mov 0x64(%edx),%eax
10929e: 83 ec 0c sub $0xc,%esp
1092a1: 50 push %eax
1092a2: 89 55 e0 mov %edx,-0x20(%ebp)
1092a5: e8 72 e1 ff ff call 10741c <malloc>
1092aa: 8b 55 e0 mov -0x20(%ebp),%edx
1092ad: 89 42 58 mov %eax,0x58(%edx)
if (tty->rawInBuf.theBuf == NULL) {
1092b0: 83 c4 10 add $0x10,%esp
1092b3: 85 c0 test %eax,%eax
1092b5: 75 05 jne 1092bc <rtems_termios_open+0x81><== ALWAYS TAKEN
free(tty);
1092b7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1092ba: eb 68 jmp 109324 <rtems_termios_open+0xe9><== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
1092bc: a1 40 1f 12 00 mov 0x121f40,%eax
1092c1: 89 82 88 00 00 00 mov %eax,0x88(%edx)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
1092c7: 8b 82 88 00 00 00 mov 0x88(%edx),%eax
1092cd: 83 ec 0c sub $0xc,%esp
1092d0: 50 push %eax
1092d1: 89 55 e0 mov %edx,-0x20(%ebp)
1092d4: e8 43 e1 ff ff call 10741c <malloc>
1092d9: 8b 55 e0 mov -0x20(%ebp),%edx
1092dc: 89 42 7c mov %eax,0x7c(%edx)
if (tty->rawOutBuf.theBuf == NULL) {
1092df: 83 c4 10 add $0x10,%esp
1092e2: 85 c0 test %eax,%eax
1092e4: 75 05 jne 1092eb <rtems_termios_open+0xb0><== ALWAYS TAKEN
free((void *)(tty->rawInBuf.theBuf));
1092e6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1092e9: eb 2d jmp 109318 <rtems_termios_open+0xdd><== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
1092eb: 83 ec 0c sub $0xc,%esp
1092ee: ff 35 38 1f 12 00 pushl 0x121f38
1092f4: 89 55 e0 mov %edx,-0x20(%ebp)
1092f7: e8 20 e1 ff ff call 10741c <malloc>
1092fc: 8b 55 e0 mov -0x20(%ebp),%edx
1092ff: 89 42 1c mov %eax,0x1c(%edx)
if (tty->cbuf == NULL) {
109302: 83 c4 10 add $0x10,%esp
109305: 85 c0 test %eax,%eax
109307: 75 39 jne 109342 <rtems_termios_open+0x107><== ALWAYS TAKEN
free((void *)(tty->rawOutBuf.theBuf));
109309: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10930c: ff 72 7c pushl 0x7c(%edx) <== NOT EXECUTED
10930f: e8 dc de ff ff call 1071f0 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
109314: 5b pop %ebx <== NOT EXECUTED
109315: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
109318: ff 72 58 pushl 0x58(%edx) <== NOT EXECUTED
10931b: e8 d0 de ff ff call 1071f0 <free> <== NOT EXECUTED
free(tty);
109320: 59 pop %ecx <== NOT EXECUTED
109321: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
109324: 52 push %edx <== NOT EXECUTED
109325: e8 c6 de ff ff call 1071f0 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
10932a: 5a pop %edx <== NOT EXECUTED
10932b: ff 35 e8 40 12 00 pushl 0x1240e8 <== NOT EXECUTED
109331: e8 a2 0d 00 00 call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
109336: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED
10933d: e9 ee 02 00 00 jmp 109630 <rtems_termios_open+0x3f5><== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
109342: c7 82 d4 00 00 00 00 movl $0x0,0xd4(%edx)
109349: 00 00 00
tty->tty_snd.sw_arg = NULL;
10934c: c7 82 d8 00 00 00 00 movl $0x0,0xd8(%edx)
109353: 00 00 00
tty->tty_rcv.sw_pfn = NULL;
109356: c7 82 dc 00 00 00 00 movl $0x0,0xdc(%edx)
10935d: 00 00 00
tty->tty_rcv.sw_arg = NULL;
109360: c7 82 e0 00 00 00 00 movl $0x0,0xe0(%edx)
109367: 00 00 00
tty->tty_rcvwakeup = 0;
10936a: c7 82 e4 00 00 00 00 movl $0x0,0xe4(%edx)
109371: 00 00 00
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
109374: a1 f0 40 12 00 mov 0x1240f0,%eax
109379: 89 02 mov %eax,(%edx)
tty->back = NULL;
10937b: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
if (rtems_termios_ttyHead != NULL)
109382: 85 c0 test %eax,%eax
109384: 74 03 je 109389 <rtems_termios_open+0x14e>
rtems_termios_ttyHead->back = tty;
109386: 89 50 04 mov %edx,0x4(%eax)
rtems_termios_ttyHead = tty;
109389: 89 1d f0 40 12 00 mov %ebx,0x1240f0
if (rtems_termios_ttyTail == NULL)
10938f: 83 3d ec 40 12 00 00 cmpl $0x0,0x1240ec
109396: 75 06 jne 10939e <rtems_termios_open+0x163>
rtems_termios_ttyTail = tty;
109398: 89 1d ec 40 12 00 mov %ebx,0x1240ec
tty->minor = minor;
10939e: 8b 45 0c mov 0xc(%ebp),%eax
1093a1: 89 43 10 mov %eax,0x10(%ebx)
tty->major = major;
1093a4: 8b 4d 08 mov 0x8(%ebp),%ecx
1093a7: 89 4b 0c mov %ecx,0xc(%ebx)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
1093aa: 83 ec 0c sub $0xc,%esp
1093ad: 8d 43 14 lea 0x14(%ebx),%eax
1093b0: 50 push %eax
1093b1: 6a 00 push $0x0
1093b3: 6a 54 push $0x54
1093b5: 6a 01 push $0x1
1093b7: 0f be 05 44 1f 12 00 movsbl 0x121f44,%eax
1093be: 0d 00 69 52 54 or $0x54526900,%eax
1093c3: 50 push %eax
1093c4: 89 55 e0 mov %edx,-0x20(%ebp)
1093c7: e8 f4 09 00 00 call 109dc0 <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)
1093cc: 83 c4 20 add $0x20,%esp
1093cf: 85 c0 test %eax,%eax
1093d1: 8b 55 e0 mov -0x20(%ebp),%edx
1093d4: 0f 85 3f 02 00 00 jne 109619 <rtems_termios_open+0x3de><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
1093da: 83 ec 0c sub $0xc,%esp
1093dd: 8d 43 18 lea 0x18(%ebx),%eax
1093e0: 50 push %eax
1093e1: 6a 00 push $0x0
1093e3: 6a 54 push $0x54
1093e5: 6a 01 push $0x1
1093e7: 0f be 05 44 1f 12 00 movsbl 0x121f44,%eax
1093ee: 0d 00 6f 52 54 or $0x54526f00,%eax
1093f3: 50 push %eax
1093f4: 89 55 e0 mov %edx,-0x20(%ebp)
1093f7: e8 c4 09 00 00 call 109dc0 <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)
1093fc: 83 c4 20 add $0x20,%esp
1093ff: 85 c0 test %eax,%eax
109401: 8b 55 e0 mov -0x20(%ebp),%edx
109404: 0f 85 0f 02 00 00 jne 109619 <rtems_termios_open+0x3de><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
10940a: 83 ec 0c sub $0xc,%esp
10940d: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax
109413: 50 push %eax
109414: 6a 00 push $0x0
109416: 6a 20 push $0x20
109418: 6a 00 push $0x0
10941a: 0f be 05 44 1f 12 00 movsbl 0x121f44,%eax
109421: 0d 00 78 52 54 or $0x54527800,%eax
109426: 50 push %eax
109427: 89 55 e0 mov %edx,-0x20(%ebp)
10942a: e8 91 09 00 00 call 109dc0 <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)
10942f: 83 c4 20 add $0x20,%esp
109432: 85 c0 test %eax,%eax
109434: 8b 55 e0 mov -0x20(%ebp),%edx
109437: 0f 85 dc 01 00 00 jne 109619 <rtems_termios_open+0x3de><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
10943d: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
109444: 00 00 00
/*
* Set callbacks
*/
tty->device = *callbacks;
109447: 8d bb 98 00 00 00 lea 0x98(%ebx),%edi
10944d: b9 08 00 00 00 mov $0x8,%ecx
109452: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
109454: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
10945b: 75 74 jne 1094d1 <rtems_termios_open+0x296><== ALWAYS TAKEN
sc = rtems_task_create (
10945d: 50 push %eax <== NOT EXECUTED
10945e: 50 push %eax <== NOT EXECUTED
10945f: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax <== NOT EXECUTED
109465: 50 push %eax <== NOT EXECUTED
109466: 6a 00 push $0x0 <== NOT EXECUTED
109468: 68 00 05 00 00 push $0x500 <== NOT EXECUTED
10946d: 68 00 04 00 00 push $0x400 <== NOT EXECUTED
109472: 6a 0a push $0xa <== NOT EXECUTED
109474: 0f be 05 44 1f 12 00 movsbl 0x121f44,%eax <== NOT EXECUTED
10947b: 0d 00 54 78 54 or $0x54785400,%eax <== NOT EXECUTED
109480: 50 push %eax <== NOT EXECUTED
109481: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
109484: e8 df 0c 00 00 call 10a168 <rtems_task_create> <== NOT EXECUTED
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
109489: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10948c: 85 c0 test %eax,%eax <== NOT EXECUTED
10948e: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
109491: 0f 85 82 01 00 00 jne 109619 <rtems_termios_open+0x3de><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
109497: 57 push %edi <== NOT EXECUTED
109498: 57 push %edi <== NOT EXECUTED
109499: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax <== NOT EXECUTED
10949f: 50 push %eax <== NOT EXECUTED
1094a0: 6a 00 push $0x0 <== NOT EXECUTED
1094a2: 68 00 05 00 00 push $0x500 <== NOT EXECUTED
1094a7: 68 00 04 00 00 push $0x400 <== NOT EXECUTED
1094ac: 6a 09 push $0x9 <== NOT EXECUTED
1094ae: 0f be 05 44 1f 12 00 movsbl 0x121f44,%eax <== NOT EXECUTED
1094b5: 0d 00 54 78 52 or $0x52785400,%eax <== NOT EXECUTED
1094ba: 50 push %eax <== NOT EXECUTED
1094bb: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
1094be: e8 a5 0c 00 00 call 10a168 <rtems_task_create> <== NOT EXECUTED
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
1094c3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1094c6: 85 c0 test %eax,%eax <== NOT EXECUTED
1094c8: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
1094cb: 0f 85 48 01 00 00 jne 109619 <rtems_termios_open+0x3de><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
1094d1: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
1094d8: 74 09 je 1094e3 <rtems_termios_open+0x2a8>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
1094da: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
1094e1: 75 30 jne 109513 <rtems_termios_open+0x2d8><== ALWAYS TAKEN
sc = rtems_semaphore_create (
1094e3: 83 ec 0c sub $0xc,%esp
1094e6: 8d 43 68 lea 0x68(%ebx),%eax
1094e9: 50 push %eax
1094ea: 6a 00 push $0x0
1094ec: 6a 24 push $0x24
1094ee: 6a 00 push $0x0
1094f0: 0f be 05 44 1f 12 00 movsbl 0x121f44,%eax
1094f7: 0d 00 72 52 54 or $0x54527200,%eax
1094fc: 50 push %eax
1094fd: 89 55 e0 mov %edx,-0x20(%ebp)
109500: e8 bb 08 00 00 call 109dc0 <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)
109505: 83 c4 20 add $0x20,%esp
109508: 85 c0 test %eax,%eax
10950a: 8b 55 e0 mov -0x20(%ebp),%edx
10950d: 0f 85 06 01 00 00 jne 109619 <rtems_termios_open+0x3de><== NEVER TAKEN
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
109513: c7 43 30 02 25 00 00 movl $0x2502,0x30(%ebx)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
10951a: c7 43 34 05 18 00 00 movl $0x1805,0x34(%ebx)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
109521: c7 43 38 bd 08 00 00 movl $0x8bd,0x38(%ebx)
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
109528: c7 43 3c 3b 82 00 00 movl $0x823b,0x3c(%ebx)
tty->termios.c_cc[VINTR] = '\003';
10952f: c6 43 41 03 movb $0x3,0x41(%ebx)
tty->termios.c_cc[VQUIT] = '\034';
109533: c6 43 42 1c movb $0x1c,0x42(%ebx)
tty->termios.c_cc[VERASE] = '\177';
109537: c6 43 43 7f movb $0x7f,0x43(%ebx)
tty->termios.c_cc[VKILL] = '\025';
10953b: c6 43 44 15 movb $0x15,0x44(%ebx)
tty->termios.c_cc[VEOF] = '\004';
10953f: c6 43 45 04 movb $0x4,0x45(%ebx)
tty->termios.c_cc[VEOL] = '\000';
109543: c6 43 4c 00 movb $0x0,0x4c(%ebx)
tty->termios.c_cc[VEOL2] = '\000';
109547: c6 43 51 00 movb $0x0,0x51(%ebx)
tty->termios.c_cc[VSTART] = '\021';
10954b: c6 43 49 11 movb $0x11,0x49(%ebx)
tty->termios.c_cc[VSTOP] = '\023';
10954f: c6 43 4a 13 movb $0x13,0x4a(%ebx)
tty->termios.c_cc[VSUSP] = '\032';
109553: c6 43 4b 1a movb $0x1a,0x4b(%ebx)
tty->termios.c_cc[VREPRINT] = '\022';
109557: c6 43 4d 12 movb $0x12,0x4d(%ebx)
tty->termios.c_cc[VDISCARD] = '\017';
10955b: c6 43 4e 0f movb $0xf,0x4e(%ebx)
tty->termios.c_cc[VWERASE] = '\027';
10955f: c6 43 4f 17 movb $0x17,0x4f(%ebx)
tty->termios.c_cc[VLNEXT] = '\026';
109563: c6 43 50 16 movb $0x16,0x50(%ebx)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
109567: c7 83 b8 00 00 00 00 movl $0x0,0xb8(%ebx)
10956e: 00 00 00
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
109571: 8b 43 64 mov 0x64(%ebx),%eax
109574: d1 e8 shr %eax
109576: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
tty->highwater = tty->rawInBuf.Size * 3/4;
10957c: 8b 43 64 mov 0x64(%ebx),%eax
10957f: 8d 04 40 lea (%eax,%eax,2),%eax
109582: c1 e8 02 shr $0x2,%eax
109585: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx)
/*
* Bump name characer
*/
if (c++ == 'z')
10958b: a0 44 1f 12 00 mov 0x121f44,%al
109590: 8d 48 01 lea 0x1(%eax),%ecx
109593: 88 0d 44 1f 12 00 mov %cl,0x121f44
109599: 3c 7a cmp $0x7a,%al
10959b: 75 07 jne 1095a4 <rtems_termios_open+0x369><== ALWAYS TAKEN
c = 'a';
10959d: c6 05 44 1f 12 00 61 movb $0x61,0x121f44 <== NOT EXECUTED
}
args->iop->data1 = tty;
1095a4: 8b 4d 10 mov 0x10(%ebp),%ecx
1095a7: 8b 01 mov (%ecx),%eax
1095a9: 89 50 34 mov %edx,0x34(%eax)
if (!tty->refcount++) {
1095ac: 8b 42 08 mov 0x8(%edx),%eax
1095af: 8d 48 01 lea 0x1(%eax),%ecx
1095b2: 89 4a 08 mov %ecx,0x8(%edx)
1095b5: 85 c0 test %eax,%eax
1095b7: 75 69 jne 109622 <rtems_termios_open+0x3e7>
if (tty->device.firstOpen)
1095b9: 8b 82 98 00 00 00 mov 0x98(%edx),%eax
1095bf: 85 c0 test %eax,%eax
1095c1: 74 15 je 1095d8 <rtems_termios_open+0x39d>
(*tty->device.firstOpen)(major, minor, arg);
1095c3: 56 push %esi
1095c4: ff 75 10 pushl 0x10(%ebp)
1095c7: ff 75 0c pushl 0xc(%ebp)
1095ca: ff 75 08 pushl 0x8(%ebp)
1095cd: 89 55 e0 mov %edx,-0x20(%ebp)
1095d0: ff d0 call *%eax
1095d2: 83 c4 10 add $0x10,%esp
1095d5: 8b 55 e0 mov -0x20(%ebp),%edx
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
1095d8: 83 ba b4 00 00 00 02 cmpl $0x2,0xb4(%edx)
1095df: 75 41 jne 109622 <rtems_termios_open+0x3e7><== ALWAYS TAKEN
sc = rtems_task_start(tty->rxTaskId,
1095e1: 53 push %ebx <== NOT EXECUTED
1095e2: 52 push %edx <== NOT EXECUTED
1095e3: 68 c3 96 10 00 push $0x1096c3 <== NOT EXECUTED
1095e8: ff b2 c4 00 00 00 pushl 0xc4(%edx) <== NOT EXECUTED
1095ee: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
1095f1: e8 de 0d 00 00 call 10a3d4 <rtems_task_start> <== NOT EXECUTED
rtems_termios_rxdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
1095f6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1095f9: 85 c0 test %eax,%eax <== NOT EXECUTED
1095fb: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
1095fe: 75 19 jne 109619 <rtems_termios_open+0x3de><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
109600: 51 push %ecx <== NOT EXECUTED
109601: 52 push %edx <== NOT EXECUTED
109602: 68 60 96 10 00 push $0x109660 <== NOT EXECUTED
109607: ff b2 c8 00 00 00 pushl 0xc8(%edx) <== NOT EXECUTED
10960d: e8 c2 0d 00 00 call 10a3d4 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
109612: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109615: 85 c0 test %eax,%eax <== NOT EXECUTED
109617: 74 09 je 109622 <rtems_termios_open+0x3e7><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
109619: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10961c: 50 push %eax <== NOT EXECUTED
10961d: e8 8a 0f 00 00 call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
109622: 83 ec 0c sub $0xc,%esp
109625: ff 35 e8 40 12 00 pushl 0x1240e8
10962b: e8 a8 0a 00 00 call 10a0d8 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
109630: 83 c4 10 add $0x10,%esp
}
109633: 8b 45 e4 mov -0x1c(%ebp),%eax
109636: 8d 65 f4 lea -0xc(%ebp),%esp
109639: 5b pop %ebx
10963a: 5e pop %esi
10963b: 5f pop %edi
10963c: c9 leave
10963d: c3 ret
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
10963e: 52 push %edx
10963f: 52 push %edx
109640: 68 e8 00 00 00 push $0xe8
109645: 6a 01 push $0x1
109647: e8 9c 46 00 00 call 10dce8 <calloc>
10964c: 89 c2 mov %eax,%edx
10964e: 89 c3 mov %eax,%ebx
if (tty == NULL) {
109650: 83 c4 10 add $0x10,%esp
109653: 85 c0 test %eax,%eax
109655: 0f 85 38 fc ff ff jne 109293 <rtems_termios_open+0x58><== ALWAYS TAKEN
10965b: e9 2b fc ff ff jmp 10928b <rtems_termios_open+0x50><== NOT EXECUTED
00108421 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
108421: 55 push %ebp
108422: 89 e5 mov %esp,%ebp
108424: 57 push %edi
108425: 56 push %esi
108426: 53 push %ebx
108427: 83 ec 3c sub $0x3c,%esp
10842a: 8b 45 08 mov 0x8(%ebp),%eax
10842d: 8b 75 0c mov 0xc(%ebp),%esi
108430: 8b 5d 10 mov 0x10(%ebp),%ebx
const unsigned char *buf = _buf;
108433: 89 c7 mov %eax,%edi
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
108435: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
10843c: 75 1b jne 108459 <rtems_termios_puts+0x38><== ALWAYS TAKEN
(*tty->device.write)(tty->minor, (void *)buf, len);
10843e: 89 75 10 mov %esi,0x10(%ebp) <== NOT EXECUTED
108441: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
108444: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
108447: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
10844a: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax <== NOT EXECUTED
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
108450: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108453: 5b pop %ebx <== NOT EXECUTED
108454: 5e pop %esi <== NOT EXECUTED
108455: 5f pop %edi <== NOT EXECUTED
108456: c9 leave <== NOT EXECUTED
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);
108457: ff e0 jmp *%eax <== NOT EXECUTED
return;
}
newHead = tty->rawOutBuf.Head;
108459: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
10845f: 89 45 e4 mov %eax,-0x1c(%ebp)
while (len) {
108462: e9 ca 00 00 00 jmp 108531 <rtems_termios_puts+0x110>
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
108467: 8b 45 e4 mov -0x1c(%ebp),%eax
10846a: 40 inc %eax
10846b: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
108471: 31 d2 xor %edx,%edx
108473: f7 f1 div %ecx
108475: 89 55 c4 mov %edx,-0x3c(%ebp)
108478: 89 55 e4 mov %edx,-0x1c(%ebp)
rtems_interrupt_disable (level);
10847b: 9c pushf
10847c: fa cli
10847d: 8f 45 d4 popl -0x2c(%ebp)
108480: 8b 55 d4 mov -0x2c(%ebp),%edx
108483: 8b 4d c4 mov -0x3c(%ebp),%ecx
while (newHead == tty->rawOutBuf.Tail) {
108486: eb 35 jmp 1084bd <rtems_termios_puts+0x9c>
tty->rawOutBufState = rob_wait;
108488: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
10848f: 00 00 00
rtems_interrupt_enable (level);
108492: 52 push %edx
108493: 9d popf
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
108494: 50 push %eax
108495: 6a 00 push $0x0
108497: 6a 00 push $0x0
108499: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10849f: 89 4d e0 mov %ecx,-0x20(%ebp)
1084a2: e8 45 1b 00 00 call 109fec <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1084a7: 83 c4 10 add $0x10,%esp
1084aa: 85 c0 test %eax,%eax
1084ac: 8b 4d e0 mov -0x20(%ebp),%ecx
1084af: 74 09 je 1084ba <rtems_termios_puts+0x99><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
1084b1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1084b4: 50 push %eax <== NOT EXECUTED
1084b5: e8 f2 20 00 00 call 10a5ac <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_interrupt_disable (level);
1084ba: 9c pushf
1084bb: fa cli
1084bc: 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) {
1084bd: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
1084c3: 39 c1 cmp %eax,%ecx
1084c5: 74 c1 je 108488 <rtems_termios_puts+0x67>
1084c7: 89 55 d4 mov %edx,-0x2c(%ebp)
1084ca: 89 4d c4 mov %ecx,-0x3c(%ebp)
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
1084cd: 8b 8b 80 00 00 00 mov 0x80(%ebx),%ecx
1084d3: 8a 07 mov (%edi),%al
1084d5: 8b 53 7c mov 0x7c(%ebx),%edx
1084d8: 88 04 0a mov %al,(%edx,%ecx,1)
tty->rawOutBuf.Head = newHead;
1084db: 8b 4d c4 mov -0x3c(%ebp),%ecx
1084de: 89 8b 80 00 00 00 mov %ecx,0x80(%ebx)
if (tty->rawOutBufState == rob_idle) {
1084e4: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx)
1084eb: 75 3e jne 10852b <rtems_termios_puts+0x10a>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
1084ed: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1084f3: a8 10 test $0x10,%al
1084f5: 75 1b jne 108512 <rtems_termios_puts+0xf1><== NEVER TAKEN
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
1084f7: 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,
1084fd: 52 push %edx
1084fe: 6a 01 push $0x1
108500: 03 43 7c add 0x7c(%ebx),%eax
108503: 50 push %eax
108504: ff 73 10 pushl 0x10(%ebx)
108507: ff 93 a4 00 00 00 call *0xa4(%ebx)
10850d: 83 c4 10 add $0x10,%esp
108510: eb 0f jmp 108521 <rtems_termios_puts+0x100>
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
108512: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108518: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
10851b: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
108521: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
108528: 00 00 00
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
10852b: 47 inc %edi
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
10852c: ff 75 d4 pushl -0x2c(%ebp)
10852f: 9d popf
len--;
108530: 4e dec %esi
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
108531: 85 f6 test %esi,%esi
108533: 0f 85 2e ff ff ff jne 108467 <rtems_termios_puts+0x46>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
108539: 8d 65 f4 lea -0xc(%ebp),%esp
10853c: 5b pop %ebx
10853d: 5e pop %esi
10853e: 5f pop %edi
10853f: c9 leave
108540: c3 ret
00108a9f <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
108a9f: 55 push %ebp <== NOT EXECUTED
108aa0: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108aa2: 57 push %edi <== NOT EXECUTED
108aa3: 56 push %esi <== NOT EXECUTED
108aa4: 53 push %ebx <== NOT EXECUTED
108aa5: 83 ec 50 sub $0x50,%esp <== NOT EXECUTED
108aa8: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
108aab: 8b 06 mov (%esi),%eax <== NOT EXECUTED
108aad: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
uint32_t count = args->count;
108ab0: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED
108ab3: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
char *buffer = args->buffer;
108ab6: 8b 4e 0c mov 0xc(%esi),%ecx <== NOT EXECUTED
108ab9: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108abc: 6a 00 push $0x0 <== NOT EXECUTED
108abe: 6a 00 push $0x0 <== NOT EXECUTED
108ac0: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED
108ac3: e8 24 15 00 00 call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
108ac8: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
108acb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108ace: 85 c0 test %eax,%eax <== NOT EXECUTED
108ad0: 0f 85 92 02 00 00 jne 108d68 <rtems_termios_read+0x2c9><== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
108ad6: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
108adc: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
108adf: 8b 80 90 3d 12 00 mov 0x123d90(%eax),%eax <== NOT EXECUTED
108ae5: 85 c0 test %eax,%eax <== NOT EXECUTED
108ae7: 74 19 je 108b02 <rtems_termios_read+0x63><== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
108ae9: 51 push %ecx <== NOT EXECUTED
108aea: 51 push %ecx <== NOT EXECUTED
108aeb: 56 push %esi <== NOT EXECUTED
108aec: 53 push %ebx <== NOT EXECUTED
108aed: ff d0 call *%eax <== NOT EXECUTED
108aef: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
108af2: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED
108af9: 00 00 00
rtems_semaphore_release (tty->isem);
108afc: 5a pop %edx <== NOT EXECUTED
108afd: e9 5b 02 00 00 jmp 108d5d <rtems_termios_read+0x2be><== NOT EXECUTED
return sc;
}
if (tty->cindex == tty->ccount) {
108b02: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
108b05: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED
108b08: 0f 85 25 02 00 00 jne 108d33 <rtems_termios_read+0x294><== NOT EXECUTED
tty->cindex = tty->ccount = 0;
108b0e: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
108b15: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED
tty->read_start_column = tty->column;
108b1c: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
108b1f: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED
if (tty->device.pollRead != NULL
108b22: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) <== NOT EXECUTED
108b29: 0f 84 c4 00 00 00 je 108bf3 <rtems_termios_read+0x154><== NOT EXECUTED
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
108b2f: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx) <== NOT EXECUTED
108b36: 0f 85 b7 00 00 00 jne 108bf3 <rtems_termios_read+0x154><== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
108b3c: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED
108b40: 74 35 je 108b77 <rtems_termios_read+0xd8><== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
108b42: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108b45: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108b48: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED
if (n < 0) {
108b4e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108b51: 85 c0 test %eax,%eax <== NOT EXECUTED
108b53: 79 0f jns 108b64 <rtems_termios_read+0xc5><== NOT EXECUTED
rtems_task_wake_after (1);
108b55: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108b58: 6a 01 push $0x1 <== NOT EXECUTED
108b5a: e8 d9 18 00 00 call 10a438 <rtems_task_wake_after> <== NOT EXECUTED
108b5f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108b62: eb de jmp 108b42 <rtems_termios_read+0xa3><== NOT EXECUTED
}
else {
if (siproc (n, tty))
108b64: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
108b67: 89 da mov %ebx,%edx <== NOT EXECUTED
108b69: e8 db fd ff ff call 108949 <siproc> <== NOT EXECUTED
108b6e: 85 c0 test %eax,%eax <== NOT EXECUTED
108b70: 74 d0 je 108b42 <rtems_termios_read+0xa3><== NOT EXECUTED
108b72: e9 bc 01 00 00 jmp 108d33 <rtems_termios_read+0x294><== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
108b77: e8 40 0e 00 00 call 1099bc <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
108b7c: 89 c7 mov %eax,%edi <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
108b7e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108b81: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108b84: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED
if (n < 0) {
108b8a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108b8d: 85 c0 test %eax,%eax <== NOT EXECUTED
108b8f: 79 3d jns 108bce <rtems_termios_read+0x12f><== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
108b91: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED
108b95: 74 0e je 108ba5 <rtems_termios_read+0x106><== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
108b97: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
108b9b: 74 22 je 108bbf <rtems_termios_read+0x120><== NOT EXECUTED
108b9d: 83 7b 20 00 cmpl $0x0,0x20(%ebx) <== NOT EXECUTED
108ba1: 74 1c je 108bbf <rtems_termios_read+0x120><== NOT EXECUTED
108ba3: eb 0a jmp 108baf <rtems_termios_read+0x110><== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
108ba5: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
108ba9: 0f 84 84 01 00 00 je 108d33 <rtems_termios_read+0x294><== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
108baf: e8 08 0e 00 00 call 1099bc <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
108bb4: 29 f8 sub %edi,%eax <== NOT EXECUTED
108bb6: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED
108bb9: 0f 87 74 01 00 00 ja 108d33 <rtems_termios_read+0x294><== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
108bbf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108bc2: 6a 01 push $0x1 <== NOT EXECUTED
108bc4: e8 6f 18 00 00 call 10a438 <rtems_task_wake_after> <== NOT EXECUTED
108bc9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108bcc: eb b0 jmp 108b7e <rtems_termios_read+0xdf><== NOT EXECUTED
}
else {
siproc (n, tty);
108bce: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
108bd1: 89 da mov %ebx,%edx <== NOT EXECUTED
108bd3: e8 71 fd ff ff call 108949 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
108bd8: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED
108bdb: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED
108bde: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED
108be1: 0f 8d 4c 01 00 00 jge 108d33 <rtems_termios_read+0x294><== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
108be7: 84 c0 test %al,%al <== NOT EXECUTED
108be9: 74 93 je 108b7e <rtems_termios_read+0xdf><== NOT EXECUTED
108beb: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
108bef: 74 8d je 108b7e <rtems_termios_read+0xdf><== NOT EXECUTED
108bf1: eb 84 jmp 108b77 <rtems_termios_read+0xd8><== NOT EXECUTED
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
108bf3: 8b 53 74 mov 0x74(%ebx),%edx <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
108bf6: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED
108bf9: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
108bfc: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
108c01: e9 de 00 00 00 jmp 108ce4 <rtems_termios_read+0x245><== NOT EXECUTED
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;
108c06: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED
108c09: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED
108c0c: 40 inc %eax <== NOT EXECUTED
108c0d: 31 d2 xor %edx,%edx <== NOT EXECUTED
108c0f: f7 f1 div %ecx <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
108c11: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED
108c14: 8a 04 10 mov (%eax,%edx,1),%al <== NOT EXECUTED
108c17: 88 45 d7 mov %al,-0x29(%ebp) <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
108c1a: 89 53 5c mov %edx,0x5c(%ebx) <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
108c1d: 8b 4b 60 mov 0x60(%ebx),%ecx <== NOT EXECUTED
108c20: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
108c23: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED
108c26: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
108c29: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED
108c2c: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED
108c2f: 03 45 c4 add -0x3c(%ebp),%eax <== NOT EXECUTED
108c32: 29 d0 sub %edx,%eax <== NOT EXECUTED
108c34: 31 d2 xor %edx,%edx <== NOT EXECUTED
108c36: f7 f1 div %ecx <== NOT EXECUTED
108c38: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx <== NOT EXECUTED
108c3e: 73 74 jae 108cb4 <rtems_termios_read+0x215><== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
108c40: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108c46: 83 e0 fe and $0xfffffffe,%eax <== NOT EXECUTED
108c49: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
108c4f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108c55: 25 02 02 00 00 and $0x202,%eax <== NOT EXECUTED
108c5a: 3d 02 02 00 00 cmp $0x202,%eax <== NOT EXECUTED
108c5f: 75 24 jne 108c85 <rtems_termios_read+0x1e6><== NOT EXECUTED
108c61: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
108c68: 74 0a je 108c74 <rtems_termios_read+0x1d5><== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
108c6a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
108c70: a8 20 test $0x20,%al <== NOT EXECUTED
108c72: 74 11 je 108c85 <rtems_termios_read+0x1e6><== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
108c74: 50 push %eax <== NOT EXECUTED
108c75: 6a 01 push $0x1 <== NOT EXECUTED
108c77: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
108c7a: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108c7d: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
108c83: eb 2c jmp 108cb1 <rtems_termios_read+0x212><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
108c85: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108c8b: f6 c4 01 test $0x1,%ah <== NOT EXECUTED
108c8e: 74 24 je 108cb4 <rtems_termios_read+0x215><== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
108c90: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108c96: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
108c99: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
108c9f: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
108ca5: 85 c0 test %eax,%eax <== NOT EXECUTED
108ca7: 74 0b je 108cb4 <rtems_termios_read+0x215><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
108ca9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108cac: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108caf: ff d0 call *%eax <== NOT EXECUTED
108cb1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
108cb4: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED
108cb8: 74 11 je 108ccb <rtems_termios_read+0x22c><== NOT EXECUTED
if (siproc (c, tty))
108cba: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED
108cbe: 89 da mov %ebx,%edx <== NOT EXECUTED
108cc0: e8 84 fc ff ff call 108949 <siproc> <== NOT EXECUTED
108cc5: 85 c0 test %eax,%eax <== NOT EXECUTED
108cc7: 75 16 jne 108cdf <rtems_termios_read+0x240><== NOT EXECUTED
108cc9: eb 16 jmp 108ce1 <rtems_termios_read+0x242><== NOT EXECUTED
wait = 0;
}
else {
siproc (c, tty);
108ccb: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED
108ccf: 89 da mov %ebx,%edx <== NOT EXECUTED
108cd1: e8 73 fc ff ff call 108949 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
108cd6: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED
108cda: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
108cdd: 7c 02 jl 108ce1 <rtems_termios_read+0x242><== NOT EXECUTED
108cdf: 31 ff xor %edi,%edi <== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
108ce1: 8b 53 70 mov 0x70(%ebx),%edx <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
108ce4: 8b 4b 5c mov 0x5c(%ebx),%ecx <== NOT EXECUTED
108ce7: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
108cea: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
108cec: 74 0f je 108cfd <rtems_termios_read+0x25e><== NOT EXECUTED
108cee: a1 38 1f 12 00 mov 0x121f38,%eax <== NOT EXECUTED
108cf3: 48 dec %eax <== NOT EXECUTED
108cf4: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
108cf7: 0f 8c 09 ff ff ff jl 108c06 <rtems_termios_read+0x167><== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
108cfd: 85 ff test %edi,%edi <== NOT EXECUTED
108cff: 74 32 je 108d33 <rtems_termios_read+0x294><== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
108d01: 51 push %ecx <== NOT EXECUTED
108d02: 52 push %edx <== NOT EXECUTED
108d03: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED
108d06: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED
108d09: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
108d0c: e8 db 12 00 00 call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
tty->rawInBufSemaphoreOptions,
timeout);
if (sc != RTEMS_SUCCESSFUL)
108d11: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108d14: 85 c0 test %eax,%eax <== NOT EXECUTED
108d16: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
108d19: 74 c9 je 108ce4 <rtems_termios_read+0x245><== NOT EXECUTED
108d1b: eb 16 jmp 108d33 <rtems_termios_read+0x294><== NOT EXECUTED
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
108d1d: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED
108d20: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
108d23: 8a 04 07 mov (%edi,%eax,1),%al <== NOT EXECUTED
108d26: 88 02 mov %al,(%edx) <== NOT EXECUTED
108d28: 42 inc %edx <== NOT EXECUTED
108d29: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
108d2c: 40 inc %eax <== NOT EXECUTED
108d2d: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED
count--;
108d30: 49 dec %ecx <== NOT EXECUTED
108d31: eb 06 jmp 108d39 <rtems_termios_read+0x29a><== NOT EXECUTED
108d33: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
108d36: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
108d39: 85 c9 test %ecx,%ecx <== NOT EXECUTED
108d3b: 74 0b je 108d48 <rtems_termios_read+0x2a9><== NOT EXECUTED
108d3d: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
108d40: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
108d43: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED
108d46: 7c d5 jl 108d1d <rtems_termios_read+0x27e><== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
108d48: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED
108d4b: 29 c8 sub %ecx,%eax <== NOT EXECUTED
108d4d: 89 46 18 mov %eax,0x18(%esi) <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
108d50: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED
108d57: 00 00 00
rtems_semaphore_release (tty->isem);
108d5a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108d5d: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED
108d60: e8 73 13 00 00 call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
return sc;
108d65: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
108d68: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
108d6b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108d6e: 5b pop %ebx <== NOT EXECUTED
108d6f: 5e pop %esi <== NOT EXECUTED
108d70: 5f pop %edi <== NOT EXECUTED
108d71: c9 leave <== NOT EXECUTED
108d72: c3 ret <== NOT EXECUTED
00107f6e <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)
{
107f6e: 55 push %ebp
107f6f: 89 e5 mov %esp,%ebp
107f71: 57 push %edi
107f72: 56 push %esi
107f73: 53 push %ebx
107f74: 83 ec 0c sub $0xc,%esp
107f77: 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))
107f7a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107f80: 25 03 04 00 00 and $0x403,%eax
107f85: 3d 01 04 00 00 cmp $0x401,%eax
107f8a: 75 2c jne 107fb8 <rtems_termios_refill_transmitter+0x4a><== ALWAYS TAKEN
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
107f8c: 56 push %esi <== NOT EXECUTED
107f8d: 6a 01 push $0x1 <== NOT EXECUTED
107f8f: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED
107f92: 50 push %eax <== NOT EXECUTED
107f93: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
107f96: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
107f9c: 9c pushf <== NOT EXECUTED
107f9d: fa cli <== NOT EXECUTED
107f9e: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
107f9f: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
107fa5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107fab: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
107fae: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
107fb4: 52 push %edx <== NOT EXECUTED
107fb5: 9d popf <== NOT EXECUTED
107fb6: eb 38 jmp 107ff0 <rtems_termios_refill_transmitter+0x82><== NOT EXECUTED
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
107fb8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107fbe: 83 e0 03 and $0x3,%eax
107fc1: 83 f8 02 cmp $0x2,%eax
107fc4: 75 37 jne 107ffd <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,
107fc6: 51 push %ecx <== NOT EXECUTED
107fc7: 6a 01 push $0x1 <== NOT EXECUTED
107fc9: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED
107fcc: 50 push %eax <== NOT EXECUTED
107fcd: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
107fd0: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
107fd6: 9c pushf <== NOT EXECUTED
107fd7: fa cli <== NOT EXECUTED
107fd8: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
107fd9: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
107fdf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107fe5: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
107fe8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
107fee: 52 push %edx <== NOT EXECUTED
107fef: 9d popf <== NOT EXECUTED
107ff0: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
107ff5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107ff8: e9 2f 01 00 00 jmp 10812c <rtems_termios_refill_transmitter+0x1be><== NOT EXECUTED
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
107ffd: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
108003: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
108009: 39 c2 cmp %eax,%edx
10800b: 75 1f jne 10802c <rtems_termios_refill_transmitter+0xbe><== ALWAYS TAKEN
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
10800d: 31 f6 xor %esi,%esi <== NOT EXECUTED
10800f: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) <== NOT EXECUTED
108016: 0f 85 10 01 00 00 jne 10812c <rtems_termios_refill_transmitter+0x1be><== NOT EXECUTED
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
10801c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10801f: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED
108025: e8 ae 20 00 00 call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
10802a: eb c9 jmp 107ff5 <rtems_termios_refill_transmitter+0x87><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
10802c: 9c pushf
10802d: fa cli
10802e: 58 pop %eax
len = tty->t_dqlen;
10802f: 8b 8b 90 00 00 00 mov 0x90(%ebx),%ecx
tty->t_dqlen = 0;
108035: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx)
10803c: 00 00 00
rtems_interrupt_enable(level);
10803f: 50 push %eax
108040: 9d popf
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
108041: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
108047: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi
10804d: 8d 04 01 lea (%ecx,%eax,1),%eax
108050: 31 d2 xor %edx,%edx
108052: f7 f6 div %esi
108054: 89 d7 mov %edx,%edi
tty->rawOutBuf.Tail = newTail;
108056: 89 93 84 00 00 00 mov %edx,0x84(%ebx)
if (tty->rawOutBufState == rob_wait) {
10805c: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
108063: 75 11 jne 108076 <rtems_termios_refill_transmitter+0x108>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
108065: 83 ec 0c sub $0xc,%esp
108068: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10806e: e8 65 20 00 00 call 10a0d8 <rtems_semaphore_release>
108073: 83 c4 10 add $0x10,%esp
}
if (newTail == tty->rawOutBuf.Head) {
108076: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
10807c: 39 c7 cmp %eax,%edi
10807e: 75 2a jne 1080aa <rtems_termios_refill_transmitter+0x13c>
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
108080: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
108087: 00 00 00
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
10808a: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax
108090: 31 f6 xor %esi,%esi
108092: 85 c0 test %eax,%eax
108094: 0f 84 8c 00 00 00 je 108126 <rtems_termios_refill_transmitter+0x1b8><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
10809a: 52 push %edx <== NOT EXECUTED
10809b: 52 push %edx <== NOT EXECUTED
10809c: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED
1080a2: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
1080a5: 52 push %edx <== NOT EXECUTED
1080a6: ff d0 call *%eax <== NOT EXECUTED
1080a8: eb 79 jmp 108123 <rtems_termios_refill_transmitter+0x1b5><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
1080aa: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1080b0: 25 10 02 00 00 and $0x210,%eax
1080b5: 3d 10 02 00 00 cmp $0x210,%eax
1080ba: 75 22 jne 1080de <rtems_termios_refill_transmitter+0x170><== 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);
1080bc: 9c pushf <== NOT EXECUTED
1080bd: fa cli <== NOT EXECUTED
1080be: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
1080bf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1080c5: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
1080c8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
1080ce: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED
1080d5: 00 00 00
rtems_interrupt_enable(level);
1080d8: 52 push %edx <== NOT EXECUTED
1080d9: 9d popf <== NOT EXECUTED
1080da: 31 f6 xor %esi,%esi <== NOT EXECUTED
1080dc: eb 48 jmp 108126 <rtems_termios_refill_transmitter+0x1b8><== NOT EXECUTED
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
1080de: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
1080e4: 39 c7 cmp %eax,%edi
1080e6: 76 08 jbe 1080f0 <rtems_termios_refill_transmitter+0x182>
nToSend = tty->rawOutBuf.Size - newTail;
1080e8: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi
1080ee: eb 06 jmp 1080f6 <rtems_termios_refill_transmitter+0x188>
else
nToSend = tty->rawOutBuf.Head - newTail;
1080f0: 8b b3 80 00 00 00 mov 0x80(%ebx),%esi
1080f6: 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)) {
1080f8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1080fe: f6 c4 06 test $0x6,%ah
108101: 74 05 je 108108 <rtems_termios_refill_transmitter+0x19a><== ALWAYS TAKEN
108103: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
108108: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
10810f: 00 00 00
(*tty->device.write)(tty->minor,
108112: 50 push %eax
108113: 56 push %esi
108114: 8b 43 7c mov 0x7c(%ebx),%eax
108117: 01 f8 add %edi,%eax
108119: 50 push %eax
10811a: ff 73 10 pushl 0x10(%ebx)
10811d: ff 93 a4 00 00 00 call *0xa4(%ebx)
108123: 83 c4 10 add $0x10,%esp
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
108126: 89 bb 84 00 00 00 mov %edi,0x84(%ebx)
}
return nToSend;
}
10812c: 89 f0 mov %esi,%eax
10812e: 8d 65 f4 lea -0xc(%ebp),%esp
108131: 5b pop %ebx
108132: 5e pop %esi
108133: 5f pop %edi
108134: c9 leave
108135: c3 ret
001096c3 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
1096c3: 55 push %ebp <== NOT EXECUTED
1096c4: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1096c6: 57 push %edi <== NOT EXECUTED
1096c7: 56 push %esi <== NOT EXECUTED
1096c8: 53 push %ebx <== NOT EXECUTED
1096c9: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
1096cc: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
1096cf: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters (
1096d2: 8d 75 e7 lea -0x19(%ebp),%esi <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
1096d5: 57 push %edi <== NOT EXECUTED
1096d6: 6a 00 push $0x0 <== NOT EXECUTED
1096d8: 6a 02 push $0x2 <== NOT EXECUTED
1096da: 6a 03 push $0x3 <== NOT EXECUTED
1096dc: e8 3f 03 00 00 call 109a20 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
1096e1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1096e4: f6 45 e0 01 testb $0x1,-0x20(%ebp) <== NOT EXECUTED
1096e8: 74 16 je 109700 <rtems_termios_rxdaemon+0x3d><== NOT EXECUTED
tty->rxTaskId = 0;
1096ea: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED
1096f1: 00 00 00
rtems_task_delete(RTEMS_SELF);
1096f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1096f7: 6a 00 push $0x0 <== NOT EXECUTED
1096f9: e8 9a 0b 00 00 call 10a298 <rtems_task_delete> <== NOT EXECUTED
1096fe: eb 21 jmp 109721 <rtems_termios_rxdaemon+0x5e><== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
109700: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109703: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
109706: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED
if (c != EOF) {
10970c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10970f: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
109712: 74 c1 je 1096d5 <rtems_termios_rxdaemon+0x12><== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
109714: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
109717: 50 push %eax <== NOT EXECUTED
109718: 6a 01 push $0x1 <== NOT EXECUTED
10971a: 56 push %esi <== NOT EXECUTED
10971b: 53 push %ebx <== NOT EXECUTED
10971c: e8 7a ea ff ff call 10819b <rtems_termios_enqueue_raw_characters><== NOT EXECUTED
109721: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109724: eb af jmp 1096d5 <rtems_termios_rxdaemon+0x12><== NOT EXECUTED
00107f53 <rtems_termios_rxirq_occured>:
* signal receive interrupt to rx daemon
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
*/
void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty)
{
107f53: 55 push %ebp <== NOT EXECUTED
107f54: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107f56: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
/*
* send event to rx daemon task
*/
rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT);
107f59: 6a 02 push $0x2 <== NOT EXECUTED
107f5b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
107f5e: ff b0 c4 00 00 00 pushl 0xc4(%eax) <== NOT EXECUTED
107f64: e8 17 1c 00 00 call 109b80 <rtems_event_send> <== NOT EXECUTED
107f69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
107f6c: c9 leave <== NOT EXECUTED
107f6d: c3 ret <== NOT EXECUTED
00109660 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
109660: 55 push %ebp <== NOT EXECUTED
109661: 89 e5 mov %esp,%ebp <== NOT EXECUTED
109663: 56 push %esi <== NOT EXECUTED
109664: 53 push %ebx <== NOT EXECUTED
109665: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
109668: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
10966b: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED
10966e: 56 push %esi <== NOT EXECUTED
10966f: 6a 00 push $0x0 <== NOT EXECUTED
109671: 6a 02 push $0x2 <== NOT EXECUTED
109673: 6a 03 push $0x3 <== NOT EXECUTED
109675: e8 a6 03 00 00 call 109a20 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
10967a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10967d: f6 45 f4 01 testb $0x1,-0xc(%ebp) <== NOT EXECUTED
109681: 74 16 je 109699 <rtems_termios_txdaemon+0x39><== NOT EXECUTED
tty->txTaskId = 0;
109683: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED
10968a: 00 00 00
rtems_task_delete(RTEMS_SELF);
10968d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109690: 6a 00 push $0x0 <== NOT EXECUTED
109692: e8 01 0c 00 00 call 10a298 <rtems_task_delete> <== NOT EXECUTED
109697: eb 25 jmp 1096be <rtems_termios_txdaemon+0x5e><== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
109699: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
10969f: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
1096a2: 8b 80 9c 3d 12 00 mov 0x123d9c(%eax),%eax <== NOT EXECUTED
1096a8: 85 c0 test %eax,%eax <== NOT EXECUTED
1096aa: 74 09 je 1096b5 <rtems_termios_txdaemon+0x55><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
1096ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1096af: 53 push %ebx <== NOT EXECUTED
1096b0: ff d0 call *%eax <== NOT EXECUTED
1096b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
1096b5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1096b8: 53 push %ebx <== NOT EXECUTED
1096b9: e8 b0 e8 ff ff call 107f6e <rtems_termios_refill_transmitter><== NOT EXECUTED
1096be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1096c1: eb ab jmp 10966e <rtems_termios_txdaemon+0xe><== NOT EXECUTED
0010899b <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
10899b: 55 push %ebp
10899c: 89 e5 mov %esp,%ebp
10899e: 57 push %edi
10899f: 56 push %esi
1089a0: 53 push %ebx
1089a1: 83 ec 20 sub $0x20,%esp
1089a4: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
1089a7: 8b 03 mov (%ebx),%eax
1089a9: 8b 70 34 mov 0x34(%eax),%esi
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
1089ac: 6a 00 push $0x0
1089ae: 6a 00 push $0x0
1089b0: ff 76 18 pushl 0x18(%esi)
1089b3: e8 34 16 00 00 call 109fec <rtems_semaphore_obtain>
1089b8: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL)
1089ba: 83 c4 10 add $0x10,%esp
1089bd: 85 c0 test %eax,%eax
1089bf: 75 77 jne 108a38 <rtems_termios_write+0x9d><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
1089c1: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
1089c7: c1 e0 05 shl $0x5,%eax
1089ca: 8b 80 94 3d 12 00 mov 0x123d94(%eax),%eax
1089d0: 85 c0 test %eax,%eax
1089d2: 74 0b je 1089df <rtems_termios_write+0x44><== ALWAYS TAKEN
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
1089d4: 57 push %edi <== NOT EXECUTED
1089d5: 57 push %edi <== NOT EXECUTED
1089d6: 53 push %ebx <== NOT EXECUTED
1089d7: 56 push %esi <== NOT EXECUTED
1089d8: ff d0 call *%eax <== NOT EXECUTED
1089da: 89 c7 mov %eax,%edi <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
1089dc: 5b pop %ebx <== NOT EXECUTED
1089dd: eb 4e jmp 108a2d <rtems_termios_write+0x92><== NOT EXECUTED
return sc;
}
if (tty->termios.c_oflag & OPOST) {
1089df: f6 46 34 01 testb $0x1,0x34(%esi)
1089e3: 74 2f je 108a14 <rtems_termios_write+0x79><== NEVER TAKEN
uint32_t count = args->count;
1089e5: 8b 4b 10 mov 0x10(%ebx),%ecx
char *buffer = args->buffer;
1089e8: 8b 43 0c mov 0xc(%ebx),%eax
1089eb: 89 45 e4 mov %eax,-0x1c(%ebp)
while (count--)
1089ee: eb 18 jmp 108a08 <rtems_termios_write+0x6d>
oproc (*buffer++, tty);
1089f0: 8b 55 e4 mov -0x1c(%ebp),%edx
1089f3: 0f b6 02 movzbl (%edx),%eax
1089f6: 42 inc %edx
1089f7: 89 55 e4 mov %edx,-0x1c(%ebp)
1089fa: 89 f2 mov %esi,%edx
1089fc: 89 4d e0 mov %ecx,-0x20(%ebp)
1089ff: e8 3d fb ff ff call 108541 <oproc>
108a04: 8b 4d e0 mov -0x20(%ebp),%ecx
108a07: 49 dec %ecx
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
108a08: 85 c9 test %ecx,%ecx
108a0a: 75 e4 jne 1089f0 <rtems_termios_write+0x55>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
108a0c: 8b 43 10 mov 0x10(%ebx),%eax
108a0f: 89 43 18 mov %eax,0x18(%ebx)
108a12: eb 16 jmp 108a2a <rtems_termios_write+0x8f>
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
108a14: 51 push %ecx <== NOT EXECUTED
108a15: 56 push %esi <== NOT EXECUTED
108a16: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108a19: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
108a1c: e8 00 fa ff ff call 108421 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
108a21: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
108a24: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED
108a27: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_semaphore_release (tty->osem);
108a2a: 83 ec 0c sub $0xc,%esp
108a2d: ff 76 18 pushl 0x18(%esi)
108a30: e8 a3 16 00 00 call 10a0d8 <rtems_semaphore_release>
return sc;
108a35: 83 c4 10 add $0x10,%esp
}
108a38: 89 f8 mov %edi,%eax
108a3a: 8d 65 f4 lea -0xc(%ebp),%esp
108a3d: 5b pop %ebx
108a3e: 5e pop %esi
108a3f: 5f pop %edi
108a40: c9 leave
108a41: c3 ret
00116500 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
116500: 55 push %ebp
116501: 89 e5 mov %esp,%ebp
116503: 83 ec 1c sub $0x1c,%esp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
116506: 8d 45 f4 lea -0xc(%ebp),%eax
116509: 50 push %eax
11650a: ff 75 08 pushl 0x8(%ebp)
11650d: 68 34 ef 13 00 push $0x13ef34
116512: e8 59 25 00 00 call 118a70 <_Objects_Get>
116517: 89 c2 mov %eax,%edx
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
116519: 83 c4 10 add $0x10,%esp
11651c: b8 04 00 00 00 mov $0x4,%eax
116521: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
116525: 75 1c jne 116543 <rtems_timer_cancel+0x43>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
116527: 83 7a 38 04 cmpl $0x4,0x38(%edx)
11652b: 74 0f je 11653c <rtems_timer_cancel+0x3c><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
11652d: 83 ec 0c sub $0xc,%esp
116530: 83 c2 10 add $0x10,%edx
116533: 52 push %edx
116534: e8 13 40 00 00 call 11a54c <_Watchdog_Remove>
116539: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
11653c: e8 94 2d 00 00 call 1192d5 <_Thread_Enable_dispatch>
116541: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116543: c9 leave
116544: c3 ret
00116968 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
116968: 55 push %ebp
116969: 89 e5 mov %esp,%ebp
11696b: 57 push %edi
11696c: 56 push %esi
11696d: 53 push %ebx
11696e: 83 ec 1c sub $0x1c,%esp
116971: 8b 5d 0c mov 0xc(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
116974: 8b 35 74 ef 13 00 mov 0x13ef74,%esi
if ( !timer_server )
11697a: b8 0e 00 00 00 mov $0xe,%eax
11697f: 85 f6 test %esi,%esi
116981: 0f 84 b4 00 00 00 je 116a3b <rtems_timer_server_fire_when+0xd3>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
116987: b0 0b mov $0xb,%al
116989: 80 3d fc e5 13 00 00 cmpb $0x0,0x13e5fc
116990: 0f 84 a5 00 00 00 je 116a3b <rtems_timer_server_fire_when+0xd3><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
116996: b0 09 mov $0x9,%al
116998: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
11699c: 0f 84 99 00 00 00 je 116a3b <rtems_timer_server_fire_when+0xd3>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
1169a2: 83 ec 0c sub $0xc,%esp
1169a5: 53 push %ebx
1169a6: e8 61 d6 ff ff call 11400c <_TOD_Validate>
1169ab: 83 c4 10 add $0x10,%esp
1169ae: 84 c0 test %al,%al
1169b0: 0f 84 80 00 00 00 je 116a36 <rtems_timer_server_fire_when+0xce>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
1169b6: 83 ec 0c sub $0xc,%esp
1169b9: 53 push %ebx
1169ba: e8 e5 d5 ff ff call 113fa4 <_TOD_To_seconds>
1169bf: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
1169c1: 83 c4 10 add $0x10,%esp
1169c4: 3b 05 78 e6 13 00 cmp 0x13e678,%eax
1169ca: 76 6a jbe 116a36 <rtems_timer_server_fire_when+0xce>
1169cc: 51 push %ecx
1169cd: 8d 45 e4 lea -0x1c(%ebp),%eax
1169d0: 50 push %eax
1169d1: ff 75 08 pushl 0x8(%ebp)
1169d4: 68 34 ef 13 00 push $0x13ef34
1169d9: e8 92 20 00 00 call 118a70 <_Objects_Get>
1169de: 89 c3 mov %eax,%ebx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1169e0: 83 c4 10 add $0x10,%esp
1169e3: b8 04 00 00 00 mov $0x4,%eax
1169e8: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
1169ec: 75 4d jne 116a3b <rtems_timer_server_fire_when+0xd3>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
1169ee: 83 ec 0c sub $0xc,%esp
1169f1: 8d 43 10 lea 0x10(%ebx),%eax
1169f4: 50 push %eax
1169f5: e8 52 3b 00 00 call 11a54c <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
1169fa: 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;
116a01: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_watchdog->routine = routine;
116a08: 8b 45 10 mov 0x10(%ebp),%eax
116a0b: 89 43 2c mov %eax,0x2c(%ebx)
the_watchdog->id = id;
116a0e: 8b 45 08 mov 0x8(%ebp),%eax
116a11: 89 43 30 mov %eax,0x30(%ebx)
the_watchdog->user_data = user_data;
116a14: 8b 45 14 mov 0x14(%ebp),%eax
116a17: 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();
116a1a: 2b 3d 78 e6 13 00 sub 0x13e678,%edi
116a20: 89 7b 1c mov %edi,0x1c(%ebx)
(*timer_server->schedule_operation)( timer_server, the_timer );
116a23: 58 pop %eax
116a24: 5a pop %edx
116a25: 53 push %ebx
116a26: 56 push %esi
116a27: ff 56 04 call *0x4(%esi)
_Thread_Enable_dispatch();
116a2a: e8 a6 28 00 00 call 1192d5 <_Thread_Enable_dispatch>
116a2f: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
116a31: 83 c4 10 add $0x10,%esp
116a34: eb 05 jmp 116a3b <rtems_timer_server_fire_when+0xd3>
116a36: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116a3b: 8d 65 f4 lea -0xc(%ebp),%esp
116a3e: 5b pop %ebx
116a3f: 5e pop %esi
116a40: 5f pop %edi
116a41: c9 leave
116a42: c3 ret
0010b549 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
10b549: 55 push %ebp <== NOT EXECUTED
10b54a: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10b54c: 57 push %edi <== NOT EXECUTED
10b54d: 56 push %esi <== NOT EXECUTED
10b54e: 53 push %ebx <== NOT EXECUTED
10b54f: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
10b552: 89 c3 mov %eax,%ebx <== NOT EXECUTED
10b554: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
10b557: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
10b55a: 25 00 00 00 20 and $0x20000000,%eax <== NOT EXECUTED
10b55f: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
10b562: 74 2a je 10b58e <rtems_verror+0x45> <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
10b564: a1 90 c2 12 00 mov 0x12c290,%eax <== NOT EXECUTED
10b569: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
10b56c: 89 15 90 c2 12 00 mov %edx,0x12c290 <== NOT EXECUTED
10b572: 85 c0 test %eax,%eax <== NOT EXECUTED
10b574: 74 0b je 10b581 <rtems_verror+0x38> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b576: a1 f0 c3 12 00 mov 0x12c3f0,%eax <== NOT EXECUTED
10b57b: 40 inc %eax <== NOT EXECUTED
10b57c: a3 f0 c3 12 00 mov %eax,0x12c3f0 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
10b581: 83 3d 90 c2 12 00 02 cmpl $0x2,0x12c290 <== NOT EXECUTED
10b588: 0f 8f 1b 01 00 00 jg 10b6a9 <rtems_verror+0x160> <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
10b58e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b591: a1 20 a1 12 00 mov 0x12a120,%eax <== NOT EXECUTED
10b596: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10b599: e8 ae bc 00 00 call 11724c <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
10b59e: 89 df mov %ebx,%edi <== NOT EXECUTED
10b5a0: 81 e7 ff ff ff 8f and $0x8fffffff,%edi <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
10b5a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b5a9: 31 f6 xor %esi,%esi <== NOT EXECUTED
10b5ab: f7 c3 00 00 00 40 test $0x40000000,%ebx <== NOT EXECUTED
10b5b1: 74 07 je 10b5ba <rtems_verror+0x71> <== NOT EXECUTED
local_errno = errno;
10b5b3: e8 18 b9 00 00 call 116ed0 <__errno> <== NOT EXECUTED
10b5b8: 8b 30 mov (%eax),%esi <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
10b5ba: 52 push %edx <== NOT EXECUTED
10b5bb: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
10b5be: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
10b5c1: a1 20 a1 12 00 mov 0x12a120,%eax <== NOT EXECUTED
10b5c6: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10b5c9: e8 5a 18 01 00 call 11ce28 <vfprintf> <== NOT EXECUTED
10b5ce: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
if (status)
10b5d1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b5d4: 85 ff test %edi,%edi <== NOT EXECUTED
10b5d6: 74 25 je 10b5fd <rtems_verror+0xb4> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
10b5d8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b5db: 57 push %edi <== NOT EXECUTED
10b5dc: e8 53 ff ff ff call 10b534 <rtems_status_text> <== NOT EXECUTED
10b5e1: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10b5e4: 50 push %eax <== NOT EXECUTED
10b5e5: 68 77 4d 12 00 push $0x124d77 <== NOT EXECUTED
10b5ea: a1 20 a1 12 00 mov 0x12a120,%eax <== NOT EXECUTED
10b5ef: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10b5f2: e8 9d bf 00 00 call 117594 <fprintf> <== NOT EXECUTED
10b5f7: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED
10b5fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (local_errno)
10b5fd: 83 fe 00 cmp $0x0,%esi <== NOT EXECUTED
10b600: 74 41 je 10b643 <rtems_verror+0xfa> <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
10b602: 7e 25 jle 10b629 <rtems_verror+0xe0> <== NOT EXECUTED
10b604: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b607: 56 push %esi <== NOT EXECUTED
10b608: e8 57 c7 00 00 call 117d64 <strerror> <== NOT EXECUTED
10b60d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b610: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED
10b613: 74 14 je 10b629 <rtems_verror+0xe0> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
10b615: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b618: 56 push %esi <== NOT EXECUTED
10b619: e8 46 c7 00 00 call 117d64 <strerror> <== NOT EXECUTED
10b61e: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10b621: 50 push %eax <== NOT EXECUTED
10b622: 68 85 4d 12 00 push $0x124d85 <== NOT EXECUTED
10b627: eb 07 jmp 10b630 <rtems_verror+0xe7> <== NOT EXECUTED
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
10b629: 50 push %eax <== NOT EXECUTED
10b62a: 56 push %esi <== NOT EXECUTED
10b62b: 68 92 4d 12 00 push $0x124d92 <== NOT EXECUTED
10b630: a1 20 a1 12 00 mov 0x12a120,%eax <== NOT EXECUTED
10b635: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10b638: e8 57 bf 00 00 call 117594 <fprintf> <== NOT EXECUTED
10b63d: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED
10b640: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
10b643: 57 push %edi <== NOT EXECUTED
10b644: 57 push %edi <== NOT EXECUTED
10b645: 68 60 54 12 00 push $0x125460 <== NOT EXECUTED
10b64a: a1 20 a1 12 00 mov 0x12a120,%eax <== NOT EXECUTED
10b64f: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10b652: e8 3d bf 00 00 call 117594 <fprintf> <== NOT EXECUTED
10b657: 89 c7 mov %eax,%edi <== NOT EXECUTED
(void) fflush(stderr);
10b659: 59 pop %ecx <== NOT EXECUTED
10b65a: a1 20 a1 12 00 mov 0x12a120,%eax <== NOT EXECUTED
10b65f: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10b662: e8 e5 bb 00 00 call 11724c <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
10b667: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b66a: 81 e3 00 00 00 30 and $0x30000000,%ebx <== NOT EXECUTED
10b670: 75 08 jne 10b67a <rtems_verror+0x131> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
10b672: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
10b675: 8d 04 17 lea (%edi,%edx,1),%eax <== NOT EXECUTED
10b678: eb 31 jmp 10b6ab <rtems_verror+0x162> <== NOT EXECUTED
(void) fflush(stderr);
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
{
if (error_flag & RTEMS_ERROR_PANIC)
10b67a: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED
10b67e: 74 16 je 10b696 <rtems_verror+0x14d> <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
10b680: 52 push %edx <== NOT EXECUTED
10b681: 52 push %edx <== NOT EXECUTED
10b682: 68 a6 4d 12 00 push $0x124da6 <== NOT EXECUTED
10b687: 6a 00 push $0x0 <== NOT EXECUTED
10b689: e8 3d 00 00 00 call 10b6cb <rtems_error> <== NOT EXECUTED
_exit(local_errno);
10b68e: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
10b691: e8 26 09 00 00 call 10bfbc <_exit> <== NOT EXECUTED
}
else
{
rtems_error(0, "fatal error, aborting");
10b696: 50 push %eax <== NOT EXECUTED
10b697: 50 push %eax <== NOT EXECUTED
10b698: 68 bb 4d 12 00 push $0x124dbb <== NOT EXECUTED
10b69d: 6a 00 push $0x0 <== NOT EXECUTED
10b69f: e8 27 00 00 00 call 10b6cb <rtems_error> <== NOT EXECUTED
abort();
10b6a4: e8 f3 b7 00 00 call 116e9c <abort> <== NOT EXECUTED
10b6a9: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
}
return chars_written;
}
10b6ab: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10b6ae: 5b pop %ebx <== NOT EXECUTED
10b6af: 5e pop %esi <== NOT EXECUTED
10b6b0: 5f pop %edi <== NOT EXECUTED
10b6b1: c9 leave <== NOT EXECUTED
10b6b2: c3 ret <== NOT EXECUTED
0010789e <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
10789e: 55 push %ebp
10789f: 89 e5 mov %esp,%ebp
1078a1: 57 push %edi
1078a2: 56 push %esi
1078a3: 53 push %ebx
1078a4: 83 ec 3c sub $0x3c,%esp
1078a7: 89 c3 mov %eax,%ebx
1078a9: 89 55 e0 mov %edx,-0x20(%ebp)
1078ac: 31 f6 xor %esi,%esi
1078ae: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp)
1078b5: 31 ff xor %edi,%edi
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
1078b7: 89 7d c4 mov %edi,-0x3c(%ebp)
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
1078ba: 8b 43 04 mov 0x4(%ebx),%eax
1078bd: 48 dec %eax
1078be: 89 43 04 mov %eax,0x4(%ebx)
1078c1: 85 c0 test %eax,%eax
1078c3: 79 15 jns 1078da <scanInt+0x3c> <== ALWAYS TAKEN
1078c5: 50 push %eax <== NOT EXECUTED
1078c6: 50 push %eax <== NOT EXECUTED
1078c7: 53 push %ebx <== NOT EXECUTED
1078c8: ff 35 20 50 12 00 pushl 0x125020 <== NOT EXECUTED
1078ce: e8 75 d0 00 00 call 114948 <__srget_r> <== NOT EXECUTED
1078d3: 89 c1 mov %eax,%ecx <== NOT EXECUTED
1078d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1078d8: eb 08 jmp 1078e2 <scanInt+0x44> <== NOT EXECUTED
1078da: 8b 03 mov (%ebx),%eax
1078dc: 0f b6 08 movzbl (%eax),%ecx
1078df: 40 inc %eax
1078e0: 89 03 mov %eax,(%ebx)
if (c == ':')
1078e2: 83 f9 3a cmp $0x3a,%ecx
1078e5: 74 4a je 107931 <scanInt+0x93>
break;
if (sign == 0) {
1078e7: 85 f6 test %esi,%esi
1078e9: 75 11 jne 1078fc <scanInt+0x5e> <== NEVER TAKEN
if (c == '-') {
sign = -1;
limit++;
continue;
1078eb: 66 be 01 00 mov $0x1,%si
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
1078ef: 83 f9 2d cmp $0x2d,%ecx
1078f2: 75 08 jne 1078fc <scanInt+0x5e> <== ALWAYS TAKEN
sign = -1;
limit++;
1078f4: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED
1078f7: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
continue;
1078fa: eb be jmp 1078ba <scanInt+0x1c> <== NOT EXECUTED
}
sign = 1;
}
if (!isdigit(c))
1078fc: a1 08 50 12 00 mov 0x125008,%eax
107901: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1)
107906: 74 3f je 107947 <scanInt+0xa9> <== NEVER TAKEN
return 0;
d = c - '0';
if ((i > (limit / 10))
107908: 8b 45 e4 mov -0x1c(%ebp),%eax
10790b: bf 0a 00 00 00 mov $0xa,%edi
107910: 31 d2 xor %edx,%edx
107912: f7 f7 div %edi
107914: 89 55 d4 mov %edx,-0x2c(%ebp)
107917: 39 45 c4 cmp %eax,-0x3c(%ebp)
10791a: 77 2b ja 107947 <scanInt+0xa9> <== NEVER TAKEN
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
10791c: 83 e9 30 sub $0x30,%ecx
if ((i > (limit / 10))
10791f: 39 45 c4 cmp %eax,-0x3c(%ebp)
107922: 75 04 jne 107928 <scanInt+0x8a> <== ALWAYS TAKEN
107924: 39 d1 cmp %edx,%ecx <== NOT EXECUTED
107926: 77 1f ja 107947 <scanInt+0xa9> <== NOT EXECUTED
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
107928: 6b 7d c4 0a imul $0xa,-0x3c(%ebp),%edi
10792c: 8d 3c 39 lea (%ecx,%edi,1),%edi
10792f: eb 86 jmp 1078b7 <scanInt+0x19>
107931: 8b 7d c4 mov -0x3c(%ebp),%edi
}
if (sign == 0)
107934: 85 f6 test %esi,%esi
107936: 74 0f je 107947 <scanInt+0xa9> <== NEVER TAKEN
return 0;
*val = i * sign;
107938: 0f af f7 imul %edi,%esi
10793b: 8b 45 e0 mov -0x20(%ebp),%eax
10793e: 89 30 mov %esi,(%eax)
107940: b8 01 00 00 00 mov $0x1,%eax
return 1;
107945: eb 02 jmp 107949 <scanInt+0xab>
107947: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
107949: 8d 65 f4 lea -0xc(%ebp),%esp
10794c: 5b pop %ebx
10794d: 5e pop %esi
10794e: 5f pop %edi
10794f: c9 leave
107950: c3 ret
00107951 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
107951: 55 push %ebp
107952: 89 e5 mov %esp,%ebp
107954: 57 push %edi
107955: 56 push %esi
107956: 53 push %ebx
107957: 83 ec 1c sub $0x1c,%esp
10795a: 89 c3 mov %eax,%ebx
10795c: 89 ce mov %ecx,%esi
10795e: 8b 7d 08 mov 0x8(%ebp),%edi
107961: 8b 4d 0c mov 0xc(%ebp),%ecx
int c;
*name = *bufp;
107964: 8b 06 mov (%esi),%eax
107966: 89 02 mov %eax,(%edx)
for (;;) {
c = getc(fp);
107968: 8b 43 04 mov 0x4(%ebx),%eax
10796b: 48 dec %eax
10796c: 89 43 04 mov %eax,0x4(%ebx)
10796f: 85 c0 test %eax,%eax
107971: 79 19 jns 10798c <scanString+0x3b>
107973: 52 push %edx
107974: 52 push %edx
107975: 53 push %ebx
107976: ff 35 20 50 12 00 pushl 0x125020
10797c: 89 4d e4 mov %ecx,-0x1c(%ebp)
10797f: e8 c4 cf 00 00 call 114948 <__srget_r>
107984: 83 c4 10 add $0x10,%esp
107987: 8b 4d e4 mov -0x1c(%ebp),%ecx
10798a: eb 08 jmp 107994 <scanString+0x43>
10798c: 8b 13 mov (%ebx),%edx
10798e: 0f b6 02 movzbl (%edx),%eax
107991: 42 inc %edx
107992: 89 13 mov %edx,(%ebx)
if (c == ':') {
107994: 83 f8 3a cmp $0x3a,%eax
107997: 75 06 jne 10799f <scanString+0x4e>
if (nlFlag)
107999: 85 c9 test %ecx,%ecx
10799b: 74 21 je 1079be <scanString+0x6d> <== ALWAYS TAKEN
10799d: eb 2f jmp 1079ce <scanString+0x7d> <== NOT EXECUTED
return 0;
break;
}
if (c == '\n') {
10799f: 83 f8 0a cmp $0xa,%eax
1079a2: 75 06 jne 1079aa <scanString+0x59>
if (!nlFlag)
1079a4: 85 c9 test %ecx,%ecx
1079a6: 75 16 jne 1079be <scanString+0x6d> <== ALWAYS TAKEN
1079a8: eb 24 jmp 1079ce <scanString+0x7d> <== NOT EXECUTED
return 0;
break;
}
if (c == EOF)
1079aa: 83 f8 ff cmp $0xffffffff,%eax
1079ad: 74 1f je 1079ce <scanString+0x7d> <== NEVER TAKEN
return 0;
if (*nleft < 2)
1079af: 83 3f 01 cmpl $0x1,(%edi)
1079b2: 76 1a jbe 1079ce <scanString+0x7d> <== NEVER TAKEN
return 0;
**bufp = c;
1079b4: 8b 16 mov (%esi),%edx
1079b6: 88 02 mov %al,(%edx)
++(*bufp);
1079b8: ff 06 incl (%esi)
--(*nleft);
1079ba: ff 0f decl (%edi)
}
1079bc: eb aa jmp 107968 <scanString+0x17>
**bufp = '\0';
1079be: 8b 06 mov (%esi),%eax
1079c0: c6 00 00 movb $0x0,(%eax)
++(*bufp);
1079c3: ff 06 incl (%esi)
--(*nleft);
1079c5: ff 0f decl (%edi)
1079c7: b8 01 00 00 00 mov $0x1,%eax
return 1;
1079cc: eb 02 jmp 1079d0 <scanString+0x7f>
1079ce: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
1079d0: 8d 65 f4 lea -0xc(%ebp),%esp
1079d3: 5b pop %ebx
1079d4: 5e pop %esi
1079d5: 5f pop %edi
1079d6: c9 leave
1079d7: c3 ret
001079d8 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
1079d8: 55 push %ebp
1079d9: 89 e5 mov %esp,%ebp
1079db: 57 push %edi
1079dc: 56 push %esi
1079dd: 53 push %ebx
1079de: 83 ec 34 sub $0x34,%esp
1079e1: 89 c6 mov %eax,%esi
1079e3: 89 d3 mov %edx,%ebx
1079e5: 89 4d d4 mov %ecx,-0x2c(%ebp)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
1079e8: 8d 7d d4 lea -0x2c(%ebp),%edi
1079eb: 6a 00 push $0x0
1079ed: 8d 45 08 lea 0x8(%ebp),%eax
1079f0: 50 push %eax
1079f1: 89 f9 mov %edi,%ecx
1079f3: 89 f0 mov %esi,%eax
1079f5: e8 57 ff ff ff call 107951 <scanString>
1079fa: 83 c4 10 add $0x10,%esp
1079fd: 85 c0 test %eax,%eax
1079ff: 0f 84 c8 00 00 00 je 107acd <scangr+0xf5> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
107a05: 50 push %eax
107a06: 50 push %eax
107a07: 8d 53 04 lea 0x4(%ebx),%edx
107a0a: 6a 00 push $0x0
107a0c: 8d 45 08 lea 0x8(%ebp),%eax
107a0f: 50 push %eax
107a10: 89 f9 mov %edi,%ecx
107a12: 89 f0 mov %esi,%eax
107a14: e8 38 ff ff ff call 107951 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
107a19: 83 c4 10 add $0x10,%esp
107a1c: 85 c0 test %eax,%eax
107a1e: 0f 84 a9 00 00 00 je 107acd <scangr+0xf5> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
107a24: 8d 55 e4 lea -0x1c(%ebp),%edx
107a27: 89 f0 mov %esi,%eax
107a29: e8 70 fe ff ff call 10789e <scanInt>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
107a2e: 85 c0 test %eax,%eax
107a30: 0f 84 97 00 00 00 je 107acd <scangr+0xf5> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
107a36: 51 push %ecx
107a37: 51 push %ecx
107a38: 8d 55 e0 lea -0x20(%ebp),%edx
107a3b: 6a 01 push $0x1
107a3d: 8d 45 08 lea 0x8(%ebp),%eax
107a40: 50 push %eax
107a41: 89 f9 mov %edi,%ecx
107a43: 89 f0 mov %esi,%eax
107a45: e8 07 ff ff ff call 107951 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
107a4a: 83 c4 10 add $0x10,%esp
107a4d: 85 c0 test %eax,%eax
107a4f: 74 7c je 107acd <scangr+0xf5> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
107a51: 8b 45 e4 mov -0x1c(%ebp),%eax
107a54: 66 89 43 08 mov %ax,0x8(%ebx)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
107a58: 8b 7d e0 mov -0x20(%ebp),%edi
107a5b: 89 fa mov %edi,%edx
107a5d: b8 01 00 00 00 mov $0x1,%eax
107a62: eb 12 jmp 107a76 <scangr+0x9e>
if(*cp == ',')
memcount++;
107a64: 80 7d d3 2c cmpb $0x2c,-0x2d(%ebp)
107a68: 0f 94 c1 sete %cl
107a6b: 89 ce mov %ecx,%esi
107a6d: 81 e6 ff 00 00 00 and $0xff,%esi
107a73: 01 f0 add %esi,%eax
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
107a75: 42 inc %edx
107a76: 8a 0a mov (%edx),%cl
107a78: 88 4d d3 mov %cl,-0x2d(%ebp)
107a7b: 84 c9 test %cl,%cl
107a7d: 75 e5 jne 107a64 <scangr+0x8c>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
107a7f: 8d 04 85 13 00 00 00 lea 0x13(,%eax,4),%eax
107a86: 39 45 08 cmp %eax,0x8(%ebp)
107a89: 72 42 jb 107acd <scangr+0xf5> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
107a8b: 8b 45 d4 mov -0x2c(%ebp),%eax
107a8e: 83 c0 0f add $0xf,%eax
107a91: 83 e0 f0 and $0xfffffff0,%eax
107a94: 89 43 0c mov %eax,0xc(%ebx)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
107a97: 89 38 mov %edi,(%eax)
107a99: 8b 45 e0 mov -0x20(%ebp),%eax
107a9c: 40 inc %eax
107a9d: ba 01 00 00 00 mov $0x1,%edx
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
107aa2: eb 11 jmp 107ab5 <scangr+0xdd>
if(*cp == ',') {
107aa4: 80 f9 2c cmp $0x2c,%cl
107aa7: 75 0b jne 107ab4 <scangr+0xdc> <== ALWAYS TAKEN
*cp = '\0';
107aa9: c6 40 ff 00 movb $0x0,-0x1(%eax) <== NOT EXECUTED
grp->gr_mem[memcount++] = cp + 1;
107aad: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED
107ab0: 89 04 91 mov %eax,(%ecx,%edx,4) <== NOT EXECUTED
107ab3: 42 inc %edx <== NOT EXECUTED
107ab4: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
107ab5: 8a 48 ff mov -0x1(%eax),%cl
107ab8: 84 c9 test %cl,%cl
107aba: 75 e8 jne 107aa4 <scangr+0xcc>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
107abc: 8b 43 0c mov 0xc(%ebx),%eax
107abf: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
107ac6: b8 01 00 00 00 mov $0x1,%eax
return 1;
107acb: eb 02 jmp 107acf <scangr+0xf7>
107acd: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
107acf: 8d 65 f4 lea -0xc(%ebp),%esp
107ad2: 5b pop %ebx
107ad3: 5e pop %esi
107ad4: 5f pop %edi
107ad5: c9 leave
107ad6: c3 ret
00107b0f <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
107b0f: 55 push %ebp
107b10: 89 e5 mov %esp,%ebp
107b12: 57 push %edi
107b13: 56 push %esi
107b14: 53 push %ebx
107b15: 83 ec 34 sub $0x34,%esp
107b18: 89 c6 mov %eax,%esi
107b1a: 89 d3 mov %edx,%ebx
107b1c: 89 4d d4 mov %ecx,-0x2c(%ebp)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
107b1f: 8d 7d d4 lea -0x2c(%ebp),%edi
107b22: 6a 00 push $0x0
107b24: 8d 45 08 lea 0x8(%ebp),%eax
107b27: 50 push %eax
107b28: 89 f9 mov %edi,%ecx
107b2a: 89 f0 mov %esi,%eax
107b2c: e8 20 fe ff ff call 107951 <scanString>
107b31: 83 c4 10 add $0x10,%esp
107b34: 85 c0 test %eax,%eax
107b36: 0f 84 c4 00 00 00 je 107c00 <scanpw+0xf1> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
107b3c: 51 push %ecx
107b3d: 51 push %ecx
107b3e: 8d 53 04 lea 0x4(%ebx),%edx
107b41: 6a 00 push $0x0
107b43: 8d 45 08 lea 0x8(%ebp),%eax
107b46: 50 push %eax
107b47: 89 f9 mov %edi,%ecx
107b49: 89 f0 mov %esi,%eax
107b4b: e8 01 fe ff ff call 107951 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
107b50: 83 c4 10 add $0x10,%esp
107b53: 85 c0 test %eax,%eax
107b55: 0f 84 a5 00 00 00 je 107c00 <scanpw+0xf1> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
107b5b: 8d 55 e4 lea -0x1c(%ebp),%edx
107b5e: 89 f0 mov %esi,%eax
107b60: e8 39 fd ff ff call 10789e <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
107b65: 85 c0 test %eax,%eax
107b67: 0f 84 93 00 00 00 je 107c00 <scanpw+0xf1> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
107b6d: 8d 55 e0 lea -0x20(%ebp),%edx
107b70: 89 f0 mov %esi,%eax
107b72: e8 27 fd ff ff call 10789e <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
107b77: 85 c0 test %eax,%eax
107b79: 0f 84 81 00 00 00 je 107c00 <scanpw+0xf1> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
107b7f: 52 push %edx
107b80: 52 push %edx
107b81: 8d 53 0c lea 0xc(%ebx),%edx
107b84: 6a 00 push $0x0
107b86: 8d 45 08 lea 0x8(%ebp),%eax
107b89: 50 push %eax
107b8a: 89 f9 mov %edi,%ecx
107b8c: 89 f0 mov %esi,%eax
107b8e: e8 be fd ff ff call 107951 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
107b93: 83 c4 10 add $0x10,%esp
107b96: 85 c0 test %eax,%eax
107b98: 74 66 je 107c00 <scanpw+0xf1> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
107b9a: 50 push %eax
107b9b: 50 push %eax
107b9c: 8d 53 10 lea 0x10(%ebx),%edx
107b9f: 6a 00 push $0x0
107ba1: 8d 45 08 lea 0x8(%ebp),%eax
107ba4: 50 push %eax
107ba5: 89 f9 mov %edi,%ecx
107ba7: 89 f0 mov %esi,%eax
107ba9: e8 a3 fd ff ff call 107951 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
107bae: 83 c4 10 add $0x10,%esp
107bb1: 85 c0 test %eax,%eax
107bb3: 74 4b je 107c00 <scanpw+0xf1> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !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)
107bb5: 51 push %ecx
107bb6: 51 push %ecx
107bb7: 8d 53 14 lea 0x14(%ebx),%edx
107bba: 6a 00 push $0x0
107bbc: 8d 45 08 lea 0x8(%ebp),%eax
107bbf: 50 push %eax
107bc0: 89 f9 mov %edi,%ecx
107bc2: 89 f0 mov %esi,%eax
107bc4: e8 88 fd ff ff call 107951 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
107bc9: 83 c4 10 add $0x10,%esp
107bcc: 85 c0 test %eax,%eax
107bce: 74 30 je 107c00 <scanpw+0xf1> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
|| !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))
107bd0: 52 push %edx
107bd1: 52 push %edx
107bd2: 8d 53 18 lea 0x18(%ebx),%edx
107bd5: 6a 01 push $0x1
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 6d fd ff ff call 107951 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
107be4: 83 c4 10 add $0x10,%esp
107be7: 85 c0 test %eax,%eax
107be9: 74 15 je 107c00 <scanpw+0xf1> <== NEVER TAKEN
|| !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;
pwd->pw_uid = pwuid;
107beb: 8b 45 e4 mov -0x1c(%ebp),%eax
107bee: 66 89 43 08 mov %ax,0x8(%ebx)
pwd->pw_gid = pwgid;
107bf2: 8b 45 e0 mov -0x20(%ebp),%eax
107bf5: 66 89 43 0a mov %ax,0xa(%ebx)
107bf9: b8 01 00 00 00 mov $0x1,%eax
return 1;
107bfe: eb 02 jmp 107c02 <scanpw+0xf3>
107c00: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
107c02: 8d 65 f4 lea -0xc(%ebp),%esp
107c05: 5b pop %ebx
107c06: 5e pop %esi
107c07: 5f pop %edi
107c08: c9 leave
107c09: c3 ret
0010a754 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
10a754: 55 push %ebp
10a755: 89 e5 mov %esp,%ebp
10a757: 83 ec 08 sub $0x8,%esp
10a75a: 8b 4d 08 mov 0x8(%ebp),%ecx
switch ( policy ) {
10a75d: 83 f9 04 cmp $0x4,%ecx
10a760: 77 0b ja 10a76d <sched_get_priority_max+0x19>
10a762: b8 01 00 00 00 mov $0x1,%eax
10a767: d3 e0 shl %cl,%eax
10a769: a8 17 test $0x17,%al
10a76b: 75 10 jne 10a77d <sched_get_priority_max+0x29><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10a76d: e8 56 78 00 00 call 111fc8 <__errno>
10a772: c7 00 16 00 00 00 movl $0x16,(%eax)
10a778: 83 c8 ff or $0xffffffff,%eax
10a77b: eb 08 jmp 10a785 <sched_get_priority_max+0x31>
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
10a77d: 0f b6 05 18 12 12 00 movzbl 0x121218,%eax
10a784: 48 dec %eax
}
10a785: c9 leave
10a786: c3 ret
0010a788 <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
10a788: 55 push %ebp
10a789: 89 e5 mov %esp,%ebp
10a78b: 83 ec 08 sub $0x8,%esp
10a78e: 8b 4d 08 mov 0x8(%ebp),%ecx
switch ( policy ) {
10a791: 83 f9 04 cmp $0x4,%ecx
10a794: 77 11 ja 10a7a7 <sched_get_priority_min+0x1f>
10a796: ba 01 00 00 00 mov $0x1,%edx
10a79b: d3 e2 shl %cl,%edx
10a79d: b8 01 00 00 00 mov $0x1,%eax
10a7a2: 80 e2 17 and $0x17,%dl
10a7a5: 75 0e jne 10a7b5 <sched_get_priority_min+0x2d><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10a7a7: e8 1c 78 00 00 call 111fc8 <__errno>
10a7ac: c7 00 16 00 00 00 movl $0x16,(%eax)
10a7b2: 83 c8 ff or $0xffffffff,%eax
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
10a7b5: c9 leave
10a7b6: c3 ret
0010a7b8 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
10a7b8: 55 push %ebp
10a7b9: 89 e5 mov %esp,%ebp
10a7bb: 56 push %esi
10a7bc: 53 push %ebx
10a7bd: 8b 75 08 mov 0x8(%ebp),%esi
10a7c0: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10a7c3: 85 f6 test %esi,%esi
10a7c5: 74 16 je 10a7dd <sched_rr_get_interval+0x25><== NEVER TAKEN
10a7c7: e8 ec d0 ff ff call 1078b8 <getpid>
10a7cc: 39 c6 cmp %eax,%esi
10a7ce: 74 0d je 10a7dd <sched_rr_get_interval+0x25>
rtems_set_errno_and_return_minus_one( ESRCH );
10a7d0: e8 f3 77 00 00 call 111fc8 <__errno>
10a7d5: c7 00 03 00 00 00 movl $0x3,(%eax)
10a7db: eb 0f jmp 10a7ec <sched_rr_get_interval+0x34>
if ( !interval )
10a7dd: 85 db test %ebx,%ebx
10a7df: 75 10 jne 10a7f1 <sched_rr_get_interval+0x39>
rtems_set_errno_and_return_minus_one( EINVAL );
10a7e1: e8 e2 77 00 00 call 111fc8 <__errno>
10a7e6: c7 00 16 00 00 00 movl $0x16,(%eax)
10a7ec: 83 c8 ff or $0xffffffff,%eax
10a7ef: eb 13 jmp 10a804 <sched_rr_get_interval+0x4c>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
10a7f1: 50 push %eax
10a7f2: 50 push %eax
10a7f3: 53 push %ebx
10a7f4: ff 35 b0 51 12 00 pushl 0x1251b0
10a7fa: e8 41 2f 00 00 call 10d740 <_Timespec_From_ticks>
10a7ff: 31 c0 xor %eax,%eax
return 0;
10a801: 83 c4 10 add $0x10,%esp
}
10a804: 8d 65 f8 lea -0x8(%ebp),%esp
10a807: 5b pop %ebx
10a808: 5e pop %esi
10a809: c9 leave
10a80a: c3 ret
0010ce38 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
10ce38: 55 push %ebp
10ce39: 89 e5 mov %esp,%ebp
10ce3b: 57 push %edi
10ce3c: 56 push %esi
10ce3d: 53 push %ebx
10ce3e: 83 ec 2c sub $0x2c,%esp
10ce41: 8b 75 08 mov 0x8(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10ce44: a1 dc a3 12 00 mov 0x12a3dc,%eax
10ce49: 40 inc %eax
10ce4a: a3 dc a3 12 00 mov %eax,0x12a3dc
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10ce4f: 8b 45 0c mov 0xc(%ebp),%eax
10ce52: 25 00 02 00 00 and $0x200,%eax
10ce57: 89 45 d4 mov %eax,-0x2c(%ebp)
10ce5a: 75 04 jne 10ce60 <sem_open+0x28>
10ce5c: 31 ff xor %edi,%edi
10ce5e: eb 03 jmp 10ce63 <sem_open+0x2b>
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
10ce60: 8b 7d 14 mov 0x14(%ebp),%edi
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
10ce63: 52 push %edx
10ce64: 52 push %edx
10ce65: 8d 45 e4 lea -0x1c(%ebp),%eax
10ce68: 50 push %eax
10ce69: 56 push %esi
10ce6a: e8 9d 53 00 00 call 11220c <_POSIX_Semaphore_Name_to_id>
10ce6f: 89 c3 mov %eax,%ebx
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
10ce71: 83 c4 10 add $0x10,%esp
10ce74: 85 c0 test %eax,%eax
10ce76: 74 19 je 10ce91 <sem_open+0x59>
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
10ce78: 83 f8 02 cmp $0x2,%eax
10ce7b: 75 06 jne 10ce83 <sem_open+0x4b> <== NEVER TAKEN
10ce7d: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
10ce81: 75 59 jne 10cedc <sem_open+0xa4>
_Thread_Enable_dispatch();
10ce83: e8 99 24 00 00 call 10f321 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
10ce88: e8 bb 83 00 00 call 115248 <__errno>
10ce8d: 89 18 mov %ebx,(%eax)
10ce8f: eb 1f jmp 10ceb0 <sem_open+0x78>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10ce91: 8b 45 0c mov 0xc(%ebp),%eax
10ce94: 25 00 0a 00 00 and $0xa00,%eax
10ce99: 3d 00 0a 00 00 cmp $0xa00,%eax
10ce9e: 75 15 jne 10ceb5 <sem_open+0x7d>
_Thread_Enable_dispatch();
10cea0: e8 7c 24 00 00 call 10f321 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
10cea5: e8 9e 83 00 00 call 115248 <__errno>
10ceaa: c7 00 11 00 00 00 movl $0x11,(%eax)
10ceb0: 83 c8 ff or $0xffffffff,%eax
10ceb3: eb 4a jmp 10ceff <sem_open+0xc7>
10ceb5: 50 push %eax
10ceb6: 8d 45 dc lea -0x24(%ebp),%eax
10ceb9: 50 push %eax
10ceba: ff 75 e4 pushl -0x1c(%ebp)
10cebd: 68 c4 a6 12 00 push $0x12a6c4
10cec2: e8 21 1c 00 00 call 10eae8 <_Objects_Get>
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
10cec7: 89 45 e0 mov %eax,-0x20(%ebp)
the_semaphore->open_count += 1;
10ceca: ff 40 18 incl 0x18(%eax)
_Thread_Enable_dispatch();
10cecd: e8 4f 24 00 00 call 10f321 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10ced2: e8 4a 24 00 00 call 10f321 <_Thread_Enable_dispatch>
goto return_id;
10ced7: 83 c4 10 add $0x10,%esp
10ceda: eb 1d jmp 10cef9 <sem_open+0xc1>
/*
* At this point, the semaphore does not exist and everything has been
* checked. We should go ahead and create a semaphore.
*/
status =_POSIX_Semaphore_Create_support(
10cedc: 8d 45 e0 lea -0x20(%ebp),%eax
10cedf: 50 push %eax
10cee0: 57 push %edi
10cee1: 6a 00 push $0x0
10cee3: 56 push %esi
10cee4: e8 ef 51 00 00 call 1120d8 <_POSIX_Semaphore_Create_support>
10cee9: 89 c3 mov %eax,%ebx
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
10ceeb: e8 31 24 00 00 call 10f321 <_Thread_Enable_dispatch>
if ( status == -1 )
10cef0: 83 c4 10 add $0x10,%esp
10cef3: 83 c8 ff or $0xffffffff,%eax
10cef6: 43 inc %ebx
10cef7: 74 06 je 10ceff <sem_open+0xc7>
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
10cef9: 8b 45 e0 mov -0x20(%ebp),%eax
10cefc: 83 c0 08 add $0x8,%eax
#endif
return id;
}
10ceff: 8d 65 f4 lea -0xc(%ebp),%esp
10cf02: 5b pop %ebx
10cf03: 5e pop %esi
10cf04: 5f pop %edi
10cf05: c9 leave
10cf06: c3 ret
00107d13 <setgrent>:
return NULL;
return &grent;
}
void setgrent(void)
{
107d13: 55 push %ebp <== NOT EXECUTED
107d14: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107d16: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
init_etc_passwd_group();
107d19: e8 24 ff ff ff call 107c42 <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
107d1e: a1 7c 6e 12 00 mov 0x126e7c,%eax <== NOT EXECUTED
107d23: 85 c0 test %eax,%eax <== NOT EXECUTED
107d25: 74 0c je 107d33 <setgrent+0x20> <== NOT EXECUTED
fclose(group_fp);
107d27: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107d2a: 50 push %eax <== NOT EXECUTED
107d2b: e8 e4 b3 00 00 call 113114 <fclose> <== NOT EXECUTED
107d30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
107d33: 52 push %edx <== NOT EXECUTED
107d34: 52 push %edx <== NOT EXECUTED
107d35: 68 33 fe 11 00 push $0x11fe33 <== NOT EXECUTED
107d3a: 68 57 11 12 00 push $0x121157 <== NOT EXECUTED
107d3f: e8 34 ba 00 00 call 113778 <fopen> <== NOT EXECUTED
107d44: a3 7c 6e 12 00 mov %eax,0x126e7c <== NOT EXECUTED
107d49: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
107d4c: c9 leave <== NOT EXECUTED
107d4d: c3 ret <== NOT EXECUTED
00107eb7 <setpwent>:
return NULL;
return &pwent;
}
void setpwent(void)
{
107eb7: 55 push %ebp <== NOT EXECUTED
107eb8: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107eba: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
init_etc_passwd_group();
107ebd: e8 80 fd ff ff call 107c42 <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
107ec2: a1 94 6d 12 00 mov 0x126d94,%eax <== NOT EXECUTED
107ec7: 85 c0 test %eax,%eax <== NOT EXECUTED
107ec9: 74 0c je 107ed7 <setpwent+0x20> <== NOT EXECUTED
fclose(passwd_fp);
107ecb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107ece: 50 push %eax <== NOT EXECUTED
107ecf: e8 40 b2 00 00 call 113114 <fclose> <== NOT EXECUTED
107ed4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
107ed7: 50 push %eax <== NOT EXECUTED
107ed8: 50 push %eax <== NOT EXECUTED
107ed9: 68 33 fe 11 00 push $0x11fe33 <== NOT EXECUTED
107ede: 68 e4 10 12 00 push $0x1210e4 <== NOT EXECUTED
107ee3: e8 90 b8 00 00 call 113778 <fopen> <== NOT EXECUTED
107ee8: a3 94 6d 12 00 mov %eax,0x126d94 <== NOT EXECUTED
107eed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
107ef0: c9 leave <== NOT EXECUTED
107ef1: c3 ret <== NOT EXECUTED
0010a650 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
10a650: 55 push %ebp
10a651: 89 e5 mov %esp,%ebp
10a653: 57 push %edi
10a654: 56 push %esi
10a655: 53 push %ebx
10a656: 83 ec 1c sub $0x1c,%esp
10a659: 8b 5d 08 mov 0x8(%ebp),%ebx
10a65c: 8b 55 0c mov 0xc(%ebp),%edx
10a65f: 8b 45 10 mov 0x10(%ebp),%eax
ISR_Level level;
if ( oact )
10a662: 85 c0 test %eax,%eax
10a664: 74 12 je 10a678 <sigaction+0x28>
*oact = _POSIX_signals_Vectors[ sig ];
10a666: 6b f3 0c imul $0xc,%ebx,%esi
10a669: 81 c6 94 67 12 00 add $0x126794,%esi
10a66f: b9 03 00 00 00 mov $0x3,%ecx
10a674: 89 c7 mov %eax,%edi
10a676: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !sig )
10a678: 85 db test %ebx,%ebx
10a67a: 74 0d je 10a689 <sigaction+0x39>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
10a67c: 8d 43 ff lea -0x1(%ebx),%eax
10a67f: 83 f8 1f cmp $0x1f,%eax
10a682: 77 05 ja 10a689 <sigaction+0x39>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
10a684: 83 fb 09 cmp $0x9,%ebx
10a687: 75 10 jne 10a699 <sigaction+0x49>
rtems_set_errno_and_return_minus_one( EINVAL );
10a689: e8 3e 7a 00 00 call 1120cc <__errno>
10a68e: c7 00 16 00 00 00 movl $0x16,(%eax)
10a694: 83 c8 ff or $0xffffffff,%eax
10a697: eb 53 jmp 10a6ec <sigaction+0x9c>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
10a699: 31 c0 xor %eax,%eax
10a69b: 85 d2 test %edx,%edx
10a69d: 74 4d je 10a6ec <sigaction+0x9c> <== NEVER TAKEN
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
10a69f: 9c pushf
10a6a0: fa cli
10a6a1: 8f 45 e4 popl -0x1c(%ebp)
if ( act->sa_handler == SIG_DFL ) {
10a6a4: 83 7a 08 00 cmpl $0x0,0x8(%edx)
10a6a8: 75 18 jne 10a6c2 <sigaction+0x72>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
10a6aa: 6b db 0c imul $0xc,%ebx,%ebx
10a6ad: 8d bb 94 67 12 00 lea 0x126794(%ebx),%edi
10a6b3: 8d b3 80 07 12 00 lea 0x120780(%ebx),%esi
10a6b9: b9 03 00 00 00 mov $0x3,%ecx
10a6be: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10a6c0: eb 24 jmp 10a6e6 <sigaction+0x96>
} else {
_POSIX_signals_Clear_process_signals( sig );
10a6c2: 83 ec 0c sub $0xc,%esp
10a6c5: 53 push %ebx
10a6c6: 89 55 e0 mov %edx,-0x20(%ebp)
10a6c9: e8 d6 4b 00 00 call 10f2a4 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
10a6ce: 6b db 0c imul $0xc,%ebx,%ebx
10a6d1: 8d bb 94 67 12 00 lea 0x126794(%ebx),%edi
10a6d7: b9 03 00 00 00 mov $0x3,%ecx
10a6dc: 8b 55 e0 mov -0x20(%ebp),%edx
10a6df: 89 d6 mov %edx,%esi
10a6e1: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10a6e3: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10a6e6: ff 75 e4 pushl -0x1c(%ebp)
10a6e9: 9d popf
10a6ea: 31 c0 xor %eax,%eax
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
10a6ec: 8d 65 f4 lea -0xc(%ebp),%esp
10a6ef: 5b pop %ebx
10a6f0: 5e pop %esi
10a6f1: 5f pop %edi
10a6f2: c9 leave
10a6f3: c3 ret
0010c3a4 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
10c3a4: 55 push %ebp
10c3a5: 89 e5 mov %esp,%ebp
10c3a7: 56 push %esi
10c3a8: 53 push %ebx
10c3a9: 83 ec 14 sub $0x14,%esp
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
10c3ac: 8d 5d f4 lea -0xc(%ebp),%ebx
10c3af: 53 push %ebx
10c3b0: ff 75 08 pushl 0x8(%ebp)
10c3b3: 6a 01 push $0x1
10c3b5: e8 c6 ff ff ff call 10c380 <sigprocmask>
(void) sigfillset( &all_signals );
10c3ba: 8d 75 f0 lea -0x10(%ebp),%esi
10c3bd: 89 34 24 mov %esi,(%esp)
10c3c0: e8 17 ff ff ff call 10c2dc <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
10c3c5: 83 c4 0c add $0xc,%esp
10c3c8: 6a 00 push $0x0
10c3ca: 6a 00 push $0x0
10c3cc: 56 push %esi
10c3cd: e8 69 00 00 00 call 10c43b <sigtimedwait>
10c3d2: 89 c6 mov %eax,%esi
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
10c3d4: 83 c4 0c add $0xc,%esp
10c3d7: 6a 00 push $0x0
10c3d9: 53 push %ebx
10c3da: 6a 00 push $0x0
10c3dc: e8 9f ff ff ff call 10c380 <sigprocmask>
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
10c3e1: 83 c4 10 add $0x10,%esp
10c3e4: 46 inc %esi
10c3e5: 74 0b je 10c3f2 <sigsuspend+0x4e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
10c3e7: e8 f4 77 00 00 call 113be0 <__errno>
10c3ec: c7 00 04 00 00 00 movl $0x4,(%eax)
return status;
}
10c3f2: 83 c8 ff or $0xffffffff,%eax
10c3f5: 8d 65 f8 lea -0x8(%ebp),%esp
10c3f8: 5b pop %ebx
10c3f9: 5e pop %esi
10c3fa: c9 leave
10c3fb: c3 ret
0010aa13 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
10aa13: 55 push %ebp
10aa14: 89 e5 mov %esp,%ebp
10aa16: 57 push %edi
10aa17: 56 push %esi
10aa18: 53 push %ebx
10aa19: 83 ec 2c sub $0x2c,%esp
10aa1c: 8b 7d 08 mov 0x8(%ebp),%edi
10aa1f: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
10aa22: 85 ff test %edi,%edi
10aa24: 74 24 je 10aa4a <sigtimedwait+0x37>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
10aa26: 85 db test %ebx,%ebx
10aa28: 74 33 je 10aa5d <sigtimedwait+0x4a>
if ( !_Timespec_Is_valid( timeout ) )
10aa2a: 83 ec 0c sub $0xc,%esp
10aa2d: 53 push %ebx
10aa2e: e8 f5 2f 00 00 call 10da28 <_Timespec_Is_valid>
10aa33: 83 c4 10 add $0x10,%esp
10aa36: 84 c0 test %al,%al
10aa38: 74 10 je 10aa4a <sigtimedwait+0x37>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
10aa3a: 83 ec 0c sub $0xc,%esp
10aa3d: 53 push %ebx
10aa3e: e8 3d 30 00 00 call 10da80 <_Timespec_To_ticks>
if ( !interval )
10aa43: 83 c4 10 add $0x10,%esp
10aa46: 85 c0 test %eax,%eax
10aa48: 75 15 jne 10aa5f <sigtimedwait+0x4c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
10aa4a: e8 91 79 00 00 call 1123e0 <__errno>
10aa4f: c7 00 16 00 00 00 movl $0x16,(%eax)
10aa55: 83 cf ff or $0xffffffff,%edi
10aa58: e9 13 01 00 00 jmp 10ab70 <sigtimedwait+0x15d>
10aa5d: 31 c0 xor %eax,%eax
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10aa5f: 8b 5d 0c mov 0xc(%ebp),%ebx
10aa62: 85 db test %ebx,%ebx
10aa64: 75 03 jne 10aa69 <sigtimedwait+0x56>
10aa66: 8d 5d dc lea -0x24(%ebp),%ebx
the_thread = _Thread_Executing;
10aa69: 8b 15 f0 62 12 00 mov 0x1262f0,%edx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10aa6f: 8b b2 f8 00 00 00 mov 0xf8(%edx),%esi
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
10aa75: 9c pushf
10aa76: fa cli
10aa77: 8f 45 d4 popl -0x2c(%ebp)
if ( *set & api->signals_pending ) {
10aa7a: 8b 0f mov (%edi),%ecx
10aa7c: 89 4d d0 mov %ecx,-0x30(%ebp)
10aa7f: 8b 8e d0 00 00 00 mov 0xd0(%esi),%ecx
10aa85: 85 4d d0 test %ecx,-0x30(%ebp)
10aa88: 74 32 je 10aabc <sigtimedwait+0xa9>
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending );
10aa8a: 83 ec 0c sub $0xc,%esp
10aa8d: 51 push %ecx
10aa8e: e8 41 ff ff ff call 10a9d4 <_POSIX_signals_Get_highest>
10aa93: 89 03 mov %eax,(%ebx)
_POSIX_signals_Clear_signals(
10aa95: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10aa9c: 6a 00 push $0x0
10aa9e: 53 push %ebx
10aa9f: 50 push %eax
10aaa0: 56 push %esi
10aaa1: e8 32 4e 00 00 call 10f8d8 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
10aaa6: ff 75 d4 pushl -0x2c(%ebp)
10aaa9: 9d popf
the_info->si_code = SI_USER;
10aaaa: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10aab1: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return the_info->si_signo;
10aab8: 8b 3b mov (%ebx),%edi
10aaba: eb 3b jmp 10aaf7 <sigtimedwait+0xe4>
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
10aabc: 8b 0d 88 69 12 00 mov 0x126988,%ecx
10aac2: 85 4d d0 test %ecx,-0x30(%ebp)
10aac5: 74 35 je 10aafc <sigtimedwait+0xe9>
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
10aac7: 83 ec 0c sub $0xc,%esp
10aaca: 51 push %ecx
10aacb: e8 04 ff ff ff call 10a9d4 <_POSIX_signals_Get_highest>
10aad0: 89 c7 mov %eax,%edi
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
10aad2: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10aad9: 6a 01 push $0x1
10aadb: 53 push %ebx
10aadc: 50 push %eax
10aadd: 56 push %esi
10aade: e8 f5 4d 00 00 call 10f8d8 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
10aae3: ff 75 d4 pushl -0x2c(%ebp)
10aae6: 9d popf
the_info->si_signo = signo;
10aae7: 89 3b mov %edi,(%ebx)
the_info->si_code = SI_USER;
10aae9: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10aaf0: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return signo;
10aaf7: 83 c4 20 add $0x20,%esp
10aafa: eb 74 jmp 10ab70 <sigtimedwait+0x15d>
}
the_info->si_signo = -1;
10aafc: c7 03 ff ff ff ff movl $0xffffffff,(%ebx)
10ab02: 8b 0d 34 62 12 00 mov 0x126234,%ecx
10ab08: 41 inc %ecx
10ab09: 89 0d 34 62 12 00 mov %ecx,0x126234
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
10ab0f: c7 42 44 20 69 12 00 movl $0x126920,0x44(%edx)
the_thread->Wait.return_code = EINTR;
10ab16: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx)
the_thread->Wait.option = *set;
10ab1d: 8b 0f mov (%edi),%ecx
10ab1f: 89 4a 30 mov %ecx,0x30(%edx)
the_thread->Wait.return_argument = the_info;
10ab22: 89 5a 28 mov %ebx,0x28(%edx)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10ab25: c7 05 50 69 12 00 01 movl $0x1,0x126950
10ab2c: 00 00 00
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
10ab2f: ff 75 d4 pushl -0x2c(%ebp)
10ab32: 9d popf
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
10ab33: 52 push %edx
10ab34: 68 1c d6 10 00 push $0x10d61c
10ab39: 50 push %eax
10ab3a: 68 20 69 12 00 push $0x126920
10ab3f: e8 1c 28 00 00 call 10d360 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10ab44: e8 60 23 00 00 call 10cea9 <_Thread_Enable_dispatch>
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
10ab49: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10ab50: 6a 00 push $0x0
10ab52: 53 push %ebx
10ab53: ff 33 pushl (%ebx)
10ab55: 56 push %esi
10ab56: e8 7d 4d 00 00 call 10f8d8 <_POSIX_signals_Clear_signals>
errno = _Thread_Executing->Wait.return_code;
10ab5b: 83 c4 20 add $0x20,%esp
10ab5e: e8 7d 78 00 00 call 1123e0 <__errno>
10ab63: 8b 15 f0 62 12 00 mov 0x1262f0,%edx
10ab69: 8b 52 34 mov 0x34(%edx),%edx
10ab6c: 89 10 mov %edx,(%eax)
return the_info->si_signo;
10ab6e: 8b 3b mov (%ebx),%edi
}
10ab70: 89 f8 mov %edi,%eax
10ab72: 8d 65 f4 lea -0xc(%ebp),%esp
10ab75: 5b pop %ebx
10ab76: 5e pop %esi
10ab77: 5f pop %edi
10ab78: c9 leave
10ab79: c3 ret
0010c5bc <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
10c5bc: 55 push %ebp
10c5bd: 89 e5 mov %esp,%ebp
10c5bf: 53 push %ebx
10c5c0: 83 ec 08 sub $0x8,%esp
10c5c3: 8b 5d 0c mov 0xc(%ebp),%ebx
int status;
status = sigtimedwait( set, NULL, NULL );
10c5c6: 6a 00 push $0x0
10c5c8: 6a 00 push $0x0
10c5ca: ff 75 08 pushl 0x8(%ebp)
10c5cd: e8 69 fe ff ff call 10c43b <sigtimedwait>
10c5d2: 89 c2 mov %eax,%edx
if ( status != -1 ) {
10c5d4: 83 c4 10 add $0x10,%esp
10c5d7: 83 f8 ff cmp $0xffffffff,%eax
10c5da: 74 0a je 10c5e6 <sigwait+0x2a>
if ( sig )
10c5dc: 31 c0 xor %eax,%eax
10c5de: 85 db test %ebx,%ebx
10c5e0: 74 0b je 10c5ed <sigwait+0x31> <== NEVER TAKEN
*sig = status;
10c5e2: 89 13 mov %edx,(%ebx)
10c5e4: eb 07 jmp 10c5ed <sigwait+0x31>
return 0;
}
return errno;
10c5e6: e8 f5 75 00 00 call 113be0 <__errno>
10c5eb: 8b 00 mov (%eax),%eax
}
10c5ed: 8b 5d fc mov -0x4(%ebp),%ebx
10c5f0: c9 leave
10c5f1: c3 ret
00108949 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
108949: 55 push %ebp <== NOT EXECUTED
10894a: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10894c: 56 push %esi <== NOT EXECUTED
10894d: 53 push %ebx <== NOT EXECUTED
10894e: 89 d3 mov %edx,%ebx <== NOT EXECUTED
108950: 89 c6 mov %eax,%esi <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
108952: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) <== NOT EXECUTED
108959: 74 30 je 10898b <siproc+0x42> <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10895b: 52 push %edx <== NOT EXECUTED
10895c: 6a 00 push $0x0 <== NOT EXECUTED
10895e: 6a 00 push $0x0 <== NOT EXECUTED
108960: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
108963: e8 84 16 00 00 call 109fec <rtems_semaphore_obtain><== NOT EXECUTED
i = iproc (c, tty);
108968: 89 f2 mov %esi,%edx <== NOT EXECUTED
10896a: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED
10896d: 89 da mov %ebx,%edx <== NOT EXECUTED
10896f: e8 bc fe ff ff call 108830 <iproc> <== NOT EXECUTED
108974: 89 c6 mov %eax,%esi <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
108976: 58 pop %eax <== NOT EXECUTED
108977: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
10897a: e8 59 17 00 00 call 10a0d8 <rtems_semaphore_release><== NOT EXECUTED
10897f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
108982: 89 f0 mov %esi,%eax <== NOT EXECUTED
108984: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
108987: 5b pop %ebx <== NOT EXECUTED
108988: 5e pop %esi <== NOT EXECUTED
108989: c9 leave <== NOT EXECUTED
10898a: c3 ret <== 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);
10898b: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
10898e: 89 da mov %ebx,%edx <== NOT EXECUTED
}
return i;
}
108990: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
108993: 5b pop %ebx <== NOT EXECUTED
108994: 5e pop %esi <== NOT EXECUTED
108995: 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);
108996: e9 95 fe ff ff jmp 108830 <iproc> <== NOT EXECUTED
00109278 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
109278: 55 push %ebp
109279: 89 e5 mov %esp,%ebp
10927b: 57 push %edi
10927c: 56 push %esi
10927d: 53 push %ebx
10927e: 83 ec 2c sub $0x2c,%esp
109281: 8b 55 08 mov 0x8(%ebp),%edx
109284: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
109287: 85 f6 test %esi,%esi
109289: 75 0d jne 109298 <stat+0x20>
rtems_set_errno_and_return_minus_one( EFAULT );
10928b: e8 04 a3 00 00 call 113594 <__errno>
109290: c7 00 0e 00 00 00 movl $0xe,(%eax)
109296: eb 53 jmp 1092eb <stat+0x73>
status = rtems_filesystem_evaluate_path( path, strlen( path ),
109298: 31 c0 xor %eax,%eax
10929a: 83 c9 ff or $0xffffffff,%ecx
10929d: 89 d7 mov %edx,%edi
10929f: f2 ae repnz scas %es:(%edi),%al
1092a1: f7 d1 not %ecx
1092a3: 49 dec %ecx
1092a4: 83 ec 0c sub $0xc,%esp
1092a7: 6a 01 push $0x1
1092a9: 8d 5d d4 lea -0x2c(%ebp),%ebx
1092ac: 53 push %ebx
1092ad: 6a 00 push $0x0
1092af: 51 push %ecx
1092b0: 52 push %edx
1092b1: e8 c2 eb ff ff call 107e78 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
1092b6: 83 c4 20 add $0x20,%esp
1092b9: 83 cf ff or $0xffffffff,%edi
1092bc: 85 c0 test %eax,%eax
1092be: 75 5c jne 10931c <stat+0xa4>
return -1;
if ( !loc.handlers->fstat_h ){
1092c0: 8b 55 dc mov -0x24(%ebp),%edx
1092c3: 83 7a 18 00 cmpl $0x0,0x18(%edx)
1092c7: 75 27 jne 1092f0 <stat+0x78> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
1092c9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
1092cc: 85 c0 test %eax,%eax <== NOT EXECUTED
1092ce: 74 10 je 1092e0 <stat+0x68> <== NOT EXECUTED
1092d0: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
1092d3: 85 c0 test %eax,%eax <== NOT EXECUTED
1092d5: 74 09 je 1092e0 <stat+0x68> <== NOT EXECUTED
1092d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1092da: 53 push %ebx <== NOT EXECUTED
1092db: ff d0 call *%eax <== NOT EXECUTED
1092dd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1092e0: e8 af a2 00 00 call 113594 <__errno> <== NOT EXECUTED
1092e5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
1092eb: 83 cf ff or $0xffffffff,%edi
1092ee: eb 2c jmp 10931c <stat+0xa4>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
1092f0: b9 12 00 00 00 mov $0x12,%ecx
1092f5: 89 f7 mov %esi,%edi
1092f7: f3 ab rep stos %eax,%es:(%edi)
status = (*loc.handlers->fstat_h)( &loc, buf );
1092f9: 50 push %eax
1092fa: 50 push %eax
1092fb: 56 push %esi
1092fc: 53 push %ebx
1092fd: ff 52 18 call *0x18(%edx)
109300: 89 c7 mov %eax,%edi
rtems_filesystem_freenode( &loc );
109302: 8b 45 e0 mov -0x20(%ebp),%eax
109305: 83 c4 10 add $0x10,%esp
109308: 85 c0 test %eax,%eax
10930a: 74 10 je 10931c <stat+0xa4> <== NEVER TAKEN
10930c: 8b 40 1c mov 0x1c(%eax),%eax
10930f: 85 c0 test %eax,%eax
109311: 74 09 je 10931c <stat+0xa4> <== NEVER TAKEN
109313: 83 ec 0c sub $0xc,%esp
109316: 53 push %ebx
109317: ff d0 call *%eax
109319: 83 c4 10 add $0x10,%esp
return status;
}
10931c: 89 f8 mov %edi,%eax
10931e: 8d 65 f4 lea -0xc(%ebp),%esp
109321: 5b pop %ebx
109322: 5e pop %esi
109323: 5f pop %edi
109324: c9 leave
109325: c3 ret
00109514 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
109514: 55 push %ebp
109515: 89 e5 mov %esp,%ebp
109517: 57 push %edi
109518: 56 push %esi
109519: 83 ec 20 sub $0x20,%esp
10951c: 8b 45 0c mov 0xc(%ebp),%eax
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
10951f: 8a 10 mov (%eax),%dl
109521: 80 fa 5c cmp $0x5c,%dl
109524: 74 09 je 10952f <symlink+0x1b> <== NEVER TAKEN
109526: 80 fa 2f cmp $0x2f,%dl
109529: 74 04 je 10952f <symlink+0x1b>
10952b: 84 d2 test %dl,%dl
10952d: 75 17 jne 109546 <symlink+0x32> <== ALWAYS TAKEN
10952f: 8d 7d e0 lea -0x20(%ebp),%edi
109532: 8b 35 d4 5f 12 00 mov 0x125fd4,%esi
109538: 83 c6 18 add $0x18,%esi
10953b: b9 05 00 00 00 mov $0x5,%ecx
109540: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
109542: b1 01 mov $0x1,%cl
109544: eb 13 jmp 109559 <symlink+0x45>
109546: 8d 7d e0 lea -0x20(%ebp),%edi
109549: 8b 35 d4 5f 12 00 mov 0x125fd4,%esi
10954f: 83 c6 04 add $0x4,%esi
109552: b9 05 00 00 00 mov $0x5,%ecx
109557: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !loc.ops->evalformake_h ) {
109559: 8b 55 ec mov -0x14(%ebp),%edx
10955c: 8b 52 04 mov 0x4(%edx),%edx
10955f: 85 d2 test %edx,%edx
109561: 74 32 je 109595 <symlink+0x81> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
109563: 56 push %esi
109564: 8d 75 f4 lea -0xc(%ebp),%esi
109567: 56 push %esi
109568: 8d 7d e0 lea -0x20(%ebp),%edi
10956b: 57 push %edi
10956c: 01 c8 add %ecx,%eax
10956e: 50 push %eax
10956f: ff d2 call *%edx
if ( result != 0 )
109571: 83 c4 10 add $0x10,%esp
109574: 83 ce ff or $0xffffffff,%esi
109577: 85 c0 test %eax,%eax
109579: 75 50 jne 1095cb <symlink+0xb7>
return -1;
if ( !loc.ops->symlink_h ) {
10957b: 8b 55 ec mov -0x14(%ebp),%edx
10957e: 8b 42 38 mov 0x38(%edx),%eax
109581: 85 c0 test %eax,%eax
109583: 75 20 jne 1095a5 <symlink+0x91> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
109585: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
109588: 85 c0 test %eax,%eax <== NOT EXECUTED
10958a: 74 09 je 109595 <symlink+0x81> <== NOT EXECUTED
10958c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10958f: 57 push %edi <== NOT EXECUTED
109590: ff d0 call *%eax <== NOT EXECUTED
109592: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
109595: e8 fa a2 00 00 call 113894 <__errno> <== NOT EXECUTED
10959a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
1095a0: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
1095a3: eb 26 jmp 1095cb <symlink+0xb7> <== NOT EXECUTED
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
1095a5: 52 push %edx
1095a6: ff 75 f4 pushl -0xc(%ebp)
1095a9: ff 75 08 pushl 0x8(%ebp)
1095ac: 57 push %edi
1095ad: ff d0 call *%eax
1095af: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &loc );
1095b1: 8b 45 ec mov -0x14(%ebp),%eax
1095b4: 83 c4 10 add $0x10,%esp
1095b7: 85 c0 test %eax,%eax
1095b9: 74 10 je 1095cb <symlink+0xb7> <== NEVER TAKEN
1095bb: 8b 40 1c mov 0x1c(%eax),%eax
1095be: 85 c0 test %eax,%eax
1095c0: 74 09 je 1095cb <symlink+0xb7> <== NEVER TAKEN
1095c2: 83 ec 0c sub $0xc,%esp
1095c5: 57 push %edi
1095c6: ff d0 call *%eax
1095c8: 83 c4 10 add $0x10,%esp
return result;
}
1095cb: 89 f0 mov %esi,%eax
1095cd: 8d 65 f8 lea -0x8(%ebp),%esp
1095d0: 5e pop %esi
1095d1: 5f pop %edi
1095d2: c9 leave
1095d3: c3 ret
00109340 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
109340: 55 push %ebp
109341: 89 e5 mov %esp,%ebp
109343: 53 push %ebx
109344: 83 ec 04 sub $0x4,%esp
109347: 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;
10934a: 8b 88 f0 00 00 00 mov 0xf0(%eax),%ecx
if ( this_reent ) {
109350: 85 c9 test %ecx,%ecx
109352: 74 32 je 109386 <sync_per_thread+0x46> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
109354: 8b 15 b0 72 12 00 mov 0x1272b0,%edx
10935a: 8b 9a f0 00 00 00 mov 0xf0(%edx),%ebx
_Thread_Executing->libc_reent = this_reent;
109360: 89 8a f0 00 00 00 mov %ecx,0xf0(%edx)
_fwalk (t->libc_reent, sync_wrapper);
109366: 52 push %edx
109367: 52 push %edx
109368: 68 b2 93 10 00 push $0x1093b2
10936d: ff b0 f0 00 00 00 pushl 0xf0(%eax)
109373: e8 30 b1 00 00 call 1144a8 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
109378: a1 b0 72 12 00 mov 0x1272b0,%eax
10937d: 89 98 f0 00 00 00 mov %ebx,0xf0(%eax)
109383: 83 c4 10 add $0x10,%esp
}
}
109386: 8b 5d fc mov -0x4(%ebp),%ebx
109389: c9 leave
10938a: c3 ret
00108fbc <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
108fbc: 55 push %ebp
108fbd: 89 e5 mov %esp,%ebp
108fbf: 56 push %esi
108fc0: 53 push %ebx
108fc1: 8b 5d 08 mov 0x8(%ebp),%ebx
108fc4: 8b 45 0c mov 0xc(%ebp),%eax
108fc7: 8b 75 10 mov 0x10(%ebp),%esi
switch (opt) {
108fca: 85 c0 test %eax,%eax
108fcc: 74 22 je 108ff0 <tcsetattr+0x34> <== ALWAYS TAKEN
108fce: 48 dec %eax <== NOT EXECUTED
108fcf: 74 0d je 108fde <tcsetattr+0x22> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
108fd1: e8 82 97 00 00 call 112758 <__errno> <== NOT EXECUTED
108fd6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
108fdc: eb 2a jmp 109008 <tcsetattr+0x4c> <== NOT EXECUTED
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
108fde: 50 push %eax <== NOT EXECUTED
108fdf: 6a 00 push $0x0 <== NOT EXECUTED
108fe1: 6a 03 push $0x3 <== NOT EXECUTED
108fe3: 53 push %ebx <== NOT EXECUTED
108fe4: e8 d3 64 00 00 call 10f4bc <ioctl> <== NOT EXECUTED
108fe9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108fec: 85 c0 test %eax,%eax <== NOT EXECUTED
108fee: 78 18 js 109008 <tcsetattr+0x4c> <== NOT EXECUTED
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
108ff0: 89 75 10 mov %esi,0x10(%ebp)
108ff3: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp)
108ffa: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
108ffd: 8d 65 f8 lea -0x8(%ebp),%esp
109000: 5b pop %ebx
109001: 5e pop %esi
109002: c9 leave
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
109003: e9 b4 64 00 00 jmp 10f4bc <ioctl>
}
}
109008: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10900b: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10900e: 5b pop %ebx <== NOT EXECUTED
10900f: 5e pop %esi <== NOT EXECUTED
109010: c9 leave <== NOT EXECUTED
109011: c3 ret <== NOT EXECUTED
00109e8c <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
109e8c: 55 push %ebp
109e8d: 89 e5 mov %esp,%ebp
109e8f: 56 push %esi
109e90: 53 push %ebx
109e91: 8b 5d 0c mov 0xc(%ebp),%ebx
109e94: 8b 75 10 mov 0x10(%ebp),%esi
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
109e97: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
109e9b: 75 1d jne 109eba <timer_create+0x2e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
109e9d: 85 f6 test %esi,%esi
109e9f: 74 19 je 109eba <timer_create+0x2e>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
109ea1: 85 db test %ebx,%ebx
109ea3: 74 22 je 109ec7 <timer_create+0x3b>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
109ea5: 8b 03 mov (%ebx),%eax
109ea7: 48 dec %eax
109ea8: 83 f8 01 cmp $0x1,%eax
109eab: 77 0d ja 109eba <timer_create+0x2e> <== NEVER TAKEN
( evp->sigev_notify != SIGEV_SIGNAL ) ) {
/* The value of the field sigev_notify is not valid */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !evp->sigev_signo )
109ead: 8b 43 04 mov 0x4(%ebx),%eax
109eb0: 85 c0 test %eax,%eax
109eb2: 74 06 je 109eba <timer_create+0x2e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
109eb4: 48 dec %eax
109eb5: 83 f8 1f cmp $0x1f,%eax
109eb8: 76 0d jbe 109ec7 <timer_create+0x3b> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
109eba: e8 21 7f 00 00 call 111de0 <__errno>
109ebf: c7 00 16 00 00 00 movl $0x16,(%eax)
109ec5: eb 2f jmp 109ef6 <timer_create+0x6a>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
109ec7: a1 48 62 12 00 mov 0x126248,%eax
109ecc: 40 inc %eax
109ecd: a3 48 62 12 00 mov %eax,0x126248
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void )
{
return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
109ed2: 83 ec 0c sub $0xc,%esp
109ed5: 68 70 65 12 00 push $0x126570
109eda: e8 1d 1b 00 00 call 10b9fc <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
109edf: 83 c4 10 add $0x10,%esp
109ee2: 85 c0 test %eax,%eax
109ee4: 75 18 jne 109efe <timer_create+0x72>
_Thread_Enable_dispatch();
109ee6: e8 16 27 00 00 call 10c601 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
109eeb: e8 f0 7e 00 00 call 111de0 <__errno>
109ef0: c7 00 0b 00 00 00 movl $0xb,(%eax)
109ef6: 83 c8 ff or $0xffffffff,%eax
109ef9: e9 83 00 00 00 jmp 109f81 <timer_create+0xf5>
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
109efe: c6 40 3c 02 movb $0x2,0x3c(%eax)
ptimer->thread_id = _Thread_Executing->Object.id;
109f02: 8b 15 04 63 12 00 mov 0x126304,%edx
109f08: 8b 52 08 mov 0x8(%edx),%edx
109f0b: 89 50 38 mov %edx,0x38(%eax)
if ( evp != NULL ) {
109f0e: 85 db test %ebx,%ebx
109f10: 74 11 je 109f23 <timer_create+0x97>
ptimer->inf.sigev_notify = evp->sigev_notify;
109f12: 8b 13 mov (%ebx),%edx
109f14: 89 50 40 mov %edx,0x40(%eax)
ptimer->inf.sigev_signo = evp->sigev_signo;
109f17: 8b 53 04 mov 0x4(%ebx),%edx
109f1a: 89 50 44 mov %edx,0x44(%eax)
ptimer->inf.sigev_value = evp->sigev_value;
109f1d: 8b 53 08 mov 0x8(%ebx),%edx
109f20: 89 50 48 mov %edx,0x48(%eax)
}
ptimer->overrun = 0;
109f23: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
ptimer->timer_data.it_value.tv_sec = 0;
109f2a: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
ptimer->timer_data.it_value.tv_nsec = 0;
109f31: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
ptimer->timer_data.it_interval.tv_sec = 0;
109f38: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
ptimer->timer_data.it_interval.tv_nsec = 0;
109f3f: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
109f46: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
109f4d: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
109f54: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
109f5b: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
109f62: 8b 50 08 mov 0x8(%eax),%edx
109f65: 0f b7 da movzwl %dx,%ebx
109f68: 8b 0d 8c 65 12 00 mov 0x12658c,%ecx
109f6e: 89 04 99 mov %eax,(%ecx,%ebx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
109f71: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
109f78: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
109f7a: e8 82 26 00 00 call 10c601 <_Thread_Enable_dispatch>
109f7f: 31 c0 xor %eax,%eax
return 0;
}
109f81: 8d 65 f8 lea -0x8(%ebp),%esp
109f84: 5b pop %ebx
109f85: 5e pop %esi
109f86: c9 leave
109f87: c3 ret
00109f88 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
109f88: 55 push %ebp
109f89: 89 e5 mov %esp,%ebp
109f8b: 57 push %edi
109f8c: 56 push %esi
109f8d: 53 push %ebx
109f8e: 83 ec 2c sub $0x2c,%esp
109f91: 8b 45 0c mov 0xc(%ebp),%eax
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
109f94: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
109f98: 0f 84 47 01 00 00 je 10a0e5 <timer_settime+0x15d> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
/* First, it verifies if the structure "value" is correct */
if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) ||
109f9e: 8b 55 10 mov 0x10(%ebp),%edx
109fa1: 81 7a 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%edx)
109fa8: 0f 87 37 01 00 00 ja 10a0e5 <timer_settime+0x15d>
( value->it_value.tv_nsec < 0 ) ||
( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) ||
109fae: 81 7a 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%edx)
109fb5: 0f 87 2a 01 00 00 ja 10a0e5 <timer_settime+0x15d> <== NEVER TAKEN
( value->it_interval.tv_nsec < 0 )) {
/* The number of nanoseconds is not correct */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
109fbb: 85 c0 test %eax,%eax
109fbd: 74 09 je 109fc8 <timer_settime+0x40>
109fbf: 83 f8 04 cmp $0x4,%eax
109fc2: 0f 85 1d 01 00 00 jne 10a0e5 <timer_settime+0x15d>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
109fc8: 8d 7d cc lea -0x34(%ebp),%edi
109fcb: b9 04 00 00 00 mov $0x4,%ecx
109fd0: 8b 75 10 mov 0x10(%ebp),%esi
109fd3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
109fd5: 83 f8 04 cmp $0x4,%eax
109fd8: 75 2f jne 10a009 <timer_settime+0x81>
struct timespec now;
_TOD_Get( &now );
109fda: 83 ec 0c sub $0xc,%esp
109fdd: 8d 5d dc lea -0x24(%ebp),%ebx
109fe0: 53 push %ebx
109fe1: e8 8e 15 00 00 call 10b574 <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
109fe6: 59 pop %ecx
109fe7: 5e pop %esi
109fe8: 8d 75 d4 lea -0x2c(%ebp),%esi
109feb: 56 push %esi
109fec: 53 push %ebx
109fed: e8 8e 31 00 00 call 10d180 <_Timespec_Greater_than>
109ff2: 83 c4 10 add $0x10,%esp
109ff5: 84 c0 test %al,%al
109ff7: 0f 85 e8 00 00 00 jne 10a0e5 <timer_settime+0x15d>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
109ffd: 52 push %edx
109ffe: 56 push %esi
109fff: 56 push %esi
10a000: 53 push %ebx
10a001: e8 9e 31 00 00 call 10d1a4 <_Timespec_Subtract>
10a006: 83 c4 10 add $0x10,%esp
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
10a009: 50 push %eax
10a00a: 8d 45 e4 lea -0x1c(%ebp),%eax
10a00d: 50 push %eax
10a00e: ff 75 08 pushl 0x8(%ebp)
10a011: 68 70 65 12 00 push $0x126570
10a016: e8 f5 1d 00 00 call 10be10 <_Objects_Get>
10a01b: 89 c3 mov %eax,%ebx
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10a01d: 83 c4 10 add $0x10,%esp
10a020: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10a024: 0f 85 bb 00 00 00 jne 10a0e5 <timer_settime+0x15d>
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
10a02a: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
10a02e: 75 3b jne 10a06b <timer_settime+0xe3>
10a030: 83 7d d8 00 cmpl $0x0,-0x28(%ebp)
10a034: 75 35 jne 10a06b <timer_settime+0xe3>
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
10a036: 83 ec 0c sub $0xc,%esp
10a039: 8d 40 10 lea 0x10(%eax),%eax
10a03c: 50 push %eax
10a03d: e8 1e 35 00 00 call 10d560 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
10a042: 83 c4 10 add $0x10,%esp
10a045: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10a049: 74 0d je 10a058 <timer_settime+0xd0>
*ovalue = ptimer->timer_data;
10a04b: 8d 73 54 lea 0x54(%ebx),%esi
10a04e: b9 04 00 00 00 mov $0x4,%ecx
10a053: 8b 7d 14 mov 0x14(%ebp),%edi
10a056: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* The new data are set */
ptimer->timer_data = normalize;
10a058: 8d 7b 54 lea 0x54(%ebx),%edi
10a05b: 8d 75 cc lea -0x34(%ebp),%esi
10a05e: b9 04 00 00 00 mov $0x4,%ecx
10a063: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10a065: c6 43 3c 04 movb $0x4,0x3c(%ebx)
10a069: eb 35 jmp 10a0a0 <timer_settime+0x118>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
10a06b: 83 ec 0c sub $0xc,%esp
10a06e: ff 75 10 pushl 0x10(%ebp)
10a071: e8 62 31 00 00 call 10d1d8 <_Timespec_To_ticks>
10a076: 89 43 64 mov %eax,0x64(%ebx)
initial_period = _Timespec_To_ticks( &normalize.it_value );
10a079: 8d 45 d4 lea -0x2c(%ebp),%eax
10a07c: 89 04 24 mov %eax,(%esp)
10a07f: e8 54 31 00 00 call 10d1d8 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
10a084: 89 1c 24 mov %ebx,(%esp)
10a087: 68 fc a0 10 00 push $0x10a0fc
10a08c: ff 73 08 pushl 0x8(%ebx)
10a08f: 50 push %eax
10a090: 8d 43 10 lea 0x10(%ebx),%eax
10a093: 50 push %eax
10a094: e8 cf 51 00 00 call 10f268 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
10a099: 83 c4 20 add $0x20,%esp
10a09c: 84 c0 test %al,%al
10a09e: 75 09 jne 10a0a9 <timer_settime+0x121>
_Thread_Enable_dispatch();
10a0a0: e8 5c 25 00 00 call 10c601 <_Thread_Enable_dispatch>
10a0a5: 31 c0 xor %eax,%eax
return 0;
10a0a7: eb 4a jmp 10a0f3 <timer_settime+0x16b>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
10a0a9: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10a0ad: 74 0d je 10a0bc <timer_settime+0x134>
*ovalue = ptimer->timer_data;
10a0af: 8d 73 54 lea 0x54(%ebx),%esi
10a0b2: b9 04 00 00 00 mov $0x4,%ecx
10a0b7: 8b 7d 14 mov 0x14(%ebp),%edi
10a0ba: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ptimer->timer_data = normalize;
10a0bc: 8d 7b 54 lea 0x54(%ebx),%edi
10a0bf: 8d 75 cc lea -0x34(%ebp),%esi
10a0c2: b9 04 00 00 00 mov $0x4,%ecx
10a0c7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10a0c9: c6 43 3c 03 movb $0x3,0x3c(%ebx)
_TOD_Get( &ptimer->time );
10a0cd: 83 ec 0c sub $0xc,%esp
10a0d0: 83 c3 6c add $0x6c,%ebx
10a0d3: 53 push %ebx
10a0d4: e8 9b 14 00 00 call 10b574 <_TOD_Get>
_Thread_Enable_dispatch();
10a0d9: e8 23 25 00 00 call 10c601 <_Thread_Enable_dispatch>
10a0de: 31 c0 xor %eax,%eax
return 0;
10a0e0: 83 c4 10 add $0x10,%esp
10a0e3: eb 0e jmp 10a0f3 <timer_settime+0x16b>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10a0e5: e8 f6 7c 00 00 call 111de0 <__errno>
10a0ea: c7 00 16 00 00 00 movl $0x16,(%eax)
10a0f0: 83 c8 ff or $0xffffffff,%eax
}
10a0f3: 8d 65 f4 lea -0xc(%ebp),%esp
10a0f6: 5b pop %ebx
10a0f7: 5e pop %esi
10a0f8: 5f pop %edi
10a0f9: c9 leave
10a0fa: c3 ret
00109db0 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
109db0: 55 push %ebp
109db1: 89 e5 mov %esp,%ebp
109db3: 57 push %edi
109db4: 56 push %esi
109db5: 53 push %ebx
109db6: 83 ec 1c sub $0x1c,%esp
109db9: 8b 75 08 mov 0x8(%ebp),%esi
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
109dbc: 83 3d 38 6b 12 00 00 cmpl $0x0,0x126b38
109dc3: 75 2c jne 109df1 <ualarm+0x41>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
109dc5: c7 05 24 6b 12 00 00 movl $0x0,0x126b24
109dcc: 00 00 00
the_watchdog->routine = routine;
109dcf: c7 05 38 6b 12 00 92 movl $0x109e92,0x126b38
109dd6: 9e 10 00
the_watchdog->id = id;
109dd9: c7 05 3c 6b 12 00 00 movl $0x0,0x126b3c
109de0: 00 00 00
the_watchdog->user_data = user_data;
109de3: c7 05 40 6b 12 00 00 movl $0x0,0x126b40
109dea: 00 00 00
109ded: 31 db xor %ebx,%ebx
109def: eb 4f jmp 109e40 <ualarm+0x90>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
109df1: 83 ec 0c sub $0xc,%esp
109df4: 68 1c 6b 12 00 push $0x126b1c
109df9: e8 4a 33 00 00 call 10d148 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
109dfe: 83 e8 02 sub $0x2,%eax
109e01: 83 c4 10 add $0x10,%esp
109e04: 31 db xor %ebx,%ebx
109e06: 83 f8 01 cmp $0x1,%eax
109e09: 77 35 ja 109e40 <ualarm+0x90> <== NEVER TAKEN
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
109e0b: a1 30 6b 12 00 mov 0x126b30,%eax
109e10: 03 05 28 6b 12 00 add 0x126b28,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
109e16: 51 push %ecx
109e17: 51 push %ecx
109e18: 8d 55 e0 lea -0x20(%ebp),%edx
109e1b: 52 push %edx
109e1c: 2b 05 34 6b 12 00 sub 0x126b34,%eax
109e22: 50 push %eax
109e23: e8 d0 2e 00 00 call 10ccf8 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
109e28: 69 4d e0 40 42 0f 00 imul $0xf4240,-0x20(%ebp),%ecx
remaining += tp.tv_nsec / 1000;
109e2f: 8b 45 e4 mov -0x1c(%ebp),%eax
109e32: bf e8 03 00 00 mov $0x3e8,%edi
109e37: 99 cltd
109e38: f7 ff idiv %edi
109e3a: 8d 1c 08 lea (%eax,%ecx,1),%ebx
109e3d: 83 c4 10 add $0x10,%esp
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
109e40: 85 f6 test %esi,%esi
109e42: 74 44 je 109e88 <ualarm+0xd8>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
109e44: b9 40 42 0f 00 mov $0xf4240,%ecx
109e49: 89 f0 mov %esi,%eax
109e4b: 31 d2 xor %edx,%edx
109e4d: f7 f1 div %ecx
109e4f: 89 45 e0 mov %eax,-0x20(%ebp)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
109e52: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx
109e58: 89 55 e4 mov %edx,-0x1c(%ebp)
ticks = _Timespec_To_ticks( &tp );
109e5b: 83 ec 0c sub $0xc,%esp
109e5e: 8d 75 e0 lea -0x20(%ebp),%esi
109e61: 56 push %esi
109e62: e8 ed 2e 00 00 call 10cd54 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
109e67: 89 34 24 mov %esi,(%esp)
109e6a: e8 e5 2e 00 00 call 10cd54 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
109e6f: a3 28 6b 12 00 mov %eax,0x126b28
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
109e74: 58 pop %eax
109e75: 5a pop %edx
109e76: 68 1c 6b 12 00 push $0x126b1c
109e7b: 68 20 63 12 00 push $0x126320
109e80: e8 ab 31 00 00 call 10d030 <_Watchdog_Insert>
109e85: 83 c4 10 add $0x10,%esp
}
return remaining;
}
109e88: 89 d8 mov %ebx,%eax
109e8a: 8d 65 f4 lea -0xc(%ebp),%esp
109e8d: 5b pop %ebx
109e8e: 5e pop %esi
109e8f: 5f pop %edi
109e90: c9 leave
109e91: c3 ret
00110d4c <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
110d4c: 55 push %ebp
110d4d: 89 e5 mov %esp,%ebp
110d4f: 57 push %edi
110d50: 56 push %esi
110d51: 53 push %ebx
110d52: 83 ec 58 sub $0x58,%esp
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
110d55: ff 75 08 pushl 0x8(%ebp)
110d58: e8 fe 62 ff ff call 10705b <rtems_filesystem_dirname>
110d5d: 89 c2 mov %eax,%edx
if ( parentpathlen == 0 )
110d5f: 83 c4 10 add $0x10,%esp
110d62: 85 c0 test %eax,%eax
110d64: 75 36 jne 110d9c <unlink+0x50>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
110d66: 8b 4d 08 mov 0x8(%ebp),%ecx
110d69: 8a 01 mov (%ecx),%al
110d6b: 3c 5c cmp $0x5c,%al
110d6d: 74 08 je 110d77 <unlink+0x2b> <== NEVER TAKEN
110d6f: 3c 2f cmp $0x2f,%al
110d71: 74 04 je 110d77 <unlink+0x2b>
110d73: 84 c0 test %al,%al
110d75: 75 0e jne 110d85 <unlink+0x39> <== ALWAYS TAKEN
110d77: 8d 7d d4 lea -0x2c(%ebp),%edi
110d7a: 8b 35 48 1f 12 00 mov 0x121f48,%esi
110d80: 83 c6 18 add $0x18,%esi
110d83: eb 0c jmp 110d91 <unlink+0x45>
110d85: 8d 7d d4 lea -0x2c(%ebp),%edi
110d88: 8b 35 48 1f 12 00 mov 0x121f48,%esi
110d8e: 83 c6 04 add $0x4,%esi
110d91: b9 05 00 00 00 mov $0x5,%ecx
110d96: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
110d98: 31 db xor %ebx,%ebx
110d9a: eb 27 jmp 110dc3 <unlink+0x77>
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
110d9c: 83 ec 0c sub $0xc,%esp
110d9f: 6a 00 push $0x0
110da1: 8d 45 d4 lea -0x2c(%ebp),%eax
110da4: 50 push %eax
110da5: 6a 02 push $0x2
110da7: 52 push %edx
110da8: ff 75 08 pushl 0x8(%ebp)
110dab: 89 55 b4 mov %edx,-0x4c(%ebp)
110dae: e8 95 63 ff ff call 107148 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
110db3: 83 c4 20 add $0x20,%esp
110db6: 85 c0 test %eax,%eax
110db8: 8b 55 b4 mov -0x4c(%ebp),%edx
110dbb: 0f 85 68 01 00 00 jne 110f29 <unlink+0x1dd> <== NEVER TAKEN
110dc1: b3 01 mov $0x1,%bl
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
110dc3: 8d 7d c0 lea -0x40(%ebp),%edi
110dc6: 8d 75 d4 lea -0x2c(%ebp),%esi
110dc9: b9 05 00 00 00 mov $0x5,%ecx
110dce: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = path + parentpathlen;
110dd0: 8b 75 08 mov 0x8(%ebp),%esi
110dd3: 01 d6 add %edx,%esi
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
110dd5: 83 c9 ff or $0xffffffff,%ecx
110dd8: 89 f7 mov %esi,%edi
110dda: 31 c0 xor %eax,%eax
110ddc: f2 ae repnz scas %es:(%edi),%al
110dde: f7 d1 not %ecx
110de0: 49 dec %ecx
110de1: 52 push %edx
110de2: 52 push %edx
110de3: 51 push %ecx
110de4: 56 push %esi
110de5: e8 4a 62 ff ff call 107034 <rtems_filesystem_prefix_separators>
110dea: 01 c6 add %eax,%esi
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
110dec: 83 c9 ff or $0xffffffff,%ecx
110def: 89 f7 mov %esi,%edi
110df1: 31 c0 xor %eax,%eax
110df3: f2 ae repnz scas %es:(%edi),%al
110df5: f7 d1 not %ecx
110df7: 49 dec %ecx
110df8: c7 04 24 00 00 00 00 movl $0x0,(%esp)
110dff: 8d 7d c0 lea -0x40(%ebp),%edi
110e02: 57 push %edi
110e03: 6a 00 push $0x0
110e05: 51 push %ecx
110e06: 56 push %esi
110e07: e8 82 62 ff ff call 10708e <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
110e0c: 83 c4 20 add $0x20,%esp
110e0f: 85 c0 test %eax,%eax
110e11: 74 2f je 110e42 <unlink+0xf6>
if ( free_parentloc )
110e13: 84 db test %bl,%bl
110e15: 0f 84 0e 01 00 00 je 110f29 <unlink+0x1dd> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
110e1b: 8b 45 e0 mov -0x20(%ebp),%eax
110e1e: 85 c0 test %eax,%eax
110e20: 0f 84 03 01 00 00 je 110f29 <unlink+0x1dd> <== NEVER TAKEN
110e26: 8b 40 1c mov 0x1c(%eax),%eax
110e29: 85 c0 test %eax,%eax
110e2b: 0f 84 f8 00 00 00 je 110f29 <unlink+0x1dd> <== NEVER TAKEN
110e31: 83 ec 0c sub $0xc,%esp
110e34: 8d 55 d4 lea -0x2c(%ebp),%edx
110e37: 52 push %edx
110e38: ff d0 call *%eax
110e3a: 83 ce ff or $0xffffffff,%esi
110e3d: e9 e2 00 00 00 jmp 110f24 <unlink+0x1d8>
return -1;
}
if ( !loc.ops->node_type_h ) {
110e42: 8b 55 cc mov -0x34(%ebp),%edx
110e45: 8b 42 10 mov 0x10(%edx),%eax
110e48: 85 c0 test %eax,%eax
110e4a: 75 05 jne 110e51 <unlink+0x105> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
110e4c: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
110e4f: eb 5b jmp 110eac <unlink+0x160> <== NOT EXECUTED
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
110e51: 83 ec 0c sub $0xc,%esp
110e54: 57 push %edi
110e55: ff d0 call *%eax
110e57: 83 c4 10 add $0x10,%esp
110e5a: 48 dec %eax
110e5b: 8b 45 cc mov -0x34(%ebp),%eax
110e5e: 75 42 jne 110ea2 <unlink+0x156>
rtems_filesystem_freenode( &loc );
110e60: 85 c0 test %eax,%eax
110e62: 74 10 je 110e74 <unlink+0x128> <== NEVER TAKEN
110e64: 8b 40 1c mov 0x1c(%eax),%eax
110e67: 85 c0 test %eax,%eax
110e69: 74 09 je 110e74 <unlink+0x128> <== NEVER TAKEN
110e6b: 83 ec 0c sub $0xc,%esp
110e6e: 57 push %edi
110e6f: ff d0 call *%eax
110e71: 83 c4 10 add $0x10,%esp
if ( free_parentloc )
110e74: 84 db test %bl,%bl
110e76: 74 1a je 110e92 <unlink+0x146> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
110e78: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
110e7b: 85 c0 test %eax,%eax <== NOT EXECUTED
110e7d: 74 13 je 110e92 <unlink+0x146> <== NOT EXECUTED
110e7f: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
110e82: 85 c0 test %eax,%eax <== NOT EXECUTED
110e84: 74 0c je 110e92 <unlink+0x146> <== NOT EXECUTED
110e86: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110e89: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
110e8c: 52 push %edx <== NOT EXECUTED
110e8d: ff d0 call *%eax <== NOT EXECUTED
110e8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
110e92: e8 6d 05 00 00 call 111404 <__errno>
110e97: c7 00 15 00 00 00 movl $0x15,(%eax)
110e9d: e9 87 00 00 00 jmp 110f29 <unlink+0x1dd>
}
if ( !loc.ops->unlink_h ) {
110ea2: 8b 50 0c mov 0xc(%eax),%edx
110ea5: 85 d2 test %edx,%edx
110ea7: 75 3b jne 110ee4 <unlink+0x198> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
110ea9: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
110eac: 85 c0 test %eax,%eax <== NOT EXECUTED
110eae: 74 09 je 110eb9 <unlink+0x16d> <== NOT EXECUTED
110eb0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110eb3: 57 push %edi <== NOT EXECUTED
110eb4: ff d0 call *%eax <== NOT EXECUTED
110eb6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( free_parentloc )
110eb9: 84 db test %bl,%bl <== NOT EXECUTED
110ebb: 74 1a je 110ed7 <unlink+0x18b> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
110ebd: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
110ec0: 85 c0 test %eax,%eax <== NOT EXECUTED
110ec2: 74 13 je 110ed7 <unlink+0x18b> <== NOT EXECUTED
110ec4: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
110ec7: 85 c0 test %eax,%eax <== NOT EXECUTED
110ec9: 74 0c je 110ed7 <unlink+0x18b> <== NOT EXECUTED
110ecb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110ece: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
110ed1: 52 push %edx <== NOT EXECUTED
110ed2: ff d0 call *%eax <== NOT EXECUTED
110ed4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
110ed7: e8 28 05 00 00 call 111404 <__errno> <== NOT EXECUTED
110edc: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
110ee2: eb 45 jmp 110f29 <unlink+0x1dd> <== NOT EXECUTED
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
110ee4: 50 push %eax
110ee5: 50 push %eax
110ee6: 57 push %edi
110ee7: 8d 45 d4 lea -0x2c(%ebp),%eax
110eea: 50 push %eax
110eeb: ff d2 call *%edx
110eed: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &loc );
110eef: 8b 45 cc mov -0x34(%ebp),%eax
110ef2: 83 c4 10 add $0x10,%esp
110ef5: 85 c0 test %eax,%eax
110ef7: 74 10 je 110f09 <unlink+0x1bd> <== NEVER TAKEN
110ef9: 8b 40 1c mov 0x1c(%eax),%eax
110efc: 85 c0 test %eax,%eax
110efe: 74 09 je 110f09 <unlink+0x1bd> <== NEVER TAKEN
110f00: 83 ec 0c sub $0xc,%esp
110f03: 57 push %edi
110f04: ff d0 call *%eax
110f06: 83 c4 10 add $0x10,%esp
if ( free_parentloc )
110f09: 84 db test %bl,%bl
110f0b: 74 1f je 110f2c <unlink+0x1e0>
rtems_filesystem_freenode( &parentloc );
110f0d: 8b 45 e0 mov -0x20(%ebp),%eax
110f10: 85 c0 test %eax,%eax
110f12: 74 18 je 110f2c <unlink+0x1e0> <== NEVER TAKEN
110f14: 8b 40 1c mov 0x1c(%eax),%eax
110f17: 85 c0 test %eax,%eax
110f19: 74 11 je 110f2c <unlink+0x1e0> <== NEVER TAKEN
110f1b: 83 ec 0c sub $0xc,%esp
110f1e: 8d 55 d4 lea -0x2c(%ebp),%edx
110f21: 52 push %edx
110f22: ff d0 call *%eax
110f24: 83 c4 10 add $0x10,%esp
110f27: eb 03 jmp 110f2c <unlink+0x1e0>
110f29: 83 ce ff or $0xffffffff,%esi
return result;
}
110f2c: 89 f0 mov %esi,%eax
110f2e: 8d 65 f4 lea -0xc(%ebp),%esp
110f31: 5b pop %ebx
110f32: 5e pop %esi
110f33: 5f pop %edi
110f34: c9 leave
110f35: c3 ret
0010cbec <unmount>:
*/
int unmount(
const char *path
)
{
10cbec: 55 push %ebp
10cbed: 89 e5 mov %esp,%ebp
10cbef: 57 push %edi
10cbf0: 56 push %esi
10cbf1: 53 push %ebx
10cbf2: 83 ec 38 sub $0x38,%esp
10cbf5: 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 ) )
10cbf8: 31 c0 xor %eax,%eax
10cbfa: 83 c9 ff or $0xffffffff,%ecx
10cbfd: 89 d7 mov %edx,%edi
10cbff: f2 ae repnz scas %es:(%edi),%al
10cc01: f7 d1 not %ecx
10cc03: 49 dec %ecx
10cc04: 6a 01 push $0x1
10cc06: 8d 75 d4 lea -0x2c(%ebp),%esi
10cc09: 56 push %esi
10cc0a: 6a 00 push $0x0
10cc0c: 51 push %ecx
10cc0d: 52 push %edx
10cc0e: e8 79 cd ff ff call 10998c <rtems_filesystem_evaluate_path>
10cc13: 83 c4 20 add $0x20,%esp
10cc16: 85 c0 test %eax,%eax
10cc18: 0f 85 0f 01 00 00 jne 10cd2d <unmount+0x141> <== NEVER TAKEN
return -1;
mt_entry = loc.mt_entry;
10cc1e: 8b 5d e4 mov -0x1c(%ebp),%ebx
fs_mount_loc = &mt_entry->mt_point_node;
fs_root_loc = &mt_entry->mt_fs_root;
10cc21: 8b 43 1c mov 0x1c(%ebx),%eax
10cc24: 3b 45 d4 cmp -0x2c(%ebp),%eax
10cc27: 8b 45 e0 mov -0x20(%ebp),%eax
10cc2a: 74 24 je 10cc50 <unmount+0x64>
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){
rtems_filesystem_freenode( &loc );
10cc2c: 85 c0 test %eax,%eax
10cc2e: 74 10 je 10cc40 <unmount+0x54> <== NEVER TAKEN
10cc30: 8b 40 1c mov 0x1c(%eax),%eax
10cc33: 85 c0 test %eax,%eax
10cc35: 74 09 je 10cc40 <unmount+0x54> <== NEVER TAKEN
10cc37: 83 ec 0c sub $0xc,%esp
10cc3a: 56 push %esi
10cc3b: ff d0 call *%eax
10cc3d: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EACCES );
10cc40: e8 0b 89 00 00 call 115550 <__errno>
10cc45: c7 00 0d 00 00 00 movl $0xd,(%eax)
10cc4b: e9 dd 00 00 00 jmp 10cd2d <unmount+0x141>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
10cc50: 85 c0 test %eax,%eax
10cc52: 74 10 je 10cc64 <unmount+0x78> <== NEVER TAKEN
10cc54: 8b 40 1c mov 0x1c(%eax),%eax
10cc57: 85 c0 test %eax,%eax
10cc59: 74 09 je 10cc64 <unmount+0x78> <== NEVER TAKEN
10cc5b: 83 ec 0c sub $0xc,%esp
10cc5e: 56 push %esi
10cc5f: ff d0 call *%eax
10cc61: 83 c4 10 add $0x10,%esp
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;
10cc64: 8b 43 14 mov 0x14(%ebx),%eax
10cc67: 83 78 28 00 cmpl $0x0,0x28(%eax)
10cc6b: 74 09 je 10cc76 <unmount+0x8a> <== NEVER TAKEN
fs_root_loc = &mt_entry->mt_fs_root;
10cc6d: 8b 43 28 mov 0x28(%ebx),%eax
10cc70: 83 78 2c 00 cmpl $0x0,0x2c(%eax)
10cc74: 75 10 jne 10cc86 <unmount+0x9a> <== ALWAYS TAKEN
if ( !fs_mount_loc->ops->unmount_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
10cc76: e8 d5 88 00 00 call 115550 <__errno> <== NOT EXECUTED
10cc7b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10cc81: e9 a7 00 00 00 jmp 10cd2d <unmount+0x141> <== NOT EXECUTED
* 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 )
10cc86: a1 68 8f 12 00 mov 0x128f68,%eax
10cc8b: 39 58 14 cmp %ebx,0x14(%eax)
10cc8e: 74 1d je 10ccad <unmount+0xc1>
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
10cc90: a1 d4 b9 12 00 mov 0x12b9d4,%eax
10cc95: eb 0a jmp 10cca1 <unmount+0xb5>
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;
fs_root_loc = &mt_entry->mt_fs_root;
10cc97: 8b 50 18 mov 0x18(%eax),%edx
10cc9a: 3b 53 2c cmp 0x2c(%ebx),%edx
10cc9d: 74 0e je 10ccad <unmount+0xc1>
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
10cc9f: 8b 00 mov (%eax),%eax
10cca1: 3d d8 b9 12 00 cmp $0x12b9d8,%eax
10cca6: 75 ef jne 10cc97 <unmount+0xab>
10cca8: e9 8b 00 00 00 jmp 10cd38 <unmount+0x14c>
* 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 )
rtems_set_errno_and_return_minus_one( EBUSY );
10ccad: e8 9e 88 00 00 call 115550 <__errno>
10ccb2: c7 00 10 00 00 00 movl $0x10,(%eax)
10ccb8: eb 73 jmp 10cd2d <unmount+0x141>
* 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 )
10ccba: 83 ec 0c sub $0xc,%esp
10ccbd: 8b 43 14 mov 0x14(%ebx),%eax
10ccc0: 53 push %ebx
10ccc1: ff 50 28 call *0x28(%eax)
10ccc4: 83 c4 10 add $0x10,%esp
10ccc7: 85 c0 test %eax,%eax
10ccc9: 75 62 jne 10cd2d <unmount+0x141> <== 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){
10cccb: 83 ec 0c sub $0xc,%esp
10ccce: 8b 43 28 mov 0x28(%ebx),%eax
10ccd1: 53 push %ebx
10ccd2: ff 50 2c call *0x2c(%eax)
10ccd5: 83 c4 10 add $0x10,%esp
10ccd8: 85 c0 test %eax,%eax
10ccda: 74 1b je 10ccf7 <unmount+0x10b> <== ALWAYS TAKEN
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
10ccdc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ccdf: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10cce2: 53 push %ebx <== NOT EXECUTED
10cce3: ff 50 20 call *0x20(%eax) <== NOT EXECUTED
10cce6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10cce9: 85 c0 test %eax,%eax <== NOT EXECUTED
10cceb: 74 40 je 10cd2d <unmount+0x141> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
10cced: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ccf0: 6a 00 push $0x0 <== NOT EXECUTED
10ccf2: e8 6d 10 00 00 call 10dd64 <rtems_fatal_error_occurred><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10ccf7: 83 ec 0c sub $0xc,%esp
10ccfa: 53 push %ebx
10ccfb: e8 2c 13 00 00 call 10e02c <_Chain_Extract>
/*
* 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 );
10cd00: 8b 43 14 mov 0x14(%ebx),%eax
10cd03: 83 c4 10 add $0x10,%esp
10cd06: 85 c0 test %eax,%eax
10cd08: 74 13 je 10cd1d <unmount+0x131> <== NEVER TAKEN
10cd0a: 8b 40 1c mov 0x1c(%eax),%eax
10cd0d: 85 c0 test %eax,%eax
10cd0f: 74 0c je 10cd1d <unmount+0x131> <== NEVER TAKEN
10cd11: 83 ec 0c sub $0xc,%esp
10cd14: 8d 53 08 lea 0x8(%ebx),%edx
10cd17: 52 push %edx
10cd18: ff d0 call *%eax
10cd1a: 83 c4 10 add $0x10,%esp
free( mt_entry );
10cd1d: 83 ec 0c sub $0xc,%esp
10cd20: 53 push %ebx
10cd21: e8 0e cd ff ff call 109a34 <free>
10cd26: 31 c0 xor %eax,%eax
return 0;
10cd28: 83 c4 10 add $0x10,%esp
10cd2b: eb 03 jmp 10cd30 <unmount+0x144>
10cd2d: 83 c8 ff or $0xffffffff,%eax
}
10cd30: 8d 65 f4 lea -0xc(%ebp),%esp
10cd33: 5b pop %ebx
10cd34: 5e pop %esi
10cd35: 5f pop %edi
10cd36: c9 leave
10cd37: c3 ret
* 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 )
10cd38: 83 ec 0c sub $0xc,%esp
10cd3b: 53 push %ebx
10cd3c: e8 05 cf ff ff call 109c46 <rtems_libio_is_open_files_in_fs>
10cd41: 83 c4 10 add $0x10,%esp
10cd44: 48 dec %eax
10cd45: 0f 85 6f ff ff ff jne 10ccba <unmount+0xce>
10cd4b: e9 5d ff ff ff jmp 10ccad <unmount+0xc1>
0010ad0c <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
10ad0c: 55 push %ebp
10ad0d: 89 e5 mov %esp,%ebp
10ad0f: 57 push %edi
10ad10: 56 push %esi
10ad11: 53 push %ebx
10ad12: 83 ec 38 sub $0x38,%esp
10ad15: 8b 55 08 mov 0x8(%ebp),%edx
10ad18: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t temp_loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
10ad1b: 31 c0 xor %eax,%eax
10ad1d: 83 c9 ff or $0xffffffff,%ecx
10ad20: 89 d7 mov %edx,%edi
10ad22: f2 ae repnz scas %es:(%edi),%al
10ad24: f7 d1 not %ecx
10ad26: 49 dec %ecx
10ad27: 6a 01 push $0x1
10ad29: 8d 75 d4 lea -0x2c(%ebp),%esi
10ad2c: 56 push %esi
10ad2d: 6a 00 push $0x0
10ad2f: 51 push %ecx
10ad30: 52 push %edx
10ad31: e8 42 d1 ff ff call 107e78 <rtems_filesystem_evaluate_path>
10ad36: 83 c4 20 add $0x20,%esp
10ad39: 83 cf ff or $0xffffffff,%edi
10ad3c: 85 c0 test %eax,%eax
10ad3e: 75 4f jne 10ad8f <utime+0x83>
return -1;
if ( !temp_loc.ops->utime_h ){
10ad40: 8b 55 e0 mov -0x20(%ebp),%edx
10ad43: 8b 42 30 mov 0x30(%edx),%eax
10ad46: 85 c0 test %eax,%eax
10ad48: 75 20 jne 10ad6a <utime+0x5e> <== ALWAYS TAKEN
rtems_filesystem_freenode( &temp_loc );
10ad4a: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
10ad4d: 85 c0 test %eax,%eax <== NOT EXECUTED
10ad4f: 74 09 je 10ad5a <utime+0x4e> <== NOT EXECUTED
10ad51: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ad54: 56 push %esi <== NOT EXECUTED
10ad55: ff d0 call *%eax <== NOT EXECUTED
10ad57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10ad5a: e8 35 88 00 00 call 113594 <__errno> <== NOT EXECUTED
10ad5f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10ad65: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED
10ad68: eb 25 jmp 10ad8f <utime+0x83> <== NOT EXECUTED
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
10ad6a: 52 push %edx
10ad6b: ff 73 04 pushl 0x4(%ebx)
10ad6e: ff 33 pushl (%ebx)
10ad70: 56 push %esi
10ad71: ff d0 call *%eax
10ad73: 89 c7 mov %eax,%edi
rtems_filesystem_freenode( &temp_loc );
10ad75: 8b 45 e0 mov -0x20(%ebp),%eax
10ad78: 83 c4 10 add $0x10,%esp
10ad7b: 85 c0 test %eax,%eax
10ad7d: 74 10 je 10ad8f <utime+0x83> <== NEVER TAKEN
10ad7f: 8b 40 1c mov 0x1c(%eax),%eax
10ad82: 85 c0 test %eax,%eax
10ad84: 74 09 je 10ad8f <utime+0x83> <== NEVER TAKEN
10ad86: 83 ec 0c sub $0xc,%esp
10ad89: 56 push %esi
10ad8a: ff d0 call *%eax
10ad8c: 83 c4 10 add $0x10,%esp
return result;
}
10ad8f: 89 f8 mov %edi,%eax
10ad91: 8d 65 f4 lea -0xc(%ebp),%esp
10ad94: 5b pop %ebx
10ad95: 5e pop %esi
10ad96: 5f pop %edi
10ad97: c9 leave
10ad98: c3 ret
00109728 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
109728: 55 push %ebp
109729: 89 e5 mov %esp,%ebp
10972b: 57 push %edi
10972c: 56 push %esi
10972d: 53 push %ebx
10972e: 83 ec 4c sub $0x4c,%esp
109731: 8b 5d 08 mov 0x8(%ebp),%ebx
109734: 8b 75 0c mov 0xc(%ebp),%esi
for (; *fmt != '\0'; fmt++) {
109737: e9 58 02 00 00 jmp 109994 <vprintk+0x26c>
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
10973c: 3c 25 cmp $0x25,%al
10973e: 74 0c je 10974c <vprintk+0x24>
BSP_output_char(*fmt);
109740: 83 ec 0c sub $0xc,%esp
109743: 0f be c0 movsbl %al,%eax
109746: 50 push %eax
109747: e9 52 01 00 00 jmp 10989e <vprintk+0x176>
continue;
}
fmt++;
10974c: 43 inc %ebx
if (*fmt == '0' ) {
10974d: c6 45 c4 20 movb $0x20,-0x3c(%ebp)
109751: 80 3b 30 cmpb $0x30,(%ebx)
109754: 75 05 jne 10975b <vprintk+0x33>
lead = '0';
fmt++;
109756: 43 inc %ebx
109757: c6 45 c4 30 movb $0x30,-0x3c(%ebp)
}
if (*fmt == '-' ) {
10975b: 31 c9 xor %ecx,%ecx
10975d: 80 3b 2d cmpb $0x2d,(%ebx)
109760: 75 03 jne 109765 <vprintk+0x3d>
minus = true;
fmt++;
109762: 43 inc %ebx
109763: b1 01 mov $0x1,%cl
109765: 31 ff xor %edi,%edi
109767: eb 0b jmp 109774 <vprintk+0x4c>
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
109769: 6b ff 0a imul $0xa,%edi,%edi
width += ((unsigned) *fmt - '0');
10976c: 0f be d2 movsbl %dl,%edx
10976f: 8d 7c 17 d0 lea -0x30(%edi,%edx,1),%edi
fmt++;
109773: 43 inc %ebx
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
109774: 8a 13 mov (%ebx),%dl
109776: 8d 42 d0 lea -0x30(%edx),%eax
109779: 3c 09 cmp $0x9,%al
10977b: 76 ec jbe 109769 <vprintk+0x41>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
10977d: c6 45 c0 00 movb $0x0,-0x40(%ebp)
109781: 80 fa 6c cmp $0x6c,%dl
109784: 75 07 jne 10978d <vprintk+0x65>
lflag = true;
c = *++fmt;
109786: 43 inc %ebx
109787: 8a 13 mov (%ebx),%dl
109789: c6 45 c0 01 movb $0x1,-0x40(%ebp)
}
if ( c == 'c' ) {
10978d: 80 fa 63 cmp $0x63,%dl
109790: 75 17 jne 1097a9 <vprintk+0x81>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
109792: 8d 7e 04 lea 0x4(%esi),%edi
BSP_output_char(chr);
109795: 83 ec 0c sub $0xc,%esp
109798: 0f be 06 movsbl (%esi),%eax
10979b: 50 push %eax
10979c: ff 15 5c 02 12 00 call *0x12025c
1097a2: 89 fe mov %edi,%esi
1097a4: e9 fb 00 00 00 jmp 1098a4 <vprintk+0x17c>
continue;
}
if ( c == 's' ) {
1097a9: 80 fa 73 cmp $0x73,%dl
1097ac: 0f 85 99 00 00 00 jne 10984b <vprintk+0x123>
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
1097b2: 8d 46 04 lea 0x4(%esi),%eax
1097b5: 89 45 c4 mov %eax,-0x3c(%ebp)
1097b8: 8b 06 mov (%esi),%eax
if ( str == NULL ) {
1097ba: 85 c0 test %eax,%eax
1097bc: 75 05 jne 1097c3 <vprintk+0x9b>
1097be: b8 fe e6 11 00 mov $0x11e6fe,%eax
1097c3: 31 f6 xor %esi,%esi
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
1097c5: eb 01 jmp 1097c8 <vprintk+0xa0>
1097c7: 46 inc %esi
1097c8: 80 3c 30 00 cmpb $0x0,(%eax,%esi,1)
1097cc: 75 f9 jne 1097c7 <vprintk+0x9f>
;
/* leading spaces */
if ( !minus )
1097ce: 89 f2 mov %esi,%edx
1097d0: 84 c9 test %cl,%cl
1097d2: 74 23 je 1097f7 <vprintk+0xcf>
1097d4: eb 25 jmp 1097fb <vprintk+0xd3>
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
1097d6: 83 ec 0c sub $0xc,%esp
1097d9: 6a 20 push $0x20
1097db: 89 45 b0 mov %eax,-0x50(%ebp)
1097de: 89 55 a8 mov %edx,-0x58(%ebp)
1097e1: 88 4d ac mov %cl,-0x54(%ebp)
1097e4: ff 15 5c 02 12 00 call *0x12025c
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
1097ea: 8b 55 a8 mov -0x58(%ebp),%edx
1097ed: 42 inc %edx
1097ee: 83 c4 10 add $0x10,%esp
1097f1: 8b 45 b0 mov -0x50(%ebp),%eax
1097f4: 8a 4d ac mov -0x54(%ebp),%cl
1097f7: 39 fa cmp %edi,%edx
1097f9: 72 db jb 1097d6 <vprintk+0xae>
BSP_output_char(' ');
/* no width option */
if (width == 0) {
1097fb: 85 ff test %edi,%edi
1097fd: 75 02 jne 109801 <vprintk+0xd9>
1097ff: 89 f7 mov %esi,%edi
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
109801: 85 ff test %edi,%edi
109803: 74 25 je 10982a <vprintk+0x102>
109805: eb 1d jmp 109824 <vprintk+0xfc>
BSP_output_char(*str);
109807: 83 ec 0c sub $0xc,%esp
10980a: 0f be d2 movsbl %dl,%edx
10980d: 52 push %edx
10980e: 89 45 b0 mov %eax,-0x50(%ebp)
109811: 88 4d ac mov %cl,-0x54(%ebp)
109814: ff 15 5c 02 12 00 call *0x12025c
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10981a: 8b 45 b0 mov -0x50(%ebp),%eax
10981d: 40 inc %eax
10981e: 83 c4 10 add $0x10,%esp
109821: 8a 4d ac mov -0x54(%ebp),%cl
109824: 8a 10 mov (%eax),%dl
109826: 84 d2 test %dl,%dl
109828: 75 dd jne 109807 <vprintk+0xdf>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
10982a: 84 c9 test %cl,%cl
10982c: 75 14 jne 109842 <vprintk+0x11a>
10982e: e9 5d 01 00 00 jmp 109990 <vprintk+0x268>
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
109833: 83 ec 0c sub $0xc,%esp
109836: 6a 20 push $0x20
109838: ff 15 5c 02 12 00 call *0x12025c
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
10983e: 46 inc %esi
10983f: 83 c4 10 add $0x10,%esp
109842: 39 fe cmp %edi,%esi
109844: 72 ed jb 109833 <vprintk+0x10b>
109846: e9 45 01 00 00 jmp 109990 <vprintk+0x268>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
10984b: 80 fa 4f cmp $0x4f,%dl
10984e: 74 5c je 1098ac <vprintk+0x184>
109850: 80 fa 6f cmp $0x6f,%dl
109853: 74 57 je 1098ac <vprintk+0x184> <== NEVER TAKEN
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
109855: 80 fa 49 cmp $0x49,%dl
109858: 74 5b je 1098b5 <vprintk+0x18d>
10985a: 80 fa 69 cmp $0x69,%dl
10985d: 74 56 je 1098b5 <vprintk+0x18d>
10985f: 80 fa 44 cmp $0x44,%dl
109862: 74 51 je 1098b5 <vprintk+0x18d>
109864: 80 fa 64 cmp $0x64,%dl
109867: 74 4c je 1098b5 <vprintk+0x18d>
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
109869: 80 fa 55 cmp $0x55,%dl
10986c: 74 05 je 109873 <vprintk+0x14b>
10986e: 80 fa 75 cmp $0x75,%dl
109871: 75 04 jne 109877 <vprintk+0x14f>
109873: 31 d2 xor %edx,%edx
109875: eb 40 jmp 1098b7 <vprintk+0x18f>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
109877: 80 fa 58 cmp $0x58,%dl
10987a: 74 05 je 109881 <vprintk+0x159>
10987c: 80 fa 78 cmp $0x78,%dl
10987f: 75 04 jne 109885 <vprintk+0x15d>
109881: 31 d2 xor %edx,%edx
109883: eb 0b jmp 109890 <vprintk+0x168>
base = 16; sign = false;
} else if ( c == 'p' ) {
109885: 80 fa 70 cmp $0x70,%dl
109888: 75 0d jne 109897 <vprintk+0x16f>
10988a: 31 d2 xor %edx,%edx
10988c: c6 45 c0 01 movb $0x1,-0x40(%ebp)
109890: b9 10 00 00 00 mov $0x10,%ecx
109895: eb 25 jmp 1098bc <vprintk+0x194>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
109897: 83 ec 0c sub $0xc,%esp
10989a: 0f be d2 movsbl %dl,%edx
10989d: 52 push %edx
10989e: ff 15 5c 02 12 00 call *0x12025c
continue;
1098a4: 83 c4 10 add $0x10,%esp
1098a7: e9 e7 00 00 00 jmp 109993 <vprintk+0x26b>
1098ac: 31 d2 xor %edx,%edx
1098ae: b9 08 00 00 00 mov $0x8,%ecx
1098b3: eb 07 jmp 1098bc <vprintk+0x194>
1098b5: b2 01 mov $0x1,%dl
1098b7: b9 0a 00 00 00 mov $0xa,%ecx
}
printNum(
1098bc: 0f be 45 c4 movsbl -0x3c(%ebp),%eax
1098c0: 89 45 b4 mov %eax,-0x4c(%ebp)
1098c3: 8d 46 04 lea 0x4(%esi),%eax
1098c6: 89 45 c4 mov %eax,-0x3c(%ebp)
1098c9: 8b 06 mov (%esi),%eax
1098cb: 8b 75 c4 mov -0x3c(%ebp),%esi
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
1098ce: 84 d2 test %dl,%dl
1098d0: 74 2b je 1098fd <vprintk+0x1d5>
1098d2: 85 c0 test %eax,%eax
1098d4: 79 27 jns 1098fd <vprintk+0x1d5>
BSP_output_char('-');
1098d6: 83 ec 0c sub $0xc,%esp
1098d9: 6a 2d push $0x2d
1098db: 89 45 b0 mov %eax,-0x50(%ebp)
1098de: 89 4d ac mov %ecx,-0x54(%ebp)
1098e1: ff 15 5c 02 12 00 call *0x12025c
unsigned_num = (unsigned long) -num;
1098e7: 8b 45 b0 mov -0x50(%ebp),%eax
1098ea: f7 d8 neg %eax
1098ec: 89 45 c4 mov %eax,-0x3c(%ebp)
if (maxwidth) maxwidth--;
1098ef: 83 c4 10 add $0x10,%esp
1098f2: 83 ff 01 cmp $0x1,%edi
1098f5: 83 d7 ff adc $0xffffffff,%edi
1098f8: 8b 4d ac mov -0x54(%ebp),%ecx
1098fb: eb 03 jmp 109900 <vprintk+0x1d8>
} else {
unsigned_num = (unsigned long) num;
1098fd: 89 45 c4 mov %eax,-0x3c(%ebp)
109900: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp)
109907: eb 1f jmp 109928 <vprintk+0x200>
}
count = 0;
while ((n = unsigned_num / base) > 0) {
toPrint[count++] = (char) (unsigned_num - (n * base));
109909: 8a 45 bc mov -0x44(%ebp),%al
10990c: f6 e1 mul %cl
10990e: 8a 55 c4 mov -0x3c(%ebp),%dl
109911: 28 c2 sub %al,%dl
109913: 88 d0 mov %dl,%al
109915: 8b 55 c0 mov -0x40(%ebp),%edx
109918: 88 44 15 d4 mov %al,-0x2c(%ebp,%edx,1)
10991c: 8b 45 b8 mov -0x48(%ebp),%eax
10991f: 89 45 c0 mov %eax,-0x40(%ebp)
109922: 8b 55 bc mov -0x44(%ebp),%edx
109925: 89 55 c4 mov %edx,-0x3c(%ebp)
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
109928: 8b 45 c4 mov -0x3c(%ebp),%eax
10992b: 31 d2 xor %edx,%edx
10992d: f7 f1 div %ecx
10992f: 89 45 bc mov %eax,-0x44(%ebp)
109932: 85 c0 test %eax,%eax
109934: 8b 55 c0 mov -0x40(%ebp),%edx
109937: 8d 52 01 lea 0x1(%edx),%edx
10993a: 89 55 b8 mov %edx,-0x48(%ebp)
10993d: 75 ca jne 109909 <vprintk+0x1e1>
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
10993f: 8a 45 c4 mov -0x3c(%ebp),%al
109942: 8b 55 c0 mov -0x40(%ebp),%edx
109945: 88 44 15 d4 mov %al,-0x2c(%ebp,%edx,1)
109949: eb 10 jmp 10995b <vprintk+0x233>
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
10994b: 83 ec 0c sub $0xc,%esp
10994e: ff 75 b4 pushl -0x4c(%ebp)
109951: ff 15 5c 02 12 00 call *0x12025c
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
109957: 4f dec %edi
109958: 83 c4 10 add $0x10,%esp
10995b: 3b 7d b8 cmp -0x48(%ebp),%edi
10995e: 77 eb ja 10994b <vprintk+0x223>
109960: 8d 45 d4 lea -0x2c(%ebp),%eax
109963: 03 45 c0 add -0x40(%ebp),%eax
109966: 31 ff xor %edi,%edi
109968: eb 1f jmp 109989 <vprintk+0x261>
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
10996a: 83 ec 0c sub $0xc,%esp
10996d: 0f be 10 movsbl (%eax),%edx
109970: 0f be 92 ff e6 11 00 movsbl 0x11e6ff(%edx),%edx
109977: 52 push %edx
109978: 89 45 b0 mov %eax,-0x50(%ebp)
10997b: ff 15 5c 02 12 00 call *0x12025c
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
109981: 47 inc %edi
109982: 8b 45 b0 mov -0x50(%ebp),%eax
109985: 48 dec %eax
109986: 83 c4 10 add $0x10,%esp
109989: 3b 7d b8 cmp -0x48(%ebp),%edi
10998c: 72 dc jb 10996a <vprintk+0x242>
10998e: eb 03 jmp 109993 <vprintk+0x26b>
109990: 8b 75 c4 mov -0x3c(%ebp),%esi
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
109993: 43 inc %ebx
109994: 8a 03 mov (%ebx),%al
109996: 84 c0 test %al,%al
109998: 0f 85 9e fd ff ff jne 10973c <vprintk+0x14>
sign,
width,
lead
);
}
}
10999e: 8d 65 f4 lea -0xc(%ebp),%esp
1099a1: 5b pop %ebx
1099a2: 5e pop %esi
1099a3: 5f pop %edi
1099a4: c9 leave
1099a5: c3 ret
0011cae4 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
11cae4: 55 push %ebp
11cae5: 89 e5 mov %esp,%ebp
11cae7: 56 push %esi
11cae8: 53 push %ebx
11cae9: 8b 5d 08 mov 0x8(%ebp),%ebx
11caec: 8b 55 0c mov 0xc(%ebp),%edx
11caef: 8b 4d 10 mov 0x10(%ebp),%ecx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11caf2: 3b 1d 44 01 12 00 cmp 0x120144,%ebx
11caf8: 73 14 jae 11cb0e <write+0x2a> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
11cafa: c1 e3 06 shl $0x6,%ebx
11cafd: 03 1d 98 40 12 00 add 0x124098,%ebx
rtems_libio_check_is_open( iop );
11cb03: 8b 73 14 mov 0x14(%ebx),%esi
11cb06: f7 c6 00 01 00 00 test $0x100,%esi
11cb0c: 75 0d jne 11cb1b <write+0x37> <== ALWAYS TAKEN
11cb0e: e8 f1 48 ff ff call 111404 <__errno> <== NOT EXECUTED
11cb13: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
11cb19: eb 31 jmp 11cb4c <write+0x68> <== NOT EXECUTED
rtems_libio_check_buffer( buffer );
11cb1b: 85 d2 test %edx,%edx
11cb1d: 74 0b je 11cb2a <write+0x46> <== NEVER TAKEN
rtems_libio_check_count( count );
11cb1f: 31 c0 xor %eax,%eax
11cb21: 85 c9 test %ecx,%ecx
11cb23: 74 44 je 11cb69 <write+0x85>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
11cb25: 83 e6 04 and $0x4,%esi
11cb28: 75 0d jne 11cb37 <write+0x53> <== ALWAYS TAKEN
11cb2a: e8 d5 48 ff ff call 111404 <__errno> <== NOT EXECUTED
11cb2f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11cb35: eb 15 jmp 11cb4c <write+0x68> <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
11cb37: 8b 43 3c mov 0x3c(%ebx),%eax
11cb3a: 8b 40 0c mov 0xc(%eax),%eax
11cb3d: 85 c0 test %eax,%eax
11cb3f: 75 10 jne 11cb51 <write+0x6d> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
11cb41: e8 be 48 ff ff call 111404 <__errno> <== NOT EXECUTED
11cb46: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
11cb4c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
11cb4f: eb 18 jmp 11cb69 <write+0x85> <== NOT EXECUTED
rc = (*iop->handlers->write_h)( iop, buffer, count );
11cb51: 56 push %esi
11cb52: 51 push %ecx
11cb53: 52 push %edx
11cb54: 53 push %ebx
11cb55: ff d0 call *%eax
if ( rc > 0 )
11cb57: 83 c4 10 add $0x10,%esp
11cb5a: 85 c0 test %eax,%eax
11cb5c: 7e 0b jle 11cb69 <write+0x85> <== NEVER TAKEN
iop->offset += rc;
11cb5e: 89 c1 mov %eax,%ecx
11cb60: c1 f9 1f sar $0x1f,%ecx
11cb63: 01 43 0c add %eax,0xc(%ebx)
11cb66: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
11cb69: 8d 65 f8 lea -0x8(%ebp),%esp
11cb6c: 5b pop %ebx
11cb6d: 5e pop %esi
11cb6e: c9 leave
11cb6f: c3 ret
0010abd0 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
10abd0: 55 push %ebp
10abd1: 89 e5 mov %esp,%ebp
10abd3: 57 push %edi
10abd4: 56 push %esi
10abd5: 53 push %ebx
10abd6: 83 ec 1c sub $0x1c,%esp
10abd9: 8b 75 08 mov 0x8(%ebp),%esi
10abdc: 8b 7d 0c mov 0xc(%ebp),%edi
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
10abdf: 3b 35 24 47 12 00 cmp 0x124724,%esi
10abe5: 73 11 jae 10abf8 <writev+0x28> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
10abe7: c1 e6 06 shl $0x6,%esi
10abea: 03 35 48 8e 12 00 add 0x128e48,%esi
rtems_libio_check_is_open( iop );
10abf0: 8b 46 14 mov 0x14(%esi),%eax
10abf3: f6 c4 01 test $0x1,%ah
10abf6: 75 10 jne 10ac08 <writev+0x38>
10abf8: e8 9f 86 00 00 call 11329c <__errno>
10abfd: c7 00 09 00 00 00 movl $0x9,(%eax)
10ac03: e9 a4 00 00 00 jmp 10acac <writev+0xdc>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
10ac08: a8 04 test $0x4,%al
10ac0a: 74 57 je 10ac63 <writev+0x93> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
10ac0c: 85 ff test %edi,%edi
10ac0e: 74 53 je 10ac63 <writev+0x93>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
10ac10: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10ac14: 7e 4d jle 10ac63 <writev+0x93>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
10ac16: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp)
10ac1d: 7f 44 jg 10ac63 <writev+0x93> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
10ac1f: 8b 46 3c mov 0x3c(%esi),%eax
10ac22: 83 78 0c 00 cmpl $0x0,0xc(%eax)
10ac26: 75 0d jne 10ac35 <writev+0x65> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
10ac28: e8 6f 86 00 00 call 11329c <__errno> <== NOT EXECUTED
10ac2d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10ac33: eb 77 jmp 10acac <writev+0xdc> <== NOT EXECUTED
10ac35: b2 01 mov $0x1,%dl
10ac37: 31 c0 xor %eax,%eax
10ac39: 31 c9 xor %ecx,%ecx
10ac3b: 89 75 e4 mov %esi,-0x1c(%ebp)
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
if ( !iov[v].iov_base )
10ac3e: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8)
10ac42: 74 1f je 10ac63 <writev+0x93>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
10ac44: 83 7c c7 04 00 cmpl $0x0,0x4(%edi,%eax,8)
10ac49: 0f 94 c3 sete %bl
10ac4c: f7 db neg %ebx
10ac4e: 21 da and %ebx,%edx
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
10ac50: 8b 74 c7 04 mov 0x4(%edi,%eax,8),%esi
10ac54: 8d 1c 31 lea (%ecx,%esi,1),%ebx
if ( total < old || total > SSIZE_MAX )
10ac57: 81 fb ff 7f 00 00 cmp $0x7fff,%ebx
10ac5d: 7f 04 jg 10ac63 <writev+0x93> <== NEVER TAKEN
10ac5f: 39 cb cmp %ecx,%ebx
10ac61: 7d 0d jge 10ac70 <writev+0xa0>
rtems_set_errno_and_return_minus_one( EINVAL );
10ac63: e8 34 86 00 00 call 11329c <__errno>
10ac68: c7 00 16 00 00 00 movl $0x16,(%eax)
10ac6e: eb 3c jmp 10acac <writev+0xdc>
* 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++ ) {
10ac70: 40 inc %eax
10ac71: 3b 45 10 cmp 0x10(%ebp),%eax
10ac74: 7d 04 jge 10ac7a <writev+0xaa>
10ac76: 89 d9 mov %ebx,%ecx
10ac78: eb c4 jmp 10ac3e <writev+0x6e>
10ac7a: 8b 75 e4 mov -0x1c(%ebp),%esi
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
10ac7d: 31 db xor %ebx,%ebx
10ac7f: 84 d2 test %dl,%dl
10ac81: 75 51 jne 10acd4 <writev+0x104>
10ac83: 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 )
10ac8a: 8b 55 e4 mov -0x1c(%ebp),%edx
10ac8d: 8b 44 d7 04 mov 0x4(%edi,%edx,8),%eax
10ac91: 85 c0 test %eax,%eax
10ac93: 74 34 je 10acc9 <writev+0xf9> <== NEVER TAKEN
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
10ac95: 52 push %edx
10ac96: 8b 56 3c mov 0x3c(%esi),%edx
10ac99: 50 push %eax
10ac9a: 8b 45 e4 mov -0x1c(%ebp),%eax
10ac9d: ff 34 c7 pushl (%edi,%eax,8)
10aca0: 56 push %esi
10aca1: ff 52 0c call *0xc(%edx)
if ( bytes < 0 )
10aca4: 83 c4 10 add $0x10,%esp
10aca7: 83 f8 00 cmp $0x0,%eax
10acaa: 7d 05 jge 10acb1 <writev+0xe1> <== ALWAYS TAKEN
10acac: 83 cb ff or $0xffffffff,%ebx
10acaf: eb 23 jmp 10acd4 <writev+0x104>
return -1;
if ( bytes > 0 ) {
10acb1: 74 0d je 10acc0 <writev+0xf0> <== NEVER TAKEN
iop->offset += bytes;
10acb3: 89 c1 mov %eax,%ecx
10acb5: c1 f9 1f sar $0x1f,%ecx
10acb8: 01 46 0c add %eax,0xc(%esi)
10acbb: 11 4e 10 adc %ecx,0x10(%esi)
total += bytes;
10acbe: 01 c3 add %eax,%ebx
}
if (bytes != iov[ v ].iov_len)
10acc0: 8b 55 e4 mov -0x1c(%ebp),%edx
10acc3: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax
10acc7: 75 0b jne 10acd4 <writev+0x104> <== NEVER TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
10acc9: ff 45 e4 incl -0x1c(%ebp)
10accc: 8b 45 10 mov 0x10(%ebp),%eax
10accf: 39 45 e4 cmp %eax,-0x1c(%ebp)
10acd2: 7c b6 jl 10ac8a <writev+0xba>
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10acd4: 89 d8 mov %ebx,%eax
10acd6: 8d 65 f4 lea -0xc(%ebp),%esp
10acd9: 5b pop %ebx
10acda: 5e pop %esi
10acdb: 5f pop %edi
10acdc: c9 leave
10acdd: c3 ret